StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SigmaTotal.h
1 // SigmaTotal.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2012 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // This file contains the class for cross section parametrizations.
7 // SigmaTotal: total and partial cross section in hadron-hadron collisions.
8 
9 #ifndef Pythia8_SigmaTotal_H
10 #define Pythia8_SigmaTotal_H
11 
12 #include "Info.h"
13 #include "ParticleData.h"
14 #include "PythiaStdlib.h"
15 #include "Settings.h"
16 
17 namespace Pythia8 {
18 
19 //==========================================================================
20 
21 // The SigmaTotal class contains parametrizations of total, elastic and
22 // diffractive cross sections, and of the respective slope parameter.
23 
24 class SigmaTotal {
25 
26 public:
27 
28  // Constructor.
29  SigmaTotal() : isCalc(false) {};
30 
31  // Store pointers and initialize data members.
32  void init(Info* infoPtrIn, Settings& settings,
33  ParticleData* particleDataPtrIn );
34 
35  // Calculate, or recalculate for new beams or new energy.
36  bool calc(int idA, int idB, double eCM);
37 
38  // Confirm that initialization worked.
39  bool hasSigmaTot() const {return isCalc;}
40 
41  // Read out total and partial cross sections.
42  double sigmaTot() const {return sigTot;}
43  double sigmaEl() const {return sigEl;}
44  double sigmaXB() const {return sigXB;}
45  double sigmaAX() const {return sigAX;}
46  double sigmaXX() const {return sigXX;}
47  double sigmaND() const {return sigND;}
48 
49  // Read out slope b in exp(b*t) dependence.
50  double bSlopeEl() const {return bEl;}
51  double bSlopeXB(double sX) const { return 2.*bB + alP2 * log(s/sX) ;}
52  double bSlopeAX(double sX) const { return 2.*bA + alP2 * log(s/sX) ;}
53  double bSlopeXX(double sX1, double sX2) const {
54  return alP2 * log( exp(4.) + s * s0 / (sX1 * sX2) ) ;}
55 
56  // Read out parameters of diffractive mass spectra.
57  double mMinXB() const {return mMinXBsave;}
58  double mMinAX() const {return mMinAXsave;}
59  double cRes() const {return CRES;}
60  double mResXB() const {return mResXBsave;}
61  double mResAX() const {return mResAXsave;}
62  double sProton() const {return SPROTON;}
63 
64  // Read out parameters of trial t spectra.
65  double bMinSlopeXB() const { return max(2., 2. * bB);}
66  double bMinSlopeAX() const { return max(2., 2. * bA);}
67  double bMinSlopeXX() const { return alP2 * 4.;}
68 
69 private:
70 
71  // Constants: could only be changed in the code itself.
72  static const int IHADATABLE[], IHADBTABLE[], ISDTABLE[], IDDTABLE[];
73  static const double MMIN, EPSILON, ETA, X[], Y[], BETA0[], BHAD[],
74  ALPHAPRIME, CONVERTEL, CONVERTSD, CONVERTDD, MMIN0,
75  CRES, MRES0, CSD[10][8], CDD[10][9], SPROTON;
76 
77  // Initialization data, normally only set once.
78  bool isCalc, setTotal, doDampen, setElastic;
79  double sigTotOwn, sigElOwn, sigXBOwn, sigAXOwn, sigXXOwn,
80  maxXBOwn, maxAXOwn, maxXXOwn, bSlope, rho, lambda, tAbsMin,
81  alphaEM0, sigmaPomP, mPomP, pPomP;
82 
83  // Pointer to various information on the generation.
84  Info* infoPtr;
85 
86  // Pointer to the particle data table.
87  ParticleData* particleDataPtr;
88 
89  // Store values found by calc.
90  double sigTot, sigEl, sigXB, sigAX, sigXX, sigND, bEl, s, bA, bB,
91  alP2, s0, exp4, mMinXBsave, mMinAXsave, mResXBsave, mResAXsave;
92 
93 };
94 
95 //==========================================================================
96 
97 } // end namespace Pythia8
98 
99 #endif // Pythia8_SigmaTotal_H