Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // MatchboxScaleChoice.h is a part of Herwig - A multi-purpose Monte Carlo event generator
0004 // Copyright (C) 2002-2019 The Herwig Collaboration
0005 //
0006 // Herwig 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 Herwig_MatchboxScaleChoice_H
0010 #define Herwig_MatchboxScaleChoice_H
0011 //
0012 // This is the declaration of the MatchboxScaleChoice class.
0013 //
0014 
0015 #include "ThePEG/Handlers/HandlerBase.h"
0016 #include "ThePEG/Handlers/StandardXComb.h"
0017 #include "ThePEG/Handlers/LastXCombInfo.h"
0018 
0019 namespace Herwig {
0020 
0021 using namespace ThePEG;
0022 
0023 /**
0024  * \ingroup Matchbox
0025  * \author Simon Platzer
0026  *
0027  * \brief MatchboxScaleChoice is the base class for scale choices
0028  * within Matchbox.
0029  *
0030  */
0031 class MatchboxScaleChoice: public HandlerBase, public LastXCombInfo<StandardXComb> {
0032 
0033 public:
0034 
0035   /**
0036    * The default constructor.
0037    */
0038   MatchboxScaleChoice();
0039 
0040 public:
0041 
0042   /**
0043    * Clone this scale choice.
0044    */
0045   Ptr<MatchboxScaleChoice>::ptr cloneMe() const {
0046     return dynamic_ptr_cast<Ptr<MatchboxScaleChoice>::ptr>(clone());
0047   }
0048 
0049   /**
0050    * Set the XComb object.
0051    */
0052   virtual void setXComb(tStdXCombPtr xc) { 
0053     theLastXComb = xc;
0054   }
0055 
0056   /**
0057    * Return the renormalization scale. This default version returns
0058    * shat.
0059    */
0060   virtual Energy2 renormalizationScale() const { 
0061     return theFixedScale == ZERO ? lastSHat() : sqr(theFixedScale); 
0062   }
0063 
0064   /**
0065    * Return the factorization scale. This default version returns
0066    * shat.
0067    */
0068   virtual Energy2 factorizationScale() const { 
0069     return theFixedScale == ZERO ? lastSHat() : sqr(theFixedScale);
0070   }
0071 
0072   /**
0073    * Return the QED renormalization scale. This default version returns
0074    * the Z mass squared.
0075    */
0076   virtual Energy2 renormalizationScaleQED() const { 
0077     if ( theFixedQEDScale != ZERO )
0078       return sqr(theFixedQEDScale);
0079     Energy mZ = getParticleData(ParticleID::Z0)->hardProcessMass();
0080     return mZ*mZ; 
0081   }
0082 
0083   /**
0084    * Return the shower hard scale. This default implementation returns the
0085    * factorization scale.
0086    */
0087   virtual Energy2 showerScale() const {
0088     return factorizationScale();
0089   }
0090 
0091 public:
0092 
0093   /** @name Functions used by the persistent I/O system. */
0094   //@{
0095   /**
0096    * Function used to write out object persistently.
0097    * @param os the persistent output stream written to.
0098    */
0099   void persistentOutput(PersistentOStream & os) const;
0100 
0101   /**
0102    * Function used to read in object persistently.
0103    * @param is the persistent input stream read from.
0104    * @param version the version number of the object when written.
0105    */
0106   void persistentInput(PersistentIStream & is, int version);
0107   //@}
0108 
0109   /**
0110    * The standard Init function used to initialize the interfaces.
0111    * Called exactly once for each class by the class description system
0112    * before the main function starts or
0113    * when this class is dynamically loaded.
0114    */
0115   static void Init();
0116 
0117 protected:
0118 
0119   /** @name Clone Methods. */
0120   //@{
0121   /**
0122    * Make a simple clone of this object.
0123    * @return a pointer to the new object.
0124    */
0125   virtual IBPtr clone() const;
0126 
0127   /** Make a clone of this object, possibly modifying the cloned object
0128    * to make it sane.
0129    * @return a pointer to the new object.
0130    */
0131   virtual IBPtr fullclone() const;
0132   //@}
0133 
0134 
0135 // If needed, insert declarations of virtual function defined in the
0136 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0137 
0138 
0139 private:
0140 
0141   /**
0142    * A fixed scale choice. If zero, shat will be used.
0143    */
0144   Energy theFixedScale;
0145 
0146   /**
0147    * A fixed QED scale choice. If zero, shat will be used.
0148    */
0149   Energy theFixedQEDScale;
0150 
0151   /**
0152    * The assignment operator is private and must never be called.
0153    * In fact, it should not even be implemented.
0154    */
0155   MatchboxScaleChoice & operator=(const MatchboxScaleChoice &) = delete;
0156 
0157 };
0158 
0159 }
0160 
0161 #endif /* Herwig_MatchboxScaleChoice_H */