fast pQCD calculations for hadron-induced processes
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
fastNLOTable Class Reference
Inheritance diagram for fastNLOTable:
fastNLOCreate fastNLOReader fastNLODiffReader fastNLOExtern fastNLOLHAPDF fastNLODiffUser fastNLOAlphas fastNLOCRunDec fastNLOHoppet fastNLOQCDNUMAS fastNLOHoppetAs

Public Member Functions

 fastNLOTable (std::string filename)
 
 fastNLOTable (const fastNLOTable &)
 
virtual void ReadTable ()
 
virtual void WriteTable ()
 
virtual void WriteTable (std::string filename)
 
bool IsCompatible (const fastNLOTable &other) const
 
bool IsCompatibleScenario (const fastNLOTable &other) const
 
bool IsCatenable (const fastNLOTable &other) const
 
bool IsCatenableScenario (const fastNLOTable &other) const
 
void PrintHeader (int iprint) const
 Print header variables (BlockA1) to screen.
 
bool IsCompatibleHeader (const fastNLOTable &other) const
 Compare header with header of another table.
 
bool IsCatenableHeader (const fastNLOTable &other) const
 Compare header with header of another table.
 
std::string GetFilename () const
 
void SetFilename (std::string name)
 
int GetItabversion () const
 
void SetItabversion (int version)
 
std::string GetScenName () const
 
void SetScenName (std::string name)
 
int GetNmult () const
 
int GetNcontrib () const
 
int GetNdata () const
 
int GetOutputPrecision () const
 
void SetOutputPrecision (int precision)
 
unsigned int GetNumDiffBin () const
 Get dimensionality of calculation: single-, double-, or triple-differential. More...
 
double GetObsBinLoBound (unsigned int iObs, unsigned int iDim) const
 Getters for linear array of observable bins "ObsBin" running from 0->(NObsBin-1) More...
 
double GetObsBinUpBound (unsigned int iObs, unsigned int iDim) const
 Return upper bin bound for obs. bin iObs in dim. iDim.
 
std::vector< double > GetObsBinsLoBounds (unsigned int iDim) const
 Return std::vector of lower bin bounds in dim. iDim for all obs. bins.
 
std::vector< double > GetObsBinsUpBounds (unsigned int iDim) const
 Return std::vector of upper bin bounds in dim. iDim for all obs. bins.
 
double GetObsBinsLoBoundsMin (unsigned int iDim) const
 Return minimum value of all lower bin bounds for dim. iDim. More...
 
double GetObsBinsUpBoundsMax (unsigned int iDim) const
 Return maximum value of all upper bin bounds for dim. iDim. More...
 
std::vector< std::pair< double, double > > GetObsBinsBounds (unsigned int iDim) const
 Return std::vector of pairs with lower and upper bin bounds in dim. iDim for all obs. bins.
 
int GetObsBinNumber (const std::vector< double > &vobs) const
 Return observable bin no. for std::vector of values obs0=var0,obs1=var1,...; -1 if outside range.
 
int GetObsBinNumber (double var0) const
 Return observable bin no. for obs0=var0 in 1D binning; -1 if outside range. More...
 
int GetObsBinNumber (double var0, double var1) const
 Return observable bin no. for obs0=var0,obs1=var1 in 2D binning; -1 if outside range. More...
 
int GetObsBinNumber (double var0, double var1, double var2) const
 Return observable bin no. for obs0=var0,obs1=var1,obs2=var2 in 3D binning; -1 if outside range. More...
 
std::vector< std::pair< double, double > > GetDim0BinBounds () const
 Getters for multidimensional binning, here called DimBins. More...
 
std::vector< std::pair< double, double > > GetDim1BinBounds (unsigned int iDim0Bin) const
 Return std::vector of pairs with unique bin bounds of 2nd dim. for 'iDim0Bin' of 1st dim.
 
std::vector< std::pair< double, double > > GetDim2BinBounds (unsigned int iDim0Bin, unsigned int iDim1Bin) const
 Return std::vector of pairs with unique bin bounds of 3rd dim. for 'iDim0Bin' and 'iDim1Bin' of 1st two dim.
 
std::vector< std::pair< double, double > > GetObsBinDimBounds (unsigned int iObs) const
 Return std::vector of pairs with lower and upper bin bounds for all dimensions for a given obs. bin.
 
std::pair< double, double > GetObsBinDimBounds (unsigned int iObs, unsigned int iDim) const
 Return pair with lower and upper bin bounds for given obs. bin and dim. iDim.
 
unsigned int GetIDim0Bin (unsigned int iObs) const
 Return bin no. in 1st dim. for obs. bin iObs. More...
 
unsigned int GetIDim1Bin (unsigned int iObs) const
 Return bin no. in 2nd dim. for obs. bin iObs. More...
 
unsigned int GetIDim2Bin (unsigned int iObs) const
 Return bin no. in 3rd dim. for obs. bin iObs. More...
 
unsigned int GetNDim0Bins () const
 Return no. of bins in 1st dimension. More...
 
unsigned int GetNDim1Bins (unsigned int iDim0Bin) const
 Return no. of bins in 2nd dimension for given bin in 1st dim. More...
 
unsigned int GetNDim2Bins (unsigned int iDim0Bin, unsigned int iDim1Bin) const
 Return no. of bins in 3rd dimension for given bins in 1st and 2nd dim. More...
 
int GetODim0Bin (double var0) const
 Return bin no. in 1st dim. for obs0=var0; -1 if outside range.
 
int GetODim1Bin (double var0, double var1) const
 Return bin no. in 2nd dim. for obs0=var0,obs1=var1; -1 if outside range.
 
int GetODim2Bin (double var0, double var1, double var2) const
 Return bin no. in 3rd dim. for obs0=var0,obs1=var1,obs2=var2; -1 if outside range.
 
int GetIDiffBin (int bin) const
 Get if dimension is 'truly differential' or bin-integrated (divided by bin width or not) More...
 
double GetBinSize (int bin) const
 Get BinSize for bin = BinSizeDim1 < * BinSizeDim2 >
 
std::vector< std::string > GetDimLabels () const
 Get vector of dimensions labels.
 
std::string GetDimLabel (int iDim) const
 Get dimension label for dimension iDim.
 
int GetINormFlag () const
 
bool IsNorm () const
 Get normalization logical (def=false)
 
std::string GetDenomTable () const
 Get filename of normalization table for INormFlag<0.
 
std::vector< std::string > GetScDescr () const
 get/set scenario description More...
 
void SetScDescr (std::vector< std::string > ScDescr)
 
int GetIpublunits () const
 get/set cross section units of published results (pb = 12, fb = 15, ...)
 
void SetIpublunits (int unit)
 
double GetEcms () const
 get/set center-of-mass energy in units of GeV
 
void SetEcms (double E)
 
int GetLoOrder () const
 get/set power of alpha_s for LO process
 
void SetLoOrder (int LOOrd)
 
unsigned int GetNObsBin () const
 get/set no. of observable bins
 
void SetNObsBin (int NObs)
 
std::vector< std::vector< std::pair< double, double > > > GetBins () const
 get/set Bin vector
 
void SetBins (std::vector< std::vector< std::pair< double, double > > >)
 
std::vector< double > GetBinSize () const
 get/set BinSize vector
 
void SetBinSize (std::vector< double >)
 
void EraseBinFromTable (unsigned int iObsIdx)
 
template<typename T >
void EraseBin (std::vector< T > &v, unsigned int idx)
 
void MultiplyBinInTable (unsigned int iObsIdx, double fact)
 
void MultiplyBinSize (unsigned int iObsIdx, double fact)
 
template<typename T >
void MultiplyBin (std::vector< T > &v, unsigned int idx, double fact)
 
void CatBinToTable (const fastNLOTable &other, unsigned int iObsIdx, unsigned int table_count)
 
void CatBin (const fastNLOTable &other, unsigned int iObsIdx, unsigned int table_count)
 
std::string GetRivetId () const
 
std::string GetXSDescr () const
 Get cross section from analysis description.
 
void SetDimLabel (std::string label, unsigned int iDim, bool IsDiff=true)
 
void SetNumDiffBin (int iDiff)
 
void PrintTableInfo (const int iprint=0) const
 Print basic info about fastNLO table and its contributions. More...
 
void PrintContributionSummary (int iprint) const
 
void PrintFastNLOTableConstants (const int iprint=0) const
 Print (technical) constants of fastNLO table (use iprint) for level of details.
 
void PrintScenario (int iprint) const
 
virtual void Print (int iprint) const
 
void MergeTable (const fastNLOTable &rhs, fastNLO::EMerge option=fastNLO::kMerge)
 'merge' More...
 
void MergeTables (const std::vector< fastNLOTable *> &tables, fastNLO::EMerge option=fastNLO::kMerge, double cutRMS=0)
 'merge' (also supports 'median' and 'mean') More...
 
void AddTable (const fastNLOTable &rhs, fastNLO::EMerge option=fastNLO::kMerge)
 'merge'
 
void DeleteAllCoeffTable ()
 Handle coefficient tables.
 
int CreateCoeffTable (int no, fastNLOCoeffBase *newcoeff)
 
void CatenateTable (const fastNLOTable &other)
 
fastNLOCoeffBaseGetCoeffTable (int no) const
 
fastNLOCoeffDataGetDataTable () const
 Returns pointer to data table if available, else returns NULL pointer.
 
fastNLOCoeffAddBaseGetReferenceTable (fastNLO::ESMOrder eOrder) const
 Returns pointer to reference table if available, else returns NULL pointer.
 
template<typename T >
void EraseBin (vector< T > &v, unsigned int idx)
 
template<typename T >
void MultiplyBin (vector< T > &v, unsigned int idx, double fact)
 

Protected Member Functions

void PrintWelcomeMessage ()
 Say hello to fastNLO user.
 
std::ostream * OpenFileWrite (bool compress=false)
 open std::ofstream for writing tables to ffilename More...
 
std::istream * OpenFileRead ()
 open std::ifstream for reading table More...
 
void WriteHeader (std::ostream &table)
 write (or cout) hader using std::ostream
 
int ReadHeader (std::istream &table)
 read header of table (BlockA1) More...
 
void CloseFileWrite (std::ostream &table)
 
void CloseFileRead (std::istream &table)
 
void WriteScenario (std::ostream &table)
 
void ReadScenario (std::istream &table)
 
void ReadCoeffTables (std::istream &table, int nCoeff)
 
fastNLOCoeffBaseReadRestOfCoeffTable (const fastNLOCoeffBase &cB, std::istream &table)
 

Protected Attributes

std::string ffilename
 
int fPrecision
 
int Itabversion
 
std::string ScenName
 
PrimalScream logger
 
std::vector< fastNLOCoeffBase *> fCoeff
 
double Ecms
 
int ILOord
 
int Ipublunits
 
std::vector< std::string > ScDescript
 
unsigned int NObsBin
 
unsigned int NDim
 
std::vector< std::string > DimLabel
 
std::vector< int > IDiffBin
 
std::vector< std::vector< std::pair< double, double > > > Bin
 
std::vector< double > BinSize
 
int INormFlag
 
std::string DenomTable
 
std::vector< int > IDivLoPointer
 
std::vector< int > IDivUpPointer
 

Static Protected Attributes

static bool fWelcomeOnce = false
 

Constructor & Destructor Documentation

◆ fastNLOTable()

fastNLOTable::fastNLOTable ( const fastNLOTable other)

Copy constructor

Member Function Documentation

◆ CloseFileRead()

void fastNLOTable::CloseFileRead ( std::istream &  table)
protected

Close file-stream

◆ CloseFileWrite()

void fastNLOTable::CloseFileWrite ( std::ostream &  table)
protected

close stream and delete object;

◆ GetDim0BinBounds()

vector< pair< double, double > > fastNLOTable::GetDim0BinBounds ( ) const

Getters for multidimensional binning, here called DimBins.

Return std::vector of pairs with unique bin bounds of 1st dim.

◆ GetIDiffBin()

int fastNLOTable::GetIDiffBin ( int  bin) const
inline

Get if dimension is 'truly differential' or bin-integrated (divided by bin width or not)


Some more info getters with respect to observable dimensions


◆ GetIDim0Bin()

unsigned int fastNLOTable::GetIDim0Bin ( unsigned int  iObs) const

Return bin no. in 1st dim. for obs. bin iObs.

Returns bin number in first dimension Valid for up to triple differential binnings

◆ GetIDim1Bin()

unsigned int fastNLOTable::GetIDim1Bin ( unsigned int  iObs) const

Return bin no. in 2nd dim. for obs. bin iObs.

Returns bin number in second dimension Valid for up to triple differential binnings

◆ GetIDim2Bin()

unsigned int fastNLOTable::GetIDim2Bin ( unsigned int  iObs) const

Return bin no. in 3rd dim. for obs. bin iObs.

Returns bin number in third dimension Valid for up to triple differential binnings

◆ GetINormFlag()

int fastNLOTable::GetINormFlag ( ) const
inline

Some info getters with respect to normalization


Get normalization flag: def=0 -> no norm. 1, 2, 3,... -> normalize to slice in NDim of same table -1,-2,-3,... -> normalize to slice in NDim of other table

◆ GetNDim0Bins()

unsigned int fastNLOTable::GetNDim0Bins ( ) const

Return no. of bins in 1st dimension.

Returns number of bins in first dimension Valid for up to triple differential binnings

◆ GetNDim1Bins()

unsigned int fastNLOTable::GetNDim1Bins ( unsigned int  iDim0Bin) const

Return no. of bins in 2nd dimension for given bin in 1st dim.

Returns number of bins in second dimension for iDim0Bin in first dimension Valid for up to triple differential binnings

◆ GetNDim2Bins()

unsigned int fastNLOTable::GetNDim2Bins ( unsigned int  iDim0Bin,
unsigned int  iDim1Bin 
) const

Return no. of bins in 3rd dimension for given bins in 1st and 2nd dim.

Returns number of bins in third dimension for iDim0Bin in first and iDim1Bin in second dimension Valid for up to triple differential binnings

◆ GetNumDiffBin()

unsigned int fastNLOTable::GetNumDiffBin ( ) const
inline

Get dimensionality of calculation: single-, double-, or triple-differential.


Getters for binning structure


◆ GetObsBinLoBound()

double fastNLOTable::GetObsBinLoBound ( unsigned int  iObs,
unsigned int  iDim 
) const

Getters for linear array of observable bins "ObsBin" running from 0->(NObsBin-1)

Return lower bin bound for obs. bin iObs in dim. iDim

◆ GetObsBinNumber() [1/3]

int fastNLOTable::GetObsBinNumber ( double  var0) const

Return observable bin no. for obs0=var0 in 1D binning; -1 if outside range.

Returns first matching observable bin number for one observation (assumes none or exactly one matching bin!) Returns -1 if outside range

◆ GetObsBinNumber() [2/3]

int fastNLOTable::GetObsBinNumber ( double  var0,
double  var1 
) const

Return observable bin no. for obs0=var0,obs1=var1 in 2D binning; -1 if outside range.

Returns first matching observable bin number for two observations (assumes none or exactly one matching bin!) Returns -1 if outside range

◆ GetObsBinNumber() [3/3]

int fastNLOTable::GetObsBinNumber ( double  var0,
double  var1,
double  var2 
) const

Return observable bin no. for obs0=var0,obs1=var1,obs2=var2 in 3D binning; -1 if outside range.

Returns first matching observable bin number for three observations (assumes none or exactly one matching bin!) Returns -1 if outside range

◆ GetObsBinsLoBoundsMin()

double fastNLOTable::GetObsBinsLoBoundsMin ( unsigned int  iDim) const

Return minimum value of all lower bin bounds for dim. iDim.

Get lowest bin edge of all observable bins for dimension 'iDim'

◆ GetObsBinsUpBoundsMax()

double fastNLOTable::GetObsBinsUpBoundsMax ( unsigned int  iDim) const

Return maximum value of all upper bin bounds for dim. iDim.

Get uppermost bin edge of all observable bins for dimension 'iDim'

◆ GetRivetId()

string fastNLOTable::GetRivetId ( ) const

??? Get Rivet ID of analysis

◆ GetScDescr()

vector< string > fastNLOTable::GetScDescr ( ) const

get/set scenario description


Some info getters & setters for table modifications


◆ MergeTable()

void fastNLOTable::MergeTable ( const fastNLOTable rhs,
fastNLO::EMerge  option = fastNLO::kMerge 
)

'merge'


Other useful functions


< Merge another table with the current one. Use the option moption in order to specify the weighting procedure.

  • Default option uses 'normalisation' constant Nevt (usually called 'merge')
  • Other weighting options are available.
  • Weighting which consider weights for individual bins and subprocesses can be chosen.
  • Tables can be 'appended', i.e. the sum of the cross sections is calculated.

◆ MergeTables()

void fastNLOTable::MergeTables ( const std::vector< fastNLOTable *> &  tables,
fastNLO::EMerge  option = fastNLO::kMerge,
double  cutRMS = 0 
)

'merge' (also supports 'median' and 'mean')

< Merge all other tables with the current one. Warning: data or multiplicative contributions might get lost Warning: Function may require lots of memory, because all contributions are kept in memory.

◆ OpenFileRead()

std::istream * fastNLOTable::OpenFileRead ( )
protected

open std::ifstream for reading table

Open file-stream for reading table

◆ OpenFileWrite()

std::ostream * fastNLOTable::OpenFileWrite ( bool  compress = false)
protected

open std::ofstream for writing tables to ffilename

open ostream for writing tables do overwrite existing table

◆ PrintTableInfo()

void fastNLOTable::PrintTableInfo ( const int  iprint = 0) const

Print basic info about fastNLO table and its contributions.


Info print out functionality


◆ ReadCoeffTables()

void fastNLOTable::ReadCoeffTables ( std::istream &  table,
int  nCoeff 
)
protected

< read nCoeff Coefficient tables (additive, multiplicative and data)

◆ ReadHeader()

int fastNLOTable::ReadHeader ( std::istream &  table)
protected

read header of table (BlockA1)

< Read table header (formely named BlockA1 and BlockA2) return number of contributions to follow

◆ ReadTable()

void fastNLOTable::ReadTable ( )
virtual

Read file

◆ SetDimLabel()

void fastNLOTable::SetDimLabel ( std::string  label,
unsigned int  iDim,
bool  IsDiff = true 
)

Set label for dimension In this method, we also set IDiffBin. The IDiffBin flag defines, if this dimension is 0 (not differential, two bin borders required), 1 (pointwise differential, one value required), (not yet completely implemented) 2 (binwise differential, two bin borders required) In case 2 the cross section is divided by the corresponding bin width in this dimension.

◆ WriteTable()

void fastNLOTable::WriteTable ( )
virtual

< WriteTable(). writes the full FastNLO table to the previously defined ffilename on disk. Write fastNLO table to file 'ffilename' (member)

Reimplemented in fastNLOCreate.


The documentation for this class was generated from the following files: