31 using namespace genie;
32 using namespace genie::constants;
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")) {
68 LOG(
"COHHadronicSystemGenerator",
pFATAL) <<
69 "ProcessEventRecord >> Cannot calculate hadronic system for " <<
82 <<
"No final state pion information in XclsTag!";
105 const InitialState & init_state = interaction -> InitState();
115 const TLorentzVector & vtx = *(nu->
X4());
116 const TLorentzVector & p4nu = *(nu ->
P4());
117 const TLorentzVector & p4fsl = *(fsl->
P4());
120 int nucl_pdgc = Ni->
Pdg();
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();
131 double mpi2 = TMath::Power(mpi,2);
134 <<
"Ev = "<< E <<
", Q^2 = " << Q2
135 <<
", y = " << y <<
", t = " << t;
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;
141 double costheta = (t - Q2 - mpi2) / (2 * ( (y *E - Epi) * Epi -
142 ppi * sqrt(TMath::Power(y * E - Epi, 2.) + t) ) );
144 if ((costheta > 1.0) || (costheta < -1.0)) {
146 <<
"Unphysical pion angle!";
149 double sintheta = TMath::Sqrt(1 - costheta * costheta);
171 double ppix = ppi * sintheta * TMath::Cos(phi);
172 double ppiy = ppi * sintheta * TMath::Sin(phi);
173 double ppiz = ppi * costheta;
187 TLorentzVector q = p4nu - p4fsl;
188 TVector3 ppi3(ppix, ppiy, ppiz);
189 ppi3.RotateUz(q.Vect().Unit());
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;
208 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
216 ppi3.Px(), ppi3.Py(), ppi3.Pz(), Epi, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
238 const TLorentzVector & vtx = *(nu->
X4());
239 const TLorentzVector & p4nu = *(nu ->
P4());
240 const TLorentzVector & p4fsl = *(fsl->
P4());
243 int nucl_pdgc = Ni->
Pdg();
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);
256 <<
"Ev = "<< E <<
", xo = " << xo
257 <<
", yo = " << yo <<
", to = " << to;
261 double Epi2 = TMath::Power(Epi,2);
262 double ppi2 = Epi2-mpi2;
263 double ppi = TMath::Sqrt(TMath::Max(0.,ppi2));
266 <<
"f/s pion E = " << Epi <<
", |p| = " << ppi;
274 TLorentzVector q = p4nu - p4fsl;
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));
285 double costheta = xi;
286 double sintheta = TMath::Sqrt(TMath::Max(0.,1.-xi*xi));
288 SLOG(
"COHHadronicVtx",
pINFO) <<
"cos(pion, q) = " << costheta;
291 double ppiL = ppi*costheta;
292 double ppiT = ppi*sintheta;
296 TVector3 ppi3(0,ppiT,ppiL);
299 ppi3.RotateUz(q.Vect().Unit());
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;
316 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
319 ppi3.Px(), ppi3.Py(),ppi3.Pz(),Epi, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
325 const Kinematics & kinematics = interaction -> Kine();
331 const TLorentzVector ppi = kinematics.
HadSystP4();
332 const TVector3 ppi3 = ppi.Vect();
333 const double Epi = ppi.E();
347 LOG(
"COHHadronicSystemGeneratorAR",
pFATAL)
348 <<
"Could not determine pion involved in interaction";
354 int nucl_pdgc = Ni->
Pdg();
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;
361 const TLorentzVector & vtx = *(nu->
X4());
367 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
370 ppi3.Px(), ppi3.Py(),ppi3.Pz(),Epi, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
Cross Section Calculation Interface.
~COHHadronicSystemGenerator()
bool IsWeakCC(void) const
void CalculateHadronicSystem_AlvarezRuso(GHepRecord *event_rec) const
double E(void) const
Get energy.
static const double kNucleonMass
double Q2(const Interaction *const i)
int getPionPDGCodeFromXclTag(const XclsTag &xcls_tag) const
virtual Interaction * Summary(void) const
static RandomGen * Instance()
Access instance.
const TLorentzVector * P4(void) const
Defines the EventGeneratorI interface.
Generated/set kinematical variables for an event.
string P4AsString(const TLorentzVector *p)
void CalculateHadronicSystem_ReinSehgal(GHepRecord *event_rec) const
double x(bool selected=false) const
const TLorentzVector & HadSystP4(void) const
A singleton holding random number generator classes. All random number generation in GENIE should tak...
double Pz(void) const
Get Pz.
Contains minimal information for tagging exclusive processes.
double Px(void) const
Get Px.
virtual GHepParticle * Probe(void) const
double y(bool selected=false) const
Summary information for an interaction.
bool IsWeakNC(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void CalculateHadronicSystem_BergerSehgalFM(GHepRecord *event_rec) const
virtual GHepParticle * FinalStatePrimaryLepton(void) const
const Kinematics & Kine(void) const
virtual GHepParticle * TargetNucleus(void) const
void CalculateHadronicSystem_BergerSehgal(GHepRecord *event_rec) const
static RunningThreadInfo * Instance(void)
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
virtual const AlgId & Id(void) const
Get algorithm ID.
static PDGLibrary * Instance(void)
const TLorentzVector * X4(void) const
const XclsTag & ExclTag(void) const
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
virtual void AddParticle(const GHepParticle &p)
const ProcessInfo & ProcInfo(void) const
double t(bool selected=false) const
Abstract class. Is used to pass some commonly recurring methods to all concrete implementations of th...
TParticlePDG * Find(int pdgc, bool must_exist=true)
double Q2(bool selected=false) const
const Target & Tgt(void) const
void ProcessEventRecord(GHepRecord *event_rec) const
COHHadronicSystemGenerator()
const EventGeneratorI * RunningThread(void)
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
GENIE's GHEP MC event record.
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
STDHEP-like event record entry that can fit a particle or a nucleus.
string Vec3AsString(const TVector3 *vec)
Keep info on the event generation thread currently on charge. This is used so that event generation m...
virtual int TargetNucleusPosition(void) const
Initial State information.
double Py(void) const
Get Py.