35 using namespace genie;
36 using namespace genie::utils;
37 using namespace genie::constants;
43 TObject(), fInteraction(NULL)
45 this->UseInteraction(0);
49 TObject(), fInteraction(NULL)
61 static bool tMaxLoaded =
false;
62 static double DFR_tMax = -1;
101 else if ( xcls.
NPi0() != 1 )
106 double mtot = Mf + mf + mpi;
107 double Ethresh = (mtot*mtot - Mi*Mi - mi*mi)/2/Mi;
111 if (pi.
IsNorm() )
return 0;
119 double mtot = Mf + ml + mk;
120 double Ethresh = (mtot*mtot - Mi*Mi)/2/Mi;
125 return ml + 0.5*ml*ml/tgt.
Mass();
130 int tgtpdgc = tgt.
Pdg();
137 if ( xcls.
NPions() > 0 ) {
141 double m = ml + m_other ;
142 double m2 = TMath::Power(m,2);
143 double Ethr = m + 0.5*m2/MA;
145 return TMath::Max(0.,Ethr);
158 double Mn2 = TMath::Power(Mn,2);
184 double smin = TMath::Power(Wmin+ml,2.);
185 double Ethr = 0.5*(smin-Mn2)/Mn;
190 smin = TMath::Power(Wmin+ml,2);
191 Ethr = TMath::Max(0.5*(smin-Mn2-ml*ml)/Mn,ml);
194 return TMath::Max(0.,Ethr);
199 return TMath::Max(0.,Ethr);
211 double Mn2 = TMath::Power(Mn,2);
213 double smin = TMath::Power(Wmin+ml,2.);
214 double Ethr = 0.5*(smin-Mn2)/Mn;
215 return TMath::Max(0.,Ethr);
224 return TMath::Max(0.,Ethr);
228 double Ethr = 0.5 * (ml*ml-TMath::Power(Mn,2))/Mn;
229 return TMath::Max(0.,Ethr);
237 double Ethr = 0.5 * (TMath::Power(
kMw+ml,2)-TMath::Power(MA,2))/MA;
238 return TMath::Max(0.,Ethr);
258 case(
kKVW) :
return this->
WLim();
break;
261 case(
kKVx) :
return this->
XLim();
break;
262 case(
kKVy) :
return this->
YLim();
break;
263 case(
kKVt) :
return this->
TLim();
break;
319 LOG(
"KPhaseSpace",
pDEBUG) <<
"E = " << E <<
", Ethr = " << Ethr;
339 double Q2 = kine.
Q2();
341 bool allowed = in_phys;
352 double Q2 = kine.
Q2();
354 bool allowed = in_phys;
363 double Q2 = kine.
Q2();
365 bool allowed = in_phys;
374 bool allowed = in_phys;
385 bool allowed = in_phys;
391 double Q2 = kine.
Q2();
392 bool allowed (Q2 > 0);
404 double Q2 = kine.
Q2();
406 LOG(
"KPhaseSpace",
pDEBUG) <<
" W = " << W <<
", limits = [" << Wl.
min <<
"," << Wl.
max <<
"];";
407 LOG(
"KPhaseSpace",
pDEBUG) <<
" Q2 = " << Q2 <<
", limits = [" << Q2l.
min <<
"," << Q2l.
max <<
"];";
418 LOG(
"KPhaseSpace",
pDEBUG) <<
" t = " << t <<
", limits = [" << tl.
min <<
"," << tl.
max <<
"];";
421 LOG(
"KPhaseSpace",
pDEBUG) <<
" phase space point is " << ( in_phys ?
"ALLOWED" :
"NOT ALLOWED");
424 bool allowed = in_phys;
431 double Q2 = kine.
Q2();
433 bool allowed = in_phys;
453 bool is_em = pi.
IsEM();
500 LOG(
"KPhaseSpace",
pDEBUG) <<
"Found nominal limits: " << Wl.
min <<
", " << Wl.
max;
527 bool is_em = pi.
IsEM();
534 if(!is_qel && !is_inel && !is_coh && !is_dme && !is_dmdis)
return Q2l;
551 }
else if (is_dme || is_dmdis) {
583 bool is_em = pi.
IsEM();
591 if(!is_qel && !is_inel && !is_coh && !is_cevns && !is_dme && !is_dmdis)
return Q2l;
612 if ( xcls.
NPions() > 0 ) {
665 double Q2maxConfig = 1.44;
666 if (Q2l.
max > Q2maxConfig) Q2l.
max = Q2maxConfig;
700 bool is_em = pi.
IsEM();
752 bool is_em = pi.
IsEM();
824 bool is_em = pi.
IsEM();
877 double Q2 = kine.
Q2();
878 double Mn = init_state.
Tgt().
Mass();
887 if ( xcls.
NPions() > 0 ) {
909 return this->
YLim(xsi);
930 double Q2 = kine.
Q2();
931 double nu = Ev * kine.
y();
942 if ( xcls.
NPions() > 0 ) {
947 double m_other2 = m_other * m_other ;
949 tl.
min = 1.0 * (Q2 + m_other2)/(2.0 * nu) * (Q2 + m_other2)/(2.0 * nu);
960 double mpi2 = mpi*mpi;
964 double nuSqPlusQ2 = nu*nu +
Q2;
965 double nuOverM = nu / M;
966 double mpiQ2term = mpi2 - Q2 - 2*nu*nu;
967 double A1 = 1 + 2*nuOverM + nuOverM*nuOverM - nuSqPlusQ2/M2;
968 double A2 = (1+nuOverM) * mpiQ2term + 2*nuOverM*nuSqPlusQ2;
969 double A3 = mpiQ2term*mpiQ2term - 4*nuSqPlusQ2*(nu*nu - mpi2);
971 tl.
min = std::abs( (A2 + sqrt(A2*A2 - A1*A3)) / A1 );
974 #if __cplusplus >= 201103L
975 tminIsNaN = std::isnan(tl.
min);
979 tminIsNaN = tl.
min != tl.
min;
984 <<
"tmin for diffractive scattering is NaN "
985 <<
"( Enu = " << Ev <<
", Q2 = " << Q2 <<
", nu = " << nu <<
")";
995 LOG(
"KPhaseSpace",
pWARN) <<
"It is not sensible to ask for t limits for events that are not coherent or diffractive.";
1009 double mtot = M + mf + mpi;
1010 double Ethresh = (mtot*mtot - M*M - mi*mi)/2/M;
1023 double ECM = init_state.
CMEnergy();
1053 double ECM = TMath::Sqrt(M*(M + 2*Ei) + mi*mi);
1085 double ECM = init_state.
CMEnergy();
1088 double Ei_CM = (s + mi2 - Mi*Mi)/2/ECM;
1089 double Ef_CM = (s + mf2 - W*
W)/2/ECM;
1090 double Pi_CM = (Ei_CM - mi)<0?0:TMath::Sqrt(Ei_CM*Ei_CM - mi2);
1091 double Pf_CM = (Ef_CM - mf)<0?0:TMath::Sqrt(Ef_CM*Ef_CM - mf2);
1093 Q2l.
min = 2*(Ei_CM*Ef_CM - Pi_CM*Pf_CM) - mi2 - mf2;
1094 Q2l.
max = 2*(Ei_CM*Ef_CM + Pi_CM*Pf_CM) - mi2 - mf2;
1124 double s = M*(M + 2*Ei) + mi2;
1125 double ECM = TMath::Sqrt(s);
1127 double Ei_CM = (s + mi2 - M*M)/2/ECM;
1128 double Ef_CM = (s + mf2 - W*
W)/2/ECM;
1129 double Pi_CM = (Ei_CM - mi)<0?0:TMath::Sqrt(Ei_CM*Ei_CM - mi2);
1130 double Pf_CM = (Ef_CM - mf)<0?0:TMath::Sqrt(Ef_CM*Ef_CM - mf2);
1132 Q2l.
min = 2*(Ei_CM*Ef_CM - Pi_CM*Pf_CM) - mi2 - mf2;
1133 Q2l.
max = 2*(Ei_CM*Ef_CM + Pi_CM*Pf_CM) - mi2 - mf2;
bool IsResonant(void) const
bool IsPhotonResonance(void) const
static SppChannel_t FromInteraction(const Interaction *interaction)
double W(bool selected=false) const
bool IsWeakCC(void) const
static const double kMinQ2Limit_VLE
Range1D_t YLim_X(void) const
y limits @ fixed x
bool IsDarkMatterElectronElastic(void) const
static const double kNucleonMass
double Q2(const Interaction *const i)
int HitNucPdg(void) const
Range1D_t Q2Lim_W_SPP(void) const
Q2 limits @ fixed W for single pion production models.
TParticlePDG * RecoilNucleon(void) const
recoil nucleon
Range1D_t InelWLim(double Ev, double M, double ml)
A simple [min,max] interval for doubles.
double Threshold(void) const
Energy threshold.
bool IsInverseMuDecay(void) const
static const double kPi0Mass
bool IsQuasiElastic(void) const
Range1D_t q2Lim(void) const
q2 limits
A singleton class holding all configuration registries built while parsing all loaded XML configurati...
double HitNucMass(void) const
int CharmHadronPdg(void) const
bool IsStrangeEvent(void) const
Range1D_t DarkQ2Lim_W(double Ev, double M, double ml, double W, double Q2min_cut=controls::kMinQ2Limit)
bool IsWithinLimits(double x, Range1D_t range)
static constexpr double s
Generated/set kinematical variables for an event.
static const double kPhotontest
int SwitchProtonNeutron(int pdgc)
static int FinStateNucleon(SppChannel_t channel)
bool IsInverseBetaDecay(void) const
double x(bool selected=false) const
static const double kLightestChmHad
double Mass(Resonance_t res)
resonance mass (GeV)
Range1D_t YLim(void) const
y limits
bool IsDiffractive(void) const
Range1D_t CEvNSQ2Lim(double Ev)
bool IsCoherentProduction(void) const
bool IsIMDAnnihilation(void) const
RgDbl GetDouble(RgKey key) const
Range1D_t Q2Lim_W(void) const
Q2 limits @ fixed W.
Range1D_t InelQ2Lim(double Ev, double M, double ml, double Q2min_cut=controls::kMinQ2Limit)
double Threshold_SPP_iso(void) const
Energy limit for resonance single pion production on isoscalar nucleon.
Range1D_t Q2Lim(void) const
Q2 limits.
static const double kElectronMass
Range1D_t Limits(KineVar_t kvar) const
Return the kinematical variable limits.
Registry * CommonList(const string &file_id, const string &set_name) const
static double GetTMaxDFR()
Contains minimal information for tagging exclusive processes.
enum genie::ESppChannel SppChannel_t
Range1D_t InelQ2Lim_W(double Ev, double M, double ml, double W, double Q2min_cut=controls::kMinQ2Limit)
static const double kTauMass
double y(bool selected=false) const
bool IsCharmEvent(void) const
bool IsSingleKaon(void) const
double W(const Interaction *const i)
Summary information for an interaction.
Range1D_t Q2Lim_W_SPP_iso(void) const
Q2 limits @ fixed W for resonance single pion production on isoscalar nucleon.
Range1D_t InelXLim(double Ev, double M, double ml)
Range1D_t DarkQ2Lim(double Ev, double M, double ml, double Q2min_cut=controls::kMinQ2Limit)
int StrangeHadronPdg(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool IsCoherentElastic(void) const
const Interaction * fInteraction
static const double kElectronMass2
Exception used inside Interaction classes.
static int InitStateNucleon(SppChannel_t channel)
bool IsNuElectronElastic(void) const
static constexpr double m2
Range1D_t WLim_SPP(void) const
W limits for single pion production models.
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsAMNuGamma(void) const
static const double kMuonMass2
const Kinematics & Kine(void) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
static const double kNeutronMass
static const double kASmallNum
bool IsDarkMatterElastic(void) const
double Minimum(KineVar_t kvar) const
bool IsPhotonCoherent(void) const
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
static int FinStatePion(SppChannel_t channel)
enum genie::EKineVar KineVar_t
bool IsDeepInelastic(void) const
double Maximum(KineVar_t kvar) const
void UseInteraction(const Interaction *in)
void UpdateWQ2FromXY(const Interaction *in)
static const double kMuonMass
TLorentzVector * HitNucP4Ptr(void) const
static PDGLibrary * Instance(void)
static const double kPionMass
bool IsAllowed(void) const
Check whether the current kinematics is in the allowed phase space.
Singleton class to load & serve a TDatabasePDG.
bool HitNucIsSet(void) const
Range1D_t InelYLim_X(double Ev, double M, double ml, double x)
Range1D_t CohYLim(double Mn, double m_produced, double mlep, double Ev, double Q2, double xsi)
Range1D_t DarkYLim(double Ev, double M, double ml)
A registry. Provides the container for algorithm configuration parameters.
static string AsString(KineVar_t kv)
const XclsTag & ExclTag(void) const
double CMEnergy() const
centre-of-mass energy (sqrt s)
bool IsInclusiveCharm(void) const
Range1D_t WLim_SPP_iso(void) const
W limits for resonance single pion production on isoscalar nucleon.
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
Range1D_t CohQ2Lim(double Mn, double m_produced, double mlep, double Ev)
Range1D_t XLim(void) const
x limits
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
double t(bool selected=false) const
Range1D_t DarkYLim_X(double Ev, double M, double ml, double x)
TParticlePDG * Find(int pdgc, bool must_exist=true)
double Q2(bool selected=false) const
const Target & Tgt(void) const
bool IsSinglePion(void) const
Range1D_t TLim(void) const
t limits
bool IsGlashowResonance(void) const
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
bool IsDarkMatterDeepInelastic(void) const
Range1D_t InelYLim(double Ev, double M, double ml)
double ProbeE(RefFrame_t rf) const
Range1D_t DarkXLim(double Ev, double M, double ml)
static constexpr double m
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Range1D_t q2Lim_W(void) const
q2 limits @ fixed W
static const double kProtonMass
Range1D_t DarkWLim(double Ev, double M, double ml)
Range1D_t WLim(void) const
W limits.
static AlgConfigPool * Instance()
Initial State information.