17 #include <TLorentzVector.h> 32 using namespace genie;
59 <<
"No nuclear target found - Not subtracting any binding energy";
65 TIter stdhep_iter(evrec);
74 bool handle = is_nucleon && in_fin_state && had_bind_e;
79 LOG(
"Nuclear",
pINFO) <<
"Binding energy = " << bindE;
83 <<
"Subtracting the binding energy from the escaped nucleon";
89 LOG(
"Nuclear",
pINFO) <<
"Kinetic energy before subtraction = " << KE;
91 KE = TMath::Max(0.,KE);
93 LOG(
"Nuclear",
pINFO) <<
"Kinetic energy after subtraction = " << KE;
98 double pmag_old = p->
P4()->P();
100 double scale = pmag_new / pmag_old;
102 <<
"|pnew| = " << pmag_new <<
", |pold| = " << pmag_old
103 <<
", scale = " << scale;
105 double pxn = scale * p->
Px();
106 double pyn = scale * p->
Py();
107 double pzn = scale * p->
Pz();
109 double pxb = (1-scale) * p->
Px();
110 double pyb = (1-scale) * p->
Py();
111 double pzb = (1-scale) * p->
Pz();
121 <<
"Adding a [BindingE] to account for nuclear binding energy";
124 -1,-1,-1,-1, pxb,pyb,pzb,bindE, 0,0,0,0);
127 <<
"Nucleon is above the Fermi sea but can't escape the nucleus";
129 <<
"Recombining remnant nucleus + f/s nucleon";
132 <<
"*** This functionality is temporarily disabled";
THE MAIN GENIE PROJECT NAMESPACE
const TLorentzVector * P4(void) const
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the 'Visito...
double RemovalEnergy(void) const
Get removal energy.
double Mass(void) const
Mass that corresponds to the PDG code.
double Pz(void) const
Get Pz.
GHepStatus_t Status(void) const
double Energy(void) const
Get energy.
double Px(void) const
Get Px.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual void Configure(const Registry &config)
void Configure(const Registry &config)
virtual GHepParticle * TargetNucleus(void) const
NucBindEnergyAggregator()
~NucBindEnergyAggregator()
A registry. Provides the container for algorithm configuration parameters.
bool IsNeutronOrProton(int pdgc)
virtual void AddParticle(const GHepParticle &p)
double NonNegative(double x)
bool GetParamDef(const RgKey &name, T &p, const T &def) 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.
void ProcessEventRecord(GHepRecord *event_rec) const
double Py(void) const
Get Py.