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());
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
virtual const AlgId & Id(void) const
Get algorithm ID.
int getPionPDGCodeFromXclTag(const XclsTag &xcls_tag) const
void CalculateHadronicSystem_AlvarezRuso(GHepRecord *event_rec) const
~COHHadronicSystemGenerator()
void CalculateHadronicSystem_BergerSehgal(GHepRecord *event_rec) const
COHHadronicSystemGenerator()
void CalculateHadronicSystem_ReinSehgal(GHepRecord *event_rec) const
void ProcessEventRecord(GHepRecord *event_rec) const
void CalculateHadronicSystem_BergerSehgalFM(GHepRecord *event_rec) const
Defines the EventGeneratorI interface.
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
STDHEP-like event record entry that can fit a particle or a nucleus.
const TLorentzVector * P4(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.
GENIE's GHEP MC event record.
virtual GHepParticle * Probe(void) const
virtual GHepParticle * TargetNucleus(void) const
virtual Interaction * Summary(void) const
virtual void AddParticle(const GHepParticle &p)
virtual int TargetNucleusPosition(void) const
virtual GHepParticle * FinalStatePrimaryLepton(void) const
HadronicSystemGenerator()
Initial State information.
const Target & Tgt(void) const
Summary information for an interaction.
const XclsTag & ExclTag(void) const
const Kinematics & Kine(void) const
const ProcessInfo & ProcInfo(void) const
Generated/set kinematical variables for an event.
double Q2(bool selected=false) const
double t(bool selected=false) const
double y(bool selected=false) const
const TLorentzVector & HadSystP4(void) const
double x(bool selected=false) const
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
bool IsWeakNC(void) const
bool IsWeakCC(void) const
A singleton holding random number generator classes. All random number generation in GENIE should tak...
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
static RandomGen * Instance()
Access instance.
Keep info on the event generation thread currently on charge. This is used so that event generation m...
static RunningThreadInfo * Instance(void)
const EventGeneratorI * RunningThread(void)
Cross Section Calculation Interface.
Contains minimal information for tagging exclusive processes.
static const double kNucleonMass
string Vec3AsString(const TVector3 *vec)
string P4AsString(const TLorentzVector *p)
THE MAIN GENIE PROJECT NAMESPACE