GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions | Variables
genie::utils::hadxs Namespace Reference

Simple functions and data for computing hadron interaction xsecs. More...

Namespaces

 berger
 

Functions

double InelasticPionNucleonXSec (double Epion, bool isChargedPion=true)
 
double TotalPionNucleonXSec (double Epion, bool isChargedPion=true)
 

Variables

static const int kInelNDataPoints = 60
 
static const double kInelMinLog10P = -0.975
 
static const double kIneldLog10P = 0.05
 
static const double kInelSig [kInelNDataPoints]
 
static const int kTotNDataPoints = 60
 
static const double kTotMinLog10P = -0.975
 
static const double kTotdLog10P = 0.05
 
static const double kTotSig [kTotNDataPoints]
 

Detailed Description

Simple functions and data for computing hadron interaction xsecs.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
March 11, 2004
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Function Documentation

double genie::utils::hadxs::InelasticPionNucleonXSec ( double  Epion,
bool  isChargedPion = true 
)

Definition at line 20 of file HadXSUtils.cxx.

References kIneldLog10P, kInelMinLog10P, kInelNDataPoints, kInelSig, genie::constants::kPi0Mass, genie::constants::kPionMass, genie::constants::kPionMass2, and genie::units::mb.

Referenced by genie::ReinSehgalCOHPiPXSec::XSec().

22 {
23 // Returns the interpolated inelastic pion-nucleon cross section.
24 // C++ adaptation of Hugh Gallagher's NeuGEN inel() function
25 
26  double mpi = kPionMass;
27  double mpi2 = kPionMass2;
28  if (!isChargedPion) {
29  mpi = kPi0Mass;
30  mpi2 = mpi * mpi;
31  }
32  double Epion2 = TMath::Power(Epion,2);
33  double P = TMath::Sqrt( TMath::Max(0.,Epion2-mpi2) );
34 
35  if(P<=0) return 0;
36 
37  double log10P = TMath::Log10(P);
38  int N = (int) ((log10P - kInelMinLog10P)/kIneldLog10P) + 1;
39 
40  double xs=0.;
41  if ((log10P - kInelMinLog10P) < 0.0) xs = (P/0.1059)*kInelSig[0];
42  else if (N>kInelNDataPoints-2) xs = kInelSig[kInelNDataPoints-1];
43  else {
44  double log10Pn = kInelMinLog10P + (N-1) * kIneldLog10P;
45  double delta = (kInelSig[N]-kInelSig[N-1])/kIneldLog10P;
46  xs = kInelSig[N-1] + delta * (log10P-log10Pn);
47  }
48  return (xs * units::mb);
49 }
static const double kInelMinLog10P
Definition: HadXSUtils.h:34
static const double kIneldLog10P
Definition: HadXSUtils.h:35
static constexpr double mb
Definition: Units.h:79
static const int kInelNDataPoints
Definition: HadXSUtils.h:33
static const double kInelSig[kInelNDataPoints]
Definition: HadXSUtils.h:36
double genie::utils::hadxs::TotalPionNucleonXSec ( double  Epion,
bool  isChargedPion = true 
)

Definition at line 51 of file HadXSUtils.cxx.

References kIneldLog10P, kInelMinLog10P, kInelNDataPoints, genie::constants::kPi0Mass, genie::constants::kPionMass, genie::constants::kPionMass2, kTotdLog10P, kTotMinLog10P, kTotSig, and genie::units::mb.

Referenced by genie::ReinDFRPXSec::XSec(), and genie::ReinSehgalCOHPiPXSec::XSec().

53 {
54 // Returns the interpolated total pion-nucleon cross section.
55 // C++ adaptation of Hugh Gallagher's NeuGEN total() function.
56 
57  double mpi = kPionMass;
58  double mpi2 = kPionMass2;
59  if (!isChargedPion) {
60  mpi = kPi0Mass;
61  mpi2 = mpi * mpi;
62  }
63  double Epion2 = TMath::Power(Epion,2);
64  double P = TMath::Sqrt( TMath::Max(0.,Epion2-mpi2) );
65 
66  if(P<=0) return 0;
67 
68  double log10P = TMath::Log10(P);
69  int N = (int) ((log10P - kInelMinLog10P)/kIneldLog10P) + 1;
70 
71  double xs=0.;
72  if ((log10P - kInelMinLog10P) < 0.0) xs = (P/0.1059)*kTotSig[0];
73  else if (N>kInelNDataPoints-2) xs = kTotSig[kInelNDataPoints-1];
74  else {
75  double log10Pn = kTotMinLog10P + (N-1) * kTotdLog10P;
76  double delta = (kTotSig[N]-kTotSig[N-1])/kTotdLog10P;
77  xs = kTotSig[N-1] + delta * (log10P-log10Pn);
78  }
79  return (xs * units::mb);
80 }
static const double kTotdLog10P
Definition: HadXSUtils.h:53
static const double kTotMinLog10P
Definition: HadXSUtils.h:52
static const double kInelMinLog10P
Definition: HadXSUtils.h:34
static const double kIneldLog10P
Definition: HadXSUtils.h:35
static constexpr double mb
Definition: Units.h:79
static const int kInelNDataPoints
Definition: HadXSUtils.h:33
static const double kTotSig[kTotNDataPoints]
Definition: HadXSUtils.h:54

Variable Documentation

const double genie::utils::hadxs::kIneldLog10P = 0.05
static

Definition at line 35 of file HadXSUtils.h.

Referenced by InelasticPionNucleonXSec(), and TotalPionNucleonXSec().

const double genie::utils::hadxs::kInelMinLog10P = -0.975
static

Definition at line 34 of file HadXSUtils.h.

Referenced by InelasticPionNucleonXSec(), and TotalPionNucleonXSec().

const int genie::utils::hadxs::kInelNDataPoints = 60
static

Definition at line 33 of file HadXSUtils.h.

Referenced by InelasticPionNucleonXSec(), and TotalPionNucleonXSec().

const double genie::utils::hadxs::kInelSig[kInelNDataPoints]
static
Initial value:
= {
1.596, 3.192, 5.692, 5.596, 3.788, 6.528,
22.931, 43.462, 55.580, 36.761, 19.754, 12.588,
12.914, 12.500, 13.707, 15.082, 19.671, 16.860,
21.708, 29.128, 21.752, 22.444, 23.698, 23.847,
23.067, 25.336, 25.366, 25.273, 24.646, 24.003,
23.636, 23.615, 23.029, 22.667, 22.434, 21.901,
21.763, 22.235, 20.177, 21.707, 20.827, 21.102,
21.028, 21.155, 20.932, 20.577, 20.865, 21.122,
21.193, 21.081, 20.611, 20.788, 20.591, 20.514,
20.796, 20.813, 20.425, 20.460, 20.495, 20.530
}

Definition at line 36 of file HadXSUtils.h.

Referenced by InelasticPionNucleonXSec().

const double genie::utils::hadxs::kTotdLog10P = 0.05
static

Definition at line 53 of file HadXSUtils.h.

Referenced by TotalPionNucleonXSec().

const double genie::utils::hadxs::kTotMinLog10P = -0.975
static

Definition at line 52 of file HadXSUtils.h.

Referenced by TotalPionNucleonXSec().

const int genie::utils::hadxs::kTotNDataPoints = 60
static

Definition at line 51 of file HadXSUtils.h.

const double genie::utils::hadxs::kTotSig[kTotNDataPoints]
static
Initial value:
= {
3.252, 6.504, 12.316, 18.314, 22.600, 31.435,
53.933, 84.872, 102.626, 87.084, 60.234, 39.922,
32.804, 28.935, 27.952, 29.439, 36.824, 31.814,
35.152, 50.062, 39.079, 35.741, 37.390, 35.575,
34.043, 34.363, 34.171, 32.990, 32.110, 31.316,
30.621, 29.918, 29.134, 28.461, 27.985, 27.208,
26.749, 27.111, 25.047, 26.357, 25.393, 25.777,
25.467, 25.305, 25.008, 24.814, 24.662, 24.481,
24.453, 24.336, 24.099, 24.098, 24.010, 23.908,
23.992, 24.058, 23.805, 23.808, 23.811, 23.815
}

Definition at line 54 of file HadXSUtils.h.

Referenced by TotalPionNucleonXSec().