GENIEGenerator
Loading...
Searching...
No Matches
GLRESPXSec.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, 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
23using namespace genie;
24using namespace genie::constants;
25
26//____________________________________________________________________________
28XSecAlgorithmI("genie::GLRESPXSec")
29{
30 born = new Born();
31
32}
33//____________________________________________________________________________
34GLRESPXSec::GLRESPXSec(string config) :
35XSecAlgorithmI("genie::GLRESPXSec", config)
36{
37
38}
39//____________________________________________________________________________
44//____________________________________________________________________________
46 const Interaction * interaction, KinePhaseSpace_t kps) const
47{
48
49 if(! this -> ValidProcess (interaction) ) return 0.;
50
51 const InitialState & init_state = interaction -> InitState();
52 const Kinematics & kinematics = interaction -> Kine();
53 const XclsTag & xclstag = interaction -> ExclTag();
54
55 int loutpdg = xclstag.FinalLeptonPdg();
56
57 double mlout = interaction->FSPrimLepton()->Mass(); //mass of charged lepton
58 double mlin = kElectronMass; //mass of incoming charged lepton
59
60 double Enuin = init_state.ProbeE(kRfLab);
61 double s = born->GetS(mlin,Enuin);
62
63 double n1 = kinematics.GetKV(kKVn1);
64 double n2 = kinematics.GetKV(kKVn2);
65 double t = born->GetT(mlin,mlout,s,n1);
66 if (t>0) return 0.;
67
68 //nlo correction
69 double zeta = born->GetReAlpha()/kPi*(2.*TMath::Log(TMath::Sqrt(-t)/kElectronMass)-1.);
70 double omx = TMath::Power(n2, 1./zeta );
71 double pdf_soft = TMath::Exp(zeta*(3./4.-TMath::EulerGamma()))/TMath::Gamma(1.+zeta) + omx*(omx-2.)/2./n2;
72 if ( omx<0. || omx>1. ) return 0.;
73 double s_r = s*(1. - omx);
74 double t_r = t*(1. - omx);
75
76 //http://users.jyu.fi/~tulappi/fysh300sl11/l2.pdf [slide 22]
77 //remember we always define nuout as p4
78 double Enuout = (mlin*mlin-t_r)/2./mlin;
79 if ( !born->IsInPhaseSpace(mlin,mlout,Enuin,Enuout) ) return 0.;
80
81 double xsec = kPi/4./(s-mlin*mlin) * pdf_soft ;
82
83 if ( pdg::IsPion(loutpdg) ) {
84 if ( TMath::Sqrt(s_r)<fWmin ) return 0.; // The W limit is because hadronization might have issues at low W (as in PYTHIA6).
85 xsec *= 64.41/10.63;
86 }
87
88 double ME = 0.;
89 if ( loutpdg == kPdgElectron ) ME = born->PXSecCCRNC(s_r,t_r,mlin,mlout);
90 else ME = born->PXSecCCR (s_r,t_r,mlin,mlout);
91 xsec *= TMath::Max(0.,ME);
92
93 //----- If requested return the free electron xsec even for nuclear target
94 if( interaction->TestBit(kIAssumeFreeElectron) ) return xsec;
95
96 //----- Scale for the number of scattering centers at the target
97 int Ne = init_state.Tgt().Z(); // num of scattering centers
98 xsec *= Ne;
99
100 if(kps!=kPSn1n2fE) {
101 LOG("GLRESPXSec", pWARN)
102 << "Doesn't support transformation from "
105 xsec = 0;
106 }
107
108 LOG("GLRESPXSec", pINFO) << "dxsec/dn1dn2 (E= " << Enuin << ", n1= " << n1 << ", n2=" << n2 << ") = " << xsec;
109
110 return xsec;
111
112}
113//____________________________________________________________________________
114double GLRESPXSec::Integral(const Interaction * interaction) const
115{
116 double xsec = fXSecIntegrator->Integrate(this,interaction);
117
118 return xsec;
119}
120//____________________________________________________________________________
121bool GLRESPXSec::ValidProcess(const Interaction* interaction) const
122{
123 if(interaction->TestBit(kISkipProcessChk)) return true;
124
125 const ProcessInfo & proc_info = interaction->ProcInfo();
126 if(!proc_info.IsGlashowResonance()) return false;
127 if(!proc_info.IsWeakCC()) return false;
128
129 const InitialState & init_state = interaction -> InitState();
130 if(!pdg::IsAntiNuE(init_state.ProbePdg())) return false;
131
132 if(init_state.Tgt().HitNucIsSet()) return false;
133
134 return true;
135}
136//____________________________________________________________________________
137void GLRESPXSec::Configure(const Registry & config)
138{
139
140 Algorithm::Configure(config);
141 this->LoadConfig();
142}
143//____________________________________________________________________________
144void GLRESPXSec::Configure(string config)
145{
146 Algorithm::Configure(config);
147 this->LoadConfig();
148}
149//____________________________________________________________________________
151{
152
153 //-- load the differential cross section integrator
154 fXSecIntegrator = dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
155 assert(fXSecIntegrator);
156
157 GetParam( "Xsec-Wmin", fWmin ) ;
158
159
160}
#define pINFO
Definition Messenger.h:62
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
#define pWARN
Definition Messenger.h:60
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)
Definition Algorithm.cxx:62
const Algorithm * SubAlg(const RgKey &registry_key) const
Born level nu-electron cross section.
Definition Born.h:26
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
double fWmin
Minimum value of W.
Definition GLRESPXSec.h:53
const XSecIntegratorI * fXSecIntegrator
diff. xsec integrator
Definition GLRESPXSec.h:51
double Integral(const Interaction *i) const
void Configure(const Registry &config)
virtual ~GLRESPXSec()
void LoadConfig(void)
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
Initial State information.
const Target & Tgt(void) const
int ProbePdg(void) const
double ProbeE(RefFrame_t rf) const
Summary information for an interaction.
Definition Interaction.h:56
const ProcessInfo & ProcInfo(void) const
Definition Interaction.h:70
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
static string AsString(KinePhaseSpace_t kps)
Generated/set kinematical variables for an event.
Definition Kinematics.h:39
double GetKV(KineVar_t kv) const
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition ProcessInfo.h:46
bool IsWeakCC(void) const
bool IsGlashowResonance(void) const
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
int Z(void) const
Definition Target.h:68
bool HitNucIsSet(void) const
Definition Target.cxx:283
Cross Section Integrator Interface.
Contains minimal information for tagging exclusive processes.
Definition XclsTag.h:39
int FinalLeptonPdg(void) const
Definition XclsTag.h:74
Basic constants.
bool IsAntiNuE(int pdgc)
Definition PDGUtils.cxx:173
bool IsPion(int pdgc)
Definition PDGUtils.cxx:326
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
const UInt_t kIAssumeFreeElectron
Definition Interaction.h:50
@ kKVn2
Definition KineVar.h:62
@ kKVn1
Definition KineVar.h:61
enum genie::EKinePhaseSpace KinePhaseSpace_t
@ kRfLab
Definition RefFrame.h:26
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition Interaction.h:47
const int kPdgElectron
Definition PDGCodes.h:35