GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HENuElPXSec.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  Alfonso Garcia <aagarciasoto \at km3net.de>
7  IFIC & Harvard University
8 */
9 //____________________________________________________________________________
10 
11 #include <TMath.h>
12 
22 
23 using namespace genie;
24 using namespace genie::constants;
25 
26 //____________________________________________________________________________
28 XSecAlgorithmI("genie::HENuElPXSec")
29 {
30  born = new Born();
31 
32 }
33 //____________________________________________________________________________
34 HENuElPXSec::HENuElPXSec(string config) :
35 XSecAlgorithmI("genie::HENuElPXSec", config)
36 {
37 
38 }
39 //____________________________________________________________________________
41 {
42 
43 }
44 //____________________________________________________________________________
46  const Interaction * interaction, KinePhaseSpace_t kps) const
47 {
48 
49  if(! this -> ValidProcess (interaction) ) return 0.;
50 
51  const ProcessInfo & proc_info = interaction->ProcInfo();
52  const InitialState & init_state = interaction -> InitState();
53  const Kinematics & kinematics = interaction -> Kine();
54 
55  bool isCC = proc_info.IsWeakCC();
56 
57  int probepdg = init_state.ProbePdg();
58 
59  double mlout = interaction->FSPrimLepton()->Mass(); //mass of outgoing charged lepton
60  double mlin = kElectronMass; //mass of incoming charged lepton
61 
62  double Enuin = init_state.ProbeE(kRfLab);
63  double s = born->GetS(mlin,Enuin);
64 
65  double n1 = kinematics.GetKV(kKVn1);
66  double n2 = kinematics.GetKV(kKVn2);
67  double t = born->GetT( mlin, mlout, s, n1 );
68  if (t>0) return 0.;
69 
70  //nlo correction
71  double zeta = born->GetReAlpha()/kPi*(2.*TMath::Log(TMath::Sqrt(-t)/kElectronMass)-1.);
72  double omx = TMath::Power(n2, 1./zeta );
73  double pdf_soft = TMath::Exp(zeta*(3./4.-TMath::EulerGamma()))/TMath::Gamma(1.+zeta) + omx*(omx-2.)/2./n2;
74  if ( omx<0. || omx>1. ) return 0.;
75  double s_r = s*(1. - omx);
76  double t_r = t*(1. - omx);
77 
78  //http://users.jyu.fi/~tulappi/fysh300sl11/l2.pdf [slide 22]
79  //remember we always define nuout as p4
80  double Enuout = (mlin*mlin-t_r)/2./mlin;
81  if ( !born->IsInPhaseSpace(mlin,mlout,Enuin,Enuout) ) return 0.;
82 
83  double xsec = kPi/4./(s-mlin*mlin) * pdf_soft ;
84 
85  double ME = 0;
86  if ( pdg::IsNuE(init_state.ProbePdg()) ) ME = born->PXSecCCVNC(s_r,t_r,mlin,mlout);
87  else {
88  if (isCC) ME = born->PXSecCCV(s_r,t_r,mlin,mlout);
89  else {
90  if (probepdg>0) ME = born->PXSecNCVnu (s_r,t_r,mlin,mlout);
91  else ME = born->PXSecNCVnubar(s_r,t_r,mlin,mlout);
92  }
93  }
94  xsec *= TMath::Max(0.,ME);
95 
96  //----- If requested return the free electron xsec even for nuclear target
97  if( interaction->TestBit(kIAssumeFreeElectron) ) return xsec;
98 
99  //----- Scale for the number of scattering centers at the target
100  int Ne = init_state.Tgt().Z(); // num of scattering centers
101  xsec *= Ne;
102 
103  if(kps!=kPSn1n2fE) {
104  LOG("HENuElPXSec", pWARN)
105  << "Doesn't support transformation from "
106  << KinePhaseSpace::AsString(kPSn1n2fE) << " to "
107  << KinePhaseSpace::AsString(kps);
108  xsec = 0;
109  }
110 
111  LOG("HENuElPXSec", pINFO) << "dxsec/dn1dn2 (E= " << Enuin << ", n1= " << n1 << ", n2=" << n2 << ") = " << xsec;
112 
113  return xsec;
114 
115 }
116 //____________________________________________________________________________
117 double HENuElPXSec::Integral(const Interaction * interaction) const
118 {
119  double xsec = fXSecIntegrator->Integrate(this,interaction);
120 
121  return xsec;
122 }
123 //____________________________________________________________________________
124 bool HENuElPXSec::ValidProcess(const Interaction* interaction) const
125 {
126  if(interaction->TestBit(kISkipProcessChk)) return true;
127 
128  const ProcessInfo & proc_info = interaction->ProcInfo();
129  if(!proc_info.IsGlashowResonance()) return false;
130 
131  const InitialState & init_state = interaction -> InitState();
132  if(pdg::IsAntiNuE(init_state.ProbePdg())) return false;
133  if(pdg::IsNuE(init_state.ProbePdg()) && !proc_info.IsWeakCC()) return false;
134  if(pdg::IsAntiNuMu(init_state.ProbePdg()) && proc_info.IsWeakCC()) return false;
135  if(pdg::IsAntiNuTau(init_state.ProbePdg()) && proc_info.IsWeakCC()) return false;
136 
137  if(init_state.Tgt().HitNucIsSet()) return false;
138 
139  return true;
140 }
141 //____________________________________________________________________________
142 void HENuElPXSec::Configure(const Registry & config)
143 {
144 
145  Algorithm::Configure(config);
146  this->LoadConfig();
147 }
148 //____________________________________________________________________________
149 void HENuElPXSec::Configure(string config)
150 {
151  Algorithm::Configure(config);
152  this->LoadConfig();
153 }
154 //____________________________________________________________________________
156 {
157 
158  //-- load the differential cross section integrator
159  fXSecIntegrator = dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
160  assert(fXSecIntegrator);
161 
162 }
Cross Section Calculation Interface.
bool IsWeakCC(void) const
double GetT(double mlin, double mlout, double s, double costhCM)
Definition: Born.cxx:200
Cross Section Integrator Interface.
virtual ~HENuElPXSec()
Definition: HENuElPXSec.cxx:40
void LoadConfig(void)
static constexpr double s
Definition: Units.h:95
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
double PXSecNCVnubar(double s, double t, double mlin, double mlout)
Definition: Born.cxx:109
bool IsInPhaseSpace(double mlin, double mlout, double Enuin, double Enuout)
Definition: Born.cxx:212
enum genie::EKinePhaseSpace KinePhaseSpace_t
static const double kElectronMass
const XSecIntegratorI * fXSecIntegrator
diff. xsec integrator
Definition: HENuElPXSec.h:51
double GetReAlpha(void)
Definition: Born.h:32
double Integral(const Interaction *i) const
Summary information for an interaction.
Definition: Interaction.h:56
double PXSecCCVNC(double s, double t, double mlin, double mlout)
Definition: Born.cxx:87
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static string AsString(KinePhaseSpace_t kps)
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
double GetKV(KineVar_t kv) const
Definition: Kinematics.cxx:323
#define pINFO
Definition: Messenger.h:62
double GetS(double mlin, double Enuin)
Definition: Born.cxx:195
void Configure(const Registry &config)
bool IsAntiNuMu(int pdgc)
Definition: PDGUtils.cxx:178
#define pWARN
Definition: Messenger.h:60
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
Born level nu-electron cross section.
Definition: Born.h:26
bool HitNucIsSet(void) const
Definition: Target.cxx:283
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
Definition: HENuElPXSec.cxx:45
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
double PXSecCCV(double s, double t, double mlin, double mlout)
Definition: Born.cxx:67
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
const Target & Tgt(void) const
Definition: InitialState.h:66
double PXSecNCVnu(double s, double t, double mlin, double mlout)
Definition: Born.cxx:98
bool IsGlashowResonance(void) const
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
double ProbeE(RefFrame_t rf) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
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
const UInt_t kIAssumeFreeElectron
Definition: Interaction.h:50
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345