GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IMDAnnihilationPXSec.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  Rosen Matev (r.matev@gmail.com)
7 */
8 //____________________________________________________________________________
9 
11 #include "Framework/Conventions/GBuild.h"
20 
21 using namespace genie;
22 using namespace genie::constants;
23 using namespace genie::controls;
24 
25 //____________________________________________________________________________
27 XSecAlgorithmI("genie::IMDAnnihilationPXSec")
28 {
29 
30 }
31 //____________________________________________________________________________
33 XSecAlgorithmI("genie::IMDAnnihilationPXSec", config)
34 {
35 
36 }
37 //____________________________________________________________________________
39 {
40 
41 }
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 //____________________________________________________________________________
90 double IMDAnnihilationPXSec::Integral(const Interaction * interaction) const
91 {
92  double xsec = fXSecIntegrator->Integrate(this,interaction);
93  return xsec;
94 }
95 //____________________________________________________________________________
96 bool 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 //____________________________________________________________________________
Cross Section Calculation Interface.
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
void Configure(const Registry &config)
enum genie::EKinePhaseSpace KinePhaseSpace_t
static const double kElectronMass
double y(bool selected=false) const
Definition: Kinematics.cxx:112
bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
Summary information for an interaction.
Definition: Interaction.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static const double kElectronMass2
static constexpr double A
Definition: Units.h:74
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
const XSecIntegratorI * fXSecIntegrator
int Z(void) const
Definition: Target.h:68
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
double Integral(const Interaction *i) const
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
Definition: KineUtils.cxx:130
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
const Target & Tgt(void) const
Definition: InitialState.h:66
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
double ProbeE(RefFrame_t rf) const
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