thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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
17namespace LHAPDF {
18 class PDF;
19}
20
21namespace ThePEG {
22
37class LHAPDF: public PDFBase {
38
39public:
40
47
51 LHAPDF(const LHAPDF &);
53
54public:
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
139protected:
140
148
152 void setPDFName(string name);
153
157 void setPDFMember(int n);
158
162 string doTest(string input);
164
165public:
166
174
180 void persistentInput(PersistentIStream & is, int version);
182
189 static void Init();
190
191protected:
192
199 virtual IBPtr clone() const;
200
205 virtual IBPtr fullclone() const;
207
208public:
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
219protected:
220
228 virtual void doinit();
229
234 virtual void doinitrun();
235
240 virtual void dofinish();
242
243private:
244
248 ::LHAPDF::PDF * thePDF;
249
254
259
266
270 double xMin;
271
275 double xMax;
276
281
286
287private:
288
293 LHAPDF & operator=(const LHAPDF &) = delete;
294
295};
296
297}
298
299#endif /* THEPEG_LHAPDF6_H */
string name() const
Returns the name of this object, without the path.
The LHAPDF class inherits from PDFBase and implements an interface to the LHAPDF library of parton de...
Definition: LHAPDF6.h:37
virtual cPDVector partons(tcPDPtr particle) const
Return the partons which this PDF may extract from the given particle.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
LHAPDF & operator=(const LHAPDF &)=delete
The assignment operator is private and must never be called.
const string & PDFName() const
The name if the PDF set to be used.
Definition: LHAPDF6.h:124
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
string thePDFName
The name of the selected PDF set.
Definition: LHAPDF6.h:253
virtual bool canHandleParticle(tcPDPtr particle) const
Return true if this PDF can handle the extraction of partons from the given particle.
int theMember
The chosen member of the selected PDF set.
Definition: LHAPDF6.h:258
virtual IBPtr clone() const
Make a simple clone of this object.
::LHAPDF::PDF * thePDF
LHAPDF member object.
Definition: LHAPDF6.h:248
virtual void dofinish()
Finalize this object.
double xMax
The maximum -value for the current PDF set.
Definition: LHAPDF6.h:275
virtual double xfsx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The sea density.
Energy2 Q2Min
The minimum -value for the current PDF set.
Definition: LHAPDF6.h:280
virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
The valence density.
void setPDFName(string name)
Used by the interface to select a set according to a file name.
int member() const
The chosen member of the selected PDF set.
Definition: LHAPDF6.h:129
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The density.
Energy2 Q2Max
The maximum -value for the current PDF set.
Definition: LHAPDF6.h:285
virtual void doinitrun()
Initialize this object.
void initPDFptr()
Initialize the LHAPDF library for the chosen PDF set if it has not been done before.
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
static void Init()
The standard Init function used to initialize the interfaces.
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
The valence density.
string doTest(string input)
Interface for simple tests.
int theMaxFlav
The maximum number of flavours for which non-zero densities are reported.
Definition: LHAPDF6.h:265
LHAPDF(const LHAPDF &)
The copy constructor.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
LHAPDF()
The default constructor.
void setPDFMember(int n)
Used by the interface to select a member in the current set.
PDFBase is the base class for implementing parton density functions for particles with sub-structure.
Definition: PDFBase.h:40
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
vector< cPDPtr > cPDVector
A vector of pointers to const ParticleData objects.
Definition: Containers.h:36