Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:31

0001 // -*- C++ -*-
0002 //
0003 // AlphaSBase.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef ThePEG_AlphaSBase_H
0010 #define ThePEG_AlphaSBase_H
0011 // This is the declaration of the AlphaSBase class.
0012 
0013 #include "RunningCoupling.h"
0014 
0015 namespace ThePEG {
0016 
0017 /**
0018  * AlphaSBase is an abstract base class used by the StandardModelBase
0019  * to implement the QCD coupling, \f$\alpha_S\f$. The AlphaSBase also
0020  * encodes the number of active flavours at a given scale and the
0021  * \f$\Lambda_{QCD}\f$ for a given number of active flavours or for a
0022  * given scale.
0023  *
0024  * @see \ref AlphaSBaseInterfaces "The interfaces"
0025  * defined for AlphaSBase.
0026  * @see StandardModelBase
0027  */
0028 class AlphaSBase: public RunningCoupling {
0029 
0030 public:
0031 
0032   /** @name Virtual functions to be overridden by sub-classes. */
0033   //@{
0034   /**
0035    * Return the flavour thresholds used. The returned vector contains
0036    * (in position <code>i</code>) the scales when the active number of
0037    * flavours changes from <code>i</code> to <code>i+1</code>.
0038    */
0039   virtual vector<Energy2> flavourThresholds() const = 0;
0040 
0041   /**
0042    * Return the \f$\Lambda_{QCD}\f$ used for different numbers of
0043    * active flavours.
0044    */
0045   virtual vector<Energy> LambdaQCDs() const = 0;
0046   //@}
0047 
0048   /** @name Access information about number of flavours and
0049       \f$\Lambda_{QCD}\f$. */
0050   //@{
0051   /**
0052    * Return the number of avtive quark flavours.
0053    */
0054   unsigned int Nf(Energy2 scale) const {
0055     unsigned int i = 0;
0056     while ( i < theFlavourThresholds.size() &&
0057         theFlavourThresholds[i] < scale ) ++i;
0058     return i;
0059   }
0060 
0061   /**
0062    * Return the \f$\Lambda_{QCD}\f$ used for \a nflav active flavours.
0063    */
0064   Energy LambdaQCD(unsigned int nflav) const  { return theLambdaQCDs[nflav]; }
0065 
0066   /**
0067    * Return the \f$\Lambda_{QCD}\f$ used for corresponding given \a scale.
0068    */
0069   Energy LambdaQCD(Energy2 scale) const { return theLambdaQCDs[Nf(scale)]; }
0070   //@}
0071 
0072   /**
0073    * Return the quark masses to be used; if not empty these masses
0074    * should be considered instead of the ones set in the particle data
0075    * objects.
0076    */
0077   const vector<Energy>& quarkMasses() const { return theQuarkMasses; }
0078 
0079 public:
0080 
0081   /** @name Functions used by the persistent I/O system. */
0082   //@{
0083   /**
0084    * Function used to write out object persistently.
0085    * @param os the persistent output stream written to.
0086    */
0087   void persistentOutput(PersistentOStream & os) const;
0088 
0089   /**
0090    * Function used to read in object persistently.
0091    * @param is the persistent input stream read from.
0092    * @param version the version number of the object when written.
0093    */
0094   void persistentInput(PersistentIStream & is, int version);
0095   //@}
0096 
0097   /**
0098    * Standard Init function used to initialize the interface.
0099    */
0100   static void Init();
0101 
0102 protected:
0103 
0104   /** @name Standard Interfaced functions. */
0105   //@{
0106 
0107   /**
0108    * Initialize this object after the setup phase before saving an
0109    * EventGenerator to disk.
0110    * @throws InitException if object could not be initialized properly.
0111    */
0112   virtual void doinit();
0113 
0114   //@}
0115 
0116 private:
0117 
0118   /**
0119    * The quark masses to be used; if not empty these masses
0120    * should be considered instead of the ones set in the particle data
0121    * objects.
0122    */
0123   vector<Energy> theQuarkMasses;
0124 
0125   /**
0126    * Flavour thresholds, set from the virtual functions in the
0127    * initialization.
0128    */
0129   vector<Energy2> theFlavourThresholds;
0130 
0131   /**
0132    * The values of \f$\Lambda_{QCD}\f$ corresponding to
0133    * theFlavourThresholds, set from the virtual functions in the
0134    * initialization.
0135    */
0136   vector<Energy> theLambdaQCDs;
0137 
0138 private:
0139 
0140   /**
0141    * Describe an abstract class with persistent data.
0142    */
0143   static AbstractClassDescription<AlphaSBase> initAlphaSBase;
0144 
0145   /**
0146    *  Private and non-existent assignment operator.
0147    */
0148   AlphaSBase & operator=(const AlphaSBase &) = delete;
0149 
0150 };
0151 
0152 /** @cond TRAITSPECIALIZATIONS */
0153 
0154 /** This template specialization informs ThePEG about the base classes
0155  *  of AlphaSBase. */
0156 template <>
0157 struct BaseClassTrait<AlphaSBase,1>: public ClassTraitsType {
0158   /** Typedef of the first base class of AlphaSBase. */
0159   typedef RunningCoupling NthBase;
0160 };
0161 
0162 /** This template specialization informs ThePEG about the name of the
0163  *  AlphaSBase class. */
0164 template <>
0165 struct ClassTraits<AlphaSBase>: public ClassTraitsBase<AlphaSBase> {
0166   /** Return a platform-independent class name */
0167   static string className() { return "ThePEG::AlphaSBase"; }
0168 };
0169 
0170 /** @endcond */
0171 
0172 }
0173 
0174 #endif /* ThePEG_AlphaSBase_H */