1 #ifndef __fastNLOReader__ 2 #define __fastNLOReader__ 4 #include "fastNLOTable.h" 5 #include "fastNLOPDFLinearCombinations.h" 11 std::vector < double >
xs;
12 std::vector < double > dxsl;
13 std::vector < double > dxsu;
25 typedef double(*mu_func)(double,double);
31 void SetFilename(std::string filename) ;
32 void InitScalevariation();
33 void SetUnits(fastNLO::EUnits Unit);
35 bool SetContributionON(fastNLO::ESMCalculation eCalc ,
unsigned int Id ,
bool SetOn =
true);
37 bool ActivateContribution(fastNLO::ESMCalculation eCalc , fastNLO::ESMOrder eOrd ,
bool SetOn =
true);
39 int ContrId(
const fastNLO::ESMCalculation eCalc,
const fastNLO::ESMOrder eOrder)
const;
41 void SetCoefficientUsageDefault();
44 if ( ctest )
return ctest->GetNScaleDep() >= 3;
45 else if ( B_LO() )
return B_LO()->GetIsFlexibleScale();
46 else if ( B_NLO() )
return B_NLO()->GetIsFlexibleScale();
47 else if ( B_NNLO() )
return B_NNLO()->GetIsFlexibleScale();
52 void SetMuRFunctionalForm(fastNLO::EScaleFunctionalForm func);
53 void SetMuFFunctionalForm(fastNLO::EScaleFunctionalForm func);
54 void SetFunctionalForm(fastNLO::EScaleFunctionalForm func , fastNLO::EMuX kMuX);
55 bool SetScaleFactorsMuRMuF(
double xmur,
double xmuf);
56 void SetExternalFuncForMuR(mu_func);
57 void SetExternalFuncForMuF(mu_func);
58 void SetExternalConstantForMuR(
double MuR);
59 void SetExternalConstantForMuF(
double MuF);
61 void UseHoppetScaleVariations(
bool);
64 void FillPDFCache(
double chksum=0.,
bool lForce=
false);
65 virtual std::vector<double> GetXFX(
double x,
double muf)
const = 0;
68 virtual bool InitPDF() = 0;
69 virtual double EvolveAlphas(
double Q)
const = 0;
72 void FillAlphasCache(
bool lForce=
false);
75 void ResetCache() { fPDFCached=0; fAlphasCached=0;}
78 void CalcCrossSection();
79 double RescaleCrossSectionUnits(
double binsize,
int xunits);
81 std::vector < double > GetCrossSection();
82 std::vector < double > GetCrossSection(
bool lNorm);
83 std::vector < double > GetNormCrossSection();
84 std::vector < std::map< double, double > > GetCrossSection_vs_x1();
85 std::vector < std::map< double, double > > GetCrossSection_vs_x2();
87 std::vector < double > GetReferenceCrossSection();
88 std::vector < double > GetKFactors();
89 std::vector < double > GetQScales();
90 std::vector < std::vector < double > > GetCrossSection2Dim();
94 XsUncertainty GetScaleUncertainty(
const fastNLO::EScaleUncertaintyStyle eScaleUnc );
95 XsUncertainty GetScaleUncertainty(
const fastNLO::EScaleUncertaintyStyle eScaleUnc,
bool lNorm );
97 std::vector< std::vector<double> > GetScaleUncertaintyVec(
const fastNLO::EScaleUncertaintyStyle eScaleUnc );
100 fastNLO::EScaleFunctionalForm GetMuRFunctionalForm()
const {
return fMuRFunc; };
101 fastNLO::EScaleFunctionalForm GetMuFFunctionalForm()
const {
return fMuFFunc; };
102 fastNLO::EUnits GetUnits()
const {
return fUnits; };
103 mu_func GetExternalFuncForMuR() {
return Fct_MuR; };
104 mu_func GetExternalFuncForMuF() {
return Fct_MuF; };
108 double GetScaleFactorMuR()
const {
return fScaleFacMuR; };
109 double GetScaleFactorMuF()
const {
return fScaleFacMuF; };
110 int GetScaleVariation()
const {
return fScalevar; };
111 std::string GetScaleDescription(
const fastNLO::ESMOrder eOrder,
int iScale=0)
const;
112 double GetNevt(
const fastNLO::ESMOrder eOrder)
const;
114 int GetNScaleVariations()
const;
115 std::vector < double > GetScaleFactors()
const;
119 void Print(
int iprint)
const;
120 void PrintContributionSummary(
int iprint)
const;
121 void PrintCrossSections()
const;
122 void PrintCrossSectionsWithReference();
125 void PrintTableInfo(
const int iprint = 0)
const;
126 void PrintFastNLOTableConstants(
const int iprint = 2)
const;
127 void PrintCrossSectionsData()
const;
128 void PrintCrossSectionsDefault(std::vector<double> kthc = std::vector<double>())
const;
129 void RunFastNLODemo();
138 void OrderCoefficients() ;
140 void StripWhitespace(std::string* s);
142 void PrintScaleSettings(fastNLO::EMuX kMuX=fastNLO::kMuR);
147 void CalcAposterioriScaleVariationMuR();
148 void CalcAposterioriScaleVariationMuF();
151 double CalcAlphas(
double Q);
152 double CalcReferenceAlphas();
153 double CalcNewPDFChecksum();
154 double CalcChecksum(
double mu);
157 void CalcReferenceCrossSection();
159 double CalcMu(fastNLO::EMuX kMuX,
double scale1 ,
double scale2 ,
double scalefactor);
160 double FuncMixedOver1(
double scale1 ,
double scale2) ;
161 double FuncMixedOver2(
double scale1 ,
double scale2) ;
162 double FuncMixedOver4(
double scale1 ,
double scale2) ;
163 double FuncMixed2s2Ov2(
double scale1 ,
double scale2) ;
164 double FuncMixed2s2Ov4(
double scale1 ,
double scale2) ;
165 double FuncPow4Sum(
double scale1 ,
double scale2) ;
166 double FuncWgtAvg(
double scale1 ,
double scale2) ;
167 double FuncLinearMean(
double scale1 ,
double scale2) ;
168 double FuncLinearSum(
double scale1 ,
double scale2) ;
169 double FuncMax(
double scale1 ,
double scale2) ;
170 double FuncMin(
double scale1 ,
double scale2) ;
171 double FuncProd(
double scale1 ,
double scale2) ;
172 double FuncExpProd2(
double scale1 ,
double scale2) ;
184 return (
fastNLOCoeffAddBase*) BBlocksSMCalc[fastNLO::kFixedOrder][fastNLO::kNextToLeading];
187 return (
fastNLOCoeffAddBase*) BBlocksSMCalc[fastNLO::kFixedOrder][fastNLO::kNextToNextToLeading];
190 if (BBlocksSMCalc[fastNLO::kThresholdCorrection].empty())
return NULL;
191 else return BBlocksSMCalc[fastNLO::kThresholdCorrection][n];
194 if (B_LO() != NULL )
return B_LO();
195 else if ( B_NLO()!= NULL )
return B_NLO();
196 else if ( B_NNLO()!= NULL )
return B_NNLO();
200 std::cerr<<
"Error. Cannot get any additive contribution, but requested."<<std::endl;
207 bool SetScaleVariation(
int scalevar);
216 std::string ffilename;
220 fastNLO::EScaleFunctionalForm fMuRFunc;
221 fastNLO::EScaleFunctionalForm fMuFFunc;
222 fastNLO::EUnits fUnits;
225 double fAlphasCached;
238 std::vector < double > XSection_LO;
239 std::vector < double > XSection;
240 std::vector < double > kFactor;
241 std::vector < double > QScale_LO;
242 std::vector < double > QScale;
243 std::vector < std::map< double, double > > fXSection_vsX1;
247 std::vector < double > XSectionRef;
248 std::vector < double > XSectionRefMixed;
249 std::vector < double > XSectionRef_s1;
250 std::vector < double > XSectionRef_s2;
Definition: fastNLOPDFLinearCombinations.h:8
std::vector< std::map< double, double > > fXSection_vsX2
Cross section vs. x ( XSection_vsX1[bin][<x,xs>] )
Definition: fastNLOReader.h:244
std::vector< std::vector< fastNLOCoeffBase *> > BBlocksSMCalc
BlockB's for SM corrections.
Definition: fastNLOReader.h:235
double fConst_MuF
Constant value for the factorization scale. Used only for flexible-scale tables and if requested...
Definition: fastNLOReader.h:106
Definition: fastNLOCoeffBase.h:15
std::vector< double > xs
Struct for returning vectors with cross section and relative uncertainty.
Definition: fastNLOReader.h:11
mu_func Fct_MuF
Function, if you define your functional form for your scale external.
Definition: fastNLOReader.h:227
Definition: fastNLOReader.h:17
double fConst_MuR
Constant value for the renormalization scale. Used only for flexible-scale tables and if requested...
Definition: fastNLOReader.h:104
Definition: fastNLOReader.h:8
bool GetIsFlexibleScaleTable(fastNLOCoeffAddBase *ctest=NULL) const
Get, if this table is a 'flexible-scale' table or not.
Definition: fastNLOReader.h:43
Definition: fastNLOCoeffAddFlex.h:8
Definition: fastNLOCoeffAddBase.h:57
mu_func Fct_MuR
Function, if you define your functional form for your scale external.
Definition: fastNLOReader.h:226
std::vector< std::vector< bool > > bUseSMCalc
switch calculations ON/OFF
Definition: fastNLOReader.h:228
Definition: fastNLOCoeffAddFix.h:8
Definition: fastNLOTable.h:20