17#include "Framework/Conventions/GBuild.h"
61 if(!
this ->
ValidProcess (interaction) ) {
LOG(
"LwlynSmith",
pWARN) <<
"not a valid process";
return 0.;}
73 const InitialState & init_state = interaction -> InitState();
77 double E2 = TMath::Power(E,2);
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;
175 const InitialState& init_state = interaction -> InitState();
179 const TLorentzVector leptonMom =
kinematics.FSLeptonP4();
180 const TLorentzVector outNucleonMom =
kinematics.HadSystP4();
185 double kF =
fPauliBlocker->GetFermiMomentum(tgt, final_nucleon_pdg,
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++){
370 fNuclModel->GenerateNucleon(*tgt, nucpos.Mag());
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") );
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual void Configure(const Registry &config)
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const Algorithm * SubAlg(const RgKey ®istry_key) const
Initial State information.
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
const Target & Tgt(void) const
double ProbeE(RefFrame_t rf) const
Target * TgtPtr(void) const
Summary information for an interaction.
TParticlePDG * RecoilNucleon(void) const
recoil nucleon
int RecoilNucleonPdg(void) const
recoil nucleon pdg
const ProcessInfo & ProcInfo(void) const
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const InitialState & InitState(void) const
Kinematics * KinePtr(void) const
static string AsString(KinePhaseSpace_t kps)
Generated/set kinematical variables for an event.
void SetQ2(double Q2, bool selected=false)
bool fDoAvgOverNucleonMomentum
Average cross section over hit nucleon monentum?
virtual ~LwlynSmithQELCCPXSec()
const NuclearModelI * fNuclModel
double fCos8c2
cos^2(cabibbo angle)
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
double fXSecNCScale
external xsec scaling factor for NC
void Configure(const Registry &config)
bool fDoPauliBlocking
Whether to apply Pauli blocking in FullDifferentialXSec.
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
const XSecIntegratorI * fXSecIntegrator
double fXSecCCScale
external xsec scaling factor for CC
double Integral(const Interaction *i) const
QELFormFactors fFormFactors
QELEvGen_BindingMode_t fIntegralNucleonBindingMode
const genie::PauliBlocker * fPauliBlocker
The PauliBlocker instance to use to apply that correction.
const QELFormFactorsModelI * fFormFactorsModel
double FullDifferentialXSec(const Interaction *i) const
bool fLFG
If the nuclear model is lfg alway average over nucleons.
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Singleton class to load & serve a TDatabasePDG.
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
Examines whether the generated event should be Pauli blocked. Is a concerete implementation of the Ev...
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsWeakNC(void) const
bool IsWeakCC(void) const
bool IsQuasiElastic(void) const
A registry. Provides the container for algorithm configuration parameters.
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
int HitNucPdg(void) const
void SetHitNucPosition(double r)
TLorentzVector * HitNucP4Ptr(void) const
double HitNucPosition(void) const
double HitNucMass(void) const
bool IsNucleus(void) const
void Configure(const Registry &config)
TVector3 GenerateVertex(const Interaction *in, double A) const
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
Cross Section Integrator Interface.
bool IsNeutrino(int pdgc)
int IonPdgCode(int A, int Z)
bool IsAntiNeutrino(int pdgc)
Simple functions for loading and reading nucleus dependent keys from config files.
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
double NuclQELXSecSuppression(string kftable, double pmax, const Interaction *in)
Root of GENIE utility namespaces.
QELEvGen_BindingMode_t StringToQELBindingMode(const std::string &mode_str)
double EnergyDeltaFunctionSolutionQEL(const Interaction &inter)
THE MAIN GENIE PROJECT NAMESPACE
enum genie::EKinePhaseSpace KinePhaseSpace_t
const UInt_t kISkipProcessChk
if set, skip process validity checks
const UInt_t kIAssumeFreeNucleon