StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StandardModel.h
1 // StandardModel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, 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 "Pythia8/Basics.h"
13 #include "Pythia8/PythiaStdlib.h"
14 #include "Pythia8/Settings.h"
15 
16 namespace Pythia8 {
17 
18 //==========================================================================
19 
20 // The AlphaStrong class calculates the alpha_strong value at an arbitrary
21 // scale, given the value at m_Z, to zeroth, first or second order.
22 
23 class AlphaStrong {
24 
25 public:
26 
27  // Constructors.
28  AlphaStrong() : isInit(false), order(0), nfmax(),
29  Lambda3Save(0.), Lambda4Save(0.), Lambda5Save(0.), Lambda6Save(0.),
30  Lambda3Save2(0.), Lambda4Save2(0.), Lambda5Save2(0.), Lambda6Save2(0.),
31  scale2Min(0.), mc(0.), mb(0.), mt(0.), mc2(0.), mb2(0.), mt2(0.), useCMW(),
32  lastCallToFull(false), valueRef(0.), valueNow(0.), scale2Now(0.) {}
33 
34  // Destructor.
35  virtual ~AlphaStrong() {}
36 
37  // Initialization for given value at M_Z and given order.
38  virtual void init(double valueIn = 0.12, int orderIn = 1, int nfmaxIn = 6,
39  bool useCMWIn = false);
40 
41  // Set flavour threshold values: m_c, m_b, m_t.
42  virtual void setThresholds(double mcIn, double mbIn, double mtIn) {
43  mt=mtIn; mb=min(mt,mbIn); mc=min(mb,mcIn);}
44 
45  // alpha_S value and Lambda values.
46  double alphaS(double scale2);
47  double alphaS1Ord(double scale2);
48  double alphaS2OrdCorr(double scale2);
49  double Lambda3() const { return Lambda3Save; }
50  double Lambda4() const { return Lambda4Save; }
51  double Lambda5() const { return Lambda5Save; }
52  double Lambda6() const { return (nfmax >= 6) ? Lambda6Save : Lambda5Save; }
53 
54  // Info: tell which scales we use for flavour thresholds.
55  double muThres(int idQ);
56  double muThres2(int idQ);
57 
58  // Return the CMW factor (for nF between 3 and 6).
59  double facCMW( int nFin);
60 
61 // Protected data members: accessible to derived classes.
62 protected:
63 
64  // Initialization data member.
65  bool isInit;
66 
67  // Running order and max number of flavours to use in running.
68  int order, nfmax;
69 
70  // Lambda values.
71  double Lambda3Save, Lambda4Save, Lambda5Save, Lambda6Save;
72  double Lambda3Save2, Lambda4Save2, Lambda5Save2, Lambda6Save2;
73 
74  // Smallest allowed renormalization scale.
75  double scale2Min;
76 
77  // Flavour thresholds.
78  static const double MZ;
79  double mc, mb, mt;
80  double mc2, mb2, mt2;
81 
82  // CMW rescaling factors.
83  bool useCMW;
84  static const double FACCMW3, FACCMW4, FACCMW5, FACCMW6;
85 
86  // Safety margins to avoid getting too close to LambdaQCD.
87  static const double SAFETYMARGIN1, SAFETYMARGIN2;
88 
89 // Private data members: not accessible to derived classes.
90 private:
91 
92  // Private constants: could only be changed in the code itself.
93  static const int NITER;
94 
95  // Private data members.
96  bool lastCallToFull;
97  double valueRef, valueNow, scale2Now;
98 
99 };
100 
101 //==========================================================================
102 
103 // The AlphaEM class calculates the alpha_electromagnetic value at an
104 // arbitrary scale, given the value at 0 and m_Z, to zeroth or first order.
105 
106 class AlphaEM {
107 
108 public:
109 
110  // Constructors.
111  AlphaEM() : order(), alpEM0(), alpEMmZ(), mZ2(), bRun(), alpEMstep() {}
112 
113  // Initialization for a given order.
114  void init(int orderIn, Settings* settingsPtr);
115 
116  // alpha_EM value.
117  double alphaEM(double scale2);
118 
119 private:
120 
121  // Constants: could only be changed in the code itself.
122  static const double MZ, Q2STEP[5], BRUNDEF[5];
123 
124  // Data members.
125  int order;
126  double alpEM0, alpEMmZ, mZ2, bRun[5], alpEMstep[5];
127 
128 };
129 
130 //==========================================================================
131 
132 // The CoupSM class stores and returns electroweak couplings,
133 // including Cabibbo-Kobayashi-Maskawa mass mixing matrix elements.
134 
135 class CoupSM {
136 
137 public:
138 
139  // Constructor.
140  CoupSM() : s2tW(), c2tW(), s2tWbar(), GFermi(), vfSave(), lfSave(), rfSave(),
141  ef2Save(), vf2Save(), af2Save(), efvfSave(), vf2af2Save(), VCKMsave(),
142  V2CKMsave(), V2CKMout(), rndmPtr() {}
143 
144  virtual ~CoupSM() {}
145 
146  // Initialize, normally from Pythia::init().
147  void init(Settings& settings, Rndm* rndmPtrIn);
148 
149  // alpha_S value and Lambda values.
150  double alphaS(double scale2) {return alphaSlocal.alphaS(scale2);}
151  double alphaS1Ord(double scale2) {return alphaSlocal.alphaS1Ord(scale2);}
152  double alphaS2OrdCorr(double scale2) {
153  return alphaSlocal.alphaS2OrdCorr(scale2);}
154  double Lambda3() const {return alphaSlocal.Lambda3();}
155  double Lambda4() const {return alphaSlocal.Lambda4();}
156  double Lambda5() const {return alphaSlocal.Lambda5();}
157 
158  // Return alpha_EM value.
159  double alphaEM(double scale2) {return alphaEMlocal.alphaEM(scale2);}
160 
161  // Return electroweak mixing angle and Fermi constant.
162  double sin2thetaW() {return s2tW;}
163  double cos2thetaW() {return c2tW;}
164  double sin2thetaWbar() {return s2tWbar;}
165  double GF() {return GFermi;}
166 
167  // Return electroweak couplings of quarks and leptons.
168  double ef(int idAbs) {return efSave[idAbs];}
169  double vf(int idAbs) {return vfSave[idAbs];}
170  double af(int idAbs) {return afSave[idAbs];}
171  double t3f(int idAbs) {return 0.5*afSave[idAbs];}
172  double lf(int idAbs) {return lfSave[idAbs];}
173  double rf(int idAbs) {return rfSave[idAbs];}
174 
175  // Return some squared couplings and other combinations.
176  double ef2(int idAbs) {return ef2Save[idAbs];}
177  double vf2(int idAbs) {return vf2Save[idAbs];}
178  double af2(int idAbs) {return af2Save[idAbs];}
179  double efvf(int idAbs) {return efvfSave[idAbs];}
180  double vf2af2(int idAbs) {return vf2af2Save[idAbs];}
181 
182  // Return CKM value or square:
183  // first index 1/2/3/4 = u/c/t/t', second 1/2/3/4 = d/s/b/b'.
184  double VCKMgen(int genU, int genD) {return VCKMsave[genU][genD];}
185  double V2CKMgen(int genU, int genD) {return V2CKMsave[genU][genD];}
186 
187  // Return CKM value or square for incoming flavours (sign irrelevant).
188  double VCKMid(int id1, int id2);
189  double V2CKMid(int id1, int id2);
190 
191  // Return CKM sum of squares for given inflavour, or random outflavour.
192  double V2CKMsum(int id) {return V2CKMout[abs(id)];}
193  int V2CKMpick(int id);
194 
195 protected:
196 
197  // Constants: could only be changed in the code itself.
198  static const double efSave[20], afSave[20];
199 
200  // Couplings and VCKM matrix (index 0 not used).
201  double s2tW, c2tW, s2tWbar, GFermi, vfSave[20], lfSave[20], rfSave[20],
202  ef2Save[20], vf2Save[20], af2Save[20], efvfSave[20],
203  vf2af2Save[20], VCKMsave[5][5], V2CKMsave[5][5], V2CKMout[20];
204 
205  // Pointer to the random number generator.
206  Rndm* rndmPtr;
207 
208  // An AlphaStrong instance for general use (but not MPI, ISR, FSR).
209  AlphaStrong alphaSlocal;
210 
211  // An AlphaEM instance for general use (but not MPI, ISR, FSR).
212  AlphaEM alphaEMlocal;
213 
214 };
215 
216 // Backwards compatability for MG5ME plugin interface with Pythia.
217 typedef CoupSM Couplings;
218 
219 //==========================================================================
220 
221 } // end namespace Pythia8
222 
223 #endif // Pythia8_StandardModel_H