14 #define FOLDER_SEP "/"
15 #define STD_PDF_INFO_EXTENSION ".info"
16 #define STD_PDF_DATA_EXTENSION ".dat"
17 #define DEFAULT_TOTAL_PDFS 13
18 #define DEFULT_NUM_FLAVORS 5
19 #define DOWN_DEFAULT_MASS 0.005
20 #define UP_DEFAULT_MASS 0.002
21 #define STRANGE_DEFAULT_MASS 0.10
22 #define CHARM_DEFAULT_MASS 1.29
23 #define BOTTOM_DEFAULT_MASS 4.19
24 #define TOP_DEFAULT_MASS 172.9
25 #define SQR(x) ((x) * (x))
26 #define NO_REQUESTED_CONFIDENCE_LEVEL -1
30 template <
typename... Args>
bool all(Args... args)
86 std::vector<std::string>
splitPaths(
const std::string &paths);
93 std::vector<std::string>
split(
const std::string &str,
char delimiter);
98 const std::string &pdfSetName);
102 inline size_t indexbelow(
double value,
const std::vector<double> &knots)
104 size_t i = std::upper_bound(knots.begin(), knots.end(), value) - knots.begin();
105 if (i == knots.size())
111 inline int in_range(
double x,
double low,
double high)
113 return x >= low && x < high;
Definition: AllFlavorsShape.h:14
ErrorType
Definition: PartonUtils.h:42
@ CONFIG_ConversionFailed
bool AddPathToEnvironment(const std::string &newPath)
OrderQCD
Definition: PartonUtils.h:50
size_t indexbelow(double value, const std::vector< double > &knots)
Definition: PartonUtils.h:102
PartonFlavor
Definition: PartonUtils.h:58
@ t
Definition: PartonUtils.h:71
@ s
Definition: PartonUtils.h:68
@ u
Definition: PartonUtils.h:66
@ dbar
Definition: PartonUtils.h:63
@ higgs
Definition: PartonUtils.h:78
@ ubar
Definition: PartonUtils.h:64
@ wplus
Definition: PartonUtils.h:76
@ b
Definition: PartonUtils.h:70
@ c
Definition: PartonUtils.h:69
@ cbar
Definition: PartonUtils.h:61
@ photon
Definition: PartonUtils.h:73
@ bbar
Definition: PartonUtils.h:60
@ tbar
Definition: PartonUtils.h:59
@ gNS
Definition: PartonUtils.h:65
@ d
Definition: PartonUtils.h:67
@ g
Definition: PartonUtils.h:72
@ sbar
Definition: PartonUtils.h:62
@ wminus
Definition: PartonUtils.h:77
@ z0
Definition: PartonUtils.h:75
bool all(Args... args)
Definition: PartonUtils.h:30
PhaseSpaceComponent
Definition: PartonUtils.h:35
std::string to_str_zeropad(int val, size_t nchars=4)
Format an integer val as a zero-padded string of length nchars.
std::vector< std::string > GetPDFxTMDPathsFromYaml()
std::pair< std::optional< std::string >, ErrorType > StandardPDFSetPath(const std::string &pdfSetName, int set)
std::vector< std::string > GetPDFxTMDPathsAsVector()
int in_range(double x, double low, double high)
Check if a number is in a range (closed-open) (from lhapdf)
Definition: PartonUtils.h:111
double _extrapolateLinear(double x, double xl, double xh, double yl, double yh)
std::pair< std::optional< std::string >, ErrorType > StandardInfoFilePath(const std::string &pdfSetName)
std::string StandardPDFNaming(const std::string &pdfName, int set)
constexpr std::array< PartonFlavor, DEFAULT_TOTAL_PDFS > standardPartonFlavors
Definition: PartonUtils.h:80
std::vector< std::string > split(const std::string &str, char delimiter)
std::vector< std::string > splitPaths(const std::string &paths)
bool hasWriteAccess(const std::string &path)