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

The "DataHandler" class provides a common interface to all datasets. It provides methods to get kinematics, central values, uncertainties, etc. More...

#include <datahandler.h>

Classes

struct  Binning
 Structure containing the single bin information. This is currently used only for the FF_SIDIS project. More...
 
struct  Kinematics
 Structure containing the kinematic information of one single data set. More...
 

Public Types

enum  Process : int {
  UnknownProcess = -1 , DY = 0 , SIDIS = 1 , SIA = 2 ,
  DIA = 3
}
 The process enumerator. More...
 
enum  Observable : int {
  UnknownObservable = -1 , dsigma_dxdydz = 0 , dsigma_dxdQdz = 1 , multiplicity = 2 ,
  F_uut = 3 , opposite_sign_ratio = 4
}
 The observable enumerator. More...
 

Public Member Functions

 DataHandler (DataHandler const &DH)
 The "DataHandler" copy constructor. More...
 
 DataHandler (std::string const &name, YAML::Node const &datafile, gsl_rng *rng=nullptr, int const &fluctuation=0, std::vector< double > const &t0={})
 The "DataHandler" constructor. More...
 
void FluctuateData (gsl_rng *rng, int const &fluctuation)
 Function that fluctuates data. More...
 
void SetMeans (std::vector< double > const &means, gsl_rng *rng=nullptr, int const &fluctuation=0)
 Function that sets the data central values replacing that introduced in the constructor. More...
 
std::string GetName () const
 Function that returns the name of the dataset. More...
 
YAML::Node GetDataFile () const
 Function that returns the datafile in YAML format. More...
 
Process GetProcess () const
 Function that returns the process code. More...
 
Observable GetObservable () const
 Function that returns the observable code. More...
 
double GetTargetIsoscalarity () const
 Function that returns the target isoscalarity. More...
 
std::string GetHadron () const
 Function that returns the possible identified hadron species in the final state. More...
 
int GetCharge () const
 Function that returns the charge of the identified final state. More...
 
std::vector< apfel::QuarkFlavour > GetTagging () const
 Function that returns the quark-tagged compoments. Zero corresponds to total. More...
 
double GetPrefactor () const
 Function that returns any possible constant prefactor to be used to multiply the theoretical predictions. More...
 
Kinematics GetKinematics () const
 Function that returns the kinematic object. More...
 
std::vector< double > GetMeanValues () const
 Function that returns the mean values. More...
 
std::vector< double > GetFluctutatedData () const
 Function that returns the fluctuated data. More...
 
std::vector< double > GetUncorrelatedUnc () const
 Function that returns the sum in quadrature of the uncorrelated uncertainties. More...
 
std::vector< std::vector< double > > GetAddCorrelatedUnc () const
 Function that returns the additive correlated systematic uncertainties. More...
 
std::vector< std::vector< double > > GetMultCorrelatedUnc () const
 Function that returns the multiplicative correlated systematic uncertainties. More...
 
std::vector< std::vector< double > > GetCorrelatedUnc () const
 Function that returns the all the correlated systematic uncertainties (additive first and multiplicative second). More...
 
apfel::matrix< double > GetCovarianceMatrix () const
 Function that returns the covariance matrix of the correlated uncertainties. More...
 
apfel::matrix< double > GetCholeskyDecomposition () const
 Function that returns the Cholesky decomposition of the covariance matrix. More...
 
std::vector< double > GetT0 () const
 Function that returns the set of t0 predictions. More...
 
std::map< std::string, std::string > GetLabels () const
 Function that returns the plotting labels. More...
 
std::vector< BinningGetBinning () const
 Get vector of bins. This is currently used only for the FF_SIDIS project. More...
 

Protected Attributes

std::string _name
 Name of the dataset. More...
 
YAML::Node _datafile
 Datafile in YAML. More...
 
Process _proc
 The process. More...
 
Observable _obs
 The observable. More...
 
double _targetiso
 Isoscalarity of the target. More...
 
std::string _hadron
 Hadron species identified in the final state. More...
 
double _charge
 Charge of the identified final state. More...
 
std::vector< apfel::QuarkFlavour > _tagging
 Possible quark-tagged components. More...
 
double _prefact
 Possible overall prefactor to multiply the theoretical predictions. More...
 
Kinematics _kin
 Kinematics block. More...
 
std::vector< double > _means
 Vector of central values. More...
 
std::vector< double > _uncor
 Vector of uncorrelated uncertainties. More...
 
std::vector< std::vector< double > > _corra
 Additive correlated uncertainties. More...
 
std::vector< std::vector< double > > _corrm
 Multiplicative correlated uncertainties. More...
 
std::vector< std::vector< double > > _corr
 All correlated uncertainties. More...
 
apfel::matrix< double > _covmat
 Covariance matrix. More...
 
apfel::matrix< double > _CholL
 Cholesky decomposition of the covariance matrix. More...
 
std::map< std::string, std::string > _labels
 Labels used for plotting. More...
 
std::vector< double > _fluctuations
 Vector of fluctuated data. More...
 
std::vector< double > _t0
 Vector of t0-predictions. More...
 
std::vector< Binning_bins
 Vector of bins (currently used only for the FF_SIDIS project) More...
 

Friends

std::ostream & operator<< (std::ostream &os, DataHandler const &DH)
 

Detailed Description

The "DataHandler" class provides a common interface to all datasets. It provides methods to get kinematics, central values, uncertainties, etc.

Examples
ComputeMeanReplica.cc, CreateTables.cc, and RunFit.cc.

Member Enumeration Documentation

◆ Observable

The observable enumerator.

Enumerator
UnknownObservable 
dsigma_dxdydz 
dsigma_dxdQdz 
multiplicity 
F_uut 
opposite_sign_ratio 

◆ Process

The process enumerator.

Enumerator
UnknownProcess 
DY 
SIDIS 
SIA 
DIA 

Constructor & Destructor Documentation

◆ DataHandler() [1/2]

NangaParbat::DataHandler::DataHandler ( DataHandler const &  DH)

The "DataHandler" copy constructor.

◆ DataHandler() [2/2]

NangaParbat::DataHandler::DataHandler ( std::string const &  name,
YAML::Node const &  datafile,
gsl_rng *  rng = nullptr,
int const &  fluctuation = 0,
std::vector< double > const &  t0 = {} 
)

The "DataHandler" constructor.

Parameters
namethe name associated to the data set
datafilethe YAML:Node with the interpolation table
rngGSL random number object
fluctuationID of the fluctuation (i.e. Monte-Carlo replica ID) (default: 0, i.e. no fluctuations)
t0vector of predictions to be used for the t0-prescription

Member Function Documentation

◆ FluctuateData()

void NangaParbat::DataHandler::FluctuateData ( gsl_rng *  rng,
int const &  fluctuation 
)

Function that fluctuates data.

Parameters
rngGSL random number object
fluctuationID of the fluctuation (i.e. Monte-Carlo replica ID) (default: 0, i.e. no fluctuations)

◆ GetAddCorrelatedUnc()

std::vector< std::vector< double > > NangaParbat::DataHandler::GetAddCorrelatedUnc ( ) const
inline

Function that returns the additive correlated systematic uncertainties.

◆ GetBinning()

std::vector< Binning > NangaParbat::DataHandler::GetBinning ( ) const
inline

Get vector of bins. This is currently used only for the FF_SIDIS project.

Todo:
Integrate it better in the rest of the class.

◆ GetCharge()

int NangaParbat::DataHandler::GetCharge ( ) const
inline

Function that returns the charge of the identified final state.

◆ GetCholeskyDecomposition()

apfel::matrix< double > NangaParbat::DataHandler::GetCholeskyDecomposition ( ) const
inline

Function that returns the Cholesky decomposition of the covariance matrix.

◆ GetCorrelatedUnc()

std::vector< std::vector< double > > NangaParbat::DataHandler::GetCorrelatedUnc ( ) const
inline

Function that returns the all the correlated systematic uncertainties (additive first and multiplicative second).

◆ GetCovarianceMatrix()

apfel::matrix< double > NangaParbat::DataHandler::GetCovarianceMatrix ( ) const
inline

Function that returns the covariance matrix of the correlated uncertainties.

◆ GetDataFile()

YAML::Node NangaParbat::DataHandler::GetDataFile ( ) const
inline

Function that returns the datafile in YAML format.

◆ GetFluctutatedData()

std::vector< double > NangaParbat::DataHandler::GetFluctutatedData ( ) const
inline

Function that returns the fluctuated data.

◆ GetHadron()

std::string NangaParbat::DataHandler::GetHadron ( ) const
inline

Function that returns the possible identified hadron species in the final state.

◆ GetKinematics()

Kinematics NangaParbat::DataHandler::GetKinematics ( ) const
inline

Function that returns the kinematic object.

◆ GetLabels()

std::map< std::string, std::string > NangaParbat::DataHandler::GetLabels ( ) const
inline

Function that returns the plotting labels.

◆ GetMeanValues()

std::vector< double > NangaParbat::DataHandler::GetMeanValues ( ) const
inline

Function that returns the mean values.

◆ GetMultCorrelatedUnc()

std::vector< std::vector< double > > NangaParbat::DataHandler::GetMultCorrelatedUnc ( ) const
inline

Function that returns the multiplicative correlated systematic uncertainties.

◆ GetName()

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

Function that returns the name of the dataset.

◆ GetObservable()

Observable NangaParbat::DataHandler::GetObservable ( ) const
inline

Function that returns the observable code.

◆ GetPrefactor()

double NangaParbat::DataHandler::GetPrefactor ( ) const
inline

Function that returns any possible constant prefactor to be used to multiply the theoretical predictions.

◆ GetProcess()

Process NangaParbat::DataHandler::GetProcess ( ) const
inline

Function that returns the process code.

◆ GetT0()

std::vector< double > NangaParbat::DataHandler::GetT0 ( ) const
inline

Function that returns the set of t0 predictions.

◆ GetTagging()

std::vector< apfel::QuarkFlavour > NangaParbat::DataHandler::GetTagging ( ) const
inline

Function that returns the quark-tagged compoments. Zero corresponds to total.

◆ GetTargetIsoscalarity()

double NangaParbat::DataHandler::GetTargetIsoscalarity ( ) const
inline

Function that returns the target isoscalarity.

Note
The code always assumes that one of the hadrons has isoscalarity 1, meaning that it's a single hadron whose distributions don't need to be manipulated.

◆ GetUncorrelatedUnc()

std::vector< double > NangaParbat::DataHandler::GetUncorrelatedUnc ( ) const
inline

Function that returns the sum in quadrature of the uncorrelated uncertainties.

◆ SetMeans()

void NangaParbat::DataHandler::SetMeans ( std::vector< double > const &  means,
gsl_rng *  rng = nullptr,
int const &  fluctuation = 0 
)

Function that sets the data central values replacing that introduced in the constructor.

Parameters
meansthe new means
rngGSL random number generator
fluctuationfluctuation index (default: 0)

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
DataHandler const &  DH 
)
friend

Member Data Documentation

◆ _bins

std::vector<Binning> NangaParbat::DataHandler::_bins
protected

Vector of bins (currently used only for the FF_SIDIS project)

◆ _charge

double NangaParbat::DataHandler::_charge
protected

Charge of the identified final state.

◆ _CholL

apfel::matrix<double> NangaParbat::DataHandler::_CholL
protected

Cholesky decomposition of the covariance matrix.

◆ _corr

std::vector<std::vector<double> > NangaParbat::DataHandler::_corr
protected

All correlated uncertainties.

◆ _corra

std::vector<std::vector<double> > NangaParbat::DataHandler::_corra
protected

Additive correlated uncertainties.

◆ _corrm

std::vector<std::vector<double> > NangaParbat::DataHandler::_corrm
protected

Multiplicative correlated uncertainties.

◆ _covmat

apfel::matrix<double> NangaParbat::DataHandler::_covmat
protected

Covariance matrix.

◆ _datafile

YAML::Node NangaParbat::DataHandler::_datafile
protected

Datafile in YAML.

◆ _fluctuations

std::vector<double> NangaParbat::DataHandler::_fluctuations
protected

Vector of fluctuated data.

◆ _hadron

std::string NangaParbat::DataHandler::_hadron
protected

Hadron species identified in the final state.

◆ _kin

Kinematics NangaParbat::DataHandler::_kin
protected

Kinematics block.

◆ _labels

std::map<std::string, std::string> NangaParbat::DataHandler::_labels
protected

Labels used for plotting.

◆ _means

std::vector<double> NangaParbat::DataHandler::_means
protected

Vector of central values.

◆ _name

std::string NangaParbat::DataHandler::_name
protected

Name of the dataset.

◆ _obs

Observable NangaParbat::DataHandler::_obs
protected

The observable.

◆ _prefact

double NangaParbat::DataHandler::_prefact
protected

Possible overall prefactor to multiply the theoretical predictions.

◆ _proc

Process NangaParbat::DataHandler::_proc
protected

The process.

◆ _t0

std::vector<double> NangaParbat::DataHandler::_t0
protected

Vector of t0-predictions.

◆ _tagging

std::vector<apfel::QuarkFlavour> NangaParbat::DataHandler::_tagging
protected

Possible quark-tagged components.

◆ _targetiso

double NangaParbat::DataHandler::_targetiso
protected

Isoscalarity of the target.

◆ _uncor

std::vector<double> NangaParbat::DataHandler::_uncor
protected

Vector of uncorrelated uncertainties.


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