GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PhotonCOHPXSec.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 
20 
21 using namespace genie;
22 using namespace genie::constants;
23 
24 const double a = 0.523 * (units::fermi);
25 const double r0 = 1.126 * (units::fermi);
26 
27 //____________________________________________________________________________
29 XSecAlgorithmI("genie::PhotonCOHPXSec")
30 {
31  born = new Born();
32 }
33 //____________________________________________________________________________
35 XSecAlgorithmI("genie::PhotonCOHPXSec", 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 InitialState & init_state = interaction -> InitState();
52  const Kinematics & kinematics = interaction -> Kine();
53 
54  int probepdg = init_state.ProbePdg();
55  double E = init_state.ProbeE(kRfLab);
56 
57  double mlout = 0;
58  if (pdg::IsNuE (TMath::Abs(probepdg))) mlout = kElectronMass;
59  else if (pdg::IsNuMu (TMath::Abs(probepdg))) mlout = kMuonMass;
60  else if (pdg::IsNuTau(TMath::Abs(probepdg))) mlout = kTauMass;
61  double mlout2 = mlout*mlout;
62 
63  int A = init_state.Tgt().A();
64  int Z = init_state.Tgt().Z();
65  double Mtgt = Z*kProtonMass + (A-Z)*kNeutronMass;
66 
67  double n1 = kinematics.GetKV(kKVn1);
68  double n2 = kinematics.GetKV(kKVn2);
69  double n3 = kinematics.GetKV(kKVn3);
70 
71  double mL = mlout+kMw;
72 
73  double Delta = TMath::Power(2.*E*Mtgt-mL*mL,2)-4.*TMath::Power(Mtgt*mL,2);
74  if (Delta<0) return 0.;
75 
76  double s12_min = E/(2.*E+Mtgt)*(mL*mL+2.*E*Mtgt-TMath::Sqrt(Delta));
77  double s12_max = E/(2.*E+Mtgt)*(mL*mL+2.*E*Mtgt+TMath::Sqrt(Delta));
78  double s12 = TMath::Exp( TMath::Log(s12_min)+(TMath::Log(s12_max)-TMath::Log(s12_min))*n2);
79 
80  double Q2_min = TMath::Power(s12,2)*Mtgt/2./E/(2.*E*Mtgt-s12);
81  double Q2_max = s12 - mL*mL;
82  double Q2 = TMath::Exp( TMath::Log(Q2_min) + (TMath::Log(Q2_max)-TMath::Log(Q2_min))*n3 );
83 
84  double s = s12 - Q2;
85  double s13 = s12/2.*((1.+kMw2/s-mlout2/s)-TMath::Sqrt(born->Lambda(1.,kMw2/s,mlout2/s))*n1);
86 
87  double ME_T = born->PXSecPhoton_T(s12,s13,Q2,mlout2) * (1.-s12/2./E/Mtgt-TMath::Power(s12/2./E,2)/Q2);
88  double ME_L = born->PXSecPhoton_L(s12,s13,Q2,mlout2) * TMath::Power(1.-s12/4./E/Mtgt,2);
89 
90  double ME = ME_T+ME_L;
91  double dps2 = 1/32./kPi2/s12 * TMath::Sqrt( born->Lambda(1.,kMw2/s,mlout2/s) ) * (TMath::Log(Q2_max)-TMath::Log(Q2_min)) * (TMath::Log(s12_max)-TMath::Log(s12_min));
92  double dP = born->GetReAlpha()*TMath::Power(Z,2)*F2_Q( TMath::Sqrt(Q2), r0*TMath::Power(A,1./3.) );
93 
94  double xsec = ME * dps2 * dP;
95 
96  if(kps!=kPSn1n2n3fE) {
97  LOG("PhotonCOHPXSec", pWARN)
98  << "Doesn't support transformation from "
100  << KinePhaseSpace::AsString(kps);
101  xsec = 0;
102  }
103 
104  // If requested return the free nucleon xsec even for input nuclear tgt
105  if( interaction->TestBit(kIAssumeFreeNucleon) ) return xsec;
106 
107  LOG("PhotonCOHPXSec", pINFO) << "dxsec/dn1dn2dn3 (E= " << E << ", n1= " << n1 << ", n2=" << n2 << ", n3=" << n3 << ") = " << xsec;
108 
109  return xsec;
110 }
111 //____________________________________________________________________________
112 double PhotonCOHPXSec::F2_Q(double Q, double r0) const
113 {
114  // Analytic Woods-Saxon, A.3 of https://arxiv.org/pdf/1807.10973.pdf
115  double FF = 0.0;
116  double coth = 1./TMath::TanH(kPi*Q*a);
117  FF = 3.*kPi*a/(TMath::Power(r0,2)+TMath::Power(kPi*a,2)) / (Q*r0* TMath::SinH(kPi*Q*a));
118  FF *= (kPi*a*coth*TMath::Sin(Q*r0) - r0 * TMath::Cos(Q*r0));
119  return TMath::Power(FF,2);
120 }
121 //____________________________________________________________________________
122 double PhotonCOHPXSec::Integral(const Interaction * interaction) const
123 {
124  double xsec = fXSecIntegrator->Integrate(this,interaction);
125  return xsec;
126 }
127 //____________________________________________________________________________
128 bool PhotonCOHPXSec::ValidProcess(const Interaction* interaction) const
129 {
130  if(interaction->TestBit(kISkipProcessChk)) return true;
131 
132  const ProcessInfo & proc_info = interaction->ProcInfo();
133  if(!proc_info.IsPhotonCoherent()) return false;
134 
135  const InitialState & init_state = interaction -> InitState();
136  if(!pdg::IsLepton(init_state.ProbePdg())) return false;
137 
138  if(init_state.Tgt().HitNucIsSet()) return false;
139 
140  return true;
141 }
142 //____________________________________________________________________________
143 
144 
145 //____________________________________________________________________________
147 {
148  Algorithm::Configure(config);
149  this->LoadConfig();
150 }
151 //____________________________________________________________________________
152 void PhotonCOHPXSec::Configure(string config)
153 {
154  Algorithm::Configure(config);
155  this->LoadConfig();
156 }
157 //____________________________________________________________________________
159 {
160 
161  //-- load the differential cross section integrator
162  fXSecIntegrator = dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
163  assert(fXSecIntegrator);
164 
165 }
Cross Section Calculation Interface.
bool IsNuTau(int pdgc)
Definition: PDGUtils.cxx:168
Cross Section Integrator Interface.
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
double PXSecPhoton_T(double s12, double s13, double Q2, double ml2)
Definition: Born.cxx:135
int A(void) const
Definition: Target.h:70
double Integral(const Interaction *i) const
static constexpr double s
Definition: Units.h:95
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
bool IsNuE(int pdgc)
Definition: PDGUtils.cxx:158
enum genie::EKinePhaseSpace KinePhaseSpace_t
static const double kElectronMass
double GetReAlpha(void)
Definition: Born.h:32
const double r0
const XSecIntegratorI * fXSecIntegrator
diff. xsec integrator
bool IsNuMu(int pdgc)
Definition: PDGUtils.cxx:163
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 constexpr double A
Definition: Units.h:74
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
const double a
double Lambda(double a, double b, double c)
Definition: Born.cxx:190
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
int ProbePdg(void) const
Definition: InitialState.h:64
static const double kNeutronMass
double PXSecPhoton_L(double s12, double s13, double Q2, double ml2)
Definition: Born.cxx:163
int Z(void) const
Definition: Target.h:68
double GetKV(KineVar_t kv) const
Definition: Kinematics.cxx:323
#define pINFO
Definition: Messenger.h:62
bool IsPhotonCoherent(void) const
#define pWARN
Definition: Messenger.h:60
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?
Born level nu-electron cross section.
Definition: Born.h:26
bool HitNucIsSet(void) const
Definition: Target.cxx:283
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
void Configure(const Registry &config)
const UInt_t kIAssumeFreeNucleon
Definition: Interaction.h:49
static constexpr double fermi
Definition: Units.h:55
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
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
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
bool IsLepton(int pdgc)
Definition: PDGUtils.cxx:86
double F2_Q(double Q, double r0) const
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition: Interaction.h:47
Initial State information.
Definition: InitialState.h:48
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:345