thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.1.5
PDFBase.h
1 // -*- C++ -*-
2 //
3 // PDFBase.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2017 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_PDFBase_H
10 #define ThePEG_PDFBase_H
11 // This is the declaration of the PDFBase class.
12 
13 #include "ThePEG/Config/ThePEG.h"
14 #include "ThePEG/Handlers/HandlerBase.h"
15 #include "ThePEG/PDF/PDFCuts.h"
16 #include "PDFBase.xh"
17 
18 namespace ThePEG {
19 
40 class PDFBase: public HandlerBase {
41 
42 public:
43 
49  PDFBase();
50 
54  PDFBase(const PDFBase &);
55 
59  virtual ~PDFBase();
61 
62 public:
63 
70  virtual bool canHandleParticle(tcPDPtr particle) const = 0;
71 
77  virtual bool canHandle(tcPDPtr particle) const;
78 
84  virtual bool hasPoleIn1(tcPDPtr particle, tcPDPtr parton) const;
85 
90  virtual cPDVector partons(tcPDPtr particle) const = 0;
91 
98  virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
99  double l, Energy2 particleScale = ZERO) const;
100 
107  virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
108  double x, double eps = 0.0,
109  Energy2 particleScale = ZERO) const;
110 
121  virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
122  double l, Energy2 particleScale = ZERO) const;
123 
133  virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
134  double x, double eps = 0.0,
135  Energy2 particleScale = ZERO) const;
136 
146  virtual double xfsl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
147  double l, Energy2 particleScale = ZERO) const;
148 
158  virtual double xfsx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
159  double x, double eps = 0.0,
160  Energy2 particleScale = ZERO) const;
161 
172  virtual double flattenL(tcPDPtr particle, tcPDPtr parton, const PDFCuts &cut,
173  double z, double & jacobian) const;
174 
187  virtual double flattenScale(tcPDPtr particle, tcPDPtr parton,
188  const PDFCuts & cut, double l, double z,
189  double & jacobian) const;
191 
197 
198 
199 public:
200 
207  void persistentOutput(PersistentOStream & os) const;
208 
214  void persistentInput(PersistentIStream & is, int version);
216 
220  static void Init();
221 
222 protected:
223 
231  virtual void doinit();
232 
233 protected:
234 
240 
241 protected:
242 
247  rangeFreeze,
250  };
251 
257 
258 private:
259 
260 
266 
270  PDFBase & operator=(const PDFBase &) = delete;
271 
272 };
273 
274 ThePEG_DECLARE_CLASS_TRAITS(PDFBase,HandlerBase);
275 
276 }
277 
278 #endif /* ThePEG_PDFBase_H */
virtual double xfsl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
The sea density.
virtual cPDVector partons(tcPDPtr particle) const =0
Return the partons which this PDF may extract from the given particle.
tcRemHPtr remnantHandler() const
Pointer to the remnant handler to handle remnant when extracting partons according to these densities...
Definition: PDFBase.h:196
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
The density.
PDFBase()
Default constructor.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
The valence density.
static AbstractClassDescription< PDFBase > initPDFBase
The static object used to initialize the description of this class.
Definition: PDFBase.h:265
The PDFCuts class is used to specify cuts on scale and momentum fractions for which a PDFBase object ...
Definition: PDFCuts.h:27
virtual bool hasPoleIn1(tcPDPtr particle, tcPDPtr parton) const
Return true if this PDF has a pole at $x=1$ for the given particle and parton.
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The valence density.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
RangeException
Indicate how to deal with x and Q2 which are out of range.
Definition: PDFBase.h:246
virtual double flattenScale(tcPDPtr particle, tcPDPtr parton, const PDFCuts &cut, double l, double z, double &jacobian) const
Generate scale (as a fraction of the maximum scale).
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
This is the main config header file for ThePEG.
static void Init()
Standard Init function used to initialize the interface.
PDFBase & operator=(const PDFBase &)=delete
Private and non-existent assignment operator.
RemHPtr theRemnantHandler
A remnant handler which can generate remnants for the parton extracted withfor this PDF...
Definition: PDFBase.h:239
PDFBase is the base class for implementing parton density functions for particles with sub-structure...
Definition: PDFBase.h:40
RangeException rangeException
Indicate to subclasses how to deal with x and Q2 which are out of range.
Definition: PDFBase.h:256
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
vector< cPDPtr > cPDVector
A vector of pointers to const ParticleData objects.
Definition: Containers.h:36
virtual double flattenL(tcPDPtr particle, tcPDPtr parton, const PDFCuts &cut, double z, double &jacobian) const
Generate a momentum fraction.
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The density.
virtual ~PDFBase()
Destructor.
virtual bool canHandleParticle(tcPDPtr particle) const =0
Return true if this PDF can handle the extraction of partons from the given particle.
virtual bool canHandle(tcPDPtr particle) const
Return true if canHandleParticle() and if the corresponding method for remnantHandler() returns true ...
virtual double xfsx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The sea density.
Freeze the value of the PDF outside the limits.
Definition: PDFBase.h:248
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:33
Set the PDF to zero outside the limits.
Definition: PDFBase.h:249