33 using namespace genie;
41 TObject(), fInteraction(NULL)
43 this->UseInteraction(0);
47 TObject(), fInteraction(NULL)
59 static bool tMaxLoaded =
false;
60 static double DFR_tMax = -1;
98 double mtot = ml + mk + Mf;
99 double Ethresh = (mtot*mtot - Mi*Mi)/(2. * Mf);
104 return ml + 0.5*ml*ml/tgt.
Mass();
109 int tgtpdgc = tgt.
Pdg();
116 if ( xcls.
NPions() > 0 ) {
120 double m = ml + m_other ;
121 double m2 = TMath::Power(m,2);
122 double Ethr = m + 0.5*m2/MA;
124 return TMath::Max(0.,Ethr);
137 double Mn2 = TMath::Power(Mn,2);
163 double smin = TMath::Power(Wmin+ml,2.);
164 double Ethr = 0.5*(smin-Mn2)/Mn;
169 smin = TMath::Power(Wmin+ml,2);
170 Ethr = TMath::Max(0.5*(smin-Mn2-ml*ml)/Mn,ml);
173 return TMath::Max(0.,Ethr);
178 return TMath::Max(0.,Ethr);
190 double Mn2 = TMath::Power(Mn,2);
192 double smin = TMath::Power(Wmin+ml,2.);
193 double Ethr = 0.5*(smin-Mn2)/Mn;
194 return TMath::Max(0.,Ethr);
203 return TMath::Max(0.,Ethr);
223 case(
kKVW) :
return this->
WLim();
break;
226 case(
kKVx) :
return this->
XLim();
break;
227 case(
kKVy) :
return this->
YLim();
break;
228 case(
kKVt) :
return this->
TLim();
break;
282 LOG(
"KPhaseSpace",
pDEBUG) <<
"E = " << E <<
", Ethr = " << Ethr;
302 double Q2 = kine.
Q2();
304 bool allowed = in_phys;
315 double Q2 = kine.
Q2();
317 bool allowed = in_phys;
326 double Q2 = kine.
Q2();
328 bool allowed = in_phys;
337 bool allowed = in_phys;
348 bool allowed = in_phys;
354 double Q2 = kine.
Q2();
355 bool allowed (Q2 > 0);
367 double Q2 = kine.
Q2();
369 LOG(
"KPhaseSpace",
pDEBUG) <<
" W = " << W <<
", limits = [" << Wl.
min <<
"," << Wl.
max <<
"];";
370 LOG(
"KPhaseSpace",
pDEBUG) <<
" Q2 = " << Q2 <<
", limits = [" << Q2l.
min <<
"," << Q2l.
max <<
"];";
381 LOG(
"KPhaseSpace",
pDEBUG) <<
" t = " << t <<
", limits = [" << tl.
min <<
"," << tl.
max <<
"];";
384 LOG(
"KPhaseSpace",
pDEBUG) <<
" phase space point is " << ( in_phys ?
"ALLOWED" :
"NOT ALLOWED");
387 bool allowed = in_phys;
394 double Q2 = kine.
Q2();
396 bool allowed = in_phys;
416 bool is_em = pi.
IsEM();
463 LOG(
"KPhaseSpace",
pDEBUG) <<
"Found nominal limits: " << Wl.
min <<
", " << Wl.
max;
490 bool is_em = pi.
IsEM();
497 if(!is_qel && !is_inel && !is_coh && !is_dme && !is_dmdis)
return Q2l;
514 }
else if (is_dme || is_dmdis) {
546 bool is_em = pi.
IsEM();
554 if(!is_qel && !is_inel && !is_coh && !is_cevns && !is_dme && !is_dmdis)
return Q2l;
575 if ( xcls.
NPions() > 0 ) {
628 double Q2maxConfig = 1.44;
629 if (Q2l.
max > Q2maxConfig) Q2l.
max = Q2maxConfig;
663 bool is_em = pi.
IsEM();
715 bool is_em = pi.
IsEM();
797 bool is_em = pi.
IsEM();
850 double Q2 = kine.
Q2();
851 double Mn = init_state.
Tgt().
Mass();
860 if ( xcls.
NPions() > 0 ) {
882 return this->
YLim(xsi);
903 double Q2 = kine.
Q2();
904 double nu = Ev * kine.
y();
915 if ( xcls.
NPions() > 0 ) {
920 double m_other2 = m_other * m_other ;
922 tl.
min = 1.0 * (Q2 + m_other2)/(2.0 * nu) * (Q2 + m_other2)/(2.0 * nu);
933 double mpi2 = mpi*mpi;
937 double nuSqPlusQ2 = nu*nu +
Q2;
938 double nuOverM = nu / M;
939 double mpiQ2term = mpi2 - Q2 - 2*nu*nu;
940 double A1 = 1 + 2*nuOverM + nuOverM*nuOverM - nuSqPlusQ2/M2;
941 double A2 = (1+nuOverM) * mpiQ2term + 2*nuOverM*nuSqPlusQ2;
942 double A3 = mpiQ2term*mpiQ2term - 4*nuSqPlusQ2*(nu*nu - mpi2);
944 tl.
min =
std::abs( (A2 + sqrt(A2*A2 - A1*A3)) / A1 );
947 #if __cplusplus >= 201103L 948 tminIsNaN = std::isnan(tl.
min);
952 tminIsNaN = tl.
min != tl.
min;
957 <<
"tmin for diffractive scattering is NaN " 958 <<
"( Enu = " << Ev <<
", Q2 = " << Q2 <<
", nu = " << nu <<
")";
968 LOG(
"KPhaseSpace",
pWARN) <<
"It is not sensible to ask for t limits for events that are not coherent or diffractive.";
bool IsResonant(void) const
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
THE MAIN GENIE PROJECT NAMESPACE
bool IsDarkMatterElectronElastic(void) const
static const double kNucleonMass
double Q2(const Interaction *const i)
int HitNucPdg(void) const
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)
Generated/set kinematical variables for an event.
static const double kPhotontest
int SwitchProtonNeutron(int pdgc)
bool IsInverseBetaDecay(void) const
double x(bool selected=false) const
static const double kLightestChmHad
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)
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.
Range1D_t InelQ2Lim_W(double Ev, double M, double ml, double W, double Q2min_cut=controls::kMinQ2Limit)
double y(bool selected=false) const
bool IsCharmEvent(void) const
bool IsSingleKaon(void) const
Summary information for an interaction.
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.
bool IsNuElectronElastic(void) const
static constexpr double m2
ClassImp(KPhaseSpace) KPhaseSpace
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
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
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)
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.
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
bool IsInclusiveCharm(void) const
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
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)
Range1D_t q2Lim_W(void) const
q2 limits @ fixed W
static const double kProtonMass
Range1D_t DarkWLim(double Ev, double M, double ml)
Root of GENIE utility namespaces.
Range1D_t WLim(void) const
W limits.
static AlgConfigPool * Instance()
Initial State information.