]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8140/include/StandardModel.h
coverity
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8140 / include / StandardModel.h
1 // StandardModel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2010 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 gives access to some Standard Model parameters.
7 // AlphaStrong: fix or first- or second-order running alpha_strong.
8
9 #ifndef Pythia8_StandardModel_H
10 #define Pythia8_StandardModel_H
11
12 #include "ParticleData.h"
13 #include "PythiaStdlib.h"
14
15 namespace Pythia8 {
16
17 //==========================================================================
18
19 // The AlphaStrong class calculates the alpha_strong value at an arbitrary 
20 // scale, given the value at m_Z, to zeroth, first or second order.
21
22 class AlphaStrong {
23
24 public:
25
26   // Constructors.
27   AlphaStrong() : isInit(false) {}
28   AlphaStrong(double valueIn, int orderIn = 1) { 
29     init( valueIn, orderIn) ;}
30
31   // Initialization for given value at M_Z and given order.
32   void init(double valueIn = 0.12, int orderIn = 1);
33
34   // alpha_S value and Lambda values.
35   double alphaS(double scale2);
36   double alphaS1Ord(double scale2);
37   double alphaS2OrdCorr(double scale2);
38   double Lambda3() const { return Lambda3Save; }
39   double Lambda4() const { return Lambda4Save; }
40   double Lambda5() const { return Lambda5Save; }
41
42 protected:
43
44   // Initialization data member; protected to allow inheritance.
45   bool   isInit;
46
47 private:
48
49   // Constants: could only be changed in the code itself.
50   static const int    NITER;
51   static const double MC, MB, MZ, SAFETYMARGIN1, SAFETYMARGIN2;
52
53   // Data members.
54   bool   lastCallToFull;
55   int    order;
56   double valueRef, valueNow, scale2Now, scale2Min, Lambda3Save, 
57          Lambda4Save, Lambda5Save, Lambda3Save2, Lambda4Save2, 
58          Lambda5Save2, mc, mb, mZ, mc2, mb2;
59
60 };
61
62 //==========================================================================
63
64 // The AlphaEM class calculates the alpha_electromagnetic value at an 
65 // arbitrary scale, given the value at 0 and m_Z, to zeroth or first order.
66
67 class AlphaEM {
68
69 public:
70
71   // Constructors.
72   AlphaEM() {}
73
74   // Initialization for a given order.
75   void init(int orderIn, Settings* settingsPtr);
76
77   // alpha_EM value.
78   double alphaEM(double scale2);
79
80 private:
81
82   // Constants: could only be changed in the code itself.
83   static const double MZ, Q2STEP[5], BRUNDEF[5];
84
85   // Data members.
86   int    order;
87   double alpEM0, alpEMmZ, mZ2, bRun[5], alpEMstep[5];
88
89 };
90
91 //==========================================================================
92
93 // The CoupSM class stores and returns electroweak couplings,
94 // including Cabibbo-Kobayashi-Maskawa mass mixing matrix elements.
95
96 class CoupSM {
97
98 public:
99
100   // Constructor.
101   CoupSM() {}
102
103   // Initialize, normally from Pythia::init().
104   void init(Settings& settings, Rndm* rndmPtrIn);
105
106   // alpha_S value and Lambda values.
107   double alphaS(double scale2) {return alphaSlocal.alphaS(scale2);}
108   double alphaS1Ord(double scale2) {return alphaSlocal.alphaS1Ord(scale2);}
109   double alphaS2OrdCorr(double scale2) {
110     return alphaSlocal.alphaS2OrdCorr(scale2);}
111   double Lambda3() const {return alphaSlocal.Lambda3();}
112   double Lambda4() const {return alphaSlocal.Lambda4();}
113   double Lambda5() const {return alphaSlocal.Lambda5();}
114
115   // Return alpha_EM value.
116   double alphaEM(double scale2) {return alphaEMlocal.alphaEM(scale2);}
117
118   // Return electroweak mixing angle.
119   double sin2thetaW() {return s2tW;}
120   double cos2thetaW() {return c2tW;}
121   double sin2thetaWbar() {return s2tWbar;}
122
123   // Return electroweak couplings of quarks and leptons.
124   double ef(int idAbs) {return efSave[idAbs];}
125   double vf(int idAbs) {return vfSave[idAbs];}
126   double af(int idAbs) {return afSave[idAbs];}
127   double t3f(int idAbs) {return 0.5*afSave[idAbs];}
128   double lf(int idAbs) {return lfSave[idAbs];}
129   double rf(int idAbs) {return rfSave[idAbs];}
130   
131   // Return some squared couplings and other combinations.
132   double ef2(int idAbs) {return ef2Save[idAbs];}
133   double vf2(int idAbs) {return vf2Save[idAbs];}
134   double af2(int idAbs) {return af2Save[idAbs];}
135   double efvf(int idAbs) {return efvfSave[idAbs];}
136   double vf2af2(int idAbs) {return vf2af2Save[idAbs];}
137
138   // Return CKM value or square: 
139   // first index 1/2/3/4 = u/c/t/t', second 1/2/3/4 = d/s/b/b'.
140   double VCKMgen(int genU, int genD) {return VCKMsave[genU][genD];}
141   double V2CKMgen(int genU, int genD) {return V2CKMsave[genU][genD];}
142
143   // Return CKM value or square for incoming flavours (sign irrelevant).
144   double VCKMid(int id1, int id2);
145   double V2CKMid(int id1, int id2);
146
147   // Return CKM sum of squares for given inflavour, or random outflavour.
148   double V2CKMsum(int id) {return V2CKMout[abs(id)];}
149   int    V2CKMpick(int id);
150
151 private:
152
153   // Constants: could only be changed in the code itself.
154   static const double efSave[20], afSave[20];
155
156   // Couplings and VCKM matrix (index 0 not used).
157   double s2tW, c2tW, s2tWbar, vfSave[20], lfSave[20], rfSave[20], 
158          ef2Save[20], vf2Save[20], af2Save[20], efvfSave[20], 
159          vf2af2Save[20], VCKMsave[5][5], V2CKMsave[5][5], V2CKMout[20];
160
161   // Pointer to the random number generator.
162   Rndm*       rndmPtr;
163
164   // An AlphaStrong instance for general use (but not MI, ISR, FSR).
165   AlphaStrong alphaSlocal;
166
167   // An AlphaEM instance for general use (but not MI, ISR, FSR).
168   AlphaEM     alphaEMlocal;
169
170 };
171
172 //==========================================================================
173
174 } // end namespace Pythia8
175
176 #endif // Pythia8_StandardModel_H