PYTHIA  8.312
StandardModel.h
1 // StandardModel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2024 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-, second- or third-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 first, second or third 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.
207 
208  // An AlphaStrong instance for general use (but not MPI, ISR, FSR).
210 
211  // An AlphaEM instance for general use (but not MPI, ISR, FSR).
213 
214 };
215 
216 // Backwards compatability for MG5ME plugin interface with Pythia.
218 
219 //==========================================================================
220 
221 // The AlphaSUN class calculates the running coupling alpha in an SU(N) model,
222 // as a function of the scale, to first, second or third order.
223 // Formally part of beyond-the-Standard-Model scenarios, e.g. Hidden Valleys,
224 // but put here since it is closely related to alpha_strong.
225 
226 class AlphaSUN {
227 
228 public:
229 
230  // Constructors.
231  AlphaSUN() : nC(0), nF(0), order(0), LambdaSave(0.), Lambda2Save(0.),
232  scale2Min(0.), b0(0.), b1(0.), b2(0.) {}
233 
234  // Destructor.
235  virtual ~AlphaSUN() {}
236 
237  // Initialization for given value at M_Z and given order.
238  virtual void initAlpha(int nCin, int nFin, int orderIn = 1,
239  double alphaIn = 0.12, double scaleIn = 91.188) {
240  initColFac( nCin, nFin, orderIn);
241  findLambda(alphaIn, scaleIn); }
242 
243  // Initialization for given value of Lambda and given order.
244  virtual void initLambda(int nCin, int nFin, int orderIn = 1,
245  double LambdaIn = 0.2) { initColFac( nCin, nFin, orderIn);
246  LambdaSave = LambdaIn; Lambda2Save = pow2(LambdaSave);
247  scale2Min = (order == 1) ? pow2(SAFETYMARGIN1) * Lambda2Save
248  : pow2(SAFETYMARGIN2) * Lambda2Save; }
249 
250  // alpha(Q^2), whole or split, and Lambda values.
251  double alpha(double scale2in);
252  double alpha1Ord(double scale2in);
253  double alpha2OrdCorr(double scale2in);
254  double Lambda() const { return LambdaSave; }
255 
256 private:
257 
258  // Constants: could only be changed in the code itself.
259  static const int NITER;
260  static const double SAFETYMARGIN1, SAFETYMARGIN2;
261 
262  // Method to initialize required constants in the SU(N) group.
263  void initColFac(int nCin, int nFin, int orderIn);
264 
265  // Method to convert an alpha at a scale into a Lambda.
266  void findLambda(double alphaIn, double scaleIn);
267 
268  // Number of colours and flavours, and running of alpha.
269  int nC, nF, order;
270  double LambdaSave, Lambda2Save, scale2Min, b0, b1, b2;
271 
272 };
273 
274 //==========================================================================
275 
276 } // end namespace Pythia8
277 
278 #endif // Pythia8_StandardModel_H
double s2tW
Couplings and VCKM matrix (index 0 not used).
Definition: StandardModel.h:201
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:182
double ef(int idAbs)
Return electroweak couplings of quarks and leptons.
Definition: StandardModel.h:168
virtual void init(double valueIn=0.12, int orderIn=1, int nfmaxIn=6, bool useCMWIn=false)
Initialization for given value at M_Z and given order.
Definition: StandardModel.cc:42
Definition: StandardModel.h:23
int order
Running order and max number of flavours to use in running.
Definition: StandardModel.h:68
AlphaEM alphaEMlocal
An AlphaEM instance for general use (but not MPI, ISR, FSR).
Definition: StandardModel.h:212
double sin2thetaW()
Return electroweak mixing angle and Fermi constant.
Definition: StandardModel.h:162
double facCMW(int nFin)
Return the CMW factor (for nF between 3 and 6).
Definition: StandardModel.cc:344
bool useCMW
CMW rescaling factors.
Definition: StandardModel.h:83
double scale2Min
Smallest allowed renormalization scale.
Definition: StandardModel.h:75
static const double FACCMW3
CMW factor for 3, 4, 5, and 6 flavours.
Definition: StandardModel.h:84
double ef2(int idAbs)
Return some squared couplings and other combinations.
Definition: StandardModel.h:176
Definition: StandardModel.h:106
double alphaEM(double scale2)
Return alpha_EM value.
Definition: StandardModel.h:159
static const double SAFETYMARGIN1
Safety margins to avoid getting too close to LambdaQCD.
Definition: StandardModel.h:87
double VCKMgen(int genU, int genD)
Definition: StandardModel.h:184
double alphaS1Ord(double scale2)
Definition: StandardModel.cc:244
Definition: Basics.h:386
AlphaStrong()
Constructors.
Definition: StandardModel.h:28
Definition: StandardModel.h:226
double muThres(int idQ)
Info: tell which scales we use for flavour thresholds.
Definition: StandardModel.cc:320
virtual void initLambda(int nCin, int nFin, int orderIn=1, double LambdaIn=0.2)
Initialization for given value of Lambda and given order.
Definition: StandardModel.h:244
double muThres2(int idQ)
Definition: StandardModel.cc:330
CoupSM()
Constructor.
Definition: StandardModel.h:140
Definition: StandardModel.h:135
double alphaS(double scale2)
alpha_S value and Lambda values.
Definition: StandardModel.h:150
static const double MZ
Flavour thresholds.
Definition: StandardModel.h:78
AlphaSUN()
Constructors.
Definition: StandardModel.h:231
AlphaEM()
Constructors.
Definition: StandardModel.h:111
virtual ~AlphaStrong()
Destructor.
Definition: StandardModel.h:35
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
double alphaS2OrdCorr(double scale2)
Definition: StandardModel.cc:279
virtual void initAlpha(int nCin, int nFin, int orderIn=1, double alphaIn=0.12, double scaleIn=91.188)
Initialization for given value at M_Z and given order.
Definition: StandardModel.h:238
double V2CKMsum(int id)
Return CKM sum of squares for given inflavour, or random outflavour.
Definition: StandardModel.h:192
Rndm * rndmPtr
Pointer to the random number generator.
Definition: StandardModel.h:206
bool isInit
Protected data members: accessible to derived classes.
Definition: StandardModel.h:65
virtual ~AlphaSUN()
Destructor.
Definition: StandardModel.h:235
double alphaS(double scale2)
alpha_S value and Lambda values.
Definition: StandardModel.cc:177
virtual void setThresholds(double mcIn, double mbIn, double mtIn)
Set flavour threshold values: m_c, m_b, m_t.
Definition: StandardModel.h:42
CoupSM Couplings
Backwards compatability for MG5ME plugin interface with Pythia.
Definition: StandardModel.h:217
double Lambda3Save
Lambda values.
Definition: StandardModel.h:71
AlphaStrong alphaSlocal
An AlphaStrong instance for general use (but not MPI, ISR, FSR).
Definition: StandardModel.h:209
Definition: Settings.h:195