Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // SatPDF.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_SatPDF_H
0010 #define HERWIG_SatPDF_H
0011 //
0012 // This is the declaration of the SatPDF class.
0013 //
0014 
0015 #include "ThePEG/PDF/PDFBase.h"
0016 
0017 namespace Herwig {
0018 using namespace ThePEG;
0019 /**
0020  * The SatPDF class defines
0021  * a modified pdf which uses an existing pdf object to add
0022  * modifications like removing the valence part of it, which
0023  * is needed in the backward evolution of secondary scatters.
0024  *
0025  * \author Manuel B\"ahr
0026  *
0027  * @see \ref SatPDFInterfaces "The interfaces"
0028  * defined for SatPDF.
0029  */
0030 class SatPDF: public PDFBase {
0031 
0032 public:
0033 
0034   /**
0035    * The default constructor.
0036    */
0037   inline SatPDF() : thePDF(PDFPtr()), theX0(1E-4), theExp(0.0) {}
0038 
0039 public:
0040 
0041   /** @name Virtual functions to be overridden by sub-classes. */
0042   //@{
0043   /**
0044    * Return true if this PDF can handle the extraction of partons from
0045    * the given \a particle.
0046    */
0047   virtual bool canHandleParticle(tcPDPtr particle) const;
0048 
0049   /**
0050    * Return the partons which this PDF may extract from the given
0051    * \a particle.
0052    */
0053   virtual cPDVector partons(tcPDPtr particle) const;
0054 
0055   /**
0056    * The density. Return the pdf for the given \a parton inside the
0057    * given \a particle for the virtuality \a partonScale and momentum
0058    * fraction \a x. The \a particle is assumed to have a virtuality \a
0059    * particleScale.
0060    */
0061   virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
0062              double x, double eps=0.0, Energy2 particleScale = ZERO) const;
0063 
0064   /**
0065    * The valence density. Return the pdf for the given cvalence \a
0066    * parton inside the given \a particle for the virtuality \a
0067    * partonScale and momentum fraction \a x. The \a particle is
0068    * assumed to have a virtuality \a particleScale. If not overidden
0069    * by a sub class this implementation will assume that the
0070    * difference between a quark and anti-quark distribution is due do
0071    * valense quarks, but return zero for anything else.
0072    */
0073   virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
0074              double x, double eps=0.0, Energy2 particleScale = ZERO) const;
0075   //@}
0076 
0077 
0078 public:
0079 
0080   /** @name Functions used by the persistent I/O system. */
0081   //@{
0082   /**
0083    * Function used to write out object persistently.
0084    * @param os the persistent output stream written to.
0085    */
0086   void persistentOutput(PersistentOStream & os) const;
0087 
0088   /**
0089    * Function used to read in object persistently.
0090    * @param is the persistent input stream read from.
0091    * @param version the version number of the object when written.
0092    */
0093   void persistentInput(PersistentIStream & is, int version);
0094   //@}
0095 
0096   /**
0097    * The standard Init function used to initialize the interfaces.
0098    * Called exactly once for each class by the class description system
0099    * before the main function starts or
0100    * when this class is dynamically loaded.
0101    */
0102   static void Init();
0103 
0104 protected:
0105 
0106   /** @name Clone Methods. */
0107   //@{
0108   /**
0109    * Make a simple clone of this object.
0110    * @return a pointer to the new object.
0111    */
0112   inline virtual IBPtr clone() const { return new_ptr(*this); }
0113 
0114   /** Make a clone of this object, possibly modifying the cloned object
0115    * to make it sane.
0116    * @return a pointer to the new object.
0117    */
0118   inline virtual IBPtr fullclone() const { return new_ptr(*this); }
0119   //@}
0120 
0121 
0122 // If needed, insert declarations of virtual function defined in the
0123 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0124 
0125 
0126 private:
0127 
0128   /**
0129    * The assignment operator is private and must never be called.
0130    * In fact, it should not even be implemented.
0131    */
0132   SatPDF & operator=(const SatPDF &) = delete;
0133 
0134   /**
0135    * pointer to the underlying ThePEG::PDFBase object, we are modifying.
0136    */
0137   PDFPtr thePDF;
0138 
0139   /**
0140    * x from where the extrapolation f(x) = f(theX0) * (x/theX0)**theExp
0141    * is used for the pdf's.
0142    */
0143   double theX0;
0144 
0145   /**
0146    * the exponent of the pdf extrapolation for small x (x < theX0).
0147    */
0148   double theExp;
0149 
0150 };
0151 
0152 }
0153 
0154 #ifndef HERWIG_TEMPLATES_IN_CC_FILE
0155 // #include "SatPDF.tcc"
0156 #endif
0157 
0158 #endif /* HERWIG_SatPDF_H */