6 : inputFile(file), pca(false) {
10 if (threshold < 0 || threshold >= 1) {
12 MACH3LOG_INFO(
"Principal component analysis but given the threshold for the principal components to be less than 0, or greater than (or equal to) 1. This will not work");
15 MACH3LOG_INFO(
"Am instead calling the usual non-PCA constructor...");
25 : inputFile(YAMLFile[0].c_str()), matrixName(name), pca(true) {
29 for(
unsigned int i = 0; i < YAMLFile.size(); i++)
35 if (threshold < 0 || threshold >= 1) {
36 MACH3LOG_INFO(
"Principal component analysis but given the threshold for the principal components to be less than 0, or greater than (or equal to) 1. This will not work");
39 MACH3LOG_INFO(
"Am instead calling the usual non-PCA constructor...");
69 MACH3LOG_ERROR(
"Adaption has been enabled and now trying to enable PCA. Right now both configuration don't work with each other");
73 PCAObj = std::make_unique<PCAHandler>();
75 if(FirstPCAdpar == -999 || LastPCAdpar == -999){
76 if(FirstPCAdpar == -999 && LastPCAdpar == -999){
81 MACH3LOG_ERROR(
"You must either leave FirstPCAdpar and LastPCAdpar at -999 or set them both to something");
96 TFile *infile =
new TFile(file.c_str(),
"READ");
97 if (infile->IsZombie()) {
98 MACH3LOG_ERROR(
"Could not open input covariance ROOT file {} !!!", file);
103 TMatrixDSym *CovMat =
static_cast<TMatrixDSym*
>(infile->Get(name.c_str()));
106 MACH3LOG_ERROR(
"Could not find covariance matrix name {} in file {}", name, file);
107 MACH3LOG_ERROR(
"Are you really sure {} exists in the file?", name);
117 for (
int iThread = 0; iThread < nThreads; iThread++) {
130 for (
int j = 0; j <
_fNumPar; j++) {
156 _fYAMLDoc[
"Systematics"] = YAML::Node(YAML::NodeType::Sequence);
157 for(
unsigned int i = 0; i < YAMLFile.size(); i++)
160 for (
const auto& item : YAMLDocTemp[
"Systematics"]) {
161 _fYAMLDoc[
"Systematics"].push_back(item);
169 for (
int iThread = 0; iThread < nThreads; iThread++) {
183 for (
int j = 0; j <
_fNumPar; j++) {
189 TMatrixDSym* _fCovMatrix =
new TMatrixDSym(
_fNumPar);
191 std::vector<std::map<std::string,double>> Correlations(
_fNumPar);
192 std::map<std::string, int> CorrNamesMap;
197 for (
auto const ¶m :
_fYAMLDoc[
"Systematics"])
199 _fFancyNames[i] = Get<std::string>(param[
"Systematic"][
"Names"][
"FancyName"], __FILE__ , __LINE__);
200 _fPreFitValue[i] = Get<double>(param[
"Systematic"][
"ParameterValues"][
"PreFitValue"], __FILE__ , __LINE__);
201 _fIndivStepScale[i] = Get<double>(param[
"Systematic"][
"StepScale"][
"MCMC"], __FILE__ , __LINE__);
202 _fError[i] = Get<double>(param[
"Systematic"][
"Error"], __FILE__ , __LINE__);
203 _fSampleNames[i] = GetFromManager<std::vector<std::string>>(param[
"Systematic"][
"SampleNames"], {}, __FILE__, __LINE__);
209 auto TempBoundsVec =
GetBounds(param[
"Systematic"][
"ParameterBounds"]);
214 _fFlatPrior[i] = GetFromManager<bool>(param[
"Systematic"][
"FlatPrior"],
false, __FILE__ , __LINE__);
217 if(GetFromManager<bool>(param[
"Systematic"][
"FixParam"],
false, __FILE__ , __LINE__)) {
221 if(param[
"Systematic"][
"SpecialProposal"]) {
226 CorrNamesMap[param[
"Systematic"][
"Names"][
"FancyName"].as<std::string>()]=i;
229 if(param[
"Systematic"][
"Correlations"]) {
230 for(
unsigned int Corr_i = 0; Corr_i < param[
"Systematic"][
"Correlations"].size(); ++Corr_i){
231 for (YAML::const_iterator it = param[
"Systematic"][
"Correlations"][Corr_i].begin(); it!=param[
"Systematic"][
"Correlations"][Corr_i].end();++it) {
232 Correlations[i][it->first.as<std::string>()] = it->second.as<
double>();
247 for (
auto const& pair : Correlations[j]) {
248 auto const& key = pair.first;
249 auto const& val = pair.second;
252 if (CorrNamesMap.find(key) != CorrNamesMap.end()) {
253 index = CorrNamesMap[key];
255 MACH3LOG_ERROR(
"Parameter {} not in list! Check your spelling?", key);
260 if(Correlations[index].find(
_fFancyNames[j]) != Correlations[index].end()) {
263 if(std::abs(Corr2 - Corr1) > FLT_EPSILON) {
272 (*_fCovMatrix)(j, index)= (*_fCovMatrix)(index, j) = Corr1*
_fError[j]*
_fError[index];
285 Tunes = std::make_unique<ParameterTunes>(
_fYAMLDoc[
"Systematics"]);
288 for(
const auto &file : YAMLFile){
301 bool CircEnabled =
false;
302 bool FlipEnabled =
false;
304 if (param[
"CircularBounds"]) {
308 if (param[
"FlipParameter"]) {
312 if (!CircEnabled && !FlipEnabled) {
320 MACH3LOG_INFO(
"Enabling CircularBounds for parameter {} with range [{}, {}]",
326 MACH3LOG_ERROR(
"Circular bounds [{}, {}] for parameter {} exceed physical bounds [{}, {}]",
336 FlipParameterPoint.push_back(Get<double>(param[
"FlipParameter"], __FILE__, __LINE__));
337 MACH3LOG_INFO(
"Enabling Flipping for parameter {} with value {}",
342 if (CircEnabled && FlipEnabled) {
344 MACH3LOG_ERROR(
"FlipParameter value {} for parameter {} is outside the CircularBounds [{}, {}]",
355 const double min_flip = std::min(flipped_low, flipped_high);
356 const double max_flip = std::max(flipped_low, flipped_high);
358 if (min_flip < low || max_flip > high) {
359 MACH3LOG_ERROR(
"Flipping about point {} for parameter {} would leave circular bounds [{}, {}]",
370 if (cov ==
nullptr) {
371 MACH3LOG_ERROR(
"Could not find covariance matrix you provided to {}", __func__ );
376 invCovMatrix =
static_cast<TMatrixDSym *
>(cov->Clone());
392 _fNames = std::vector<std::string>(SizeVec);
395 _fError = std::vector<double>(SizeVec);
396 _fCurrVal = std::vector<double>(SizeVec);
397 _fPropVal = std::vector<double>(SizeVec);
399 _fUpBound = std::vector<double>(SizeVec);
409 for(
int i = 0; i < SizeVec; i++) {
444 std::vector<double> props(
_fNumPar);
462 if (__builtin_expect(!
pca, 1)) {
464 #pragma omp parallel for
466 for (
int i = 0; i <
_fNumPar; ++i) {
481 MACH3LOG_WARN(
"Tried {} times to throw parameter {} but failed",
throws, i);
511 for (
int i = 0; i <
_fNumPar; ++i) {
517 const double sigma = sqrt((*
covMatrix)(i,i));
518 double throwrange = sigma;
519 if (paramrange < sigma) throwrange = paramrange;
526 MACH3LOG_WARN(
"Tried {} times to throw parameter {} but failed",
throws, i);
601 #pragma omp parallel for
603 for (
int i = 0; i <
_fNumPar; ++i) {
616 #pragma omp parallel for
618 for (
int i = 0; i <
PCAObj->GetNumberPCAedParameters(); ++i)
621 if (
PCAObj->IsParameterFixedPCA(i)) {
640 #pragma omp parallel for
642 for (
int i = 0; i <
_fNumPar; ++i) {
658 #pragma omp parallel for
660 for (
int i = 0; i <
_fNumPar; ++i) {
674 _fPropVal[index] = LowBound + std::fmod(
_fPropVal[index] - UpBound, UpBound - LowBound);
675 }
else if (
_fPropVal[index] < LowBound) {
676 _fPropVal[index] = UpBound - std::fmod(LowBound -
_fPropVal[index], UpBound - LowBound);
698 for (
int i = 0; i <
_fNumPar; i++) {
717 for (
int i = 0; i <
_fNumPar; i++) {
731 for (
int i = 0; i <
_fNumPar; i++) {
745 MACH3LOG_INFO(
"{:<30} {:<10} {:<10} {:<10}",
"Name",
"Prior",
"Current",
"Proposed");
746 for (
int i = 0; i <
_fNumPar; ++i) {
760 #pragma omp parallel for reduction(+:logL)
771 for (
int j = 0; j <= i; ++j) {
774 double scale = (i != j) ? 1. : 0.5;
787 #pragma omp parallel for reduction(+:NOutside)
815 for (
int i = 0; i <
_fNumPar; i++) {
820 if (pars.size() !=
size_t(
_fNumPar)) {
824 int parsSize = int(pars.size());
825 for (
int i = 0; i < parsSize; i++) {
827 if(std::isnan(pars[i])) {
838 PCAObj->TransferToParam();
846 for (
int i = 0; i <
_fNumPar; ++i) {
856 for (
int i = 0; i <
_fNumPar; ++i) {
866 MACH3LOG_ERROR(
"You are trying so set StepScale to 0 or negative this will not work");
870 const double SuggestedScale = 2.38*2.38/
_fNumPar;
871 if(std::fabs(scale - SuggestedScale)/SuggestedScale > 1) {
872 MACH3LOG_WARN(
"Defined Global StepScale is {}, while suggested suggested {}", scale, SuggestedScale);
898 PCAObj->ToggleFixAllParameters();
928 MACH3LOG_WARN(
"I couldn't find parameter with name {}, therefore will not fix it", name);
939 MACH3LOG_WARN(
"I couldn't find parameter with name {}, therefore don't know if it fixed", name);
965 if (
int(stepscale.size()) !=
_fNumPar)
967 MACH3LOG_WARN(
"Stepscale vector not equal to number of parameters. Quitting..");
968 MACH3LOG_WARN(
"Size of argument vector: {}", stepscale.size());
973 for (
int iParam = 0 ; iParam <
_fNumPar; iParam++) {
982 MACH3LOG_INFO(
"============================================================");
984 for (
int iParam = 0; iParam <
_fNumPar; iParam++) {
987 MACH3LOG_INFO(
"============================================================");
1001 int originalErrorWarning = gErrorIgnoreLevel;
1002 gErrorIgnoreLevel = kFatal;
1005 int MaxAttempts = 1e5;
1007 bool CanDecomp =
false;
1010 for (iAttempt = 0; iAttempt < MaxAttempts; iAttempt++) {
1011 chdcmp = TDecompChol(*cov);
1012 if (chdcmp.Decompose()) {
1017 #pragma omp parallel for
1019 for (
int iVar = 0 ; iVar <
_fNumPar; iVar++) {
1020 (*cov)(iVar,iVar) += pow(10, -9);
1026 MACH3LOG_ERROR(
"Tried {} times to shift diagonal but still can not decompose the matrix", MaxAttempts);
1027 MACH3LOG_ERROR(
"This indicates that something is wrong with the input matrix");
1031 MACH3LOG_INFO(
"Had to shift diagonal {} time(s) to allow the covariance matrix to be decomposed", iAttempt);
1034 gErrorIgnoreLevel = originalErrorWarning;
1040 std::vector<double> stepScales(
_fNumPar);
1041 for (
int i = 0; i <
_fNumPar; i++) {
1052 if (cov ==
nullptr) {
1053 MACH3LOG_ERROR(
"Could not find covariance matrix you provided to {}", __func__);
1057 if (
covMatrix->GetNrows() != cov->GetNrows()) {
1058 MACH3LOG_ERROR(
"Matrix given for throw Matrix is not the same size as the covariance matrix stored in object!");
1064 throwMatrix =
static_cast<TMatrixDSym*
>(cov->Clone());
1068 TDecompChol TDecompChol_throwMatrix(*
throwMatrix);
1070 if(!TDecompChol_throwMatrix.Decompose()) {
1080 #pragma omp parallel for collapse(2)
1106 MACH3LOG_ERROR(
"PCA has been enabled and now trying to enable Adaption. Right now both configuration don't work with each other");
1109 AdaptiveHandler = std::make_unique<adaptive_mcmc::AdaptiveMCMCHandler>();
1112 if(!success)
return;
1117 if(!GetFromManager<bool>(adapt_manager[
"AdaptionOptions"][
"Covariance"][
matrixName][
"UseExternalMatrix"],
false, __FILE__ , __LINE__)) {
1126 auto external_file_name = GetFromManager<std::string>(adapt_manager[
"AdaptionOptions"][
"Covariance"][
matrixName][
"ExternalMatrixFileName"],
"", __FILE__ , __LINE__);
1127 auto external_matrix_name = GetFromManager<std::string>(adapt_manager[
"AdaptionOptions"][
"Covariance"][
matrixName][
"ExternalMatrixName"],
"", __FILE__ , __LINE__);
1128 auto external_mean_name = GetFromManager<std::string>(adapt_manager[
"AdaptionOptions"][
"Covariance"][
matrixName][
"ExternalMeansName"],
"", __FILE__ , __LINE__);
1133 MACH3LOG_INFO(
"Successfully Set External Throw Matrix Stored in {}", external_file_name);
1158 TMatrixDSym* update_matrix =
static_cast<TMatrixDSym*
>(
AdaptiveHandler->GetAdaptiveCovariance()->Clone());
1180 TMatrixDSym* cov_trans = cov;
1182 TMatrixDSym cov_sym = 0.5*(*cov+*cov_trans);
1185 TDecompSVD cov_sym_svd=TDecompSVD(cov_sym);
1186 if(!cov_sym_svd.Decompose()){
1191 TMatrixD cov_sym_v = cov_sym_svd.GetV();
1192 TMatrixD cov_sym_vt = cov_sym_v;
1195 TVectorD cov_sym_sigvect = cov_sym_svd.GetSig();
1197 const Int_t nCols = cov_sym_v.GetNcols();
1198 TMatrixDSym cov_sym_sig(nCols);
1199 TMatrixDDiag cov_sym_sig_diag(cov_sym_sig);
1200 cov_sym_sig_diag=cov_sym_sigvect;
1203 TMatrixDSym cov_sym_polar = cov_sym_sig.SimilarityT(cov_sym_vt);
1206 TMatrixDSym cov_closest_approx = 0.5*(cov_sym+cov_sym_polar);
1211 *cov = cov_closest_approx;
1224 hMatrix->SetBinContent(i+1, i+1, 1.);
1230 #pragma omp parallel for
1234 for(
int j = 0; j <= i; j++)
1237 hMatrix->SetBinContent(i+1, j+1, Corr);
1238 hMatrix->SetBinContent(j+1, i+1, Corr);
1258 for (YAML::Node param : copyNode[
"Systematics"])
1265 std::ofstream fout(
"Modified_Matrix.yaml");
1277 std::string SampleNameCopy = SampleName;
1278 std::transform(SampleNameCopy.begin(), SampleNameCopy.end(), SampleNameCopy.begin(), ::tolower);
1281 if (SampleNameCopy.find(
'*') != std::string::npos) {
1282 MACH3LOG_ERROR(
"Wildcards ('*') are not supported in sample name: '{}'", SampleName);
1286 bool Applies =
false;
1288 for (
size_t i = 0; i <
_fSampleNames[SystIndex].size(); i++) {
1291 std::transform(pattern.begin(), pattern.end(), pattern.begin(), ::tolower);
1294 std::string regexPattern =
"^" + std::regex_replace(pattern, std::regex(
"\\*"),
".*") +
"$";
1296 std::regex regex(regexPattern);
1297 if (std::regex_match(SampleNameCopy, regex)) {
1301 }
catch (
const std::regex_error& e) {
1313 if(
Tunes ==
nullptr) {
1314 MACH3LOG_ERROR(
"Tunes haven't been initialised, which are being loaded from YAML, have you used some deprecated constructor");
1317 auto Values =
Tunes->GetTune(TuneName);
#define _noexcept_
KS: noexcept can help with performance but is terrible for debugging, this is meant to help easy way ...
#define MACH3LOG_CRITICAL
Type Get(const YAML::Node &node, const std::string File, const int Line)
Get content of config file.
#define M3OpenConfig(filename)
Macro to simplify calling LoadYaml with file and line info.
#define GetBounds(filename)
Custom exception class for MaCh3 errors.
std::vector< int > CircularBoundsIndex
Indices of parameters with circular bounds.
void ToggleFixParameter(const int i)
fix parameter at prior values
bool use_adaptive
Are we using AMCMC?
virtual void ProposeStep()
Generate a new proposed state.
double * randParams
Random number taken from gaussian around prior error used for corr_throw.
double ** throwMatrixCholDecomp
Throw matrix that is being used in the fit, much faster as TMatrixDSym cache miss.
std::unique_ptr< adaptive_mcmc::AdaptiveMCMCHandler > AdaptiveHandler
Struct containing information about adaption.
virtual ~ParameterHandlerBase()
Destructor.
TMatrixDSym * invCovMatrix
The inverse covariance matrix.
std::vector< int > FlipParameterIndex
Indices of parameters with flip symmetry.
bool AppliesToSample(const int SystIndex, const std::string &SampleName) const
Check if parameter is affecting given sample name.
void AcceptStep() _noexcept_
Accepted this step.
void ThrowParProp(const double mag=1.)
Throw the proposed parameter by mag sigma. Should really just have the user specify this throw by hav...
std::unique_ptr< ParameterTunes > Tunes
Struct containing information about adaption.
void InitialiseAdaption(const YAML::Node &adapt_manager)
Initialise adaptive MCMC.
TMatrixDSym * throwMatrix
Matrix which we use for step proposal before Cholesky decomposition (not actually used for step propo...
void ThrowParCurr(const double mag=1.)
Helper function to throw the current parameter by mag sigma. Can study bias in MCMC with this; put di...
double _fGlobalStepScale
Global step scale applied to all params in this class.
void ReserveMemory(const int size)
Initialise vectors with parameters information.
std::vector< std::string > _fFancyNames
Fancy name for example rather than xsec_0 it is MAQE, useful for human reading.
bool doSpecialStepProposal
Check if any of special step proposal were enabled.
std::vector< bool > _fFlatPrior
Whether to apply flat prior or not.
void ThrowParameters()
Throw the parameters according to the covariance matrix. This shouldn't be used in MCMC code ase it c...
void Init(const std::string &name, const std::string &file)
Initialisation of the class using matrix from root file.
std::string matrixName
Name of cov matrix.
void MakeClosestPosDef(TMatrixDSym *cov)
HW: Finds closest possible positive definite matrix in Frobenius Norm ||.||_frob Where ||X||_frob=sqr...
void RandomConfiguration()
Randomly throw the parameters in their 1 sigma range.
TMatrixD * throwMatrix_CholDecomp
Matrix which we use for step proposal after Cholesky decomposition.
std::vector< double > FlipParameterPoint
Central points around which parameters are flipped.
void UpdateAdaptiveCovariance()
Method to update adaptive MCMC .
std::vector< double > _fError
Prior error on the parameter.
void PrintNominal() const
Print prior value for every parameter.
YAML::Node _fYAMLDoc
Stores config describing systematics.
bool IsParameterFixed(const int i) const
Is parameter fixed or not.
void UpdateThrowMatrix(TMatrixDSym *cov)
void CircularParBounds(const int i, const double LowBound, const double UpBound)
HW :: This method is a tad hacky but modular arithmetic gives me a headache.
void SaveUpdatedMatrixConfig()
KS: After step scale, prefit etc. value were modified save this modified config.
void ResetIndivStepScale()
Adaptive Step Tuning Stuff.
std::unique_ptr< PCAHandler > PCAObj
Struct containing information about PCA.
int _fNumPar
Number of systematic parameters.
double CalcLikelihood() const _noexcept_
Calc penalty term based on inverted covariance matrix.
void FlipParameterValue(const int index, const double FlipPoint)
KS: Flip parameter around given value, for example mass ordering around 0.
void ConstructPCA(const double eigen_threshold, int FirstPCAdpar, int LastPCAdpar)
CW: Calculate eigen values, prepare transition matrices and remove param based on defined threshold.
std::vector< double > _fLowBound
Lowest physical bound, parameter will not be able to go beyond it.
std::vector< double > _fCurrVal
Current value of the parameter.
void PrintNominalCurrProp() const
Print prior, current and proposed value for each parameter.
ParameterHandlerBase(const std::vector< std::string > &YAMLFile, std::string name, double threshold=-1, int FirstPCAdpar=-999, int LastPCAdpar=-999)
ETA - constructor for a YAML file.
std::vector< std::vector< double > > InvertCovMatrix
KS: Same as above but much faster as TMatrixDSym cache miss.
TMatrixDSym * covMatrix
The covariance matrix.
std::vector< double > _fPreFitValue
Parameter value dictated by the prior model. Based on it penalty term is calculated.
void Randomize() _noexcept_
"Randomize" the parameters in the covariance class for the proposed step. Used the proposal kernel an...
void PrintIndivStepScale() const
Print step scale for each parameter.
std::vector< std::string > _fNames
ETA _fNames is set automatically in the covariance class to be something like xsec_i,...
std::vector< std::pair< double, double > > CircularBoundsValues
Circular bounds for each parameter (lower, upper)
void EnableSpecialProposal(const YAML::Node ¶m, const int Index)
Enable special proposal.
double * corr_throw
Result of multiplication of Cholesky matrix and randParams.
std::vector< double > _fUpBound
Upper physical bound, parameter will not be able to go beyond it.
bool pca
perform PCA or not
std::vector< double > _fIndivStepScale
Individual step scale used by MCMC algorithm.
std::vector< std::unique_ptr< TRandom3 > > random_number
KS: Set Random numbers for each thread so each thread has different seed.
void MakePosDef(TMatrixDSym *cov=nullptr)
Make matrix positive definite by adding small values to diagonal, necessary for inverting matrix.
void SpecialStepProposal()
Perform Special Step Proposal.
int PrintLength
KS: This is used when printing parameters, sometimes we have super long parameters name,...
void CorrelateSteps() _noexcept_
Use Cholesky throw matrix for better step proposal.
std::vector< double > _fPropVal
Proposed value of the parameter.
std::vector< std::vector< std::string > > _fSampleNames
Tells to which samples object param should be applied.
int CheckBounds() const _noexcept_
Check if parameters were proposed outside physical boundary.
void ToggleFixAllParameters()
fix parameters at prior values
std::string GetParName(const int i) const
Get name of parameter.
std::vector< double > GetProposed() const
Get vector of all proposed parameter values.
virtual double GetLikelihood()
Return CalcLikelihood if some params were thrown out of boundary return LARGE_LOGL
int GetParIndex(const std::string &name) const
Get index based on name.
std::string GetParFancyName(const int i) const
Get fancy name of the Parameter.
TH2D * GetCorrelationMatrix()
KS: Convert covariance matrix to correlation matrix and return TH2D which can be used for fancy plott...
std::string GetName() const
Get name of covariance.
double GetParInit(const int i) const
Get prior parameter value.
double GetDiagonalError(const int i) const
Get diagonal error for ith parameter.
void SetName(const std::string &name)
Set matrix name.
void SetCovMatrix(TMatrixDSym *cov)
Set covariance matrix.
void SetFlatPrior(const int i, const bool eL)
Set if parameter should have flat prior or not.
void SetStepScale(const double scale)
Set global step scale for covariance object.
void SetThrowMatrix(TMatrixDSym *cov)
Use new throw matrix, used in adaptive MCMC.
void SetParameters(const std::vector< double > &pars={})
Set parameter values using vector, it has to have same size as covariance class.
void SetBranches(TTree &tree, const bool SaveProposal=false)
set branches for output file
void SetParCurrProp(const int i, const double val)
Set current parameter value.
void SetSingleParameter(const int parNo, const double parVal)
Set value of single param to a given value.
void SetPar(const int i, const double val)
Set all the covariance matrix parameters to a user-defined value.
void SetIndivStepScale(const int ParameterIndex, const double StepScale)
DB Function to set fIndivStepScale from a vector (Can be used from execs and inside covariance constr...
void SetTune(const std::string &TuneName)
KS: Set proposed parameter values vector to be base on tune values, for example set proposed values t...
void MatrixVectorMulti(double *_restrict_ VecMulti, double **_restrict_ matrix, const double *_restrict_ vector, const int n)
KS: Custom function to perform multiplication of matrix and vector with multithreading.
int GetThreadIndex()
thread index inside parallel loop
double MatrixVectorMultiSingle(double **_restrict_ matrix, const double *_restrict_ vector, const int Length, const int i)
KS: Custom function to perform multiplication of matrix and single element which is thread safe.
static constexpr const double _LARGE_LOGL_
Large Likelihood is used it parameter go out of physical boundary, this indicates in MCMC that such s...
int GetNThreads()
number of threads which we need for example for TRandom3
static constexpr const int _BAD_INT_
Default value used for int initialisation.
std::string FormatDouble(const double value, const int precision)
Convert double into string for precision, useful for playing with yaml if you don't want to have in c...