A class to manage parameter central values and their uncertanities. More...
#include <CentralValuesAndUncertainties.h>
Public Member Functions | |
CentralValuesAndUncertainties () | |
void | readFromXML (const char *filename) |
Read a xml file name to parse the parameters. More... | |
void | addUncorrelated (Parameter &cv_par, double uncertainty) |
Add a parameter with its central value and its uncertainty. The parameter is specified as uncorrelated with all other parameters in the table, and any others that will be added. In that case, the uncertainty can be represented as a single floating point value. More... | |
void | addCorrelated (ParameterTable &cv_pars, TMatrixD &cov_mx) |
Add a set of parameters with correlated uncertainties. The central values of the parameters must be provided along with the covariance matrix of the parameters. These parameters are assumed to be block uncorrelated with all the other parameters. More... | |
void | setBaseSeed (int val) |
Set a beggining/base seed to be used in generating random parameter shifts for the many universe method. This base seed should be unique and not shared by any other many universe error calculator. More... | |
ParameterTable | calculateParsForUniverse (int universe) |
Calculate a table of randomly varied parameters for a particular universe i. The universe number is used, along with the base seed, to calculate a unique seed for this universe, allowing our computation to be repeatable. We loop over all uncorrelated parameters and sample each from a normal distribution with mean=CV parameter and variance=sqrate of the uncertainty. We loop over all correlated sets of parameters. For each, we have a list of N central values x and a single joint NxN covariance matrix V. We execute a cholesky decomposition of V to find a lower left diagonal matrix L such that L L^T =V. Then we generate. More... | |
ParameterTable | getCVPars () |
Get the central value parameters. More... | |
Static Public Member Functions | |
static CentralValuesAndUncertainties * | getInstance () |
Private Attributes | |
ParameterTable | uncorrelated_pars |
boost::interprocess::flat_map< std::string, double > | uncorrelated_errors |
std::vector< ParameterTable > | correlated_par_tables |
std::vector< TMatrixD > | covariance_matrices |
TRandom3 * | r3 |
int | baseSeed |
Static Private Attributes | |
static CentralValuesAndUncertainties * | instance = 0 |
A class to manage parameter central values and their uncertanities.
Definition at line 20 of file CentralValuesAndUncertainties.h.
NeutrinoFluxReweight::CentralValuesAndUncertainties::CentralValuesAndUncertainties | ( | ) |
Setting the seed to zero.
Definition at line 20 of file CentralValuesAndUncertainties.cpp.
void NeutrinoFluxReweight::CentralValuesAndUncertainties::addCorrelated | ( | ParameterTable & | cv_pars, |
TMatrixD & | cov_mx | ||
) |
Add a set of parameters with correlated uncertainties. The central values of the parameters must be provided along with the covariance matrix of the parameters. These parameters are assumed to be block uncorrelated with all the other parameters.
Definition at line 127 of file CentralValuesAndUncertainties.cpp.
void NeutrinoFluxReweight::CentralValuesAndUncertainties::addUncorrelated | ( | Parameter & | cv_par, |
double | uncertainty | ||
) |
Add a parameter with its central value and its uncertainty. The parameter is specified as uncorrelated with all other parameters in the table, and any others that will be added. In that case, the uncertainty can be represented as a single floating point value.
Definition at line 121 of file CentralValuesAndUncertainties.cpp.
ParameterTable NeutrinoFluxReweight::CentralValuesAndUncertainties::calculateParsForUniverse | ( | int | universe | ) |
Calculate a table of randomly varied parameters for a particular universe i. The universe number is used, along with the base seed, to calculate a unique seed for this universe, allowing our computation to be repeatable. We loop over all uncorrelated parameters and sample each from a normal distribution with mean=CV parameter and variance=sqrate of the uncertainty. We loop over all correlated sets of parameters. For each, we have a list of N central values x and a single joint NxN covariance matrix V. We execute a cholesky decomposition of V to find a lower left diagonal matrix L such that L L^T =V. Then we generate.
We are going to use 100% correlated bin-to-bin for systematic errors in thin target data:
Definition at line 135 of file CentralValuesAndUncertainties.cpp.
ParameterTable NeutrinoFluxReweight::CentralValuesAndUncertainties::getCVPars | ( | ) |
Get the central value parameters.
Definition at line 207 of file CentralValuesAndUncertainties.cpp.
|
static |
Definition at line 233 of file CentralValuesAndUncertainties.cpp.
void NeutrinoFluxReweight::CentralValuesAndUncertainties::readFromXML | ( | const char * | filename | ) |
Read a xml file name to parse the parameters.
Reading the uncorrelated parameters:
Reading the uncorrelated list:
Reading the correlated parameters:
Definition at line 26 of file CentralValuesAndUncertainties.cpp.
void NeutrinoFluxReweight::CentralValuesAndUncertainties::setBaseSeed | ( | int | val | ) |
Set a beggining/base seed to be used in generating random parameter shifts for the many universe method. This base seed should be unique and not shared by any other many universe error calculator.
Definition at line 132 of file CentralValuesAndUncertainties.cpp.
|
private |
Definition at line 54 of file CentralValuesAndUncertainties.h.
|
private |
Definition at line 51 of file CentralValuesAndUncertainties.h.
|
private |
Definition at line 52 of file CentralValuesAndUncertainties.h.
|
staticprivate |
Definition at line 47 of file CentralValuesAndUncertainties.h.
|
private |
Definition at line 53 of file CentralValuesAndUncertainties.h.
|
private |
Definition at line 50 of file CentralValuesAndUncertainties.h.
|
private |
Definition at line 49 of file CentralValuesAndUncertainties.h.