Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // RunningCoupling.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad, (C) 2009 Simon Platzer
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_RunningCoupling_H
0010 #define ThePEG_RunningCoupling_H
0011 // This is the declaration of the RunningCoupling class.
0012 
0013 #include "ThePEG/Interface/Interfaced.h"
0014 #include "ThePEG/Repository/EventGenerator.h"
0015 #include "StandardModelBase.fh"
0016 
0017 namespace ThePEG {
0018 
0019 /**
0020  * RunningCoupling an abstract base class unifying the treatment
0021  * of running couplings in ThePEG.
0022  *
0023  * @see \ref RunningCouplingInterfaces "The interfaces"
0024  * defined for RunningCoupling.
0025  * @see StandardModelBase
0026  */
0027 class RunningCoupling: public Interfaced {
0028 
0029 public:
0030 
0031   /**
0032    * The default constructor.
0033    */
0034   RunningCoupling () : theScaleFactor(1.) {}
0035 
0036   /**@name Methods to be implemented by a derived class */
0037   //@{
0038 
0039   /**
0040    * Return the value of the coupling at a given \a scale using the
0041    * given standard model object, \a sm.
0042    */
0043   virtual double value (Energy2 scale, const StandardModelBase & sm) const = 0;
0044 
0045   /**
0046    * Return the number of loops contributing to
0047    * the running this coupling. The default returns
0048    * zero to ensure backward compatibility.
0049    */
0050   virtual unsigned int nloops () const { return 0; }
0051 
0052   //@}
0053 
0054   /**
0055    * Return the value of the coupling at a given \a scale using the
0056    * StandardModelBase object used by the EventGenerator.
0057    */
0058   double value(Energy2 scale) const {
0059     return value(scale,*(generator()->standardModel()));
0060   }
0061 
0062   /**
0063    * Return an overestimate to the running coupling at the
0064    * given scale. This is defined to aid veto algorithms
0065    * and by default returns the coupling itself, using the EventGenerators's
0066    * StandardModelBase object.
0067    */
0068   virtual double overestimateValue (Energy2 scale) const {
0069     return value(scale);
0070   }
0071 
0072   /**
0073    * Return the ratio of the exact to the overestimated value
0074    * of the running coupling. The default implementation returns
0075    * one in accordance with the default implementation of
0076    * overestimateValue
0077    */
0078   virtual double ratioToOverestimate (Energy2) const {
0079     return 1.;
0080   }
0081 
0082   /**
0083    * Return the scale factor, which may be used to globally
0084    * rescale the argument of the running coupling.
0085    */
0086   double scaleFactor () const { return theScaleFactor; }
0087 
0088 public:
0089 
0090   /** @name Functions used by the persistent I/O system. */
0091   //@{
0092   /**
0093    * Function used to write out object persistently.
0094    * @param os the persistent output stream written to.
0095    */
0096   void persistentOutput(PersistentOStream & os) const;
0097 
0098   /**
0099    * Function used to read in object persistently.
0100    * @param is the persistent input stream read from.
0101    * @param version the version number of the object when written.
0102    */
0103   void persistentInput(PersistentIStream & is, int version);
0104   //@}
0105 
0106   /**
0107    * Standard Init function used to initialize the interface.
0108    */
0109   static void Init();
0110 
0111 private:
0112 
0113   /**
0114    * Describe an abstract class without persistent data.
0115    */
0116   static AbstractClassDescription<RunningCoupling> initRunningCoupling;
0117 
0118   /**
0119    *  Private and non-existent assignment operator.
0120    */
0121   RunningCoupling & operator=(const RunningCoupling &) = delete;
0122 
0123   /**
0124    * The scale factor used to rescale the argument of
0125    * the running coupling.
0126    */
0127   double theScaleFactor;
0128 
0129 };
0130 
0131 /** @cond TRAITSPECIALIZATIONS */
0132 
0133 /** This template specialization informs ThePEG about the base classes
0134  *  of RunningCoupling. */
0135 template <>
0136 struct BaseClassTrait<RunningCoupling,1>: public ClassTraitsType {
0137   /** Typedef of the first base class of RunningCoupling. */
0138   typedef Interfaced NthBase;
0139 };
0140 
0141 /** This template specialization informs ThePEG about the name of the
0142  *  RunningCoupling class. */
0143 template <>
0144 struct ClassTraits<RunningCoupling>: public ClassTraitsBase<RunningCoupling> {
0145   /** Return a platform-independent class name */
0146   static string className() { return "ThePEG::RunningCoupling"; }
0147 };
0148 
0149 /** @endcond */
0150 
0151 }
0152 
0153 #endif /* ThePEG_RunningCoupling_H */