PDFxTMDLib  1.0.0
Classes | Typedefs | Enumerations | Functions | Variables
PDFxTMD Namespace Reference

Classes

struct  DefaultAllFlavorShape
 
struct  DefaultAllFlavorTMDShape
 
class  ConfigWrapper
 
class  PDFxTMDException
 
class  FileLoadException
 
class  OutOfRangeExcecption
 
class  PolicyExeption
 
class  InvalidFormatException
 
class  InvalidInfoFile
 
class  InitializationError
 
class  InvalidInputError
 
class  NotSupportError
 
class  NotImplementedError
 
class  MetadataError
 
class  AlphaQCDError
 
class  FileUtils
 
class  CRTPBase
 
class  KeyValueStore
 
class  LibraryBanner
 
class  Logger
 
class  NumParser
 
struct  PDFErrInfo
 Structure encoding the structure of the PDF error-set (Taken from LHAPDF library code) More...
 
struct  PDFUncertainty
 Structure for storage of uncertainty info calculated over a PDF error set. More...
 
struct  YamlCouplingInfo
 
struct  YamlErrorInfo
 
struct  YamlImpelemntationInfo
 
struct  YamlStandardPDFInfo
 
struct  YamlStandardTMDInfo
 
class  CouplingFactory
 Factory class for creating QCD coupling objects. More...
 
class  GenericTMDFactory
 Factory class for creating TMD (Transverse Momentum Dependent) PDF objects. More...
 
class  GenericCPDFFactory
 Factory class for creating collinear PDF objects. More...
 
struct  TMDPDFTag
 
struct  CollinearPDFTag
 
struct  DefaultPDFImplementations
 Tag types for PDF implementations. More...
 
struct  DefaultPDFImplementations< TMDPDFTag >
 
struct  DefaultPDFImplementations< CollinearPDFTag >
 
class  GenericPDF
 
class  AnalyticQCDCoupling
 
class  InterpolateQCDCoupling
 
class  YamlCouplingInterp
 
class  NullQCDCoupling
 null uncertainty for pdf set that do not impelement uncertainty. More...
 
class  ODEQCDCoupling
 
class  CContinuationExtrapolator
 
class  CErrExtrapolator
 
class  CNearestPointExtrapolator
 
class  TErrExtrapolator
 
class  TZeroExtrapolator
 
class  CLHAPDFBicubicInterpolator
 
class  CLHAPDFBilinearInterpolator
 
class  TTrilinearInterpolator
 
class  TTrilinearTMDLibInterpolator
 
class  CDefaultLHAPDFFileReader
 
class  TDefaultAllFlavorReader
 
class  TDefaultLHAPDF_TMDReader
 
class  ICPDF
 Interface for Collinear Parton Distribution Functions (CPDFs). More...
 
class  IExtrapolator
 
class  IAdvancedExtrapolator
 
class  IcPDFExtrapolator
 
class  IcAdvancedPDFExtrapolator
 
class  ITMDExtrapolator
 
class  ITMDAdvancedTMDExtrapolator
 
class  IInterpolator
 
class  IcPDFInterpolator
 
class  ITMDInterpolator
 
class  IQCDCoupling
 
class  IReader
 
class  ITMD
 Interface for Transverse Momentum Dependent (TMD) parton distribution functions. More...
 
class  IUncertainty
 
struct  PDFType
 A type trait to map a tag to a specific PDF interface type. More...
 
struct  PDFType< TMDPDFTag >
 Specialization of PDFType for Transverse Momentum Dependent (TMD) PDFs. More...
 
struct  PDFType< CollinearPDFTag >
 Specialization of PDFType for Collinear PDFs. More...
 
class  PDFSet
 Manages a set of Parton Distribution Functions (PDFs), providing tools for uncertainty and correlation analysis. More...
 
class  HessianStrategy
 Strategy interface for calculating Hessian uncertainties. More...
 
class  NullUncertaintyStrategy
 null uncertainty for pdf set that do not impelement uncertainty. More...
 
class  ReplicasPercentileStrategy
 Strategy interface for calculating uncertainties using replicas and percentiles. More...
 
class  ReplicasStdDevStrategy
 Strategy interface for calculating replica uncertainties. More...
 
class  SymmHessianStrategy
 Strategy interface for calculating symmetric Hessian uncertainties. More...
 

Typedefs

using StandardType = std::variant< int, float, std::string >
 
using StandardTypeMap = std::map< std::string, StandardType >
 
using TMDPDF = GenericPDF< TMDPDFTag >
 
using CollinearPDF = GenericPDF< CollinearPDFTag >
 

Enumerations

enum class  Types { Int , Float , String }
 
enum class  PhaseSpaceComponent { X , Kt2 , Q2 }
 
enum class  ErrorType { None , CONFIG_KeyNotFound , CONFIG_ConversionFailed , FILE_NOT_FOUND = 10 }
 
enum class  OrderQCD {
  LO , NLO , N2LO , N3LO ,
  N4LO
}
 
enum  PartonFlavor {
  tbar = -6 , bbar = -5 , cbar = -4 , sbar = -3 ,
  dbar = -1 , ubar = -2 , gNS = 0 , u = 2 ,
  d = 1 , s = 3 , c = 4 , b = 5 ,
  t = 6 , g = 21 , photon = 22 , z0 = 100 ,
  wplus , wminus , higgs
}
 
enum class  AlphasType { None , ipol , analytic , ode }
 
enum class  AlphasFlavorScheme { fixed , variable }
 

Functions

bool isBlockSeparator (std::string &line)
 
bool isComment (const std::string &line)
 
int findPidInPids (int pid, const std::vector< int > &pids)
 
double igamc (double a, double x)
 Incomplete gamma function (complement integral) More...
 
double igam (double a, double x)
 Left tail of incomplete gamma function. More...
 
double norm_quantile (double p)
 Compute quantiles for standard normal distribution N(0, 1) at probability p. More...
 
double chisquared_quantile (double p, double ndf)
 Compute quantiles of the chi-squared probability distribution function. More...
 
template<typename N >
int sgn (N val)
 Get the sign of a number. More...
 
template<typename... Args>
bool all (Args... args)
 
std::vector< std::string > splitPaths (const std::string &paths)
 
bool hasWriteAccess (const std::string &path)
 
double _extrapolateLinear (double x, double xl, double xh, double yl, double yh)
 
std::string StandardPDFNaming (const std::string &pdfName, int set)
 
std::vector< std::string > GetPDFxTMDPathsAsVector ()
 
std::vector< std::string > GetPDFxTMDPathsFromYaml ()
 
bool AddPathToEnvironment (const std::string &newPath)
 
std::vector< std::string > split (const std::string &str, char delimiter)
 
std::string to_str_zeropad (int val, size_t nchars=4)
 Format an integer val as a zero-padded string of length nchars. More...
 
std::pair< std::optional< std::string >, ErrorTypeStandardInfoFilePath (const std::string &pdfSetName)
 
std::pair< std::optional< std::string >, ErrorTypeStandardPDFSetPath (const std::string &pdfSetName, int set)
 
size_t indexbelow (double value, const std::vector< double > &knots)
 
int in_range (double x, double low, double high)
 Check if a number is in a range (closed-open) (from lhapdf) More...
 
template<typename Reader >
bool isInRangeX (const Reader &reader, double x)
 
template<typename Reader >
bool isInRangeQ2 (const Reader &reader, double q2)
 
template<typename Reader >
bool isInRangeKt2 (const Reader &reader, double kt2)
 
template<typename Reader >
bool isInRange (const Reader &reader, double x, double mu2)
 
template<typename Reader >
bool isInRange (const Reader &reader, double x, double kt2, double mu2)
 
void ltrim (std::string &s)
 
void rtrim (std::string &s)
 
void trim (std::string &s)
 
std::string ltrim_copy (std::string s)
 
std::string rtrim_copy (std::string s)
 
std::string trim_copy (std::string s)
 
std::string ToLower (const std::string &str)
 
std::string ToUpper (const std::string &str)
 
bool StartsWith (const std::string &str, const std::string &prefix)
 
std::pair< std::optional< YamlCouplingInfo >, ErrorTypeYamlCouplingInfoReader (const std::string &yamlInfoPath)
 
int numFlavorsQ2 (double q2, const YamlCouplingInfo &couplingInfo, int nfMin=-1, int nfMax=-1)
 
double beta (OrderQCD qcdOrder, int nf)
 
std::vector< double > betas (int nf)
 
std::pair< std::optional< YamlErrorInfo >, ErrorTypeYamlErrorInfoReader (const std::string &yamlInfoPath)
 
std::pair< std::optional< YamlImpelemntationInfo >, ErrorTypeYamlImpelemntationInfoReader (const std::string &yamlInfoPath)
 
std::pair< std::optional< YamlStandardTMDInfo >, ErrorTypeYamlStandardPDFInfoReader (const std::string &yamlInfoPath)
 
double _findClosestMatch (const std::vector< double > &cands, double target)
 

Variables

constexpr std::array< PartonFlavor, DEFAULT_TOTAL_PDFSstandardPartonFlavors
 
const PDFUncertainty NULL_PDF_UNCERTAINTY
 

Typedef Documentation

◆ CollinearPDF

◆ StandardType

using PDFxTMD::StandardType = typedef std::variant<int, float, std::string>

◆ StandardTypeMap

using PDFxTMD::StandardTypeMap = typedef std::map<std::string, StandardType>

◆ TMDPDF

Enumeration Type Documentation

◆ AlphasFlavorScheme

Enumerator
fixed 
variable 

◆ AlphasType

enum PDFxTMD::AlphasType
strong
Enumerator
None 
ipol 
analytic 
ode 

◆ ErrorType

enum PDFxTMD::ErrorType
strong
Enumerator
None 
CONFIG_KeyNotFound 
CONFIG_ConversionFailed 
FILE_NOT_FOUND 

◆ OrderQCD

enum PDFxTMD::OrderQCD
strong
Enumerator
LO 
NLO 
N2LO 
N3LO 
N4LO 

◆ PartonFlavor

Enumerator
tbar 
bbar 
cbar 
sbar 
dbar 
ubar 
gNS 
photon 
z0 
wplus 
wminus 
higgs 

◆ PhaseSpaceComponent

Enumerator
Kt2 
Q2 

◆ Types

enum PDFxTMD::Types
strong
Enumerator
Int 
Float 
String 

Function Documentation

◆ _extrapolateLinear()

double PDFxTMD::_extrapolateLinear ( double  x,
double  xl,
double  xh,
double  yl,
double  yh 
)

◆ _findClosestMatch()

double PDFxTMD::_findClosestMatch ( const std::vector< double > &  cands,
double  target 
)
inline
Todo:
Closeness in linear or log space? Hmm...

◆ AddPathToEnvironment()

bool PDFxTMD::AddPathToEnvironment ( const std::string &  newPath)

◆ all()

template<typename... Args>
bool PDFxTMD::all ( Args...  args)

◆ beta()

double PDFxTMD::beta ( OrderQCD  qcdOrder,
int  nf 
)

◆ betas()

std::vector<double> PDFxTMD::betas ( int  nf)

◆ chisquared_quantile()

double PDFxTMD::chisquared_quantile ( double  p,
double  ndf 
)

Compute quantiles of the chi-squared probability distribution function.

Algorithm AS 91 Appl. Statist. (1975) Vol.24, P.35 implemented by Anna Kreshuk. Incorporates the suggested changes in AS R85 (vol.40(1), pp.233-5, 1991) Parameters:

  • p - the probability value, at which the quantile is computed
  • ndf - number of degrees of freedom

◆ findPidInPids()

int PDFxTMD::findPidInPids ( int  pid,
const std::vector< int > &  pids 
)

◆ GetPDFxTMDPathsAsVector()

std::vector<std::string> PDFxTMD::GetPDFxTMDPathsAsVector ( )

◆ GetPDFxTMDPathsFromYaml()

std::vector<std::string> PDFxTMD::GetPDFxTMDPathsFromYaml ( )

◆ hasWriteAccess()

bool PDFxTMD::hasWriteAccess ( const std::string &  path)

◆ igam()

double PDFxTMD::igam ( double  a,
double  x 
)

Left tail of incomplete gamma function.

$ \gamma(a,x) = x^a e^-x \sum_k=0^\inf x^k / \Gamma(a+k+1) $

◆ igamc()

double PDFxTMD::igamc ( double  a,
double  x 
)

Incomplete gamma function (complement integral)

$ \gamma_c(a,x) = 1 - \gamma(a,x) $ $ \gamma_c(a,x) = 1/\Gamma(a) \int_x^\inf e^-t t^(a-1) dt $

In this implementation both arguments must be positive. The integral is evaluated by either a power series or continued fraction expansion, depending on the relative values of a and x.

◆ in_range()

int PDFxTMD::in_range ( double  x,
double  low,
double  high 
)
inline

Check if a number is in a range (closed-open) (from lhapdf)

◆ indexbelow()

size_t PDFxTMD::indexbelow ( double  value,
const std::vector< double > &  knots 
)
inline

◆ isBlockSeparator()

bool PDFxTMD::isBlockSeparator ( std::string &  line)
inline

◆ isComment()

bool PDFxTMD::isComment ( const std::string &  line)
inline

◆ isInRange() [1/2]

template<typename Reader >
bool PDFxTMD::isInRange ( const Reader &  reader,
double  x,
double  kt2,
double  mu2 
)

◆ isInRange() [2/2]

template<typename Reader >
bool PDFxTMD::isInRange ( const Reader &  reader,
double  x,
double  mu2 
)
inline

◆ isInRangeKt2()

template<typename Reader >
bool PDFxTMD::isInRangeKt2 ( const Reader &  reader,
double  kt2 
)

◆ isInRangeQ2()

template<typename Reader >
bool PDFxTMD::isInRangeQ2 ( const Reader &  reader,
double  q2 
)

◆ isInRangeX()

template<typename Reader >
bool PDFxTMD::isInRangeX ( const Reader &  reader,
double  x 
)

◆ ltrim()

void PDFxTMD::ltrim ( std::string &  s)
inline

◆ ltrim_copy()

std::string PDFxTMD::ltrim_copy ( std::string  s)
inline

◆ norm_quantile()

double PDFxTMD::norm_quantile ( double  p)

Compute quantiles for standard normal distribution N(0, 1) at probability p.

ALGORITHM AS241 APPL. STATIST. (1988) VOL. 37, NO. 3, 477-484.

◆ numFlavorsQ2()

int PDFxTMD::numFlavorsQ2 ( double  q2,
const YamlCouplingInfo couplingInfo,
int  nfMin = -1,
int  nfMax = -1 
)

◆ rtrim()

void PDFxTMD::rtrim ( std::string &  s)
inline

◆ rtrim_copy()

std::string PDFxTMD::rtrim_copy ( std::string  s)
inline

◆ sgn()

template<typename N >
int PDFxTMD::sgn ( val)
inline

Get the sign of a number.

◆ split()

std::vector<std::string> PDFxTMD::split ( const std::string &  str,
char  delimiter 
)

◆ splitPaths()

std::vector<std::string> PDFxTMD::splitPaths ( const std::string &  paths)

◆ StandardInfoFilePath()

std::pair<std::optional<std::string>, ErrorType> PDFxTMD::StandardInfoFilePath ( const std::string &  pdfSetName)

◆ StandardPDFNaming()

std::string PDFxTMD::StandardPDFNaming ( const std::string &  pdfName,
int  set 
)

◆ StandardPDFSetPath()

std::pair<std::optional<std::string>, ErrorType> PDFxTMD::StandardPDFSetPath ( const std::string &  pdfSetName,
int  set 
)

◆ StartsWith()

bool PDFxTMD::StartsWith ( const std::string &  str,
const std::string &  prefix 
)
inline

◆ to_str_zeropad()

std::string PDFxTMD::to_str_zeropad ( int  val,
size_t  nchars = 4 
)

Format an integer val as a zero-padded string of length nchars.

◆ ToLower()

std::string PDFxTMD::ToLower ( const std::string &  str)
inline

◆ ToUpper()

std::string PDFxTMD::ToUpper ( const std::string &  str)
inline

◆ trim()

void PDFxTMD::trim ( std::string &  s)
inline

◆ trim_copy()

std::string PDFxTMD::trim_copy ( std::string  s)
inline

◆ YamlCouplingInfoReader()

std::pair<std::optional<YamlCouplingInfo>, ErrorType> PDFxTMD::YamlCouplingInfoReader ( const std::string &  yamlInfoPath)

◆ YamlErrorInfoReader()

std::pair<std::optional<YamlErrorInfo>, ErrorType> PDFxTMD::YamlErrorInfoReader ( const std::string &  yamlInfoPath)

◆ YamlImpelemntationInfoReader()

std::pair<std::optional<YamlImpelemntationInfo>, ErrorType> PDFxTMD::YamlImpelemntationInfoReader ( const std::string &  yamlInfoPath)

◆ YamlStandardPDFInfoReader()

std::pair<std::optional<YamlStandardTMDInfo>, ErrorType> PDFxTMD::YamlStandardPDFInfoReader ( const std::string &  yamlInfoPath)

Variable Documentation

◆ NULL_PDF_UNCERTAINTY

const PDFUncertainty PDFxTMD::NULL_PDF_UNCERTAINTY
Initial value:
= []() {
PDFUncertainty temp(
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(),
std::numeric_limits<double>::quiet_NaN());
temp.errparts = {};
return temp;
}()

◆ standardPartonFlavors

constexpr std::array<PartonFlavor, DEFAULT_TOTAL_PDFS> PDFxTMD::standardPartonFlavors
constexpr
Initial value:
= {
@ t
Definition: PartonUtils.h:71
@ s
Definition: PartonUtils.h:68
@ u
Definition: PartonUtils.h:66
@ dbar
Definition: PartonUtils.h:63
@ ubar
Definition: PartonUtils.h:64
@ b
Definition: PartonUtils.h:70
@ c
Definition: PartonUtils.h:69
@ cbar
Definition: PartonUtils.h:61
@ bbar
Definition: PartonUtils.h:60
@ tbar
Definition: PartonUtils.h:59
@ gNS
Definition: PartonUtils.h:65
@ d
Definition: PartonUtils.h:67
@ sbar
Definition: PartonUtils.h:62