44 using namespace genie;
50 int pdgc,
const TLorentzVector & x4,
const TLorentzVector & p4,
52 double mfp_scale_factor,
bool interacted,
53 double nRpi,
double nRnuc,
double NR,
double R0)
56 <<
"Calculating mean free path weight: " 57 <<
"A = " << A <<
", Z = " << Z <<
", mfp_scale = " << mfp_scale_factor
58 <<
", interacted = " << interacted;
60 <<
"nR_pion = " << nRpi <<
", nR_nucleon = " << nRnuc
61 <<
", NR = " << NR <<
", R0 = " << R0;
65 pdgc,x4,p4,A,Z,1.,nRpi,nRnuc,NR,R0);
66 LOG(
"ReW",
pINFO) <<
"Probability(default mfp) = " << pdef;
67 if(pdef<=0)
return 1.;
71 pdgc,x4,p4,A,Z,mfp_scale_factor,nRpi,nRnuc,NR,R0);
72 LOG(
"ReW",
pINFO) <<
"Probability(tweaked mfp) = " << ptwk;
73 if(ptwk<=0)
return 1.;
77 LOG(
"ReW",
pINFO) <<
"Mean free path weight = " << w_mfp;
82 int pdgc,
const TLorentzVector & vtx,
const TLorentzVector & x4,
83 const TLorentzVector & p4,
double A,
double Z,
84 double fz_scale_factor,
bool interacted,
85 double nRpi,
double nRnuc,
double NR,
double R0)
88 TLorentzVector fz = x4 - vtx;
89 TLorentzVector fztwk = fz_scale_factor*fz;
90 TLorentzVector x4twk = x4 + fztwk - fz;
92 LOG(
"ReW",
pDEBUG) <<
"Formation zone = "<< fz.Vect().Mag() <<
" fm";
96 pdgc,x4,p4,A,Z,1.,nRpi,nRnuc,NR,R0);
97 LOG(
"ReW",
pDEBUG) <<
"Survival probability (nominal) = "<< pdef;
98 if(pdef<=0)
return 1.;
101 <<
"Default formation zone takes hadron outside " 102 <<
"nucleus so cannot reweight!" ;
108 pdgc,x4twk,p4,A,Z,1.,nRpi,nRnuc,NR,R0);
109 if(ptwk<=0)
return 1.;
110 LOG(
"ReW",
pDEBUG) <<
"Survival probability (tweaked) = "<< ptwk;
115 <<
"Particle weight for formation zone tweak = "<< ptwk;
120 double pdef,
double ptwk,
bool interacted)
135 w_mfp = (1-pdef>0) ? (1-ptwk) / (1-pdef) : 1;
137 w_mfp = (pdef>0) ? ptwk / pdef : 1;
139 w_mfp = TMath::Max(0.,w_mfp);
147 double fate_frac = 0.0;
229 <<
"Have reached default case and assigning fraction{fate} = 0";
236 fate_frac *= frac_scale_factor;
246 if(TMath::Abs(fate_frac-fate_frac_nominal) <
kASmallNum)
return 0;
248 if(fate_frac_nominal <= 0) {
return -99999; }
250 double scale = TMath::Max(0.,fate_frac)/fate_frac_nominal;
261 bool by_agky = is_dis && !charm;
271 bool found_string = (
event.FindParticle(
kPdgString, prefragm, 0) != 0);
272 bool found_cluster = (
event.FindParticle(
kPdgCluster, prefragm, 0) != 0);
273 bool handled_by_pythia = found_string || found_cluster;
275 return handled_by_pythia;
290 const TLorentzVector & p4nu = *(nu->
P4());
291 const TLorentzVector & p4N = *(N ->
P4());
292 const TLorentzVector & p4l = *(l ->
P4());
294 TLorentzVector pX4 = p4nu + p4N - p4l;
306 if(twkdial < 0.)
return -1;
307 if(twkdial > 0.)
return +1;
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)
double WhichFateFractionScaleFactor(genie::rew::GSyst_t syst, double kinE, double fate_frac)
tweak inelastic probability for pions, for given total rescattering probability
#include "Numerical/GSFunc.h"
tweak elastic probability for pions, for given total rescattering probability
enum genie::EGHepStatus GHepStatus_t
TLorentzVector Hadronic4pLAB(const EventRecord &event)
tweak charge exchange probability for nucleons, for given total rescattering probability ...
double AGKYWeight(int pdgc, double xF, double pT2)
tweak pion production probability for pions, for given total rescattering probability ...
double Frac(int hpdgc, INukeFateHA_t fate, double ke) const
bool IsCharmEvent(void) const
Summary information for an interaction.
tweak inelastic probability for nucleons, for given total rescattering probability ...
tweak absorption probability for nucleons, for given total rescattering probability ...
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool HadronizedByAGKY(const EventRecord &event)
static double fMinKinEnergy
tweak absorption probability for pions, for given total rescattering probability
static INukeHadroData * Instance(void)
double ProbSurvival(int pdgc, const TLorentzVector &x4, const TLorentzVector &p4, double A, double Z, double mfp_scale_factor=1.0, double nRpi=0.5, double nRnuc=1.0, double NR=3, double R0=1.4)
Hadron survival probability.
static const double kASmallNum
An enumeration of systematic parameters.
tweak elastic probability for nucleons, for given total rescattering probability
Misc GENIE control constants.
double MeanFreePathWeight(int pdgc, const TLorentzVector &x4, const TLorentzVector &p4, double A, double Z, double mfp_scale_factor, bool interacted, double nRpi=0.5, double nRnuc=1.0, double NR=3, double R0=1.4)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
bool IsDeepInelastic(void) const
bool HadronizedByAGKYPythia(const EventRecord &event)
const XclsTag & ExclTag(void) const
tweak pion production probability for nucleons, for given total rescattering probability ...
const ProcessInfo & ProcInfo(void) const
double FateFraction(genie::rew::GSyst_t syst, double kinE, double frac_scale_factor=1.)
Singleton class to load & serve hadron x-section splines used by GENIE's version of the INTRANUKE cascade...
static double fMaxKinEnergyHA
TLorentzVector * P4(void) const
tweak charge exchange probability for pions, for given total rescattering probability ...
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.
Event finding and building.