GENIEGenerator
Loading...
Searching...
No Matches
IMDAnnihilationPXSec.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 Rosen Matev (r.matev@gmail.com)
7*/
8//____________________________________________________________________________
9
11#include "Framework/Conventions/GBuild.h"
20
21using namespace genie;
22using namespace genie::constants;
23using namespace genie::controls;
24
25//____________________________________________________________________________
27XSecAlgorithmI("genie::IMDAnnihilationPXSec")
28{
29
30}
31//____________________________________________________________________________
33XSecAlgorithmI("genie::IMDAnnihilationPXSec", config)
34{
35
36}
37//____________________________________________________________________________
42//____________________________________________________________________________
44 const Interaction * interaction, KinePhaseSpace_t kps) const
45{
46 if(! this -> ValidProcess (interaction) ) return 0.;
47 if(! this -> ValidKinematics (interaction) ) return 0.;
48
49 //----- get initial state & kinematics
50 const InitialState & init_state = interaction -> InitState();
51 const Kinematics & kinematics = interaction -> Kine();
52
53 double Ev = init_state.ProbeE(kRfLab);
54 double twoMeEv = 2*kElectronMass*Ev;
55 double ymax = 1 - kMuonMass2/(twoMeEv + kElectronMass2);
56 double y = kinematics.y();
57 double A = kGF2/kPi;
58
59 LOG("IMDAnnihilation", pDEBUG) << "Ev = " << Ev << ", y = " << y << ", ymax = " << ymax;
60 //Note: y = (Ev-El)/Ev but in Marciano's paper y=(El-(m_l^2+m_e^2)/2m_e)/Ev.
61 y = 1 - y - (kMuonMass2 + kElectronMass2)/twoMeEv;
62
63 if(y > ymax) return 0;
64 if(y < 0) return 0;
65
66 double xsec = A*(twoMeEv*TMath::Power(1-y,2) - (kMuonMass2 - kElectronMass2)*(1-y)); // <-- dxsec/dy
67
68#ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__
69 LOG("IMDAnnihilation", pDEBUG)
70 << "*** dxsec(ve-)/dy [free e-](Ev="<< Ev << ", y= "<< y<< ") = "<< xsec;
71#endif
72
73 //----- The algorithm computes dxsec/dy
74 // Check whether variable tranformation is needed
75 if(kps!=kPSyfE) {
76 double J = utils::kinematics::Jacobian(interaction,kPSyfE,kps);
77 xsec *= J;
78 }
79
80 //----- If requested return the free electron xsec even for nuclear target
81 if( interaction->TestBit(kIAssumeFreeElectron) ) return xsec;
82
83 //----- Scale for the number of scattering centers at the target
84 int Ne = init_state.Tgt().Z(); // num of scattering centers
85 xsec *= Ne;
86
87 return xsec;
88}
89//____________________________________________________________________________
90double IMDAnnihilationPXSec::Integral(const Interaction * interaction) const
91{
92 double xsec = fXSecIntegrator->Integrate(this,interaction);
93 return xsec;
94}
95//____________________________________________________________________________
96bool IMDAnnihilationPXSec::ValidProcess(const Interaction * interaction) const
97{
98 if(interaction->TestBit(kISkipProcessChk)) return true;
99 return true;
100}
101//____________________________________________________________________________
103{
104 if(interaction->TestBit(kISkipKinematicChk)) return true;
105 return true;
106}
107//____________________________________________________________________________
109{
110 Algorithm::Configure(config);
111 this->LoadConfig();
112}
113//____________________________________________________________________________
115{
116 Algorithm::Configure(config);
117 this->LoadConfig();
118}
119//____________________________________________________________________________
121{
122 // load XSec Integrator
124 dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
125 assert(fXSecIntegrator);
126}
127//____________________________________________________________________________
#define pDEBUG
Definition Messenger.h:63
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
const Algorithm * SubAlg(const RgKey &registry_key) const
void Configure(const Registry &config)
const XSecIntegratorI * fXSecIntegrator
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.
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
double Integral(const Interaction *i) const
Initial State information.
const Target & Tgt(void) const
double ProbeE(RefFrame_t rf) const
Summary information for an interaction.
Definition Interaction.h:56
Generated/set kinematical variables for an event.
Definition Kinematics.h:39
double y(bool selected=false) const
A registry. Provides the container for algorithm configuration parameters.
Definition Registry.h:65
int Z(void) const
Definition Target.h:68
Cross Section Integrator Interface.
Basic constants.
Misc GENIE control constants.
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
const UInt_t kIAssumeFreeElectron
Definition Interaction.h:50
enum genie::EKinePhaseSpace KinePhaseSpace_t
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition Interaction.h:48
@ kRfLab
Definition RefFrame.h:26
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition Interaction.h:47