19 #include "Framework/Conventions/GBuild.h"
29 using namespace genie;
30 using namespace genie::constants;
31 using namespace genie::controls;
67 double mv = init_state.
Probe()->Mass();
69 double pv = std::sqrt( std::max(0., Ev*Ev - mv*mv) );
72 const TLorentzVector& hit_nuc_P4 = init_state.
Tgt().
HitNucP4();
73 double M = hit_nuc_P4.M();
84 double pl = std::sqrt( Tl*Tl + 2.*ml*Tl );
85 double Q2 = -mv*mv - ml*ml + 2.*Ev*El - 2.*pv*pl*ctl;
88 double omega = Ev - El;
90 double W = std::sqrt( std::max(0., M*M - Q2 + 2.*omega*M) );
106 const Kinematics & kinematics = interaction -> Kine();
107 double W = kinematics.
W();
108 double Q2 = kinematics.
Q2();
117 double M2n2 = M2n*M2n;
123 if(W < Wlim.min || W > Wlim.
max)
131 if(Q2 < Q2lim.min || Q2 > Q2lim.
max)
145 double Q2dep = Q2*TMath::Power((1+Q2/
fMq2d),-8.);
148 double FF2 = Wdep * Q2dep;
161 double sin2_halftheta = M2n*Q2 / (4*M2n*E2 - 2*E*
Q2);
163 double cos2_halftheta = 1.-sin2_halftheta;
165 double tan2_halftheta = sin2_halftheta/cos2_halftheta;
169 double tau = Q2/(4*M2n2);
173 double Ep = E / (1. + 2.*(E/M2n)*sin2_halftheta);
177 xsec = 4*
kAem2*Ep2*cos2_halftheta/Q4 * FF2 * (tau/(1+tau) +2*tau*tan2_halftheta);
182 double tau = Q2/(4*M2n2);
183 double tau2 = tau*tau;
184 double smufac = 4*M2n*Ev - Q2 - ml*ml;
185 double A = (ml*ml+
Q2)/M2n2 * (tau*(1+tau) - tau2*(1-tau)+4*tau2)/TMath::Power(1+tau,2.) * FF2;
186 double C = tau/4/(1+tau) * FF2;
187 xsec = A + smufac*smufac*C;
190 if ( kps!=
kPSWQ2fE && xsec != 0. ) {
192 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
194 <<
"Jacobian for transformation to: "
258 double fFracADep = 1.;
259 if(A>=12) fFracADep = TMath::Power((N/6.),
fMECAPower-1.);
266 double fFracCCQE_cluster=0.;
273 xsec *=
fFracCCQE*fFracCCQE_cluster*fFracADep;
296 double fFracADep = 1.;
297 if(A>=12) fFracADep = TMath::Power((A/12.),
fMECAPower-1.);
302 double fFracNCQE_cluster=0.;
303 if(nucleon_cluster_pdg==2000000200) fFracNCQE_cluster= 0.5*(1-
fFracPN_NC);
304 if(nucleon_cluster_pdg==2000000201) fFracNCQE_cluster=
fFracPN_NC;
305 if(nucleon_cluster_pdg==2000000202) fFracNCQE_cluster= 0.5*(1-
fFracPN_NC);
306 xsec *=
fFracNCQE*fFracNCQE_cluster*fFracADep;
324 double fFracADep = 1.;
325 if(A>=12) fFracADep = TMath::Power((A/12.),
fMECAPower-1.);
330 double fFracEMQE_cluster=0.;
331 if(nucleon_cluster_pdg==2000000200) fFracEMQE_cluster= 0.5*(1-
fFracPN_EM);
332 if(nucleon_cluster_pdg==2000000201) fFracEMQE_cluster=
fFracPN_EM;
333 if(nucleon_cluster_pdg==2000000202) fFracEMQE_cluster= 0.5*(1-
fFracPN_EM);
334 xsec *=
fFracEMQE*fFracEMQE_cluster*fFracADep;
348 if(!proc_info.
IsMEC())
return false;
364 string global_key_head =
"XSecModel@genie::EventGenerator/" ;
365 string local_key_head =
"XSecModel-" ;
367 Registry r(
"EmpiricalMECPXSec2015_specific",
false ) ;
368 r.
Set( local_key_head +
"QEL-NC", algos -> GetAlg( global_key_head +
"QEL-NC") ) ;
369 r.
Set( local_key_head +
"QEL-CC", algos -> GetAlg( global_key_head +
"QEL-CC") ) ;
370 r.
Set( local_key_head +
"QEL-EM", algos -> GetAlg( global_key_head +
"QEL-EM") ) ;
396 string key_head =
"XSecModel-" ;
414 "genie::MECXSec",
"Fast") );
Cross Section Calculation Interface.
double W(bool selected=false) const
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
bool IsWeakCC(void) const
bool IsNeutrino(int pdgc)
double J(double q0, double q3, double Enu, double ml)
Range1D_t InelWLim(double El, double ml, double M)
Cross Section Integrator Interface.
double Q2(const Interaction *const i)
int HitNucPdg(void) const
void SetQ2(double Q2, bool selected=false)
Kinematics * KinePtr(void) const
void Configure(const Registry &config)
Range1D_t InelWLim(double Ev, double M, double ml)
A simple [min,max] interval for doubles.
double fFracPN_NC
toy model param: fraction of nucleon pairs that are pn, not nn or pp
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
Generated/set kinematical variables for an event.
TParticlePDG * Probe(void) const
double Mass(Resonance_t res)
resonance mass (GeV)
bool fIntegrateForReweighting
const XSecAlgorithmI * fXSecAlgCCQE
cross section algorithm for CCQE
const XSecAlgorithmI * fXSecAlgNCQE
cross section algorithm for NCQE
enum genie::EKinePhaseSpace KinePhaseSpace_t
static Interaction * QELCC(int tgt, int nuc, int probe, double E=0)
const XSecIntegratorI * fXSecIntegrator
Integrator used for reweighting.
double fMass
toy model param: peak of W distribution (GeV)
static const double kMinQ2Limit
Range1D_t InelQ2Lim_W(double Ev, double M, double ml, double W, double Q2min_cut=controls::kMinQ2Limit)
double W(const Interaction *const i)
Summary information for an interaction.
const TLorentzVector & HitNucP4(void) const
bool IsWeakNC(void) const
double fFracPN_CC
toy model param: fraction of nucleon pairs that are pn, not nn or pp
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static constexpr double A
static const double kAem2
static string AsString(KinePhaseSpace_t kps)
static Interaction * QELNC(int tgt, int nuc, int probe, double E=0)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsAntiNeutrino(int pdgc)
void WQ2toXY(double Ev, double M, double W, double Q2, double &x, double &y)
const Kinematics & Kine(void) const
virtual void Configure(const Registry &config)
double fWidth
toy model param: width of W distribution (GeV)
double GetKV(KineVar_t kv) const
Algorithm * AdoptAlgorithm(const AlgId &algid) const
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
double fMq2d
toy model param: `mass' in dipole (Q2 - dependence) form factor (GeV)
double fFracPN_EM
toy model param: fraction of nucleon pairs that are pn, not nn or pp
void SetW(double W, bool selected=false)
Range1D_t InelQ2Lim_W(double El, double ml, double M, double W)
static PDGLibrary * Instance(void)
const XSecAlgorithmI * fXSecAlgEMQE
cross section algorithm for EMQE
static AlgFactory * Instance()
double Integral(const Interaction *i) const
static Interaction * QELEM(int tgt, int nuc, int probe, double E=0)
double fFracEMQE
empirical model param: MEC cross section is taken to be this fraction of Rosenbluth xs ...
A registry. Provides the container for algorithm configuration parameters.
double fFracNCQE
empirical model param: MEC cross section is taken to be this fraction of NCQE cross section ...
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
double fFracCCQE
empirical model param: MEC cross section is taken to be this fraction of CCQE cross section ...
TParticlePDG * Find(int pdgc, bool must_exist=true)
double fMECAPower
power of A relative to carbon
double Q2(bool selected=false) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
The GENIE Algorithm Factory.
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
void Set(RgIMapPair entry)
double ProbeE(RefFrame_t rf) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
virtual ~EmpiricalMECPXSec2015()
virtual double Integral(const Interaction *i) const =0
const UInt_t kISkipProcessChk
if set, skip process validity checks
static AlgConfigPool * Instance()
Initial State information.
const Algorithm * SubAlg(const RgKey ®istry_key) const