37 using namespace genie;
91 if(!tweaked)
return 1.;
103 bool is_dis =
event.Summary()->ProcInfo().IsDeepInelastic();
113 double event_weight = 1.;
117 TVector3 p3hadr = p4hadr.Vect();
121 const TLorentzVector & vtx = *(
event.HitNucleon()->X4());
130 TIter event_iter(&event);
131 while ( (p = dynamic_cast<GHepParticle *>(event_iter.Next())) ) {
151 LOG(
"ReW",
pFATAL) <<
"INTRANUKE didn't set a valid rescattering code for event in position: " << ip;
152 LOG(
"ReW",
pFATAL) <<
"Here is the problematic event:";
158 bool interacted = !escaped;
161 <<
"Attempting to reweight hadron at position = " << ip
162 <<
" with PDG code = " << pdgc
164 << ((interacted) ?
"re-interacted" :
"did not re-interact");
167 double m = p->
Mass();
168 TLorentzVector * p4 = p->
P4();
175 double fz_twk = fz_def * fz_scale_factor;
176 fz_twk = TMath::Max(0.,fz_twk);
179 <<
"Formation zone = " << fz_def <<
" fm (nominal), " 180 << fz_twk <<
" fm (tweaked) - scale factor = " << fz_scale_factor;
183 TVector3 step3v = p4->Vect();
184 step3v.SetMag(fz_def);
185 TLorentzVector step4v(step3v, 0.);
187 TLorentzVector x4 = vtx + step4v;
193 pdgc, vtx, x4, *p4, A, Z, fz_scale_factor, interacted);
196 event_weight *= hadron_weight;
double FZoneWeight(int pdgc, const TLorentzVector &vtx, const TLorentzVector &x4, const TLorentzVector &p4, double A, double Z, double fz_scale_factor, bool interacted, double nRpi=0.5, double nRnuc=1.0, double NR=3, double R0=1.4)
int RescatterCode(void) const
#include "Numerical/GSFunc.h"
double fFZoneTwkDial
formation zone tweaking dial
enum genie::EGHepStatus GHepStatus_t
TLorentzVector Hadronic4pLAB(const EventRecord &event)
void SetCT0Nucleon(double ct0)
double Mass(void) const
Mass that corresponds to the PDG code.
double CalcWeight(const EventRecord &event)
calculate a weight for the input event using the current nuisance param values
GHepStatus_t Status(void) const
double FormationZone(double m, const TLorentzVector &p, const TVector3 &p3hadr, double ct0, double K)
double OneSigmaErr(GSyst_t syst, int sign=0) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?
void SetCT0Pion(double ct0)
static const double kASmallNum
An enumeration of systematic parameters.
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
virtual GHepParticle * HitNucleon(void) const
void SetSystematic(GSyst_t syst, double val)
update the value for the specified nuisance param
void Reset(void)
set all nuisance parameters to default values
static GSystUncertainty * Instance(void)
string X4AsString(const TLorentzVector *x)
TLorentzVector * P4(void) const
void Reconfigure(void)
propagate updated nuisance parameter values to actual MC, etc
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.
Root of GENIE utility namespaces.
Event finding and building.
GENIE event reweighting engine ABC.