thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
PDF.h
1// -*- C++ -*-
2//
3// PDF.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 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_PDF_H
10#define ThePEG_PDF_H
11// This is the declaration of the PDF class.
12
13#include "ThePEG/PDF/PartonBinInstance.h"
14
15namespace ThePEG {
16
22class PDF {
23
24public:
25
31 PDF() {}
32
37 if ( !pb ) return;
38 thePDF = pb->pdf();
39 theParticle = pb->particleData();
40 }
41
46 : thePDF(pdf), theParticle(pd) {}
48
49public:
50
58 double xfl(tcPPtr parton, Energy2 partonScale, double l,
59 Energy2 particleScale = ZERO) const {
60 return xfl(parton->dataPtr(), partonScale, l, particleScale);
61 }
62
68 double xfx(tcPPtr parton, Energy2 partonScale, double x,
69 double eps = 0.0, Energy2 particleScale = ZERO) const {
70 return xfx(parton->dataPtr(), partonScale, x, eps, particleScale);
71 }
72
78 double xfvl(tcPPtr parton, Energy2 partonScale, double l,
79 Energy2 particleScale = ZERO) const {
80 return xfvl(parton->dataPtr(), partonScale, l, particleScale);
81 }
82
88 double xfvx(tcPPtr parton, Energy2 partonScale, double x,
89 double eps = 0.0, Energy2 particleScale = ZERO) const {
90 return xfvx(parton->dataPtr(), partonScale, x, eps, particleScale);
91 }
92
98 double xfl(tcPDPtr parton, Energy2 partonScale, double l,
99 Energy2 particleScale = ZERO) const {
100 return thePDF?
101 thePDF->xfl(theParticle, parton, partonScale, l, particleScale): 0.0;
102 }
103
109 double xfx(tcPDPtr parton, Energy2 partonScale, double x,
110 double eps = 0.0, Energy2 particleScale = ZERO) const {
111 return thePDF?
112 thePDF->xfx(theParticle, parton, partonScale, x, eps, particleScale): 0.0;
113 }
114
120 double xfvl(tcPDPtr parton, Energy2 partonScale, double l,
121 Energy2 particleScale = ZERO) const {
122 return thePDF?
123 thePDF->xfvl(theParticle, parton, partonScale, l, particleScale): 0.0;
124 }
125
131 double xfvx(tcPDPtr parton, Energy2 partonScale, double x,
132 double eps = 0.0, Energy2 particleScale = ZERO) const {
133 return thePDF?
134 thePDF->xfvx(theParticle, parton, partonScale, x, eps, particleScale): 0.0;
135 }
137
138
142 tcPDFPtr pdf() const { return thePDF; }
143
147 tcPDPtr particle() const { return theParticle; }
148
152 bool operator==(const PDF& x) const {
153 return
154 pdf() == x.pdf() &&
155 particle() == x.particle();
156 }
157
161 bool operator<(const PDF& x) const {
162 return
163 pdf() == x.pdf() ?
164 particle() < x.particle() :
165 pdf() < x.pdf();
166 }
167
168private:
169
174
179
180};
181
182}
183
184#endif /* ThePEG_PDF_H */
PDF is a simple wrapper class with normal copy-semantics which holds a PDFBase object and a ParticleD...
Definition: PDF.h:22
bool operator==(const PDF &x) const
Compare for equality.
Definition: PDF.h:152
double xfvl(tcPPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
Return the valence density for the given parton, for a given partonScale and logarithmic momentum fra...
Definition: PDF.h:78
PDF(tcPDFPtr pdf, tcPDPtr pd)
Constructor from a given PDFBase and ParticleData object.
Definition: PDF.h:45
double xfvx(tcPPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
Return the valence density for the given parton, for a given partonScale and momentum fraction x assu...
Definition: PDF.h:88
double xfl(tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
Return the density for the given parton, for a given partonScale and logarithmic momentum fraction l ...
Definition: PDF.h:98
double xfl(tcPPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
Return the density for the given parton, for a given partonScale and logarithmic momentum fraction l ...
Definition: PDF.h:58
double xfx(tcPPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
Return the density for the given parton, for a given partonScale and momentum fraction x assuming the...
Definition: PDF.h:68
tcPDFPtr pdf() const
The parton density object.
Definition: PDF.h:142
double xfvl(tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale=ZERO) const
Return the valence density for the given parton, for a given partonScale and logarithmic momentum fra...
Definition: PDF.h:120
PDF(tcPBIPtr pb)
Constructor from a given PartonBinInstance.
Definition: PDF.h:36
bool operator<(const PDF &x) const
Compare for ordering.
Definition: PDF.h:161
PDF()
Default constructor.
Definition: PDF.h:31
tcPDFPtr thePDF
The parton density object.
Definition: PDF.h:173
double xfvx(tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
Return the valence density for the given parton, for a given partonScale and momentum fraction x assu...
Definition: PDF.h:131
double xfx(tcPDPtr parton, Energy2 partonScale, double x, double eps=0.0, Energy2 particleScale=ZERO) const
Return the density for the given parton, for a given partonScale and momentum fraction x assuming the...
Definition: PDF.h:109
tcPDPtr theParticle
The particle for which the parton density is used.
Definition: PDF.h:178
tcPDPtr particle() const
The particle for which the parton density is used.
Definition: PDF.h:147
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