Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:24:23

0001 // -*- C++ -*-
0002 
0003 // couplings/nlo_alpha_s.h is part of matchbox
0004 // (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
0005 
0006 #ifndef matchbox_couplings_nlo_alpha_s_h
0007 #define matchbox_couplings_nlo_alpha_s_h
0008 
0009 #include "alpha_s.h"
0010 
0011 namespace matchbox {
0012 
0013   using namespace ThePEG;
0014 
0015   /**
0016    * NLO running alpha_s
0017    *
0018    * @see \ref nlo_alpha_sInterfaces "The interfaces"
0019    * defined for nlo_alpha_s.
0020    */
0021   class nlo_alpha_s
0022     : public alpha_s {
0023 
0024   public:
0025 
0026     /**
0027      * The default constructor.
0028      */
0029     nlo_alpha_s();
0030 
0031   public:
0032 
0033     /// return alpha_s as function of scale, QCD scale
0034     /// and number of active flavours
0035     virtual double operator () (Energy2 scale,
0036                 Energy2 lambda2,
0037                 unsigned int nf) const;
0038 
0039     /// return the number of loops which determine this running
0040     virtual unsigned int nloops () const { return 2; }
0041 
0042   public:
0043 
0044     /** @name Functions used by the persistent I/O system. */
0045     //@{
0046     /**
0047      * Function used to write out object persistently.
0048      * @name os the persistent output stream written to.
0049      */
0050     void persistentOutput(PersistentOStream & os) const;
0051 
0052     /**
0053      * Function used to read in object persistently.
0054      * @name is the persistent input stream read from.
0055      * @name version the version number of the object when written.
0056      */
0057     void persistentInput(PersistentIStream & is, int version);
0058     //@}
0059 
0060     /**
0061      * The standard Init function used to initialize the interfaces.
0062      * Called exactly once for each class by the class description system
0063      * before the main function starts or
0064      * when this class is dynamically loaded.
0065      */
0066     static void Init();
0067 
0068   protected:
0069 
0070     /** @name Standard Interfaced functions. */
0071     //@{
0072 
0073     /**
0074      * Initialize this object after the setup phase before saving an
0075      * EventGenerator to disk.
0076      * @throws InitException if object could not be initialized properly.
0077      */
0078     virtual inline void doinit() {
0079       freezing_scale_ *= scale_factor();
0080       alpha_s::doinit();
0081     }
0082 
0083     //@}
0084 
0085   protected:
0086 
0087     /** @name Clone Methods. */
0088     //@{
0089     /**
0090      * Make a simple clone of this object.
0091      * @return a pointer to the new object.
0092      */
0093     virtual IBPtr clone() const;
0094 
0095     /** Make a clone of this object, possibly modifying the cloned object
0096      * to make it sane.
0097      * @return a pointer to the new object.
0098      */
0099     virtual IBPtr fullclone() const;
0100     //@}
0101 
0102   private:
0103 
0104     /**
0105      * The static object used to initialize the description of this class.
0106      * Indicates that this is an abstract class with persistent data.
0107      */
0108     static ClassDescription<nlo_alpha_s> initnlo_alpha_s;
0109 
0110     /**
0111      * The assignment operator is private and must never be called.
0112      * In fact, it should not even be implemented.
0113      */
0114     nlo_alpha_s & operator=(const nlo_alpha_s &) = delete;
0115 
0116   private:
0117 
0118     struct rg_solution {
0119 
0120       inline double operator () (double alpha) {
0121 
0122     double beta0 = (33.-2.*nf)/(12.*Constants::pi);
0123     double beta1 = (153.-19.*nf)/(24.*sqr(Constants::pi));
0124 
0125     return ((1./alpha)+(beta1/beta0)*log(alpha/(beta0+beta1*alpha))- beta0*slog);
0126 
0127       }
0128 
0129       double slog;
0130       unsigned int nf;
0131 
0132     };
0133 
0134     Energy freezing_scale_;
0135 
0136     bool exact_evaluation_;
0137 
0138     static rg_solution& rg () {
0139       static rg_solution rg_;
0140       return rg_;
0141     }
0142 
0143     static gsl::bisection_root_solver<rg_solution,100>& rg_solver () {
0144       static gsl::bisection_root_solver<rg_solution,100> rg_solver_(rg());
0145       return rg_solver_;
0146     }
0147 
0148     bool two_largeq_terms_;
0149 
0150   };
0151 
0152 }
0153 
0154 #include "ThePEG/Utilities/ClassTraits.h"
0155 
0156 namespace ThePEG {
0157 
0158   /** @cond TRAITSPECIALIZATIONS */
0159 
0160   /** This template specialization informs ThePEG about the
0161    *  base classes of nlo_alpha_s. */
0162   template <>
0163   struct BaseClassTrait<matchbox::nlo_alpha_s,1> {
0164     /** Typedef of the first base class of nlo_alpha_s. */
0165     typedef matchbox::alpha_s NthBase;
0166   };
0167 
0168   /** This template specialization informs ThePEG about the name of
0169    *  the nlo_alpha_s class and the shared object where it is defined. */
0170   template <>
0171   struct ClassTraits<matchbox::nlo_alpha_s>
0172     : public ClassTraitsBase<matchbox::nlo_alpha_s> {
0173     /** Return a platform-independent class name */
0174     static string className() { return "matchbox::nlo_alpha_s"; }
0175     /**
0176      * The name of a file containing the dynamic library where the class
0177      * nlo_alpha_s is implemented. It may also include several, space-separated,
0178      * libraries if the class nlo_alpha_s depends on other classes (base classes
0179      * excepted). In this case the listed libraries will be dynamically
0180      * linked in the order they are specified.
0181      */
0182     static string library() { return "HwDipoleShowerAlphaS.so"; }
0183   };
0184 
0185   /** @endcond */
0186 
0187 }
0188 
0189 #endif /* matchbox_couplings_nlo_alpha_s_h */