fast pQCD calculations for hadron-induced processes
fastNLOLHAPDF.h
1 // Author: Daniel Britzger
2 // DESY, 20/04/2012
3 
5 // //
6 // fastNLO_reader_2.1.0 //
7 // D. Britzger, T. Kluge, K. Rabbertz, F. Stober, M. Wobisch //
8 // //
9 // The projects web page can be found at: //
10 // http://projects.hepforge.org/fastnlo //
11 // //
12 // If you use this code, please cite: //
13 // T. Kluge, K. Rabbertz and M. Wobisch, hep-ph/0609285 //
14 // D. Britzger, T. Kluge, K. Rabbertz, F. Stober, M. Wobisch, //
15 // arXiv:1109.1310 //
16 // //
18 
19 #ifndef FASTNLOLHAPDF
20 #define FASTNLOLHAPDF
21 
22 #include "fastNLOReader.h"
23 #include "fastNLOConstants.h"
24 #include <LHAPDF/LHAPDF.h>
25 #include <cmath>
26 
27 
28 class fastNLOLHAPDF : public fastNLOReader {
29 
30 private:
31 public:
32  fastNLOLHAPDF(std::string name);
34  ~fastNLOLHAPDF();
35  fastNLOLHAPDF(std::string name, std::string LHAPDFfile, int PDFSet = 0);
36  fastNLOLHAPDF(const fastNLOTable&, std::string LHAPDFfile, int PDFSet = 0);
37 
38  // Initializer. Necessary for some alternative evolutions.
39  virtual void InitEvolveAlphas();
40  // Pseudo-Setters. DonĀ“t work with LHAPDF, but print warning instead.
41  virtual void SetMz(double Mz);
42  virtual void SetNFlavor(int nflavor);
43  virtual void SetNLoop(int nloop);
44  virtual void SetAlphasMz(double AlphasMz , bool ReCalcCrossSection = false);
45  virtual void SetQMass(int pdgid, double mq);
46  // Setters
47  void SetLHAPDFFilename(std::string filename);
48  void SetLHAPDFMember(int set);
49  // Getters
50  std::string GetLHAPDFFilename() const {return fLHAPDFFilename;}
51  int GetIPDFMember() const;
52  int GetNPDFMembers() const;
53  int GetNPDFMaxMember() const;
54  void PrintPDFInformation() const ;
55  virtual double GetQMass(int pdgid) const;
56  int GetNLoop() const;
57  int GetNFlavor() const;
58  double GetAlphasMz() const;
59 
61  XsUncertainty GetAsUncertainty( const fastNLO::EAsUncertaintyStyle eAsUnc );
62  XsUncertainty GetAsUncertainty( const fastNLO::EAsUncertaintyStyle eAsUnc, bool lNorm );
64  std::vector< std::vector<double> > GetAsUncertaintyVec( const fastNLO::EAsUncertaintyStyle eAsUnc );
65 
67  XsUncertainty GetPDFUncertainty( const fastNLO::EPDFUncertaintyStyle ePDFUnc );
68  XsUncertainty GetPDFUncertainty( const fastNLO::EPDFUncertaintyStyle ePDFUnc, bool lNorm );
69  std::vector<std::vector<double> > GetPDFUncertaintyVec(fastNLO::EPDFUncertaintyStyle);
70 
71  // Deprecated: Replaced by struct as return object: Return vector of pairs with all cross section values first and pairs of PDF uncertainties second
72  // vector < pair < double, pair <double, double> > > GetPDFUncertainty(const EPDFUncertaintyStyle ePDFUnc);
73 #if defined LHAPDF_MAJOR_VERSION && LHAPDF_MAJOR_VERSION == 6
74  std::vector<LHAPDF::PDFUncertainty> GetPDFUncertaintyLHAPDF(double cl=100*erf(1/sqrt(2)), bool alternative=false);
75  std::vector<double> CalcPDFUncertaintyMinus(const std::vector<LHAPDF::PDFUncertainty>& ) const;
76  std::vector<double> CalcPDFUncertaintyPlus(const std::vector<LHAPDF::PDFUncertainty>& ) const;
77  std::vector<double> CalcPDFUncertaintyRelMinus(const std::vector<LHAPDF::PDFUncertainty>& ) const;
78  std::vector<double> CalcPDFUncertaintyRelPlus(const std::vector<LHAPDF::PDFUncertainty>& ) const;
79  std::vector<double> CalcPDFUncertaintySymm(const std::vector<LHAPDF::PDFUncertainty>& ) const;
80  std::vector<double> CalcPDFUncertaintyCentral(const std::vector<LHAPDF::PDFUncertainty>& ) const;
81 #endif
82 
83  // inherited functions
84  virtual double EvolveAlphas(double Q) const ;
85  virtual bool InitPDF();
86  virtual std::vector<double> GetXFX(double xp, double muf) const ;
87 
88 protected:
89 
90  // ---- LHAPDF vars ---- //
91  std::string fLHAPDFFilename;
92  #if defined LHAPDF_MAJOR_VERSION && LHAPDF_MAJOR_VERSION == 6
93  LHAPDF::PDFSet* PDFSet;
94  LHAPDF::PDF* PDF;
95  #endif
96  int fnPDFs;
97  int fiPDFMember;
98 
99  double fchksum;
100 
101 
102 };
103 
104 #endif
XsUncertainty GetAsUncertainty(const fastNLO::EAsUncertaintyStyle eAsUnc)
Return struct with vectors containing the cross section values and the selected a_s(M_Z) uncertainty...
Definition: fastNLOLHAPDF.cc:627
std::vector< std::vector< double > > GetAsUncertaintyVec(const fastNLO::EAsUncertaintyStyle eAsUnc)
Function for use with pyext (TODO: Clean this up)
Definition: fastNLOLHAPDF.cc:693
XsUncertainty GetPDFUncertainty(const fastNLO::EPDFUncertaintyStyle ePDFUnc)
Return struct with vectors containing the cross section values and the selected scale uncertainty...
Definition: fastNLOLHAPDF.cc:422
Definition: fastNLOLHAPDF.h:28
Definition: fastNLOReader.h:17
Definition: fastNLOReader.h:8
Definition: fastNLOTable.h:20