17 #include "Framework/Conventions/GBuild.h"
36 using namespace genie;
37 using namespace genie::constants;
38 using namespace genie::utils;
61 if(!
this ->
ValidProcess (interaction) ) {
LOG(
"LwlynSmith",
pWARN) <<
"not a valid process";
return 0.;}
72 const Kinematics & kinematics = interaction -> Kine();
73 const InitialState & init_state = interaction -> InitState();
77 double E2 = TMath::Power(E,2);
80 double q2 = kinematics.
q2();
84 int sign = (is_neutrino) ? -1 : 1;
94 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
99 double ml2 = TMath::Power(ml, 2);
100 double M2 = TMath::Power(M, 2);
101 double M4 = TMath::Power(M2, 2);
102 double FA2 = TMath::Power(FA, 2);
103 double Fp2 = TMath::Power(Fp, 2);
104 double F1V2 = TMath::Power(F1V, 2);
105 double xiF2V2 = TMath::Power(xiF2V, 2);
107 double s_u = 4*E*M + q2 - ml2;
108 double q2_M2 = q2/M2;
111 double A = (0.25*(ml2-q2)/M2) * (
112 (4-q2_M2)*FA2 - (4+q2_M2)*F1V2 - q2_M2*xiF2V2*(1+0.25*q2_M2)
113 -4*q2_M2*F1V*xiF2V - (ml2/M2)*(
114 (F1V2+xiF2V2+2*F1V*xiF2V)+(FA2+4*Fp2+4*FA*Fp)+(q2_M2-4)*Fp2));
115 double B = -1 * q2_M2 * FA*(F1V+xiF2V);
116 double C = 0.25*(FA2 + F1V2 - 0.25*q2_M2*xiF2V2);
118 double xsec = Gfactor * (A + sign*B*s_u/M2 + C*s_u*s_u/M4);
121 double xsec_scale = 1 ;
128 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
130 <<
"dXSec[QEL]/dQ2 [FreeN](E = "<< E <<
", Q2 = "<< -q2 <<
") = "<< xsec;
132 <<
"A(Q2) = " << A <<
", B(Q2) = " << B <<
", C(Q2) = " << C;
140 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
142 <<
"Jacobian for transformation to: "
159 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
161 <<
"Nuclear suppression factor R(Q2) = " << R <<
", NNucl = " << NNucl;
174 const Kinematics& kinematics = interaction -> Kine();
175 const InitialState& init_state = interaction -> InitState();
179 const TLorentzVector leptonMom = kinematics.
FSLeptonP4();
180 const TLorentzVector outNucleonMom = kinematics.
HadSystP4();
187 double pNf = outNucleonMom.P();
188 if ( pNf < kF )
return 0.;
195 TLorentzVector neutrinoMom = *tempNeutrino;
215 double mNucleon = ( mNi + interaction->
RecoilNucleon()->Mass() ) / 2.;
218 TLorentzVector qP4 = neutrinoMom - leptonMom;
221 double inNucleonOnShellEnergy = std::sqrt( std::pow(mNi, 2)
222 + std::pow(inNucleonMom->P(), 2) );
223 TLorentzVector inNucleonMomOnShell( inNucleonMom->Vect(), inNucleonOnShellEnergy );
227 TLorentzVector qTildeP4 = outNucleonMom - inNucleonMomOnShell;
229 double Q2 = -1. * qP4.Mag2();
230 double Q2tilde = -1. * qTildeP4.Mag2();
234 if ( qTildeP4.E() <= 0. && init_state.
Tgt().
IsNucleus() &&
236 if ( Q2tilde <= 0. )
return 0.;
257 * neutrinoMom.E() * outNucleonMom.E() * leptonMom.E() );
260 double tau = Q2tilde / (4 * std::pow(mNucleon, 2));
261 double h1 = FA*FA*(1 + tau) + tau*(F1V + xiF2V)*(F1V + xiF2V);
262 double h2 = FA*FA + F1V*F1V + tau*xiF2V*xiF2V;
263 double h3 = 2.0 * FA * (F1V + xiF2V);
264 double h4 = 0.25 * xiF2V*xiF2V *(1-tau) + 0.5*F1V*xiF2V + FA*Fp - tau*Fp*Fp;
267 int sign = (is_neutrino) ? -1 : 1;
268 double l1 = 2*neutrinoMom.Dot(leptonMom)*std::pow(mNucleon, 2);
269 double l2 = 2*(neutrinoMom.Dot(inNucleonMomOnShell)) * (inNucleonMomOnShell.Dot(leptonMom)) - neutrinoMom.Dot(leptonMom)*std::pow(mNucleon, 2);
270 double l3 = (neutrinoMom.Dot(inNucleonMomOnShell) * qTildeP4.Dot(leptonMom)) - (neutrinoMom.Dot(qTildeP4) * leptonMom.Dot(inNucleonMomOnShell));
272 double l4 = neutrinoMom.Dot(leptonMom) * qTildeP4.Dot(qTildeP4) - 2*neutrinoMom.Dot(qTildeP4)*leptonMom.Dot(qTildeP4);
273 double l5 = neutrinoMom.Dot(inNucleonMomOnShell) * leptonMom.Dot(qTildeP4) + leptonMom.Dot(inNucleonMomOnShell)*neutrinoMom.Dot(qTildeP4) - neutrinoMom.Dot(leptonMom)*inNucleonMomOnShell.Dot(qTildeP4);
275 double LH = 2 *(l1*h1 + l2*h2 + l3*h3 + l4*h4 + l5*h2);
277 double xsec = Gfactor * LH;
286 double xsec_scale = 1 ;
293 const Target & target = init_state.
Tgt();
297 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
299 <<
"Nuclear suppression factor R(Q2) = " << R <<
", NNucl = " << NNucl;
341 int Zf = (is_p) ? Zi-1 : Zi;
348 <<
"Unknwown nuclear target! No target with code: "
352 double Mi = nucl_i ->
Mass();
353 double Mf = nucl_f ->
Mass();
358 double xsec_sum = 0.;
359 const int nnuc = 2000;
364 for(
int inuc=0;inuc<nnuc;inuc++){
372 double EN = Mi - TMath::Sqrt(p3N.Mag2() + Mf*Mf);
374 p4N->SetPx (p3N.Px());
375 p4N->SetPy (p3N.Py());
376 p4N->SetPz (p3N.Pz());
382 double xsec_avg = xsec_sum / nnuc;
407 bool prcok = proc_info.
IsWeakCC() && ((isP&&isnub) || (isN&&isnu));
408 if(!prcok)
return false;
433 fCos8c2 = TMath::Power(TMath::Cos(thc), 2);
437 this->
SubAlg(
"FormFactorsAlg"));
447 RgKey nuclkey =
"IntegralNuclearModel";
453 bool average_over_nuc_mom ;
454 GetParamDef(
"IntegralAverageOverNucleonMomentum", average_over_nuc_mom,
false ) ;
465 std::string temp_binding_mode;
466 GetParamDef(
"IntegralNucleonBindingMode", temp_binding_mode, std::string(
"UseNuclearModel") );
470 GetParamDef(
"IntegralNucleonBindingMode", temp_binding_mode, std::string(
"UseNuclearModel") );
double FullDifferentialXSec(const Interaction *i) const
Cross Section Calculation Interface.
double fXSecCCScale
external xsec scaling factor for CC
TVector3 GenerateVertex(const Interaction *in, double A) const
bool IsWeakCC(void) const
double fXSecNCScale
external xsec scaling factor for NC
bool IsNeutrino(int pdgc)
double J(double q0, double q3, double Enu, double ml)
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
TParticlePDG * RecoilNucleon(void) const
recoil nucleon
bool fLFG
If the nuclear model is lfg alway average over nucleons.
int RecoilNucleonPdg(void) const
recoil nucleon pdg
bool IsQuasiElastic(void) const
double HitNucMass(void) const
bool IsNucleus(void) const
Generated/set kinematical variables for an event.
Examines whether the generated event should be Pauli blocked. Is a concerete implementation of the Ev...
const NuclearModelI * fNuclModel
const TLorentzVector & HadSystP4(void) const
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
double Mass(Resonance_t res)
resonance mass (GeV)
void SetHitNucPosition(double r)
enum genie::EKinePhaseSpace KinePhaseSpace_t
bool fDoAvgOverNucleonMomentum
Average cross section over hit nucleon monentum?
double Integral(const Interaction *i) const
const TVector3 & Momentum3(void) const
virtual NuclearModel_t ModelType(const Target &) const =0
QELEvGen_BindingMode_t fIntegralNucleonBindingMode
Summary information for an interaction.
double GetFermiMomentum(const Target &tgt, int pdg_Nf, double radius=0.0) const
Get the Fermi momentum needed to check Pauli blocking.
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
double q2(bool selected=false) const
const QELFormFactorsModelI * fFormFactorsModel
bool IsWeakNC(void) const
const XSecIntegratorI * fXSecIntegrator
const TLorentzVector & FSLeptonP4(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual ~LwlynSmithQELCCPXSec()
static constexpr double A
double EnergyDeltaFunctionSolutionQEL(const Interaction &inter)
static string AsString(KinePhaseSpace_t kps)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsAntiNeutrino(int pdgc)
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
virtual void Configure(const Registry &config)
bool fDoPauliBlocking
Whether to apply Pauli blocking in FullDifferentialXSec.
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
QELFormFactors fFormFactors
void Configure(const Registry &config)
virtual const AlgId & Id(void) const
Get algorithm ID.
TLorentzVector * HitNucP4Ptr(void) const
static PDGLibrary * Instance(void)
Singleton class to load & serve a TDatabasePDG.
A registry. Provides the container for algorithm configuration parameters.
const UInt_t kIAssumeFreeNucleon
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
double HitNucPosition(void) const
QELEvGen_BindingMode_t StringToQELBindingMode(const std::string &mode_str)
Target * TgtPtr(void) const
double fCos8c2
cos^2(cabibbo angle)
int IonPdgCode(int A, int Z)
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
TParticlePDG * Find(int pdgc, bool must_exist=true)
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
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
virtual bool GenerateNucleon(const Target &) const =0
double ProbeE(RefFrame_t rf) const
const genie::PauliBlocker * fPauliBlocker
The PauliBlocker instance to use to apply that correction.
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
void Configure(const Registry &config)
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
const UInt_t kISkipProcessChk
if set, skip process validity checks
double NuclQELXSecSuppression(string kftable, double pmax, const Interaction *in)
Initial State information.
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
const Algorithm * SubAlg(const RgKey ®istry_key) const