37 using namespace genie;
83 <<
"No final state pion information in XclsTag!";
88 int nucl_pdgc = Ni->
Pdg();
91 const TLorentzVector & p4nu = *(nu ->
P4());
92 const TLorentzVector & p4Ni = *(Ni ->
P4());
93 const TLorentzVector & p4fsl = *(fsl->
P4());
96 TLorentzVector q = p4nu - p4fsl;
99 TLorentzVector qnrf(q);
100 TVector3
beta = p4Ni.BoostVector();
103 const InitialState & init_state = interaction -> InitState();
109 double mpi2 = TMath::Power(mpi,2);
110 double xo = interaction->
Kine().
x(
true);
111 double yo = interaction->
Kine().
y(
true);
112 double to = interaction->
Kine().
t(
true);
113 double Epi = qnrf.E() - 0.5*to/M;
114 double Epi2 = TMath::Power(Epi,2);
115 double ppi2 = Epi2-mpi2;
120 <<
", xo = " << xo <<
", yo = " << yo <<
", to = " << to;
122 <<
"f/s pion E = " << Epi <<
", |p| = " << ppi;
126 double xi = -to - mpi2 - qnrf.M2() + 2*qnrf.E()*Epi;
127 xi /= (2 *
TMath::Sqrt(Epi2-mpi2) * qnrf.Vect().Mag());
129 if(xi < 0. || xi > 1. || Epi<= mpi) {
130 LOG(
"DFRKinematics",
pWARN) <<
"Invalid selected kinematics; Attempt regenerating";
133 exception.
SetReason(
"Invalid selected kinematics");
139 LOG(
"DFRHadronicVtx",
pINFO) <<
"|to| = " << -to;
140 LOG(
"DFRHadronicVtx",
pINFO) <<
"q2 = " << qnrf.M2();
141 LOG(
"DFRHadronicVtx",
pINFO) <<
"xi = " << xi;
143 double costheta = xi;
144 double sintheta =
TMath::Sqrt(TMath::Max(0.,1.-xi*xi));
146 SLOG(
"DFRHadronicVtx",
pINFO) <<
"cos(pion, q) = " << costheta;
149 double ppiL = ppi*costheta;
150 double ppiT = ppi*sintheta;
153 TVector3 ppi3(0,ppiT,ppiL);
156 ppi3.RotateUz(qnrf.Vect().Unit());
158 TLorentzVector p4pi(ppi3,Epi);
164 double pxNf = nu->
Px() + Ni->
Px() - fsl->
Px() - p4pi.Px();
165 double pyNf = nu->
Py() + Ni->
Py() - fsl->
Py() - p4pi.Py();
166 double pzNf = nu->
Pz() + Ni->
Pz() - fsl->
Pz() - p4pi.Pz();
167 double ENf = nu->
E() + Ni->
E() - fsl->
E() - p4pi.E();
172 const TLorentzVector & vtx = *(nu->
X4());
179 pxNf, pyNf, pzNf, ENf, 0, 0, 0, 0);
182 p4pi.Px(), p4pi.Py(),p4pi.Pz(),p4pi.E(), vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
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
enum genie::EGHepStatus GHepStatus_t
double HitNucMass(void) const
bool IsNucleus(void) const
virtual int HitNucleonPosition(void) const
double x(bool selected=false) const
::xsd::cxx::tree::exception< char > exception
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
Var Sqrt(const Var &v)
Use to take sqrt of a var.
const TLorentzVector * X4(void) const
const XclsTag & ExclTag(void) const
virtual GHepParticle * HitNucleon(void) const
TParticlePDG * Find(int pdgc)
void SwitchOnStepBack(void)
assert(nhit_max >=nhit_nbins)
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...
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.
Initial State information.
double Py(void) const
Get Py.