GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
INukeHadroData.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::INukeHadroData
5 
6 \brief Singleton class to load & serve hadron x-section splines used by
7  GENIE's version of the INTRANUKE cascade MC.
8 
9  See $GENIE/src/HadronTransport/Intranuke.h for more details on the
10  INTRANUKE cascade MC developed primarity by S.Dytman and H.Gallagher
11  continuing older work from R.Edgecock, G.F.Pearce, W.A.Mann,
12  R.Merenyi and others.
13 
14  The hadron x-section data used to build the x-section splines stored
15  at this singleton are provided & maintained by Steve Dytman.
16  See the data files in $GENIE/data/hadron_xsec/ for more details on
17  Steve's data sources and applied corrections.
18  In a nutshell:
19  The h+N x-sections come mostly from the SAID (Arndt et al.) PWA fit
20  while the h+A x-sections come from a combination of Ashery, Carroll
21  data and extrapolations, and INC model results from Mashnik et al.
22  for h+Fe56.
23 
24 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>, Rutherford Lab.
25  Steve Dytman <dytman+@pitt.edu>, Pittsburgh Univ.
26  Aaron Meyer <asm58@pitt.edu>, Pittsburgh Univ.
27  Alex Bell, Pittsburgh Univ.
28 
29 \created February 01, 2007
30 
31 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
32  For the full text of the license visit http://copyright.genie-mc.org
33 
34 
35 */
36 //____________________________________________________________________________
37 
38 #ifndef _INTRANUKE_HADRON_CROSS_SECTIONS_H_
39 #define _INTRANUKE_HADRON_CROSS_SECTIONS_H_
40 
44 
45 class TGraph2D;
46 
47 namespace genie {
48 
49 class Spline;
50 
52 {
53 public:
54  static INukeHadroData * Instance (void);
55 
56 // Note that, unlike most the rest of GENIE where everything is expressed
57 // in natural units, all x-section splines included here are evaluated in
58 // kinetic energies given in MeV and return the x-section value in mbarns
59 
60  double XSec (int hpdgc, int tgt, int nprod, INukeFateHN_t rxnType, double ke, double costh) const;
61 
62  double Frac (int hpdgc, INukeFateHA_t fate, double ke) const;
63  double XSec (int hpdgc, INukeFateHN_t fate, double ke, int targA, int targZ) const;
64  // double Frac (int hpdgc, INukeFateHA_t fate, double ke) const;
65  double Frac (int hpdgc, INukeFateHN_t fate, double ke, int targA=0, int targZ=0) const;
66  double IntBounce (const GHepParticle* p, int target, int s1, INukeFateHN_t fate);
67  //int AngleAndProduct (const GHepParticle* p, int target, double &angle, INukeFateHN_t fate);
68 
69  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70  // hN mode hadron x-section splines
71  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72  const Spline * XSecPipn_Tot (void) const { return fXSecPipn_Tot; }
73  const Spline * XSecPipn_CEx (void) const { return fXSecPipn_CEx; }
74  const Spline * XSecPipn_Elas (void) const { return fXSecPipn_Elas; }
75  const Spline * XSecPipn_Reac (void) const { return fXSecPipn_Reac; }
76  const Spline * XSecPipp_Tot (void) const { return fXSecPipp_Tot; }
77  const Spline * XSecPipp_CEx (void) const { return fXSecPipp_CEx; }
78  const Spline * XSecPipp_Elas (void) const { return fXSecPipp_Elas; }
79  const Spline * XSecPipp_Reac (void) const { return fXSecPipp_Reac; }
80  const Spline * XSecPipp_Abs (void) const { return fXSecPipd_Abs; }
81  const Spline * XSecPi0n_Tot (void) const { return fXSecPi0n_Tot; }
82  const Spline * XSecPi0n_CEx (void) const { return fXSecPi0n_CEx; }
83  const Spline * XSecPi0n_Elas (void) const { return fXSecPi0n_Elas; }
84  const Spline * XSecPi0n_Reac (void) const { return fXSecPi0n_Reac; }
85  const Spline * XSecPi0p_Tot (void) const { return fXSecPi0p_Tot; }
86  const Spline * XSecPi0p_CEx (void) const { return fXSecPi0p_CEx; }
87  const Spline * XSecPi0p_Elas (void) const { return fXSecPi0p_Elas; }
88  const Spline * XSecPi0p_Reac (void) const { return fXSecPi0p_Reac; }
89  const Spline * XSecPi0p_Abs (void) const { return fXSecPi0d_Abs; }
90  const Spline * XSecPp_Tot (void) const { return fXSecPp_Tot; }
91  const Spline * XSecPp_Elas (void) const { return fXSecPp_Elas; }
92  const Spline * XSecPp_Reac (void) const { return fXSecPp_Reac; }
93  const Spline * XSecPn_Tot (void) const { return fXSecPn_Tot; }
94  const Spline * XSecPn_Elas (void) const { return fXSecPn_Elas; }
95  const Spline * XSecPn_Reac (void) const { return fXSecPn_Reac; }
96  const Spline * XSecNn_Tot (void) const { return fXSecNn_Tot; }
97  const Spline * XSecNn_Elas (void) const { return fXSecNn_Elas; }
98  const Spline * XSecNn_Reac (void) const { return fXSecNn_Reac; }
99  const Spline * XSecKpn_Elas (void) const { return fXSecKpn_Elas; }
100  const Spline * XSecKpp_Elas (void) const { return fXSecKpp_Elas; }
101  const Spline * XSecKpN_Abs (void) const { return fXSecKpN_Abs; }
102  const Spline * XSecKpN_Tot (void) const { return fXSecKpN_Tot; }
103  const Spline * XSecGamp_fs (void) const { return fXSecGamp_fs; }
104  const Spline * XSecGamn_fs (void) const { return fXSecGamn_fs; }
105  const Spline * XSecGamN_Tot (void) const { return fXSecGamN_Tot; }
106  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
107  // hA mode hadron x-section splines
108  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109  const Spline * FracPA_Tot (void) const { return fFracPA_Tot; }
110  const Spline * FracPA_Elas (void) const { return fFracPA_Elas; }
111  const Spline * FracPA_Inel (void) const { return fFracPA_Inel; }
112  const Spline * FracPA_CEx (void) const { return fFracPA_CEx; }
113  const Spline * FracPA_Abs (void) const { return fFracPA_Abs; }
114  const Spline * FracPA_Pipro (void) const { return fFracPA_Pipro; }
115  const Spline * FracNA_Tot (void) const { return fFracNA_Tot; }
116  const Spline * FracNA_Elas (void) const { return fFracNA_Elas; }
117  const Spline * FracNA_Inel (void) const { return fFracNA_Inel; }
118  const Spline * FracNA_CEx (void) const { return fFracNA_CEx; }
119  const Spline * FracNA_Abs (void) const { return fFracNA_Abs; }
120  const Spline * FracNA_Pipro (void) const { return fFracNA_Pipro; }
121  const Spline * FracPipA_Tot (void) const { return fFracPipA_Tot; }
122  const Spline * FracPipA_Elas (void) const { return fFracPipA_Elas; }
123  const Spline * FracPipA_Inel (void) const { return fFracPipA_Inel; }
124  const Spline * FracPipA_CEx (void) const { return fFracPipA_CEx; }
125  const Spline * FracPipA_Abs (void) const { return fFracPipA_Abs; }
126  const Spline * FracPipA_PiProd (void) const { return fFracPipA_PiProd; }
127  const Spline * FracPimA_Tot (void) const { return fFracPimA_Tot; }
128  const Spline * FracPimA_Elas (void) const { return fFracPimA_Elas; }
129  const Spline * FracPimA_Inel (void) const { return fFracPimA_Inel; }
130  const Spline * FracPimA_CEx (void) const { return fFracPimA_CEx; }
131  const Spline * FracPimA_Abs (void) const { return fFracPimA_Abs; }
132  const Spline * FracPimA_PiProd (void) const { return fFracPimA_PiProd; }
133  const Spline * FracPi0A_Tot (void) const { return fFracPi0A_Tot; }
134  const Spline * FracPi0A_Elas (void) const { return fFracPi0A_Elas; }
135  const Spline * FracPi0A_Inel (void) const { return fFracPi0A_Inel; }
136  const Spline * FracPi0A_CEx (void) const { return fFracPi0A_CEx; }
137  const Spline * FracPi0A_Abs (void) const { return fFracPi0A_Abs; }
138  const Spline * FracPi0A_PiProd (void) const { return fFracPi0A_PiProd; }
139  const Spline * FracKA_Tot (void) const { return fFracKA_Tot; }
140  const Spline * FracKA_Elas (void) const { return fFracKA_Elas; }
141  const Spline * FracKA_Inel (void) const { return fFracKA_Inel; }
142  const Spline * FracKA_Abs (void) const { return fFracKA_Abs; }
143  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144  // hN mode TGraph2D XSec objects
145  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146  /*
147  const TGraph2D * hN2dXSecPP_Elas (void) const { return fhN2dXSecPP_Elas; }
148  const TGraph2D * hN2dXSecNP_Elas (void) const { return fhN2dXSecNP_Elas; }
149  const TGraph2D * hN2dXSecPipN_Elas (void) const { return fhN2dXSecPipN_Elas; }
150  const TGraph2D * hN2dXSecPi0N_Elas (void) const { return fhN2dXSecPi0N_Elas; }
151  const TGraph2D * hN2dXSecPimN_Elas (void) const { return fhN2dXSecPimN_Elas; }
152  const TGraph2D * hN2dXSecKpN_Elas (void) const { return fhN2dXSecKpN_Elas; }
153  const TGraph2D * hN2dXSecKpP_Elas (void) const { return fhN2dXSecKpP_Elas; }
154  const TGraph2D * hN2dXSecPiN_CEx (void) const { return fhN2dXSecPiN_CEx; }
155  const TGraph2D * hN2dXSecPiN_Abs (void) const { return fhN2dXSecPiN_Abs; }
156  const TGraph2D * hN2dXSecGamPi0P_Inelas (void) const { return fhN2dXSecGamPi0P_Inelas; }
157  const TGraph2D * hN2dXSecGamPi0N_Inelas (void) const { return fhN2dXSecGamPi0N_Inelas; }
158  const TGraph2D * hN2dXSecGamPipN_Inelas (void) const { return fhN2dXSecGamPipN_Inelas; }
159  const TGraph2D * hN2dXSecGamPimP_Inelas (void) const { return fhN2dXSecGamPimP_Inelas; }
160  */
161 
162  // const methods (don't modify object) that return pointers to a BLI2DNonUnifGrid that is const
163  const BLI2DNonUnifGrid * hN2dXSecPP_Elas (void) const { return fhN2dXSecPP_Elas; }
164  const BLI2DNonUnifGrid * hN2dXSecNP_Elas (void) const { return fhN2dXSecNP_Elas; }
165  const BLI2DNonUnifGrid * hN2dXSecPipN_Elas (void) const { return fhN2dXSecPipN_Elas; }
166  const BLI2DNonUnifGrid * hN2dXSecPi0N_Elas (void) const { return fhN2dXSecPi0N_Elas; }
167  const BLI2DNonUnifGrid * hN2dXSecPimN_Elas (void) const { return fhN2dXSecPimN_Elas; }
168  const BLI2DNonUnifGrid * hN2dXSecKpN_Elas (void) const { return fhN2dXSecKpN_Elas; }
169  const BLI2DNonUnifGrid * hN2dXSecKpP_Elas (void) const { return fhN2dXSecKpP_Elas; }
170  const BLI2DNonUnifGrid * hN2dXSecPiN_CEx (void) const { return fhN2dXSecPiN_CEx; }
171  const BLI2DNonUnifGrid * hN2dXSecPiN_Abs (void) const { return fhN2dXSecPiN_Abs; }
176 
177  static double fMinKinEnergy; ///<
178  static double fMaxKinEnergyHA; ///<
179  static double fMaxKinEnergyHN; ///<
180 
181 private:
182  INukeHadroData();
183  INukeHadroData(const INukeHadroData & shx);
184  ~INukeHadroData();
185 
186  void LoadCrossSections(void);
187 
188  void ReadhNFile(
189  string filename, double ke, int npoints, int & curr_point,
190  /*double * ke_array,*/ double * costh_array, double * xsec_array, int cols);
191 
193 
194  Spline * fXSecPipn_Tot; ///< pi+n hN x-section splines
198  Spline * fXSecPipp_Tot; ///< pi+p hN x-section splines
203  Spline * fXSecPi0n_Tot; ///< pi0n hN x-section splines
207  Spline * fXSecPi0p_Tot; ///< pi0p hN x-section splines
212  Spline * fXSecPp_Tot; ///< p/nN x-section splines
221  Spline * fXSecKpn_Elas; ///< K+N x-section splines
225  Spline * fFracPA_Tot; ///< N+A x-section splines
237  Spline * fFracPipA_Tot; ///< pi+A x-section splines
255  Spline * fFracKA_Tot; ///< K+A x-section splines
259  Spline * fXSecGamp_fs; ///< gamma A x-section splines
262 
263  /*TGraph2D * fhN2dXSecPP_Elas;
264  TGraph2D * fhN2dXSecNP_Elas;
265  TGraph2D * fhN2dXSecPipN_Elas;
266  TGraph2D * fhN2dXSecPi0N_Elas;
267  TGraph2D * fhN2dXSecPimN_Elas;
268  TGraph2D * fhN2dXSecKpN_Elas;
269  TGraph2D * fhN2dXSecKpP_Elas;
270  TGraph2D * fhN2dXSecPiN_CEx;
271  TGraph2D * fhN2dXSecPiN_Abs;
272  TGraph2D * fhN2dXSecGamPi0P_Inelas;
273  TGraph2D * fhN2dXSecGamPi0N_Inelas;
274  TGraph2D * fhN2dXSecGamPipN_Inelas;
275  TGraph2D * fhN2dXSecGamPimP_Inelas;*/
289 
290  //-- Sinleton cleaner
291  struct Cleaner {
294  if (INukeHadroData::fInstance !=0) {
297  }
298  }
299  };
300  friend struct Cleaner;
301 };
302 
303 } // genie namespace
304 #endif //_INTRANUKE_HADRON_CROSS_SECTIONS_H_
305 
Spline * fFracKA_Tot
K+A x-section splines.
static INukeHadroData * fInstance
const BLI2DNonUnifGrid * hN2dXSecPipN_Elas(void) const
const BLI2DNonUnifGrid * hN2dXSecPi0N_Elas(void) const
const Spline * XSecPi0p_Abs(void) const
const Spline * FracPipA_CEx(void) const
const Spline * FracPi0A_PiProd(void) const
const Spline * XSecPi0n_CEx(void) const
const Spline * XSecPi0p_Elas(void) const
const Spline * FracNA_Inel(void) const
BLI2DNonUnifGrid * fhN2dXSecPP_Elas
const Spline * FracPimA_Elas(void) const
Spline * fXSecKpn_Elas
K+N x-section splines.
const Spline * XSecPp_Elas(void) const
BLI2DNonUnifGrid * fhN2dXSecPipN_Elas
const Spline * FracPipA_Abs(void) const
const Spline * FracPA_Abs(void) const
BLI2DNonUnifGrid * fhN2dXSecGamPi0N_Inelas
const Spline * XSecPi0n_Elas(void) const
BLI2DNonUnifGrid * fhN2dXSecGamPi0P_Inelas
const BLI2DNonUnifGrid * hN2dXSecGamPi0P_Inelas(void) const
const Spline * FracPimA_Abs(void) const
A numeric analysis tool class for interpolating 1-D functions.
Definition: Spline.h:58
BLI2DNonUnifGrid * fhN2dXSecKpN_Elas
const Spline * FracPi0A_Elas(void) const
const Spline * XSecPp_Tot(void) const
BLI2DNonUnifGrid * fhN2dXSecPiN_Abs
const Spline * FracNA_Tot(void) const
const BLI2DNonUnifGrid * hN2dXSecPP_Elas(void) const
const Spline * FracPipA_Tot(void) const
const Spline * XSecPi0p_Reac(void) const
Spline * fXSecPi0p_Tot
pi0p hN x-section splines
BLI2DNonUnifGrid * fhN2dXSecKpP_Elas
const Spline * XSecPi0p_CEx(void) const
const Spline * FracPipA_Elas(void) const
const Spline * FracPi0A_Abs(void) const
double Frac(int hpdgc, INukeFateHA_t fate, double ke) const
BLI2DNonUnifGrid * fhN2dXSecGamPipN_Inelas
const Spline * XSecPn_Reac(void) const
const Spline * FracPA_Pipro(void) const
const Spline * FracPimA_PiProd(void) const
const BLI2DNonUnifGrid * hN2dXSecNP_Elas(void) const
const BLI2DNonUnifGrid * hN2dXSecKpP_Elas(void) const
const Spline * XSecPipp_Abs(void) const
const BLI2DNonUnifGrid * hN2dXSecPiN_Abs(void) const
const Spline * XSecPi0n_Tot(void) const
const Spline * FracPA_Tot(void) const
const Spline * FracPipA_PiProd(void) const
const Spline * XSecPi0n_Reac(void) const
enum genie::EINukeFateHN_t INukeFateHN_t
const Spline * XSecPn_Elas(void) const
const BLI2DNonUnifGrid * hN2dXSecKpN_Elas(void) const
BLI2DNonUnifGrid * fhN2dXSecGamPimP_Inelas
const BLI2DNonUnifGrid * hN2dXSecPimN_Elas(void) const
const Spline * FracPA_CEx(void) const
static double fMinKinEnergy
const Spline * XSecGamN_Tot(void) const
const Spline * XSecGamp_fs(void) const
const Spline * XSecPipn_Tot(void) const
static INukeHadroData * Instance(void)
const Spline * XSecPipp_Tot(void) const
const Spline * FracPi0A_Inel(void) const
const Spline * FracPA_Elas(void) const
const Spline * FracPipA_Inel(void) const
const Spline * FracKA_Elas(void) const
Spline * fXSecGamp_fs
gamma A x-section splines
BLI2DNonUnifGrid * fhN2dXSecNP_Elas
const Spline * FracNA_Pipro(void) const
BLI2DNonUnifGrid * fhN2dXSecPiN_CEx
const Spline * XSecNn_Tot(void) const
const Spline * FracKA_Abs(void) const
const Spline * XSecKpN_Tot(void) const
const Spline * XSecPipp_CEx(void) const
Spline * fXSecPipn_Tot
pi+n hN x-section splines
const BLI2DNonUnifGrid * hN2dXSecGamPipN_Inelas(void) const
const Spline * FracPimA_Tot(void) const
const Spline * XSecKpn_Elas(void) const
const Spline * FracPA_Inel(void) const
const Spline * FracNA_Elas(void) const
double IntBounce(const GHepParticle *p, int target, int s1, INukeFateHN_t fate)
void ReadhNFile(string filename, double ke, int npoints, int &curr_point, double *costh_array, double *xsec_array, int cols)
const Spline * XSecPipn_CEx(void) const
const BLI2DNonUnifGrid * hN2dXSecGamPi0N_Inelas(void) const
const Spline * XSecPi0p_Tot(void) const
const Spline * XSecPipn_Reac(void) const
const Spline * FracKA_Tot(void) const
const Spline * FracPimA_Inel(void) const
BLI2DNonUnifGrid * fhN2dXSecPimN_Elas
const BLI2DNonUnifGrid * hN2dXSecGamPimP_Inelas(void) const
Spline * fXSecPi0n_Tot
pi0n hN x-section splines
const Spline * FracPi0A_Tot(void) const
Spline * fFracPipA_Tot
pi+A x-section splines
const Spline * XSecKpN_Abs(void) const
static double fMaxKinEnergyHN
double XSec(int hpdgc, int tgt, int nprod, INukeFateHN_t rxnType, double ke, double costh) const
const Spline * FracPimA_CEx(void) const
Singleton class to load &amp; serve hadron x-section splines used by GENIE&#39;s version of the INTRANUKE cas...
const Spline * FracPi0A_CEx(void) const
Spline * fFracPA_Tot
N+A x-section splines.
const Spline * XSecNn_Reac(void) const
const Spline * XSecPipp_Elas(void) const
const Spline * FracNA_CEx(void) const
const Spline * XSecPp_Reac(void) const
static double fMaxKinEnergyHA
BLI2DNonUnifGrid * fhN2dXSecPi0N_Elas
const BLI2DNonUnifGrid * hN2dXSecPiN_CEx(void) const
const Spline * XSecPipp_Reac(void) const
Spline * fXSecPipp_Tot
pi+p hN x-section splines
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition: GHepParticle.h:39
const Spline * XSecNn_Elas(void) const
const Spline * FracNA_Abs(void) const
enum genie::EINukeFateHA_t INukeFateHA_t
const Spline * XSecGamn_fs(void) const
const Spline * XSecPn_Tot(void) const
const Spline * XSecPipn_Elas(void) const
const Spline * FracKA_Inel(void) const
const Spline * XSecKpp_Elas(void) const
Spline * fXSecPp_Tot
p/nN x-section splines