![]() |
MaCh3
2.6.1
Reference Guide
|
Module for extracting specific penalty terms from MCMC chains. More...
#include <CLI/Modules/GetPenaltyTermModule.hpp>
Public Member Functions | |
| virtual | ~GetPenaltyTermModule () |
| Destructor. More... | |
| MaCh3ArgumentParser * | get_parser () override |
| Get the argument parser for this module. More... | |
| int | Run () override |
| Execute the penalty term extraction. More... | |
Public Member Functions inherited from M3::PluginBase | |
| virtual | ~PluginBase ()=default |
Public Member Functions inherited from M3::IPlugin | |
| virtual | ~IPlugin ()=default |
Private Member Functions | |
| void | ReadCovFile (const std::string &inputFile, std::vector< double > &Prior, std::vector< bool > &isFlat, std::vector< std::string > &ParamNames, std::vector< std::vector< double >> &invCovMatrix, int &nParams) |
| Read covariance matrix and parameter information from file. More... | |
| void | LoadSettings (YAML::Node &Settings, std::vector< std::string > &SetsNames, std::vector< std::string > &FancyTitle, std::vector< std::vector< bool >> &isRelevantParam, const std::vector< std::string > &ParamNames, const int nParams) |
| Load penalty term sets from YAML configuration. More... | |
| void | GetPenaltyTerm (const std::string &inputFile, const std::string &configFile) |
| Calculate and plot penalty terms for parameter sets. More... | |
Additional Inherited Members | |
Protected Attributes inherited from M3::PluginBase | |
| std::unique_ptr< MaCh3ArgumentParser > | m_parser |
| Argument parser for this plugin. More... | |
Module for extracting specific penalty terms from MCMC chains.
This module retrieves penalty terms from flux and cross-section systematic chains, since these systematic uncertainties are handled separately and the penalty term cannot be taken directly from the chain.
Definition at line 25 of file GetPenaltyTermModule.hpp.
|
virtualdefault |
Destructor.
|
overridevirtual |
Get the argument parser for this module.
Implements M3::IPlugin.
Definition at line 32 of file GetPenaltyTermModule.cpp.
|
private |
Calculate and plot penalty terms for parameter sets.
Calculate and plot penalty terms for each parameter set.
| inputFile | Path to the MCMC chain ROOT file |
| configFile | Path to the YAML configuration file |
Main function that reads the covariance, loads configuration, iterates through MCMC steps, and calculates penalty terms for each defined set. Results are saved to ROOT file and PDF plots.
| inputFile | Path to the MCMC chain ROOT file |
| configFile | Path to the YAML configuration file |
Definition at line 242 of file GetPenaltyTermModule.cpp.
|
private |
Load penalty term sets from YAML configuration.
Load penalty term set definitions from YAML configuration.
| Settings | YAML configuration node |
| SetsNames | Vector to store set names |
| FancyTitle | Vector to store fancy titles for each set |
| isRelevantParam | 2D vector indicating which parameters belong to each set |
| ParamNames | Vector of all parameter names |
| nParams | Total number of parameters |
Parses the configuration to determine which parameters belong to each penalty term set, based on either inclusion or exclusion patterns.
| Settings | YAML configuration node |
| SetsNames | Vector to be filled with set names |
| FancyTitle | Vector to be filled with fancy titles for plotting |
| isRelevantParam | 2D vector to be filled with parameter relevance flags |
| ParamNames | Vector of all parameter names from the covariance |
| nParams | Total number of parameters |
Definition at line 163 of file GetPenaltyTermModule.cpp.
|
private |
Read covariance matrix and parameter information from file.
Read covariance matrix and prior information from ROOT file.
| inputFile | Path to the ROOT file containing the covariance |
| Prior | Vector to store prior parameter values |
| isFlat | Vector to store flat prior flags |
| ParamNames | Vector to store parameter names |
| invCovMatrix | 2D vector to store inverted covariance matrix |
| nParams | Reference to store the number of parameters |
Loads the covariance matrix, inverts it, and extracts parameter priors and flat prior flags from the MCMC output file.
| inputFile | Path to the ROOT file containing MCMC output |
| Prior | Vector to be filled with prior parameter values |
| isFlat | Vector to be filled with flat prior flags |
| ParamNames | Vector to be filled with parameter names |
| invCovMatrix | 2D vector to be filled with inverted covariance matrix |
| nParams | Reference to store the number of parameters |
Definition at line 68 of file GetPenaltyTermModule.cpp.
|
overridevirtual |
Execute the penalty term extraction.
Implements M3::IPlugin.
Definition at line 46 of file GetPenaltyTermModule.cpp.