![]() |
MaCh3 2.2.1
Reference Guide
|
Typedefs | |
using | float_t = double |
using | int_t = int |
using | uint_t = unsigned |
Enumerations | |
enum | kInfCrit { kBIC , kDIC , kWAIC , kInfCrits } |
KS: Different Information Criterion tests mostly based Gelman paper. More... | |
Functions | |
template<typename T > | |
constexpr T | fmaf_t (T x, T y, T z) |
Function template for fused multiply-add. | |
int | GetNThreads () |
number of threads which we need for example for TRandom3 | |
int | GetThreadIndex () |
thread index inside parallel loop | |
TFile * | Open (const std::string &Name, const std::string &Type, const std::string &File, const int Line) |
Opens a ROOT file with the given name and mode. | |
template<typename ObjectType > | |
std::unique_ptr< ObjectType > | Clone (const ObjectType *obj, const std::string &name="") |
KS: Creates a copy of a ROOT-like object and wraps it in a smart pointer. | |
double * | MatrixMult (double *A, double *B, int n) |
CW: Multi-threaded matrix multiplication. | |
double ** | MatrixMult (double **A, double **B, int n) |
CW: Multi-threaded matrix multiplication. | |
TMatrixD | MatrixMult (TMatrixD A, TMatrixD B) |
CW: Multi-threaded matrix multiplication. | |
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. | |
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. | |
void | FixSampleNamesQuotes (std::string &yamlStr) |
KS: Yaml emitter has problem and drops "", if you have special signs in you like * then there is problem. This bit hacky code adds these "". | |
void | AddTuneValues (YAML::Node &root, const std::vector< double > &Values, const std::string &Tune, const std::vector< std::string > &FancyNames={}) |
KS: Add Tune values to YAML covariance matrix. | |
void | MakeCorrelationMatrix (YAML::Node &root, const std::vector< double > &Values, const std::vector< double > &Errors, const std::vector< std::vector< double > > &Correlation, const std::vector< std::string > &FancyNames={}) |
KS: Replace correlation matrix and tune values in YAML covariance matrix. | |
TMacro * | GetConfigMacroFromChain (TDirectory *CovarianceFolder) |
KS: We store configuration macros inside the chain. In the past, multiple configs were stored, which required error-prone hardcoding like "Config_xsec_cov". Therefore, this code maintains backward compatibility by checking the number of macros present and using a hardcoded name only if necessary. | |
TMatrixDSym * | GetCovMatrixFromChain (TDirectory *TempFile) |
KS: Retrieve the cross-section covariance matrix from the given TDirectory. Historically, multiple covariance matrices could be stored, requiring fragile hardcoded paths like "CovarianceFolder/xsec_cov". This function maintains backward compatibility by: | |
Variables | |
static constexpr const double | _BAD_DOUBLE_ = -999.99 |
Default value used for double initialisation. | |
static constexpr const int | _BAD_INT_ = -999 |
Default value used for int initialisation. | |
static constexpr const double | _DEFAULT_RETURN_VAL_ = -999999.123456 |
static constexpr const double | Unity_D = 1. |
Some commonly used variables to which we set pointers to. | |
static constexpr const float | Unity_F = 1. |
static constexpr const float_t | Unity = Unity_D |
static constexpr const double | Zero_D = 0. |
static constexpr const float | Zero_F = 0. |
static constexpr const float_t | Zero = Zero_D |
static constexpr const double | KinematicLowBound = std::numeric_limits<double>::lowest() |
When parameter has no bound this serves as it. Lowest possible value the system. | |
static constexpr const double | KinematicUpBound = std::numeric_limits<double>::max() |
When parameter has no bound this serves as it. Highest possible value the system. | |
static constexpr const double | _LARGE_LOGL_ = 1234567890.0 |
Large Likelihood is used it parameter go out of physical boundary, this indicates in MCMC that such step should be removed. | |
static constexpr const double | _LOW_MC_BOUND_ = .00001 |
MC prediction lower bound in bin to identify problematic binning definitions and handle LogL calculation. | |
static constexpr const double | DefSplineKnotUpBound = 9999 |
Default value for spline knot capping, default mean not capping is being applied. | |
static constexpr const double | DefSplineKnotLowBound = -9999 |
Default value for spline knot capping, default mean not capping is being applied. | |
Run low or high memory versions of structs N.B. for 64 bit systems sizeof(float) == sizeof(double) so not a huge effect
using M3::float_t = typedef double |
using M3::uint_t = typedef unsigned |
enum M3::kInfCrit |
KS: Different Information Criterion tests mostly based Gelman paper.
Enumerator | |
---|---|
kBIC | Bayesian Information Criterion. |
kDIC | Deviance Information Criterion. |
kWAIC | Watanabe-Akaike information criterion. |
kInfCrits | This only enumerates. |
Definition at line 10 of file SampleSummary.h.
|
inline |
KS: Add Tune values to YAML covariance matrix.
Definition at line 181 of file ParameterHandlerUtils.h.
std::unique_ptr< ObjectType > M3::Clone | ( | const ObjectType * | obj, |
const std::string & | name = "" |
||
) |
KS: Creates a copy of a ROOT-like object and wraps it in a smart pointer.
ObjectType | The type of the object to clone for example TH1D or TH2Poly. |
obj | Pointer to the object to clone. |
Definition at line 138 of file HistogramUtils.h.
|
inline |
KS: Yaml emitter has problem and drops "", if you have special signs in you like * then there is problem. This bit hacky code adds these "".
Definition at line 150 of file ParameterHandlerUtils.h.
|
constexpr |
|
inline |
KS: We store configuration macros inside the chain. In the past, multiple configs were stored, which required error-prone hardcoding like "Config_xsec_cov". Therefore, this code maintains backward compatibility by checking the number of macros present and using a hardcoded name only if necessary.
Definition at line 366 of file ParameterHandlerUtils.h.
|
inline |
KS: Retrieve the cross-section covariance matrix from the given TDirectory. Historically, multiple covariance matrices could be stored, requiring fragile hardcoded paths like "CovarianceFolder/xsec_cov". This function maintains backward compatibility by:
Definition at line 407 of file ParameterHandlerUtils.h.
int M3::GetNThreads | ( | ) |
number of threads which we need for example for TRandom3
Definition at line 322 of file Monitor.cpp.
|
inline |
|
inline |
KS: Replace correlation matrix and tune values in YAML covariance matrix.
Definition at line 256 of file ParameterHandlerUtils.h.
|
inline |
CW: Multi-threaded matrix multiplication.
Definition at line 62 of file ParameterHandlerUtils.h.
|
inline |
CW: Multi-threaded matrix multiplication.
Definition at line 30 of file ParameterHandlerUtils.h.
|
inline |
CW: Multi-threaded matrix multiplication.
Definition at line 98 of file ParameterHandlerUtils.h.
|
inline |
KS: Custom function to perform multiplication of matrix and vector with multithreading.
VecMulti | Output Vector, VecMulti = matrix x vector |
matrix | This matrix is used for multiplication VecMulti = matrix x vector |
VecMulti | This vector is used for multiplication VecMulti = matrix x vector |
n | this is size of matrix and vector, we assume matrix is symmetric |
Definition at line 112 of file ParameterHandlerUtils.h.
|
inline |
KS: Custom function to perform multiplication of matrix and single element which is thread safe.
matrix | This matrix is used for multiplication VecMulti = matrix x vector |
Length | this is size of matrix and vector, we assume matrix is symmetric |
i | Element of matrix that we want to multiply |
Definition at line 136 of file ParameterHandlerUtils.h.
TFile * M3::Open | ( | const std::string & | Name, |
const std::string & | Type, | ||
const std::string & | File, | ||
const int | Line | ||
) |
Opens a ROOT file with the given name and mode.
This function wraps ROOT’s TFile
constructor and checks whether the file was opened successfully and give some useful debugging information
Name | The name or path of the file to open. |
Type | The file open mode (e.g., "READ", "RECREATE", "UPDATE"). |
Definition at line 610 of file HistogramUtils.cpp.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |