herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
PomeronPDF.h
1 // -*- C++ -*-
2 //
3 // PomeronPDF.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 The Herwig Collaboration
5 //
6 // Herwig 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 HERWIG_PomeronPDF_H
10 #define HERWIG_PomeronPDF_H
11 
12 #include <ThePEG/PDF/PDFBase.h>
13 #include <iostream>
14 #include <fstream>
15 #include <string>
16 #include <cmath>
17 
18 namespace Herwig {
19 
20 using namespace ThePEG;
21 
29 class PomeronPDF : public PDFBase {
30 public:
31 
37  PomeronPDF();
38 
39 
47  virtual bool canHandleParticle(tcPDPtr particle) const;
48 
54  virtual cPDVector partons(tcPDPtr p) const;
55 
65  virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
66  double x, double eps = 0.0,
67  Energy2 particleScale = ZERO) const;
68 
78  virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
79  double x, double eps = 0.0,
80  Energy2 particleScale = ZERO) const;
82 
83 public:
84 
91  void persistentOutput(PersistentOStream & os) const;
92 
98  void persistentInput(PersistentIStream & is, int version);
100 
107  static void Init();
108 
109 
110 protected:
111 
119  virtual void doinit();
120 
121 protected:
122 
129  virtual IBPtr clone() const;
130 
135  virtual IBPtr fullclone() const;
137 
138 
139 private:
143  enum PDFFlavour {charm, gluon, singlet};
144 
150 
155  PomeronPDF & operator=(const PomeronPDF &) = delete;
156 
157 private:
158 
166  double getPDFValue(PDFFlavour flPDF, double x, Energy2 qq) const;
167 
171  void loadTables() const;
172 
173 private:
174 
178  static const int nPDFFlavour_;
179 
180 
185  mutable vector<vector<vector<double> > > pdfTable_;
186 
190  mutable vector<vector<double> > lxGrid_;
191 
195  mutable vector<vector<double> > lqqGrid_;
196 
200  vector<string> fileName_;
201 
205  string rootName_;
206 
211 
216 
220  int PDFFit_;
221 
226 
227 
228 };
229 
230 }
231 
232 namespace ThePEG {
233 
238 template <>
239 struct BaseClassTrait<Herwig::PomeronPDF,1> {
241  typedef PDFBase NthBase;
242 };
243 
246 template <>
247 struct ClassTraits<Herwig::PomeronPDF>: public ClassTraitsBase<Herwig::PomeronPDF> {
249  static string className() { return "Herwig::PomeronPDF"; }
257  static string library() { return "HwPomeronPDF.so"; }
258 };
259 
262 }
263 
264 #endif
vector< vector< vector< double > > > pdfTable_
Vector of matrixes of PDF functions for different flavours: pdfTable [Flavours][Q^2][log x]...
Definition: PomeronPDF.h:185
int nxPoints_
Number of ln x points.
Definition: PomeronPDF.h:210
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
int boundary_
Switch between different aproaches when the values are out of PDF range: 0 Extrapolate, 1 Freeze.
Definition: PomeronPDF.h:225
static ClassDescription< PomeronPDF > initPomeronPDF
The static object used to initialize the description of this class.
Definition: PomeronPDF.h:149
static const int nPDFFlavour_
Number of PDF flavours.
Definition: PomeronPDF.h:178
PDFFlavour
Enumeration to storage the types of partons.
Definition: PomeronPDF.h:143
Implementation of the PomeronPDF PDFs.
Definition: PomeronPDF.h:29
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
vector< vector< double > > lxGrid_
Vector of grid with log x values: lxGrid [Flavours] [log x].
Definition: PomeronPDF.h:190
vector< cPDPtr > cPDVector
int PDFFit_
Switch between different PDF fits.
Definition: PomeronPDF.h:220
vector< vector< double > > lqqGrid_
Vector of grid with log qq values: lxGrid [Flavours] [log qq].
Definition: PomeronPDF.h:195
-*- C++ -*-
vector< string > fileName_
Vector of names of PDF data files for each flavour.
Definition: PomeronPDF.h:200
string rootName_
Base of the filename.
Definition: PomeronPDF.h:205
int nqPoints_
Number of qq flavours.
Definition: PomeronPDF.h:215
constexpr ZeroUnit ZERO