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 <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

March 11, 2004

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Function Documentation

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

Definition at line 29 of file HadXSUtils.cxx.

References delta, makeTrainCVSamples::int, kIneldLog10P, kInelMinLog10P, kInelNDataPoints, kInelSig, genie::constants::kPi0Mass, genie::constants::kPionMass, genie::constants::kPionMass2, genie::units::mb, P, and ana::Sqrt().

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

31 {
32 // Returns the interpolated inelastic pion-nucleon cross section.
33 // C++ adaptation of Hugh Gallagher's NeuGEN inel() function
34 
35  double mpi = kPionMass;
36  double mpi2 = kPionMass2;
37  if (!isChargedPion) {
38  mpi = kPi0Mass;
39  mpi2 = mpi * mpi;
40  }
41  double Epion2 = TMath::Power(Epion,2);
42  double P = TMath::Sqrt( TMath::Max(0.,Epion2-mpi2) );
43 
44  if(P<=0) return 0;
45 
46  double log10P = TMath::Log10(P);
47  int N = (int) ((log10P - kInelMinLog10P)/kIneldLog10P) + 1;
48 
49  double xs=0.;
50  if ((log10P - kInelMinLog10P) < 0.0) xs = (P/0.1059)*kInelSig[0];
51  else if (N>kInelNDataPoints-2) xs = kInelSig[kInelNDataPoints-1];
52  else {
53  double log10Pn = kInelMinLog10P + (N-1) * kIneldLog10P;
54  double delta = (kInelSig[N]-kInelSig[N-1])/kIneldLog10P;
55  xs = kInelSig[N-1] + delta * (log10P-log10Pn);
56  }
57  return (xs * units::mb);
58 }
const Var kPi0Mass
double delta
Definition: runWimpSim.h:98
#define P(a, b, c, d, e, x)
static const double kInelMinLog10P
Definition: HadXSUtils.h:35
static const double kIneldLog10P
Definition: HadXSUtils.h:36
static const int kInelNDataPoints
Definition: HadXSUtils.h:34
static const double kPionMass
Definition: Constants.h:74
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
static const double kInelSig[kInelNDataPoints]
Definition: HadXSUtils.h:37
static const double kPionMass2
Definition: Constants.h:87
double genie::utils::hadxs::TotalPionNucleonXSec ( double  Epion,
bool  isChargedPion = true 
)

Definition at line 60 of file HadXSUtils.cxx.

References delta, makeTrainCVSamples::int, kIneldLog10P, kInelMinLog10P, kInelNDataPoints, genie::constants::kPi0Mass, genie::constants::kPionMass, genie::constants::kPionMass2, kTotdLog10P, kTotMinLog10P, kTotSig, genie::units::mb, P, and ana::Sqrt().

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

62 {
63 // Returns the interpolated total pion-nucleon cross section.
64 // C++ adaptation of Hugh Gallagher's NeuGEN total() function.
65 
66  double mpi = kPionMass;
67  double mpi2 = kPionMass2;
68  if (!isChargedPion) {
69  mpi = kPi0Mass;
70  mpi2 = mpi * mpi;
71  }
72  double Epion2 = TMath::Power(Epion,2);
73  double P = TMath::Sqrt( TMath::Max(0.,Epion2-mpi2) );
74 
75  if(P<=0) return 0;
76 
77  double log10P = TMath::Log10(P);
78  int N = (int) ((log10P - kInelMinLog10P)/kIneldLog10P) + 1;
79 
80  double xs=0.;
81  if ((log10P - kInelMinLog10P) < 0.0) xs = (P/0.1059)*kTotSig[0];
82  else if (N>kInelNDataPoints-2) xs = kTotSig[kInelNDataPoints-1];
83  else {
84  double log10Pn = kTotMinLog10P + (N-1) * kTotdLog10P;
85  double delta = (kTotSig[N]-kTotSig[N-1])/kTotdLog10P;
86  xs = kTotSig[N-1] + delta * (log10P-log10Pn);
87  }
88  return (xs * units::mb);
89 }
static const double kTotdLog10P
Definition: HadXSUtils.h:54
const Var kPi0Mass
double delta
Definition: runWimpSim.h:98
static const double kTotMinLog10P
Definition: HadXSUtils.h:53
#define P(a, b, c, d, e, x)
static const double kInelMinLog10P
Definition: HadXSUtils.h:35
static const double kIneldLog10P
Definition: HadXSUtils.h:36
static const int kInelNDataPoints
Definition: HadXSUtils.h:34
static const double kTotSig[kTotNDataPoints]
Definition: HadXSUtils.h:55
static const double kPionMass
Definition: Constants.h:74
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
static const double kPionMass2
Definition: Constants.h:87

Variable Documentation

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

Definition at line 36 of file HadXSUtils.h.

Referenced by InelasticPionNucleonXSec(), and TotalPionNucleonXSec().

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

Definition at line 35 of file HadXSUtils.h.

Referenced by InelasticPionNucleonXSec(), and TotalPionNucleonXSec().

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

Definition at line 34 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 37 of file HadXSUtils.h.

Referenced by InelasticPionNucleonXSec().

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

Definition at line 54 of file HadXSUtils.h.

Referenced by TotalPionNucleonXSec().

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

Definition at line 53 of file HadXSUtils.h.

Referenced by TotalPionNucleonXSec().

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

Definition at line 52 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 55 of file HadXSUtils.h.

Referenced by TotalPionNucleonXSec().