GENIEGenerator
Loading...
Searching...
No Matches
LabFrameHadronTensorI.cxx
Go to the documentation of this file.
1// standard library includes
2#include <cmath>
3
4// GENIE includes
10
12 const Interaction* interaction, double Q_value) const
13{
14 // Don't do anything if you've been handed a nullptr
15 if ( !interaction ) return 0.;
16
17 int probe_pdg = interaction->InitState().ProbePdg();
18 double E_probe = interaction->InitState().ProbeE(kRfLab);
19 double m_probe = interaction->InitState().Probe()->Mass();
20 double Tl = interaction->Kine().GetKV(kKVTl);
21 double cos_l = interaction->Kine().GetKV(kKVctl);
22 double ml = interaction->FSPrimLepton()->Mass();
23
24 return contraction(probe_pdg, E_probe, m_probe, Tl, cos_l, ml, Q_value);
25}
26
27double genie::LabFrameHadronTensorI::contraction(int probe_pdg, double E_probe,
28 double m_probe, double Tl, double cos_l, double ml, double Q_value) const
29{
30 // Final state lepton total energy
31 double El = Tl + ml;
32
33 // Energy transfer (uncorrected)
34 double q0 = E_probe - El;
35
36 // The corrected energy transfer takes into account the binding
37 // energy of the struck nucleon(s)
38 double q0_corrected = q0 - Q_value;
39
40 // Magnitude of the initial state lepton 3-momentum
41 double k_initial = std::sqrt( std::max(0., std::pow(E_probe, 2)
42 - std::pow(m_probe, 2) ));
43
44 // Magnitude of the final state lepton 3-momentum
45 double k_final = std::sqrt( std::max(0., std::pow(Tl, 2) + 2*ml*Tl) );
46
47 // Square of the magnitude of the 3-momentum transfer
48 double q_mag2 = std::pow(k_initial, 2) + std::pow(k_final, 2)
49 - 2.*k_initial*k_final*cos_l;
50
51 // Square of the magnitude of the 4-momentum transfer
52 double q2 = q0_corrected*q0_corrected - q_mag2;
53
54 // Differential cross section
55 double xs = dSigma_dT_dCosTheta(probe_pdg, E_probe, m_probe, Tl, cos_l, ml,
56 Q_value);
57
58 if ( pdg::IsNeutrino(probe_pdg) || pdg::IsAntiNeutrino(probe_pdg) ) {
59 /// See equation (3) of Nieves, Amaro, and Valverde, Phys. Rev. C 70,
60 /// 055503 (2004)
61 xs *= 2. * genie::constants::kPi * k_initial
62 / (k_final * genie::constants::kGF2);
63 }
64 else if ( probe_pdg == kPdgElectron ) {
65 /// See equation (82) of Gil, Nieves, and Oset, Nucl. Phys. A 627, 543
66 /// (1997)
67 xs *= std::pow(q2 / genie::constants::kAem, 2) * k_initial / k_final
68 / (2. * genie::constants::kPi);
69 }
70 else {
71 LOG("TabulatedHadronTensor", pERROR)
72 << "Unknown probe PDG code " << probe_pdg
73 << "encountered.";
74 return 0.;
75 }
76
77 return xs;
78}
#define pERROR
Definition Messenger.h:59
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
TParticlePDG * Probe(void) const
int ProbePdg(void) const
double ProbeE(RefFrame_t rf) const
Summary information for an interaction.
Definition Interaction.h:56
const Kinematics & Kine(void) const
Definition Interaction.h:71
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const InitialState & InitState(void) const
Definition Interaction.h:69
double GetKV(KineVar_t kv) const
virtual double contraction(const Interaction *interaction, double Q_value) const
virtual double dSigma_dT_dCosTheta(const Interaction *interaction, double Q_value) const =0
bool IsNeutrino(int pdgc)
Definition PDGUtils.cxx:110
bool IsAntiNeutrino(int pdgc)
Definition PDGUtils.cxx:118
@ kKVTl
Definition KineVar.h:38
@ kKVctl
Definition KineVar.h:39
@ kRfLab
Definition RefFrame.h:26
const int kPdgElectron
Definition PDGCodes.h:35