29 using namespace genie;
75 <<
"No final state pion information in XclsTag!";
80 int nucl_pdgc = Ni->
Pdg();
83 const TLorentzVector & p4nu = *(nu ->
P4());
84 const TLorentzVector & p4Ni = *(Ni ->
P4());
85 const TLorentzVector & p4fsl = *(fsl->
P4());
88 TLorentzVector q = p4nu - p4fsl;
91 TLorentzVector qnrf(q);
92 TVector3
beta = p4Ni.BoostVector();
95 const InitialState & init_state = interaction -> InitState();
101 double mpi2 = TMath::Power(mpi,2);
102 double xo = interaction->
Kine().
x(
true);
103 double yo = interaction->
Kine().
y(
true);
104 double to = interaction->
Kine().
t(
true);
105 double Epi = qnrf.E() - 0.5*to/M;
106 double Epi2 = TMath::Power(Epi,2);
107 double ppi2 = Epi2-mpi2;
108 double ppi = TMath::Sqrt(TMath::Max(0.,ppi2));
112 <<
", xo = " << xo <<
", yo = " << yo <<
", to = " << to;
114 <<
"f/s pion E = " << Epi <<
", |p| = " << ppi;
118 double xi = -to - mpi2 - qnrf.M2() + 2*qnrf.E()*Epi;
119 xi /= (2 * TMath::Sqrt(Epi2-mpi2) * qnrf.Vect().Mag());
121 if(xi < 0. || xi > 1. || Epi<= mpi) {
122 LOG(
"DFRKinematics",
pWARN) <<
"Invalid selected kinematics; Attempt regenerating";
125 exception.
SetReason(
"Invalid selected kinematics");
131 LOG(
"DFRHadronicVtx",
pINFO) <<
"|to| = " << -to;
132 LOG(
"DFRHadronicVtx",
pINFO) <<
"q2 = " << qnrf.M2();
133 LOG(
"DFRHadronicVtx",
pINFO) <<
"xi = " << xi;
135 double costheta = xi;
136 double sintheta = TMath::Sqrt(TMath::Max(0.,1.-xi*xi));
138 SLOG(
"DFRHadronicVtx",
pINFO) <<
"cos(pion, q) = " << costheta;
141 double ppiL = ppi*costheta;
142 double ppiT = ppi*sintheta;
145 TVector3 ppi3(0,ppiT,ppiL);
148 ppi3.RotateUz(qnrf.Vect().Unit());
150 TLorentzVector p4pi(ppi3,Epi);
156 double pxNf = nu->
Px() + Ni->
Px() - fsl->
Px() - p4pi.Px();
157 double pyNf = nu->
Py() + Ni->
Py() - fsl->
Py() - p4pi.Py();
158 double pzNf = nu->
Pz() + Ni->
Pz() - fsl->
Pz() - p4pi.Pz();
159 double ENf = nu->
E() + Ni->
E() - fsl->
E() - p4pi.E();
164 const TLorentzVector & vtx = *(nu->
X4());
171 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
174 p4pi.Px(), p4pi.Py(),p4pi.Pz(),p4pi.E(), vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
double beta(double KE, const simb::MCParticle *part)
THE MAIN GENIE PROJECT NAMESPACE
void ProcessEventRecord(GHepRecord *event_rec) const
double E(void) const
Get energy.
virtual Interaction * Summary(void) const
static RandomGen * Instance()
Access instance.
const TLorentzVector * P4(void) const
double HitNucMass(void) const
bool IsNucleus(void) const
virtual int HitNucleonPosition(void) const
double x(bool selected=false) 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.
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual GHepParticle * FinalStatePrimaryLepton(void) const
const Kinematics & Kine(void) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
~DFRHadronicSystemGenerator()
DFRHadronicSystemGenerator()
void SetReturnStep(int s)
TRandom3 & RndHadro(void) const
rnd number generator used by hadronization models
static PDGLibrary * Instance(void)
void SetReason(string reason)
virtual TBits * EventFlags(void) const
const TLorentzVector * X4(void) const
const XclsTag & ExclTag(void) const
virtual GHepParticle * HitNucleon(void) const
void SwitchOnStepBack(void)
virtual void AddParticle(const GHepParticle &p)
const InitialState & InitState(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)
const Target & Tgt(void) const
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
double ProbeE(RefFrame_t rf) const
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.
cet::coded_exception< error, detail::translate > exception
enum genie::EGHepStatus GHepStatus_t
Initial State information.
double Py(void) const
Get Py.