Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:32

0001 // StandardModel.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2024 Torbjorn Sjostrand.
0003 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
0004 // Please respect the MCnet Guidelines, see GUIDELINES for details.
0005 
0006 // This file gives access to some Standard Model parameters.
0007 // AlphaStrong: fix or first-, second- or third-order running alpha_strong.
0008 
0009 #ifndef Pythia8_StandardModel_H
0010 #define Pythia8_StandardModel_H
0011 
0012 #include "Pythia8/Basics.h"
0013 #include "Pythia8/PythiaStdlib.h"
0014 #include "Pythia8/Settings.h"
0015 
0016 namespace Pythia8 {
0017 
0018 //==========================================================================
0019 
0020 // The AlphaStrong class calculates the alpha_strong value at an arbitrary
0021 // scale, given the value at m_Z, to first, second or third order.
0022 
0023 class AlphaStrong {
0024 
0025 public:
0026 
0027   // Constructors.
0028   AlphaStrong() : isInit(false), order(0), nfmax(),
0029     Lambda3Save(0.), Lambda4Save(0.), Lambda5Save(0.), Lambda6Save(0.),
0030     Lambda3Save2(0.), Lambda4Save2(0.), Lambda5Save2(0.), Lambda6Save2(0.),
0031     scale2Min(0.), mc(0.), mb(0.), mt(0.), mc2(0.), mb2(0.), mt2(0.), useCMW(),
0032     lastCallToFull(false), valueRef(0.), valueNow(0.), scale2Now(0.) {}
0033 
0034   // Destructor.
0035   virtual ~AlphaStrong() {}
0036 
0037   // Initialization for given value at M_Z and given order.
0038   virtual void init(double valueIn = 0.12, int orderIn = 1, int nfmaxIn = 6,
0039     bool useCMWIn = false);
0040 
0041   // Set flavour threshold values: m_c, m_b, m_t.
0042   virtual void setThresholds(double mcIn, double mbIn, double mtIn) {
0043     mt=mtIn; mb=min(mt,mbIn); mc=min(mb,mcIn);}
0044 
0045   // alpha_S value and Lambda values.
0046   double alphaS(double scale2);
0047   double alphaS1Ord(double scale2);
0048   double alphaS2OrdCorr(double scale2);
0049   double Lambda3() const { return Lambda3Save; }
0050   double Lambda4() const { return Lambda4Save; }
0051   double Lambda5() const { return Lambda5Save; }
0052   double Lambda6() const { return (nfmax >= 6) ? Lambda6Save : Lambda5Save; }
0053 
0054   // Info: tell which scales we use for flavour thresholds.
0055   double muThres(int idQ);
0056   double muThres2(int idQ);
0057 
0058   // Return the CMW factor (for nF between 3 and 6).
0059   double facCMW( int nFin);
0060 
0061 // Protected data members: accessible to derived classes.
0062 protected:
0063 
0064   // Initialization data member.
0065   bool   isInit;
0066 
0067   // Running order and max number of flavours to use in running.
0068   int    order, nfmax;
0069 
0070   // Lambda values.
0071   double Lambda3Save, Lambda4Save, Lambda5Save, Lambda6Save;
0072   double Lambda3Save2, Lambda4Save2, Lambda5Save2, Lambda6Save2;
0073 
0074   // Smallest allowed renormalization scale.
0075   double scale2Min;
0076 
0077   // Flavour thresholds.
0078   static const double MZ;
0079   double mc, mb, mt;
0080   double mc2, mb2, mt2;
0081 
0082   // CMW rescaling factors.
0083   bool useCMW;
0084   static const double FACCMW3, FACCMW4, FACCMW5, FACCMW6;
0085 
0086   // Safety margins to avoid getting too close to LambdaQCD.
0087   static const double SAFETYMARGIN1, SAFETYMARGIN2;
0088 
0089 // Private data members: not accessible to derived classes.
0090 private:
0091 
0092   // Private constants: could only be changed in the code itself.
0093   static const int    NITER;
0094 
0095   // Private data members.
0096   bool   lastCallToFull;
0097   double valueRef, valueNow, scale2Now;
0098 
0099 };
0100 
0101 //==========================================================================
0102 
0103 // The AlphaEM class calculates the alpha_electromagnetic value at an
0104 // arbitrary scale, given the value at 0 and m_Z, to zeroth or first order.
0105 
0106 class AlphaEM {
0107 
0108 public:
0109 
0110   // Constructors.
0111   AlphaEM() : order(), alpEM0(), alpEMmZ(), mZ2(), bRun(), alpEMstep() {}
0112 
0113   // Initialization for a given order.
0114   void init(int orderIn, Settings* settingsPtr);
0115 
0116   // alpha_EM value.
0117   double alphaEM(double scale2);
0118 
0119 private:
0120 
0121   // Constants: could only be changed in the code itself.
0122   static const double MZ, Q2STEP[5], BRUNDEF[5];
0123 
0124   // Data members.
0125   int    order;
0126   double alpEM0, alpEMmZ, mZ2, bRun[5], alpEMstep[5];
0127 
0128 };
0129 
0130 //==========================================================================
0131 
0132 // The CoupSM class stores and returns electroweak couplings,
0133 // including Cabibbo-Kobayashi-Maskawa mass mixing matrix elements.
0134 
0135 class CoupSM {
0136 
0137 public:
0138 
0139   // Constructor.
0140   CoupSM() : s2tW(), c2tW(), s2tWbar(), GFermi(), vfSave(), lfSave(), rfSave(),
0141     ef2Save(), vf2Save(), af2Save(), efvfSave(), vf2af2Save(), VCKMsave(),
0142     V2CKMsave(), V2CKMout(), rndmPtr() {}
0143 
0144   virtual ~CoupSM() {}
0145 
0146   // Initialize, normally from Pythia::init().
0147   void init(Settings& settings, Rndm* rndmPtrIn);
0148 
0149   // alpha_S value and Lambda values.
0150   double alphaS(double scale2) {return alphaSlocal.alphaS(scale2);}
0151   double alphaS1Ord(double scale2) {return alphaSlocal.alphaS1Ord(scale2);}
0152   double alphaS2OrdCorr(double scale2) {
0153     return alphaSlocal.alphaS2OrdCorr(scale2);}
0154   double Lambda3() const {return alphaSlocal.Lambda3();}
0155   double Lambda4() const {return alphaSlocal.Lambda4();}
0156   double Lambda5() const {return alphaSlocal.Lambda5();}
0157 
0158   // Return alpha_EM value.
0159   double alphaEM(double scale2) {return alphaEMlocal.alphaEM(scale2);}
0160 
0161   // Return electroweak mixing angle and Fermi constant.
0162   double sin2thetaW() {return s2tW;}
0163   double cos2thetaW() {return c2tW;}
0164   double sin2thetaWbar() {return s2tWbar;}
0165   double GF() {return GFermi;}
0166 
0167   // Return electroweak couplings of quarks and leptons.
0168   double ef(int idAbs) {return efSave[idAbs];}
0169   double vf(int idAbs) {return vfSave[idAbs];}
0170   double af(int idAbs) {return afSave[idAbs];}
0171   double t3f(int idAbs) {return 0.5*afSave[idAbs];}
0172   double lf(int idAbs) {return lfSave[idAbs];}
0173   double rf(int idAbs) {return rfSave[idAbs];}
0174 
0175   // Return some squared couplings and other combinations.
0176   double ef2(int idAbs) {return ef2Save[idAbs];}
0177   double vf2(int idAbs) {return vf2Save[idAbs];}
0178   double af2(int idAbs) {return af2Save[idAbs];}
0179   double efvf(int idAbs) {return efvfSave[idAbs];}
0180   double vf2af2(int idAbs) {return vf2af2Save[idAbs];}
0181 
0182   // Return CKM value or square:
0183   // first index 1/2/3/4 = u/c/t/t', second 1/2/3/4 = d/s/b/b'.
0184   double VCKMgen(int genU, int genD) {return VCKMsave[genU][genD];}
0185   double V2CKMgen(int genU, int genD) {return V2CKMsave[genU][genD];}
0186 
0187   // Return CKM value or square for incoming flavours (sign irrelevant).
0188   double VCKMid(int id1, int id2);
0189   double V2CKMid(int id1, int id2);
0190 
0191   // Return CKM sum of squares for given inflavour, or random outflavour.
0192   double V2CKMsum(int id) {return V2CKMout[abs(id)];}
0193   int    V2CKMpick(int id);
0194 
0195 protected:
0196 
0197   // Constants: could only be changed in the code itself.
0198   static const double efSave[20], afSave[20];
0199 
0200   // Couplings and VCKM matrix (index 0 not used).
0201   double s2tW, c2tW, s2tWbar, GFermi, vfSave[20], lfSave[20], rfSave[20],
0202          ef2Save[20], vf2Save[20], af2Save[20], efvfSave[20],
0203          vf2af2Save[20], VCKMsave[5][5], V2CKMsave[5][5], V2CKMout[20];
0204 
0205   // Pointer to the random number generator.
0206   Rndm*       rndmPtr;
0207 
0208   // An AlphaStrong instance for general use (but not MPI, ISR, FSR).
0209   AlphaStrong alphaSlocal;
0210 
0211   // An AlphaEM instance for general use (but not MPI, ISR, FSR).
0212   AlphaEM     alphaEMlocal;
0213 
0214 };
0215 
0216 // Backwards compatability for MG5ME plugin interface with Pythia.
0217 typedef CoupSM Couplings;
0218 
0219 //==========================================================================
0220 
0221 // The AlphaSUN class calculates the running coupling alpha in an SU(N) model,
0222 // as a function of the scale, to first, second or third order.
0223 // Formally part of beyond-the-Standard-Model scenarios, e.g. Hidden Valleys,
0224 // but put here since it is closely related to alpha_strong.
0225 
0226 class AlphaSUN {
0227 
0228 public:
0229 
0230   // Constructors.
0231   AlphaSUN() : nC(0), nF(0), order(0), LambdaSave(0.), Lambda2Save(0.),
0232     scale2Min(0.), b0(0.), b1(0.), b2(0.) {}
0233 
0234   // Destructor.
0235   virtual ~AlphaSUN() {}
0236 
0237   // Initialization for given value at M_Z and given order.
0238   virtual void initAlpha(int nCin, int nFin, int orderIn = 1,
0239     double alphaIn = 0.12, double scaleIn = 91.188) {
0240      initColFac( nCin, nFin, orderIn);
0241      findLambda(alphaIn, scaleIn); }
0242 
0243   // Initialization for given value of Lambda and given order.
0244   virtual void initLambda(int nCin, int nFin, int orderIn = 1,
0245     double LambdaIn = 0.2) { initColFac( nCin, nFin, orderIn);
0246     LambdaSave = LambdaIn; Lambda2Save = pow2(LambdaSave);
0247     scale2Min = (order == 1) ? pow2(SAFETYMARGIN1) * Lambda2Save
0248       : pow2(SAFETYMARGIN2) * Lambda2Save; }
0249 
0250   // alpha(Q^2), whole or split, and Lambda values.
0251   double alpha(double scale2in);
0252   double alpha1Ord(double scale2in);
0253   double alpha2OrdCorr(double scale2in);
0254   double Lambda() const { return LambdaSave; }
0255 
0256 private:
0257 
0258   // Constants: could only be changed in the code itself.
0259   static const int    NITER;
0260   static const double SAFETYMARGIN1, SAFETYMARGIN2;
0261 
0262   // Method to initialize required constants in the SU(N) group.
0263   void initColFac(int nCin, int nFin, int orderIn);
0264 
0265   // Method to convert an alpha at a scale into a Lambda.
0266   void findLambda(double alphaIn, double scaleIn);
0267 
0268   // Number of colours and flavours, and running of alpha.
0269   int    nC, nF, order;
0270   double LambdaSave, Lambda2Save, scale2Min, b0, b1, b2;
0271 
0272 };
0273 
0274 //==========================================================================
0275 
0276 } // end namespace Pythia8
0277 
0278 #endif // Pythia8_StandardModel_H