GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NuElectronPXSec.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <c.andreopoulos \at cern.ch>
7  University of Liverpool
8 */
9 //____________________________________________________________________________
10 
12 #include "Framework/Conventions/GBuild.h"
21 
22 using namespace genie;
23 using namespace genie::constants;
24 using namespace genie::controls;
25 
26 //____________________________________________________________________________
28 XSecAlgorithmI("genie::NuElectronPXSec")
29 {
30 
31 }
32 //____________________________________________________________________________
34 XSecAlgorithmI("genie::NuElectronPXSec", config)
35 {
36 
37 }
38 //____________________________________________________________________________
40 {
41 
42 }
43 //____________________________________________________________________________
45  const Interaction * interaction, KinePhaseSpace_t kps) const
46 {
47  if(! this -> ValidProcess (interaction) ) return 0.;
48  if(! this -> ValidKinematics (interaction) ) return 0.;
49 
50  //----- get initial state & kinematics
51  const InitialState & init_state = interaction -> InitState();
52  const Kinematics & kinematics = interaction -> Kine();
53  const ProcessInfo & proc_info = interaction -> ProcInfo();
54 
55  double Ev = init_state.ProbeE(kRfLab);
56  double me = kElectronMass;
57  double y = kinematics.y();
58  double A = kGF2*2*me*Ev/kPi;
59 
60  y = 1 - me/Ev - y; // FSPL = electron. XSec below are expressed in Marciano's y!
61  if(y > 1/(1+0.5*me/Ev)) return 0;
62  if(y < 0) return 0;
63 
64  double xsec = 0; // <-- dxsec/dy
65 
66  int inu = init_state.ProbePdg();
67 
68  // nue + e- -> nue + e- [CC + NC + interference]
69  if(pdg::IsNuE(inu))
70  {
71  double em = -0.5 - fSin28w;
72  double ep = -fSin28w;
73  xsec = TMath::Power(em,2) + TMath::Power(ep*(1-y),2) - ep*em*me*y/Ev;
74  xsec *= A;
75  }
76 
77  // nuebar + e- -> nue + e- [CC + NC + interference]
78  if(pdg::IsAntiNuE(inu))
79  {
80  double em = -0.5 - fSin28w;
81  double ep = -fSin28w;
82  xsec = TMath::Power(ep,2) + TMath::Power(em*(1-y),2) - ep*em*me*y/Ev;
83  xsec *= A;
84  }
85 
86  // numu/nutau + e- -> numu/nutau + e- [NC]
87  if( (pdg::IsNuMu(inu)||pdg::IsNuTau(inu)) && proc_info.IsWeakNC() )
88  {
89  double em = 0.5 - fSin28w;
90  double ep = -fSin28w;
91  xsec = TMath::Power(em,2) + TMath::Power(ep*(1-y),2) - ep*em*me*y/Ev;
92  xsec *= A;
93  }
94 
95  // numubar/nutaubar + e- -> numubar/nutaubar + e- [NC]
96  if( (pdg::IsAntiNuMu(inu)||pdg::IsAntiNuTau(inu)) && proc_info.IsWeakNC() )
97  {
98  double em = 0.5 - fSin28w;
99  double ep = -fSin28w;
100  xsec = TMath::Power(ep,2) + TMath::Power(em*(1-y),2) - ep*em*me*y/Ev;
101  xsec *= A;
102  }
103 
104  // numu/nutau + e- -> l- + nu_e [CC}
105  if( (pdg::IsNuMu(inu)||pdg::IsNuTau(inu)) && proc_info.IsWeakCC() ) xsec=0;
106 /*
107  double ml = (pdg::IsNuMu(inu)) ? kMuonMass : kTauMass;
108  double ml2 = TMath::Power(ml,2);
109  xsec = (kGF2*s/kPi)*(1-ml2/s);
110  xsec = TMath::Max(0.,xsec); // if s<ml2 => xsec<0 : force to xsec=0
111 */
112 
113 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
114  LOG("Elastic", pDEBUG)
115  << "*** dxsec(ve-)/dy [free e-](Ev="<< Ev << ", y= "<< y<< ") = "<< xsec;
116 #endif
117 
118  //----- The algorithm computes dxsec/dy
119  // Check whether variable tranformation is needed
120  if(kps!=kPSyfE) {
121  double J = utils::kinematics::Jacobian(interaction,kPSyfE,kps);
122  xsec *= J;
123  }
124 
125  //----- If requested return the free electron xsec even for nuclear target
126  if( interaction->TestBit(kIAssumeFreeElectron) ) return xsec;
127 
128  //----- Scale for the number of scattering centers at the target
129  int Ne = init_state.Tgt().Z(); // num of scattering centers
130  xsec *= Ne;
131 
132  return xsec;
133 }
134 //____________________________________________________________________________
135 double NuElectronPXSec::Integral(const Interaction * interaction) const
136 {
137  double xsec = fXSecIntegrator->Integrate(this,interaction);
138  return xsec;
139 }
140 //____________________________________________________________________________
141 bool NuElectronPXSec::ValidProcess(const Interaction * interaction) const
142 {
143  if(interaction->TestBit(kISkipProcessChk)) return true;
144  return true;
145 }
146 //____________________________________________________________________________
147 bool NuElectronPXSec::ValidKinematics(const Interaction* interaction) const
148 {
149  if(interaction->TestBit(kISkipKinematicChk)) return true;
150  return true;
151 }
152 //____________________________________________________________________________
154 {
155  Algorithm::Configure(config);
156  this->LoadConfig();
157 }
158 //____________________________________________________________________________
159 void NuElectronPXSec::Configure(string config)
160 {
161  Algorithm::Configure(config);
162  this->LoadConfig();
163 }
164 //____________________________________________________________________________
166 {
167  // weinberg angle
168  double thw ;
169  GetParam( "WeinbergAngle", thw ) ;
170  fSin28w = TMath::Power(TMath::Sin(thw), 2);
171  fSin48w = TMath::Power(TMath::Sin(thw), 4);
172 
173  // load XSec Integrator
175  dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
176  assert(fXSecIntegrator);
177 }
178 //____________________________________________________________________________
Cross Section Calculation Interface.
bool IsNuTau(int pdgc)
Definition: PDGUtils.cxx:168
bool IsWeakCC(void) const
double J(double q0, double q3, double Enu, double ml)
Definition: MECUtils.cxx:147
Cross Section Integrator Interface.
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
bool IsAntiNuTau(int pdgc)
Definition: PDGUtils.cxx:183
bool IsNuE(int pdgc)
Definition: PDGUtils.cxx:158
const XSecIntegratorI * fXSecIntegrator
enum genie::EKinePhaseSpace KinePhaseSpace_t
static const double kElectronMass
double Integral(const Interaction *i) const
double y(bool selected=false) const
Definition: Kinematics.cxx:112
bool IsNuMu(int pdgc)
Definition: PDGUtils.cxx:163
Summary information for an interaction.
Definition: Interaction.h:56
bool IsWeakNC(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double A
Definition: Units.h:74
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
int ProbePdg(void) const
Definition: InitialState.h:64
int Z(void) const
Definition: Target.h:68
bool IsAntiNuMu(int pdgc)
Definition: PDGUtils.cxx:178
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
void Configure(const Registry &config)
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
Definition: KineUtils.cxx:130
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
Definition: InitialState.h:66
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
double ProbeE(RefFrame_t rf) const
bool IsAntiNuE(int pdgc)
Definition: PDGUtils.cxx:173
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition: Interaction.h:47
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63
const UInt_t kIAssumeFreeElectron
Definition: Interaction.h:50
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345