thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
LHAPDF6.h
1 // -*- C++ -*-
2 //
3 // LHAPDF6.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 2014-2019 Leif Lonnblad, David Grellscheid
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_LHAPDF6_H
10 #define THEPEG_LHAPDF6_H
11 //
12 // This is the declaration of the LHAPDF class.
13 //
14 
15 #include "ThePEG/PDF/PDFBase.h"
16 
17 namespace LHAPDF {
18  class PDF;
19 }
20 
21 namespace ThePEG {
22 
37 class LHAPDF: public PDFBase {
38 
39 public:
40 
46  LHAPDF();
47 
51  LHAPDF(const LHAPDF &);
53 
54 public:
55 
62  virtual bool canHandleParticle(tcPDPtr particle) const;
63 
68  virtual cPDVector partons(tcPDPtr particle) const;
69 
76  virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
77  double x, double eps = 0.0,
78  Energy2 particleScale = ZERO) const;
79 
88  virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
89  double l, Energy2 particleScale = ZERO) const;
90 
99  virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
100  double x, double eps = 0.0,
101  Energy2 particleScale = ZERO) const;
102 
112  virtual double xfsx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
113  double x, double eps = 0.0,
114  Energy2 particleScale = ZERO) const;
116 
117 
124  const string & PDFName() const { return thePDFName; }
125 
129  int member() const { return theMember; }
130 
136  int maxFlav() const { return theMaxFlav; }
138 
139 protected:
140 
147  void initPDFptr();
148 
152  void setPDFName(string name);
153 
157  void setPDFMember(int n);
158 
162  string doTest(string input);
164 
165 public:
166 
173  void persistentOutput(PersistentOStream & os) const;
174 
180  void persistentInput(PersistentIStream & is, int version);
182 
189  static void Init();
190 
191 protected:
192 
199  virtual IBPtr clone() const;
200 
205  virtual IBPtr fullclone() const;
207 
208 public:
209 
212  class NotInstalled: public InterfaceException {};
213 
216 // If needed, insert declarations of virtual function defined in the
217 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
218 
219 protected:
220 
228  virtual void doinit();
229 
234  virtual void doinitrun();
235 
240  virtual void dofinish();
242 
243 private:
244 
248  ::LHAPDF::PDF * thePDF;
249 
253  string thePDFName;
254 
259 
266 
270  double xMin;
271 
275  double xMax;
276 
281 
286 
287 private:
288 
293  LHAPDF & operator=(const LHAPDF &) = delete;
294 
295 };
296 
297 }
298 
299 #endif /* THEPEG_LHAPDF6_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
int member() const
The chosen member of the selected PDF set.
Definition: LHAPDF6.h:129
double xMax
The maximum -value for the current PDF set.
Definition: LHAPDF6.h:275
Energy2 Q2Min
The minimum -value for the current PDF set.
Definition: LHAPDF6.h:280
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Energy2 Q2Max
The maximum -value for the current PDF set.
Definition: LHAPDF6.h:285
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
const string & PDFName() const
The name if the PDF set to be used.
Definition: LHAPDF6.h:124
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
string thePDFName
The name of the selected PDF set.
Definition: LHAPDF6.h:253
::LHAPDF::PDF * thePDF
LHAPDF member object.
Definition: LHAPDF6.h:248
int theMember
The chosen member of the selected PDF set.
Definition: LHAPDF6.h:258
PDFBase is the base class for implementing parton density functions for particles with sub-structure...
Definition: PDFBase.h:40
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
Definition: LHAPDF6.h:17
double xMin
The minimum -value for the current PDF set.
Definition: LHAPDF6.h:270
int maxFlav() const
The maximum number of flavours for which non-zero densities are reported.
Definition: LHAPDF6.h:136
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
int theMaxFlav
The maximum number of flavours for which non-zero densities are reported.
Definition: LHAPDF6.h:265