GENIEGenerator
Loading...
Searching...
No Matches
genie::COHHadronicSystemGenerator Class Reference

Generates the f/s hadronic system in v COH pi production interactions. Is a concrete implementation of the EventRecordVisitorI interface. More...

#include <COHHadronicSystemGenerator.h>

Inheritance diagram for genie::COHHadronicSystemGenerator:
[legend]
Collaboration diagram for genie::COHHadronicSystemGenerator:
[legend]

Public Member Functions

 COHHadronicSystemGenerator ()
 COHHadronicSystemGenerator (string config)
 ~COHHadronicSystemGenerator ()
void ProcessEventRecord (GHepRecord *event_rec) const
void CalculateHadronicSystem_ReinSehgal (GHepRecord *event_rec) const
void CalculateHadronicSystem_BergerSehgal (GHepRecord *event_rec) const
void CalculateHadronicSystem_BergerSehgalFM (GHepRecord *event_rec) const
void CalculateHadronicSystem_AlvarezRuso (GHepRecord *event_rec) const
Public Member Functions inherited from genie::HadronicSystemGenerator
void AddTargetNucleusRemnant (GHepRecord *event_rec) const
void AddFinalHadronicSyst (GHepRecord *event_rec) const
void PreHadronTransportDecays (GHepRecord *event_rec) const
TLorentzVector Hadronic4pLAB (GHepRecord *event_rec) const
TLorentzVector MomentumTransferLAB (GHepRecord *event_rec) const
TVector3 HCM2LAB (GHepRecord *event_rec) const
int HadronShowerCharge (GHepRecord *event_rec) const
int ResonanceCharge (GHepRecord *event_rec) const
Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void Configure (const Registry &config)
virtual void Configure (string config)
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Private Member Functions

int getPionPDGCodeFromXclTag (const XclsTag &xcls_tag) const

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)
Protected Member Functions inherited from genie::HadronicSystemGenerator
 HadronicSystemGenerator ()
 HadronicSystemGenerator (string name)
 HadronicSystemGenerator (string name, string config)
 ~HadronicSystemGenerator ()
Protected Member Functions inherited from genie::EventRecordVisitorI
 EventRecordVisitorI ()
 EventRecordVisitorI (string name)
 EventRecordVisitorI (string name, string config)
Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.
Protected Attributes inherited from genie::HadronicSystemGenerator
const EventRecordVisitorIfPreINukeDecayer
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Detailed Description

Generates the f/s hadronic system in v COH pi production interactions. Is a concrete implementation of the EventRecordVisitorI interface.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n October 03, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 28 of file COHHadronicSystemGenerator.h.

Constructor & Destructor Documentation

◆ COHHadronicSystemGenerator() [1/2]

COHHadronicSystemGenerator::COHHadronicSystemGenerator ( )

Definition at line 35 of file COHHadronicSystemGenerator.cxx.

35 :
36 HadronicSystemGenerator("genie::COHHadronicSystemGenerator")
37{
38
39}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ COHHadronicSystemGenerator() [2/2]

COHHadronicSystemGenerator::COHHadronicSystemGenerator ( string config)

Definition at line 41 of file COHHadronicSystemGenerator.cxx.

41 :
42 HadronicSystemGenerator("genie::COHHadronicSystemGenerator", config)
43{
44
45}

References genie::HadronicSystemGenerator::HadronicSystemGenerator().

◆ ~COHHadronicSystemGenerator()

COHHadronicSystemGenerator::~COHHadronicSystemGenerator ( )

Definition at line 47 of file COHHadronicSystemGenerator.cxx.

48{
49
50}

Member Function Documentation

◆ CalculateHadronicSystem_AlvarezRuso()

void COHHadronicSystemGenerator::CalculateHadronicSystem_AlvarezRuso ( GHepRecord * event_rec) const

Definition at line 322 of file COHHadronicSystemGenerator.cxx.

323{
324 Interaction * interaction = evrec->Summary();
325 const Kinematics & kinematics = interaction -> Kine();
326 GHepParticle * nu = evrec->Probe();
327 GHepParticle * Ni = evrec->TargetNucleus();
328 GHepParticle * fsl = evrec->FinalStatePrimaryLepton();
329
330 // Pion
331 const TLorentzVector ppi = kinematics.HadSystP4();
332 const TVector3 ppi3 = ppi.Vect();
333 const double Epi = ppi.E();
334 int pion_pdgc=0;
335 if ( interaction->ProcInfo().IsWeakCC() ) {
336 if( nu->Pdg() > 0 ){ // neutrino
337 pion_pdgc = kPdgPiP;
338 }
339 else{ // anti-neutrino
340 pion_pdgc = kPdgPiM;
341 }
342 }
343 else if ( interaction->ProcInfo().IsWeakNC() ) {
344 pion_pdgc = kPdgPi0;
345 }
346 else{
347 LOG("COHHadronicSystemGeneratorAR", pFATAL)
348 << "Could not determine pion involved in interaction";
349 exit(1);
350 }
351
352 //
353 // Nucleus
354 int nucl_pdgc = Ni->Pdg(); // pdg of final nucleus same as the initial nucleus
355 double pxNf = nu->Px() + Ni->Px() - fsl->Px() - ppi3.Px();
356 double pyNf = nu->Py() + Ni->Py() - fsl->Py() - ppi3.Py();
357 double pzNf = nu->Pz() + Ni->Pz() - fsl->Pz() - ppi3.Pz();
358 double ENf = nu->E() + Ni->E() - fsl->E() - Epi;
359 //
360 // Both
361 const TLorentzVector & vtx = *(nu->X4());
362 int mom = evrec->TargetNucleusPosition();
363
364 //
365 // Fill the records
366 evrec->AddParticle(nucl_pdgc,kIStStableFinalState, mom,-1,-1,-1,
367 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
368
369 evrec->AddParticle(pion_pdgc,kIStStableFinalState, mom,-1,-1,-1,
370 ppi3.Px(), ppi3.Py(),ppi3.Pz(),Epi, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
371}
#define pFATAL
Definition Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
int Pdg(void) const
const TLorentzVector * X4(void) const
double Px(void) const
Get Px.
double E(void) const
Get energy.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
const ProcessInfo & ProcInfo(void) const
Definition Interaction.h:70
const TLorentzVector & HadSystP4(void) const
Definition Kinematics.h:66
bool IsWeakNC(void) const
bool IsWeakCC(void) const
const int kPdgPiM
Definition PDGCodes.h:159
@ kIStStableFinalState
Definition GHepStatus.h:30
const int kPdgPi0
Definition PDGCodes.h:160
const int kPdgPiP
Definition PDGCodes.h:158

References genie::GHepRecord::AddParticle(), genie::GHepParticle::E(), genie::GHepRecord::FinalStatePrimaryLepton(), genie::Kinematics::HadSystP4(), genie::ProcessInfo::IsWeakCC(), genie::ProcessInfo::IsWeakNC(), genie::kIStStableFinalState, genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, LOG, genie::GHepParticle::Pdg(), pFATAL, genie::GHepRecord::Probe(), genie::Interaction::ProcInfo(), genie::GHepParticle::Px(), genie::GHepParticle::Py(), genie::GHepParticle::Pz(), genie::GHepRecord::Summary(), genie::GHepRecord::TargetNucleus(), genie::GHepRecord::TargetNucleusPosition(), and genie::GHepParticle::X4().

Referenced by ProcessEventRecord().

◆ CalculateHadronicSystem_BergerSehgal()

void COHHadronicSystemGenerator::CalculateHadronicSystem_BergerSehgal ( GHepRecord * event_rec) const

Definition at line 88 of file COHHadronicSystemGenerator.cxx.

89{
90 // Treatment of the hadronic side is identical to Rein-Sehgal if we assume an infinite
91 // mass for the nucleus.
93}
void CalculateHadronicSystem_ReinSehgal(GHepRecord *event_rec) const

References CalculateHadronicSystem_ReinSehgal().

Referenced by ProcessEventRecord().

◆ CalculateHadronicSystem_BergerSehgalFM()

void COHHadronicSystemGenerator::CalculateHadronicSystem_BergerSehgalFM ( GHepRecord * event_rec) const

Definition at line 95 of file COHHadronicSystemGenerator.cxx.

96{
97 //
98 // This method generates the final state hadronic system (pion + nucleus) in
99 // COH interactions
100 //
101 RandomGen * rnd = RandomGen::Instance();
102
103 Interaction * interaction = evrec->Summary();
104 const XclsTag & xcls_tag = interaction->ExclTag();
105 const InitialState & init_state = interaction -> InitState();
106
107 //-- Access neutrino, initial nucleus and final state prim. lepton entries
108 GHepParticle * nu = evrec->Probe();
109 GHepParticle * Ni = evrec->TargetNucleus();
110 GHepParticle * fsl = evrec->FinalStatePrimaryLepton();
111 assert(nu);
112 assert(Ni);
113 assert(fsl);
114
115 const TLorentzVector & vtx = *(nu->X4());
116 const TLorentzVector & p4nu = *(nu ->P4());
117 const TLorentzVector & p4fsl = *(fsl->P4());
118
119 //-- Determine the pdg code of the final state pion & nucleus
120 int nucl_pdgc = Ni->Pdg(); // same as the initial nucleus
121 int pion_pdgc = getPionPDGCodeFromXclTag(xcls_tag);
122
123 //-- basic kinematic inputs
124 double E = nu->E();
125 double Q2 = interaction->Kine().Q2(true);
126 double y = interaction->Kine().y(true);
127 double t = interaction->Kine().t(true);
128 double MA = init_state.Tgt().Mass();
129 // double MA2 = TMath::Power(MA, 2.); // Unused
130 double mpi = PDGLibrary::Instance()->Find(pion_pdgc)->Mass();
131 double mpi2 = TMath::Power(mpi,2);
132
133 SLOG("COHHadronicVtx", pINFO)
134 << "Ev = "<< E << ", Q^2 = " << Q2
135 << ", y = " << y << ", t = " << t;
136
137 double Epi = y * E - t / (2 * MA);
138 double ppi2 = Epi * Epi - mpi2;
139 double ppi = ppi2 > 0.0 ? TMath::Sqrt(ppi2) : 0.0;
140
141 double costheta = (t - Q2 - mpi2) / (2 * ( (y *E - Epi) * Epi -
142 ppi * sqrt(TMath::Power(y * E - Epi, 2.) + t) ) );
143
144 if ((costheta > 1.0) || (costheta < -1.0)) {
145 SLOG("COHHadronicVtx", pERROR)
146 << "Unphysical pion angle!";
147 }
148
149 double sintheta = TMath::Sqrt(1 - costheta * costheta);
150
151 //-- first work in the c.m.s. frame
152 // double S = 2 * MA * nuh - Q2 + MA2;
153 // double S_2 = S >= 0 ? TMath::Sqrt(S) : 0.0; // TODO - Error here?
154 // double Pcm = MA * TMath::Sqrt( (nuh*nuh + Q2)/S );
155 // double Epi = (S + mpi2 - MA2)/(2 * S_2);
156 // double EAprime = (S - mpi2 + MA2)/(2 * S_2);
157 // double EA = (S + MA2 + Q2)/(2 * S_2);
158 // double PAprime2 = TMath::Power(EAprime,2.0) - MA2;
159 // double PAprime = TMath::Sqrt(PAprime2);
160 // double tA = TMath::Power((EAprime - EA),2.0) - TMath::Power(PAprime,2.0) -
161 // TMath::Power(Pcm, 2.0);
162 // double tB = 2 * Pcm * PAprime;
163 // double cosT = (t - tA)/tB;
164 // double sinT = TMath::Sqrt(1 - cosT*cosT);
165 // double PAz = PAprime * cosT;
166 // double PAperp = PAprime * sinT;
167 // double PPiz = -PAz;
168
169 // Randomize transverse components
170 double phi = 2 * kPi * rnd->RndHadro().Rndm();
171 double ppix = ppi * sintheta * TMath::Cos(phi);
172 double ppiy = ppi * sintheta * TMath::Sin(phi);
173 double ppiz = ppi * costheta;
174
175 // boost back to the lab frame
176 // double beta = TMath::Sqrt( nuh*nuh + Q2 )/(nuh + MA);
177 // double gamma = (nuh + MA)/TMath::Sqrt(S);
178 // double betagamma = beta * gamma;
179
180 // double epi = gamma*Epi + betagamma*PPiz;
181 // double ppiz = betagamma*Epi + gamma*PPiz;
182
183 // double ea = gamma*EAprime + betagamma*PAz;
184 // double paz = betagamma*EAprime + gamma*PAz;
185
186 // Now rotate so our axes are aligned with the lab instead of q
187 TLorentzVector q = p4nu - p4fsl;
188 TVector3 ppi3(ppix, ppiy, ppiz);
189 ppi3.RotateUz(q.Vect().Unit());
190
191 // Nucleus...
192 // TVector3 pa(PAx,PAy,paz);
193 // pa.RotateUz(q.Vect().Unit());
194
195 // now figure out the f/s nucleus 4-p
196
197 double pxNf = nu->Px() + Ni->Px() - fsl->Px() - ppi3.Px();
198 double pyNf = nu->Py() + Ni->Py() - fsl->Py() - ppi3.Py();
199 double pzNf = nu->Pz() + Ni->Pz() - fsl->Pz() - ppi3.Pz();
200 double ENf = nu->E() + Ni->E() - fsl->E() - Epi;
201
202 //-- Save the particles at the GHEP record
203
204 int mom = evrec->TargetNucleusPosition();
205
206 // Nucleus - need to balance overall 4-momentum
207 evrec->AddParticle(nucl_pdgc,kIStStableFinalState, mom,-1,-1,-1,
208 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
209
210 // evrec->AddParticle(
211 // nucl_pdgc,kIStStableFinalState, mom,-1,-1,-1,
212 // pa.Px(), pa.Py(), pa.Pz(), ea, 0, 0, 0, 0);
213
214 evrec->AddParticle(
215 pion_pdgc,kIStStableFinalState, mom,-1,-1,-1,
216 ppi3.Px(), ppi3.Py(), ppi3.Pz(), Epi, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
217}
#define pINFO
Definition Messenger.h:62
#define pERROR
Definition Messenger.h:59
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition Messenger.h:84
int getPionPDGCodeFromXclTag(const XclsTag &xcls_tag) const
const TLorentzVector * P4(void) const
const Target & Tgt(void) const
const XclsTag & ExclTag(void) const
Definition Interaction.h:72
const Kinematics & Kine(void) const
Definition Interaction.h:71
double Q2(bool selected=false) const
double t(bool selected=false) const
double y(bool selected=false) const
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
Definition RandomGen.h:53
static RandomGen * Instance()
Access instance.
Definition RandomGen.cxx:74
double Mass(void) const
Definition Target.cxx:224
double Q2(const Interaction *const i)

References genie::GHepRecord::AddParticle(), genie::GHepParticle::E(), genie::Interaction::ExclTag(), genie::GHepRecord::FinalStatePrimaryLepton(), genie::PDGLibrary::Find(), getPionPDGCodeFromXclTag(), genie::PDGLibrary::Instance(), genie::RandomGen::Instance(), genie::Interaction::Kine(), genie::kIStStableFinalState, genie::constants::kPi, genie::Target::Mass(), genie::GHepParticle::P4(), genie::GHepParticle::Pdg(), pERROR, pINFO, genie::GHepRecord::Probe(), genie::GHepParticle::Px(), genie::GHepParticle::Py(), genie::GHepParticle::Pz(), genie::Kinematics::Q2(), genie::RandomGen::RndHadro(), SLOG, genie::GHepRecord::Summary(), genie::Kinematics::t(), genie::GHepRecord::TargetNucleus(), genie::GHepRecord::TargetNucleusPosition(), genie::InitialState::Tgt(), genie::GHepParticle::X4(), and genie::Kinematics::y().

Referenced by ProcessEventRecord().

◆ CalculateHadronicSystem_ReinSehgal()

void COHHadronicSystemGenerator::CalculateHadronicSystem_ReinSehgal ( GHepRecord * event_rec) const

Definition at line 219 of file COHHadronicSystemGenerator.cxx.

220{
221 //
222 // This method generates the final state hadronic system (pion + nucleus) in
223 // COH interactions
224 //
225 RandomGen * rnd = RandomGen::Instance();
226
227 Interaction * interaction = evrec->Summary();
228 const XclsTag & xcls_tag = interaction->ExclTag();
229
230 //-- Access neutrino, initial nucleus and final state prim. lepton entries
231 GHepParticle * nu = evrec->Probe();
232 GHepParticle * Ni = evrec->TargetNucleus();
233 GHepParticle * fsl = evrec->FinalStatePrimaryLepton();
234 assert(nu);
235 assert(Ni);
236 assert(fsl);
237
238 const TLorentzVector & vtx = *(nu->X4());
239 const TLorentzVector & p4nu = *(nu ->P4());
240 const TLorentzVector & p4fsl = *(fsl->P4());
241
242 //-- Determine the pdg code of the final state pion & nucleus
243 int nucl_pdgc = Ni->Pdg(); // same as the initial nucleus
244 int pion_pdgc = getPionPDGCodeFromXclTag(xcls_tag);
245
246 //-- basic kinematic inputs
247 double E = nu->E();
248 double M = kNucleonMass;
249 double mpi = PDGLibrary::Instance()->Find(pion_pdgc)->Mass();
250 double mpi2 = TMath::Power(mpi,2);
251 double xo = interaction->Kine().x(true);
252 double yo = interaction->Kine().y(true);
253 double to = interaction->Kine().t(true);
254
255 SLOG("COHHadronicVtx", pINFO)
256 << "Ev = "<< E << ", xo = " << xo
257 << ", yo = " << yo << ", to = " << to;
258
259 //-- compute pion energy and |momentum|
260 double Epi = yo * E;
261 double Epi2 = TMath::Power(Epi,2);
262 double ppi2 = Epi2-mpi2;
263 double ppi = TMath::Sqrt(TMath::Max(0.,ppi2));
264
265 SLOG("COHHadronicVtx", pINFO)
266 << "f/s pion E = " << Epi << ", |p| = " << ppi;
267 assert(Epi>mpi);
268
269 //-- 4-momentum transfer q=p(neutrino) - p(f/s lepton)
270 // Note: m^2 = q^2 < 0
271 // Also, since the nucleus is heavy all energy loss is comminicated to
272 // the outgoing pion Rein & Sehgal, Nucl.Phys.B223.29-44(1983), p.35
273
274 TLorentzVector q = p4nu - p4fsl;
275
276 SLOG("COHHadronicVtx", pINFO)
277 << "\n 4-p transfer q @ LAB: " << utils::print::P4AsString(&q);
278
279 //-- find angle theta between q and ppi (xi=costheta)
280 // note: t=|(ppi-q)^2|, Rein & Sehgal, Nucl.Phys.B223.29-44(1983), p.36
281
282 double xi = 1. + M*xo/Epi - 0.5*mpi2/Epi2 - 0.5*to/Epi2;
283 xi /= TMath::Sqrt((1.+2.*M*xo/Epi)*(1.-mpi2/Epi2));
284
285 double costheta = xi;
286 double sintheta = TMath::Sqrt(TMath::Max(0.,1.-xi*xi));
287
288 SLOG("COHHadronicVtx", pINFO) << "cos(pion, q) = " << costheta;
289
290 // compute transverse and longitudinal ppi components along q
291 double ppiL = ppi*costheta;
292 double ppiT = ppi*sintheta;
293
294 double phi = 2*kPi* rnd->RndHadro().Rndm();
295
296 TVector3 ppi3(0,ppiT,ppiL);
297
298 ppi3.RotateZ(phi); // randomize transverse components
299 ppi3.RotateUz(q.Vect().Unit()); // align longit. component with q in LAB
300
301 SLOG("COHHadronicVtx", pINFO)
302 << "Pion 3-p @ LAB: " << utils::print::Vec3AsString(&ppi3);
303
304 // now figure out the f/s nucleus 4-p
305
306 double pxNf = nu->Px() + Ni->Px() - fsl->Px() - ppi3.Px();
307 double pyNf = nu->Py() + Ni->Py() - fsl->Py() - ppi3.Py();
308 double pzNf = nu->Pz() + Ni->Pz() - fsl->Pz() - ppi3.Pz();
309 double ENf = nu->E() + Ni->E() - fsl->E() - Epi;
310
311 //-- Save the particles at the GHEP record
312
313 int mom = evrec->TargetNucleusPosition();
314
315 evrec->AddParticle(nucl_pdgc,kIStStableFinalState, mom,-1,-1,-1,
316 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
317
318 evrec->AddParticle(pion_pdgc,kIStStableFinalState, mom,-1,-1,-1,
319 ppi3.Px(), ppi3.Py(),ppi3.Pz(),Epi, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
320}
double x(bool selected=false) const
string Vec3AsString(const TVector3 *vec)
string P4AsString(const TLorentzVector *p)

References genie::GHepRecord::AddParticle(), genie::GHepParticle::E(), genie::Interaction::ExclTag(), genie::GHepRecord::FinalStatePrimaryLepton(), genie::PDGLibrary::Find(), getPionPDGCodeFromXclTag(), genie::PDGLibrary::Instance(), genie::RandomGen::Instance(), genie::Interaction::Kine(), genie::kIStStableFinalState, genie::constants::kNucleonMass, genie::constants::kPi, genie::GHepParticle::P4(), genie::utils::print::P4AsString(), genie::GHepParticle::Pdg(), pINFO, genie::GHepRecord::Probe(), genie::GHepParticle::Px(), genie::GHepParticle::Py(), genie::GHepParticle::Pz(), genie::RandomGen::RndHadro(), SLOG, genie::GHepRecord::Summary(), genie::Kinematics::t(), genie::GHepRecord::TargetNucleus(), genie::GHepRecord::TargetNucleusPosition(), genie::utils::print::Vec3AsString(), genie::Kinematics::x(), genie::GHepParticle::X4(), and genie::Kinematics::y().

Referenced by CalculateHadronicSystem_BergerSehgal(), and ProcessEventRecord().

◆ getPionPDGCodeFromXclTag()

int COHHadronicSystemGenerator::getPionPDGCodeFromXclTag ( const XclsTag & xcls_tag) const
private

Definition at line 74 of file COHHadronicSystemGenerator.cxx.

75{
76 int pion_pdgc = 0;
77 if (xcls_tag.NPi0() == 1) pion_pdgc = kPdgPi0;
78 else if (xcls_tag.NPiPlus() == 1) pion_pdgc = kPdgPiP;
79 else if (xcls_tag.NPiMinus() == 1) pion_pdgc = kPdgPiM;
80 else {
81 LOG("COHHadronicVtx", pFATAL)
82 << "No final state pion information in XclsTag!";
83 exit(1);
84 }
85 return pion_pdgc;
86}
int NPi0(void) const
Definition XclsTag.h:58
int NPiMinus(void) const
Definition XclsTag.h:60
int NPiPlus(void) const
Definition XclsTag.h:59

References genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, LOG, genie::XclsTag::NPi0(), genie::XclsTag::NPiMinus(), genie::XclsTag::NPiPlus(), and pFATAL.

Referenced by CalculateHadronicSystem_BergerSehgalFM(), and CalculateHadronicSystem_ReinSehgal().

◆ ProcessEventRecord()

void COHHadronicSystemGenerator::ProcessEventRecord ( GHepRecord * event_rec) const
virtual

Implements genie::EventRecordVisitorI.

Definition at line 52 of file COHHadronicSystemGenerator.cxx.

53{
54 // Access cross section algorithm for running thread
55 RunningThreadInfo * rtinfo = RunningThreadInfo::Instance();
56 const EventGeneratorI * evg = rtinfo->RunningThread();
57 const XSecAlgorithmI *fXSecModel = evg->CrossSectionAlg();
58 if (fXSecModel->Id().Name() == "genie::ReinSehgalCOHPiPXSec") {
60 } else if ((fXSecModel->Id().Name() == "genie::BergerSehgalCOHPiPXSec2015")) {
62 } else if ((fXSecModel->Id().Name() == "genie::BergerSehgalFMCOHPiPXSec2015")) {
64 } else if ((fXSecModel->Id().Name() == "genie::AlvarezRusoCOHPiPXSec")) {
66 }
67 else {
68 LOG("COHHadronicSystemGenerator",pFATAL) <<
69 "ProcessEventRecord >> Cannot calculate hadronic system for " <<
70 fXSecModel->Id().Name();
71 }
72}
string Name(void) const
Definition AlgId.h:44
virtual const AlgId & Id(void) const
Get algorithm ID.
Definition Algorithm.h:98
void CalculateHadronicSystem_AlvarezRuso(GHepRecord *event_rec) const
void CalculateHadronicSystem_BergerSehgal(GHepRecord *event_rec) const
void CalculateHadronicSystem_BergerSehgalFM(GHepRecord *event_rec) const
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
static RunningThreadInfo * Instance(void)
const EventGeneratorI * RunningThread(void)

References CalculateHadronicSystem_AlvarezRuso(), CalculateHadronicSystem_BergerSehgal(), CalculateHadronicSystem_BergerSehgalFM(), CalculateHadronicSystem_ReinSehgal(), genie::EventGeneratorI::CrossSectionAlg(), genie::Algorithm::Id(), genie::RunningThreadInfo::Instance(), LOG, genie::AlgId::Name(), pFATAL, and genie::RunningThreadInfo::RunningThread().


The documentation for this class was generated from the following files: