PYTHIA  8.316
StandardModel.h
1 // StandardModel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2025 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, double valueMaxIn = -1., double renormShiftIn = 0.);
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  // Return the alphaSmax value.
62  double alphaSmax() { return valueMax; }
63 
64  // Return the poleShift value.
65  double renormShift() { return renormShiftSave; }
66 
67 // Protected data members: accessible to derived classes.
68 protected:
69 
70  // Initialization data member.
71  bool isInit;
72 
73  // Running order and max number of flavours to use in running.
74  int order, nfmax;
75 
76  // Lambda values.
77  double Lambda3Save, Lambda4Save, Lambda5Save, Lambda6Save;
78  double Lambda3Save2, Lambda4Save2, Lambda5Save2, Lambda6Save2;
79 
80  // Smallest allowed renormalization scale.
81  double scale2Min;
82 
83  // Flavour thresholds.
84  static const double MZ;
85  double mc, mb, mt;
86  double mc2, mb2, mt2;
87 
88  // CMW rescaling factors.
89  bool useCMW;
90  static const double FACCMW3, FACCMW4, FACCMW5, FACCMW6;
91 
92  // Safety margins to avoid getting too close to LambdaQCD.
93  static const double SAFETYMARGIN1, SAFETYMARGIN2;
94 
95 // Private data members: not accessible to derived classes.
96 private:
97 
98  // Private constants: could only be changed in the code itself.
99  static const int NITER;
100 
101  // Private data members.
102  bool lastCallToFull;
103  double valueRef, valueNow, scale2Now;
104  double valueMax{-1.}, renormShiftSave{0.};
105 
106 };
107 
108 //==========================================================================
109 
110 // The AlphaEM class calculates the alpha_electromagnetic value at an
111 // arbitrary scale, given the value at 0 and m_Z, to zeroth or first order.
112 
113 class AlphaEM {
114 
115 public:
116 
117  // Constructors.
118  AlphaEM() : order(), alpEM0(), alpEMmZ(), mZ2(), bRun(), alpEMstep() {}
119 
120  // Initialization for a given order.
121  void init(int orderIn, Settings* settingsPtr);
122 
123  // alpha_EM value.
124  double alphaEM(double scale2);
125 
126 private:
127 
128  // Constants: could only be changed in the code itself.
129  static const double MZ, Q2STEP[5], BRUNDEF[5];
130 
131  // Data members.
132  int order;
133  double alpEM0, alpEMmZ, mZ2, bRun[5], alpEMstep[5];
134 
135 };
136 
137 //==========================================================================
138 
139 // The CoupSM class stores and returns electroweak couplings,
140 // including Cabibbo-Kobayashi-Maskawa mass mixing matrix elements.
141 
142 class CoupSM {
143 
144 public:
145 
146  // Constructor.
147  CoupSM() : s2tW(), c2tW(), s2tWbar(), GFermi(), vfSave(), lfSave(), rfSave(),
148  ef2Save(), vf2Save(), af2Save(), efvfSave(), vf2af2Save(), VCKMsave(),
149  V2CKMsave(), V2CKMout(), rndmPtr() {}
150 
151  virtual ~CoupSM() {}
152 
153  // Initialize, normally from Pythia::init().
154  void init(Settings& settings, Rndm* rndmPtrIn);
155 
156  // alpha_S value and Lambda values.
157  double alphaS(double scale2) {return alphaSlocal.alphaS(scale2);}
158  double alphaS1Ord(double scale2) {return alphaSlocal.alphaS1Ord(scale2);}
159  double alphaS2OrdCorr(double scale2) {
160  return alphaSlocal.alphaS2OrdCorr(scale2);}
161  double Lambda3() const {return alphaSlocal.Lambda3();}
162  double Lambda4() const {return alphaSlocal.Lambda4();}
163  double Lambda5() const {return alphaSlocal.Lambda5();}
164 
165  // Return alpha_EM value.
166  double alphaEM(double scale2) {return alphaEMlocal.alphaEM(scale2);}
167 
168  // Return electroweak mixing angle and Fermi constant.
169  double sin2thetaW() {return s2tW;}
170  double cos2thetaW() {return c2tW;}
171  double sin2thetaWbar() {return s2tWbar;}
172  double GF() {return GFermi;}
173 
174  // Return electroweak couplings of quarks and leptons.
175  double ef(int idAbs) {return efSave[idAbs];}
176  double vf(int idAbs) {return vfSave[idAbs];}
177  double af(int idAbs) {return afSave[idAbs];}
178  double t3f(int idAbs) {return 0.5*afSave[idAbs];}
179  double lf(int idAbs) {return lfSave[idAbs];}
180  double rf(int idAbs) {return rfSave[idAbs];}
181 
182  // Return some squared couplings and other combinations.
183  double ef2(int idAbs) {return ef2Save[idAbs];}
184  double vf2(int idAbs) {return vf2Save[idAbs];}
185  double af2(int idAbs) {return af2Save[idAbs];}
186  double efvf(int idAbs) {return efvfSave[idAbs];}
187  double vf2af2(int idAbs) {return vf2af2Save[idAbs];}
188 
189  // Return CKM value or square:
190  // first index 1/2/3/4 = u/c/t/t', second 1/2/3/4 = d/s/b/b'.
191  double VCKMgen(int genU, int genD) {return VCKMsave[genU][genD];}
192  double V2CKMgen(int genU, int genD) {return V2CKMsave[genU][genD];}
193 
194  // Return CKM value or square for incoming flavours (sign irrelevant).
195  double VCKMid(int id1, int id2);
196  double V2CKMid(int id1, int id2);
197 
198  // Return CKM sum of squares for given inflavour, or random outflavour.
199  double V2CKMsum(int id) {return V2CKMout[abs(id)];}
200  int V2CKMpick(int id);
201 
202 protected:
203 
204  // Constants: could only be changed in the code itself.
205  static const double efSave[20], afSave[20];
206 
207  // Couplings and VCKM matrix (index 0 not used).
208  double s2tW, c2tW, s2tWbar, GFermi, vfSave[20], lfSave[20], rfSave[20],
209  ef2Save[20], vf2Save[20], af2Save[20], efvfSave[20],
210  vf2af2Save[20], VCKMsave[5][5], V2CKMsave[5][5], V2CKMout[20];
211 
212  // Pointer to the random number generator.
214 
215  // An AlphaStrong instance for general use (but not MPI, ISR, FSR).
217 
218  // An AlphaEM instance for general use (but not MPI, ISR, FSR).
220 
221 };
222 
223 // Backwards compatability for MG5ME plugin interface with Pythia.
225 
226 //==========================================================================
227 
228 // The AlphaSUN class calculates the running coupling alpha in an SU(N) model,
229 // as a function of the scale, to first, second or third order.
230 // Formally part of beyond-the-Standard-Model scenarios, e.g. Hidden Valleys,
231 // but put here since it is closely related to alpha_strong.
232 
233 class AlphaSUN {
234 
235 public:
236 
237  // Constructors.
238  AlphaSUN() : nC(0), nF(0), order(0), LambdaSave(0.), Lambda2Save(0.),
239  scale2Min(0.), b0(0.), b1(0.), b2(0.) {}
240 
241  // Destructor.
242  virtual ~AlphaSUN() {}
243 
244  // Initialization for given value at M_Z and given order.
245  virtual void initAlpha(int nCin, int nFin, int orderIn = 1,
246  double alphaIn = 0.12, double scaleIn = 91.188) {
247  initColFac( nCin, nFin, orderIn);
248  findLambda(alphaIn, scaleIn); }
249 
250  // Initialization for given value of Lambda and given order.
251  virtual void initLambda(int nCin, int nFin, int orderIn = 1,
252  double LambdaIn = 0.2) { initColFac( nCin, nFin, orderIn);
253  LambdaSave = LambdaIn; Lambda2Save = pow2(LambdaSave);
254  scale2Min = (order == 1) ? pow2(SAFETYMARGIN1) * Lambda2Save
255  : pow2(SAFETYMARGIN2) * Lambda2Save; }
256 
257  // alpha(Q^2), whole or split, and Lambda values.
258  double alpha(double scale2in);
259  double alpha1Ord(double scale2in);
260  double alpha2OrdCorr(double scale2in);
261  double Lambda() const { return LambdaSave; }
262 
263 private:
264 
265  // Constants: could only be changed in the code itself.
266  static const int NITER;
267  static const double SAFETYMARGIN1, SAFETYMARGIN2;
268 
269  // Method to initialize required constants in the SU(N) group.
270  void initColFac(int nCin, int nFin, int orderIn);
271 
272  // Method to convert an alpha at a scale into a Lambda.
273  void findLambda(double alphaIn, double scaleIn);
274 
275  // Number of colours and flavours, and running of alpha.
276  int nC, nF, order;
277  double LambdaSave, Lambda2Save, scale2Min, b0, b1, b2;
278 
279 };
280 
281 //==========================================================================
282 
283 } // end namespace Pythia8
284 
285 #endif // Pythia8_StandardModel_H
double s2tW
Couplings and VCKM matrix (index 0 not used).
Definition: StandardModel.h:208
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:173
double ef(int idAbs)
Return electroweak couplings of quarks and leptons.
Definition: StandardModel.h:175
Definition: StandardModel.h:23
int order
Running order and max number of flavours to use in running.
Definition: StandardModel.h:74
AlphaEM alphaEMlocal
An AlphaEM instance for general use (but not MPI, ISR, FSR).
Definition: StandardModel.h:219
double sin2thetaW()
Return electroweak mixing angle and Fermi constant.
Definition: StandardModel.h:169
double facCMW(int nFin)
Return the CMW factor (for nF between 3 and 6).
Definition: StandardModel.cc:359
bool useCMW
CMW rescaling factors.
Definition: StandardModel.h:89
double scale2Min
Smallest allowed renormalization scale.
Definition: StandardModel.h:81
static const double FACCMW3
CMW factor for 3, 4, 5, and 6 flavours.
Definition: StandardModel.h:90
double ef2(int idAbs)
Return some squared couplings and other combinations.
Definition: StandardModel.h:183
Definition: StandardModel.h:113
double alphaEM(double scale2)
Return alpha_EM value.
Definition: StandardModel.h:166
static const double SAFETYMARGIN1
Safety margins to avoid getting too close to LambdaQCD.
Definition: StandardModel.h:93
double VCKMgen(int genU, int genD)
Definition: StandardModel.h:191
double alphaS1Ord(double scale2)
Definition: StandardModel.cc:259
Definition: Basics.h:388
AlphaStrong()
Constructors.
Definition: StandardModel.h:28
Definition: StandardModel.h:233
double muThres(int idQ)
Info: tell which scales we use for flavour thresholds.
Definition: StandardModel.cc:335
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:251
double renormShift()
Return the poleShift value.
Definition: StandardModel.h:65
double muThres2(int idQ)
Definition: StandardModel.cc:345
CoupSM()
Constructor.
Definition: StandardModel.h:147
virtual void init(double valueIn=0.12, int orderIn=1, int nfmaxIn=6, bool useCMWIn=false, double valueMaxIn=-1., double renormShiftIn=0.)
Initialization for given value at M_Z and given order.
Definition: StandardModel.cc:42
Definition: StandardModel.h:142
double alphaS(double scale2)
alpha_S value and Lambda values.
Definition: StandardModel.h:157
static const double MZ
Flavour thresholds.
Definition: StandardModel.h:84
double alphaSmax()
Return the alphaSmax value.
Definition: StandardModel.h:62
AlphaSUN()
Constructors.
Definition: StandardModel.h:238
AlphaEM()
Constructors.
Definition: StandardModel.h:118
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:294
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:245
double V2CKMsum(int id)
Return CKM sum of squares for given inflavour, or random outflavour.
Definition: StandardModel.h:199
Rndm * rndmPtr
Pointer to the random number generator.
Definition: StandardModel.h:213
bool isInit
Protected data members: accessible to derived classes.
Definition: StandardModel.h:71
virtual ~AlphaSUN()
Destructor.
Definition: StandardModel.h:242
double alphaS(double scale2)
alpha_S value and Lambda values.
Definition: StandardModel.cc:189
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:224
double Lambda3Save
Lambda values.
Definition: StandardModel.h:77
AlphaStrong alphaSlocal
An AlphaStrong instance for general use (but not MPI, ISR, FSR).
Definition: StandardModel.h:216
Definition: Settings.h:196