Nanga Parbat 1.1.0
A TMD fitting framework
Public Member Functions | Protected Attributes | List of all members
NangaParbat::ConvolutionTable Class Reference

Class that implements the methods fot the numerical convolution of the interpolation tables with user-defined non-perturbative functions. More...

#include <convolutiontable.h>

Public Member Functions

 ConvolutionTable ()
 The "ConvolutionTable" constructor. More...
 
 ConvolutionTable (YAML::Node const &table, std::vector< double > const &cutParam={}, std::vector< std::shared_ptr< Cut > > const &cuts={}, double const &acc=1e-7)
 The "ConvolutionTable" constructor. More...
 
 ConvolutionTable (std::string const &infile, std::vector< double > const &cutParam={}, std::vector< std::shared_ptr< Cut > > const &cuts={}, double const &acc=1e-7)
 The "ConvolutionTable" constructor. More...
 
std::map< double, double > ConvoluteDY (std::function< double(double const &, double const &, double const &)> const &fNP) const
 This function convolutes a Drell-Yan input convolution table with a user-defined non-perturbative function. More...
 
std::map< double, double > ConvoluteSIDIS (std::function< double(double const &, double const &, double const &)> const &fNP, std::function< double(double const &, double const &, double const &)> const &DNP) const
 This function convolutes a SIDIS input convolution table with two user-defined non-perturbative functions. More...
 
virtual std::vector< double > GetPredictions (std::function< double(double const &, double const &, double const &)> const &fNP1, std::function< double(double const &, double const &, double const &)> const &fNP2) const
 This function returns a vector of predictions given two user-defined non-perturbative functions. More...
 
virtual std::vector< double > GetPredictions (std::function< double(double const &, double const &, double const &, int const &)> const &fNP) const
 This function returns a vector of predictions with a single user-defined non-perturbative function. More...
 
virtual std::vector< double > GetPredictions (std::function< double(double const &, double const &, double const &, int const &)> const &fNP, std::function< double(double const &, double const &, double const &, int const &)> const &dNP) const
 This function returns a vector of predictions given two user-defined non-perturbative function. More...
 
std::valarray< bool > GetCutMask () const
 This function returns the mask of points that pass all the cuts. More...
 
Getters

Functions to retrieve the feauture of the convolution table

std::string GetName () const
 
int GetProcess () const
 
double GetCME () const
 
std::vector< std::vector< double > > GetqTBins () const
 
std::vector< double > GetcutParam () const
 
FF_SIDIS

Virtual functions required by FF_SIDIS

virtual void SetInputFFs (std::function< std::map< int, double >(double const &, double const &)> const &InDistFunc)
 
virtual void SetInputFFs (std::function< apfel::Set< apfel::Distribution >(double const &)> const &InDistFunc)
 
virtual std::vector< double > GetPredictions (std::function< double(double const &, double const &, double const &)> const &) const
 

Protected Attributes

std::string const _name
 Name of the table. More...
 
int const _proc
 Index of the process (0: DY, 1: SIDIS) More...
 
double const _Vs
 Center of mass energy. More...
 
bool const _IntqT
 Whether the bin are integrated in qT or not. More...
 
std::vector< double > const _qTv
 Vector of qT bin-bounds. More...
 
std::vector< std::vector< double > > const _qTmap
 Vector of bounds for each qT bin. More...
 
std::vector< double > const _qTfact
 Bin-by-bin factors. More...
 
double const _prefact
 Overall prefactor. More...
 
double const _prefact2
 Second overall prefactor (do we really need it?) More...
 
std::vector< double > const _zOgata
 Unscaled Ogata coordinate. More...
 
std::vector< double > const _Qg
 Grid in Q. More...
 
std::vector< double > _xig
 Grid in xi;. More...
 
std::vector< double > _xbg
 Grid in xi;. More...
 
std::vector< double > _zg
 Grid in xi;. More...
 
std::map< double, std::vector< std::vector< double > > > _PSRed
 The phase-space reduction factors. More...
 
std::map< double, std::vector< std::vector< double > > > _dPSRed
 The derivative of the phase-space reduction factors. More...
 
std::map< double, std::vector< std::vector< std::vector< double > > > > _WDY
 The weights for Drell-Yan. More...
 
std::map< double, std::vector< std::vector< std::vector< std::vector< double > > > > > _WSIDIS
 The weights for SIDIS. More...
 
std::vector< double > const _cutParam
 The parameters needed to compute the ratio qT / Q. More...
 
double _acc
 The Ogata-quadrature accuracy. More...
 
std::vector< std::shared_ptr< Cut > > _cuts
 Cut objects. More...
 
std::valarray< bool > _cutmask
 Mask of points that pass the cuts. More...
 

Detailed Description

Class that implements the methods fot the numerical convolution of the interpolation tables with user-defined non-perturbative functions.

Examples
ComputeMeanReplica.cc, ComputePredictions.cc, and RunFit.cc.

Constructor & Destructor Documentation

◆ ConvolutionTable() [1/3]

NangaParbat::ConvolutionTable::ConvolutionTable ( )

The "ConvolutionTable" constructor.

Note
This constructor is supposed to be used only when inherinting this class as it does not fully define a "ConvolutionTable" object.

◆ ConvolutionTable() [2/3]

NangaParbat::ConvolutionTable::ConvolutionTable ( YAML::Node const &  table,
std::vector< double > const &  cutParam = {},
std::vector< std::shared_ptr< Cut > > const &  cuts = {},
double const &  acc = 1e-7 
)

The "ConvolutionTable" constructor.

Parameters
tablethe YAML:Node with the interpolation table
cutParammaximum value allowed for the ratio qT /Q (default: 100)
cutsvector of cut objects (default: empty)
accthe Ogata-quadrature required accuracy (default: 10-7)
Note
The accuracy has to be intended as the best accuracy over the tabulated Ogata-quadrature points. This accuracy may not be met within the tabulated points.

◆ ConvolutionTable() [3/3]

NangaParbat::ConvolutionTable::ConvolutionTable ( std::string const &  infile,
std::vector< double > const &  cutParam = {},
std::vector< std::shared_ptr< Cut > > const &  cuts = {},
double const &  acc = 1e-7 
)

The "ConvolutionTable" constructor.

Parameters
infilethe name of interpolation table in YAML format
cutParammaximum value allowed for the ratio qT /Q (default: 100)
cutsvector of cut objects (default: empty)
accthe Ogata-quadrature required accuracy (default: 10-7)
Note
The accuracy has to be intended as the best accuracy over the tabulated Ogata-quadrature points. This accuracy may not be met within the tabulated points.

Member Function Documentation

◆ ConvoluteDY()

std::map< double, double > NangaParbat::ConvolutionTable::ConvoluteDY ( std::function< double(double const &, double const &, double const &)> const &  fNP) const

This function convolutes a Drell-Yan input convolution table with a user-defined non-perturbative function.

Parameters
fNPthe non-perturbative input function associated to PDFs
Returns
a map that associates each value of qT to a prediction.

◆ ConvoluteSIDIS()

std::map< double, double > NangaParbat::ConvolutionTable::ConvoluteSIDIS ( std::function< double(double const &, double const &, double const &)> const &  fNP,
std::function< double(double const &, double const &, double const &)> const &  DNP 
) const

This function convolutes a SIDIS input convolution table with two user-defined non-perturbative functions.

Parameters
fNPthe non-perturbative input function associated to PDFs
DNPthe non-perturbative input function associated to FFs
Returns
a map that associates each value of qT to a prediction.

◆ GetCME()

double NangaParbat::ConvolutionTable::GetCME ( ) const
inline

◆ GetCutMask()

std::valarray< bool > NangaParbat::ConvolutionTable::GetCutMask ( ) const
inline

This function returns the mask of points that pass all the cuts.

◆ GetcutParam()

std::vector< double > NangaParbat::ConvolutionTable::GetcutParam ( ) const
inline

◆ GetName()

std::string NangaParbat::ConvolutionTable::GetName ( ) const
inline

◆ GetPredictions() [1/4]

virtual std::vector< double > NangaParbat::ConvolutionTable::GetPredictions ( std::function< double(double const &, double const &, double const &)> const &  ) const
inlinevirtual

◆ GetPredictions() [2/4]

virtual std::vector< double > NangaParbat::ConvolutionTable::GetPredictions ( std::function< double(double const &, double const &, double const &)> const &  fNP1,
std::function< double(double const &, double const &, double const &)> const &  fNP2 
) const
virtual

This function returns a vector of predictions given two user-defined non-perturbative functions.

Parameters
fNP1the first non-perturbative input function
fNP2the second non-perturbative input function
Returns
a vector of predictions.

◆ GetPredictions() [3/4]

virtual std::vector< double > NangaParbat::ConvolutionTable::GetPredictions ( std::function< double(double const &, double const &, double const &, int const &)> const &  fNP) const
virtual

This function returns a vector of predictions with a single user-defined non-perturbative function.

Parameters
fNPthe (indexed) non-perturbative input function
Returns
a vector of predictions.
Note
WARNING: This function is meant to be used for internal purposes because it "decides" internally how to use the function "fNP" and may behave unexpectedly.

◆ GetPredictions() [4/4]

virtual std::vector< double > NangaParbat::ConvolutionTable::GetPredictions ( std::function< double(double const &, double const &, double const &, int const &)> const &  fNP,
std::function< double(double const &, double const &, double const &, int const &)> const &  dNP 
) const
virtual

This function returns a vector of predictions given two user-defined non-perturbative function.

Parameters
fNPthe non-perturbative input functions parameterised by an index
dNPa second non-perturbative input function parameterised by an index that is meant to return the derivarive of the first function w.r.t. to some parameter of "fNP"
Returns
a vector of predictions.
Note
WARNING: This function is meant to be used for internal purposes because it "decides" internally how to use the function "fNP" and may behave unexpectedly. Specifically, this is used to compute the anaylitic derivative of the chi2 used duering the minimisation.

◆ GetProcess()

int NangaParbat::ConvolutionTable::GetProcess ( ) const
inline

◆ GetqTBins()

std::vector< std::vector< double > > NangaParbat::ConvolutionTable::GetqTBins ( ) const
inline

◆ SetInputFFs() [1/2]

virtual void NangaParbat::ConvolutionTable::SetInputFFs ( std::function< apfel::Set< apfel::Distribution >(double const &)> const &  InDistFunc)
inlinevirtual

◆ SetInputFFs() [2/2]

virtual void NangaParbat::ConvolutionTable::SetInputFFs ( std::function< std::map< int, double >(double const &, double const &)> const &  InDistFunc)
inlinevirtual

Member Data Documentation

◆ _acc

double NangaParbat::ConvolutionTable::_acc
protected

The Ogata-quadrature accuracy.

◆ _cutmask

std::valarray<bool> NangaParbat::ConvolutionTable::_cutmask
protected

Mask of points that pass the cuts.

◆ _cutParam

std::vector<double> const NangaParbat::ConvolutionTable::_cutParam
protected

The parameters needed to compute the ratio qT / Q.

◆ _cuts

std::vector<std::shared_ptr<Cut> > NangaParbat::ConvolutionTable::_cuts
protected

Cut objects.

◆ _dPSRed

std::map<double,std::vector<std::vector<double> > > NangaParbat::ConvolutionTable::_dPSRed
protected

The derivative of the phase-space reduction factors.

◆ _IntqT

bool const NangaParbat::ConvolutionTable::_IntqT
protected

Whether the bin are integrated in qT or not.

◆ _name

std::string const NangaParbat::ConvolutionTable::_name
protected

Name of the table.

◆ _prefact

double const NangaParbat::ConvolutionTable::_prefact
protected

Overall prefactor.

◆ _prefact2

double const NangaParbat::ConvolutionTable::_prefact2
protected

Second overall prefactor (do we really need it?)

◆ _proc

int const NangaParbat::ConvolutionTable::_proc
protected

Index of the process (0: DY, 1: SIDIS)

◆ _PSRed

std::map<double,std::vector<std::vector<double> > > NangaParbat::ConvolutionTable::_PSRed
protected

The phase-space reduction factors.

◆ _Qg

std::vector<double> const NangaParbat::ConvolutionTable::_Qg
protected

Grid in Q.

◆ _qTfact

std::vector<double> const NangaParbat::ConvolutionTable::_qTfact
protected

Bin-by-bin factors.

◆ _qTmap

std::vector<std::vector<double> > const NangaParbat::ConvolutionTable::_qTmap
protected

Vector of bounds for each qT bin.

◆ _qTv

std::vector<double> const NangaParbat::ConvolutionTable::_qTv
protected

Vector of qT bin-bounds.

◆ _Vs

double const NangaParbat::ConvolutionTable::_Vs
protected

Center of mass energy.

◆ _WDY

std::map<double,std::vector<std::vector<std::vector<double> > > > NangaParbat::ConvolutionTable::_WDY
protected

The weights for Drell-Yan.

◆ _WSIDIS

std::map<double,std::vector<std::vector<std::vector<std::vector<double> > > > > NangaParbat::ConvolutionTable::_WSIDIS
protected

The weights for SIDIS.

◆ _xbg

std::vector<double> NangaParbat::ConvolutionTable::_xbg
protected

Grid in xi;.

◆ _xig

std::vector<double> NangaParbat::ConvolutionTable::_xig
protected

Grid in xi;.

◆ _zg

std::vector<double> NangaParbat::ConvolutionTable::_zg
protected

Grid in xi;.

◆ _zOgata

std::vector<double> const NangaParbat::ConvolutionTable::_zOgata
protected

Unscaled Ogata coordinate.


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