![]() |
MaCh3 2.2.1
Reference Guide
|
Struct which wraps around the actual input file and also holds general information, and data from the file to be used by other classes. More...
#include <Plotting/plottingUtils/inputManager.h>
Public Member Functions | |
InputFile (const std::string &fName) | |
Create InputFile instance based on a specified file. | |
InputFile (const InputFile &)=delete | |
InputFile (InputFile &&)=default | |
~InputFile () | |
Destructor. | |
void | Close () |
Close out the underlying root file. | |
void | Summarise () const |
Print out a small summary of what is contained in the file. | |
void | Dump () const |
Print out a more detailed summary of what is contained in the file. | |
Public Attributes | |
MCMCProcessor * | mcmcProc = nullptr |
ptr to an MCMCProcessor instance to be used if this is a MaCh3 input file | |
TTree * | posteriorTree = nullptr |
std::shared_ptr< TFile > | file |
Pointer to the underlying file for this InputFile instance. | |
std::string | fileName |
The location of the underlying file. | |
std::string | fitter |
Which fitter this file came from, detected by InputManager::fillFileInfo(). | |
bool | hasLLHScans |
Whether or not this file contains any log likelihood scans. | |
std::vector< std::string > | availableParams_LLH |
The parameters that this file contains likelihood scans for. | |
std::unordered_map< std::string, bool > | hasLLHScans_map |
std::unordered_map< std::string, std::unordered_map< std::string, std::shared_ptr< TGraph > > > | LLHScans_map |
std::unordered_map< std::string, std::unordered_map< std::string, bool > > | availableParams_map_LLH |
bool | hasLLHScansBySample |
std::vector< std::string > | availableSamples_LLH |
std::unordered_map< std::string, std::unordered_map< std::string, std::shared_ptr< TGraph > > > | LLHScansBySample_map |
std::unordered_map< std::string, std::unordered_map< std::string, bool > > | availableParams_map_LLHBySample |
bool | hasPostFitErrors |
Whether or not this file contains any processed post fit errors. | |
std::vector< std::string > | availableParams_postFitErrors |
The parameters that this file has post fit errors for. | |
std::unordered_map< std::string, std::unordered_map< std::string, double > > | postFitErrors |
std::unordered_map< std::string, std::unordered_map< std::string, double > > | postFitValues |
std::string | defaultErrorType |
bool | has1dPosteriors |
Whether or not the file has processed 1d posteriors. | |
bool | hasMCMCchain |
Whether or not the file has unprocessed MCMC chain steps. | |
int | nMCMCentries |
The number of steps in the MCMC chain. | |
std::unordered_map< std::string, bool > | availableParams_map_MCMCchain |
whether or not specific parameters exist in the MCMC posterior chain | |
std::unordered_map< std::string, bool > | availableParams_map_1dPosteriors |
std::vector< std::string > | availableParams_1dPosteriors |
std::vector< std::string > | availableParams_MCMCchain |
std::unordered_map< std::string, double * > | MCMCstepParamsMap |
std::unordered_map< std::string, int > | MCMCstepTreeIndicesMap |
std::unordered_map< std::string, std::shared_ptr< TGraph > > | posteriors1d_map |
bool | hasSigmaVars |
Whether or not this file contains Sigma variations. | |
Struct which wraps around the actual input file and also holds general information, and data from the file to be used by other classes.
This is just a little guy thats intended to be just a plain old data type which simply holds and organises information and data read from the underlying input file, just some methods to inspect the contents of the object. As such it does not implement methods to manipulate such data, which is all done via the InputManager() class. Reason for this object is to try to smooth over the cracks that come from very different file structures used by different fitters and provide a common format to be used for plot making. Intended use of this objects is only via InputManager which contains the methods to fill and manipulate it.
Definition at line 35 of file inputManager.h.
|
inline |
Create InputFile instance based on a specified file.
fName | The name of the file to open. |
Constructor which opens the specified file and sets default values for information parameters. Currently this assumes the specified file is a root file, and opens it as a TFile. In future it would be nice to extend this to be able to read different types of files, perhaps also moving the opening of the file to a different place to keep this struct nice and simple, perhaps into the InputManager.
Definition at line 44 of file inputManager.h.
|
delete |
|
default |
|
inline |
Destructor.
Definition at line 68 of file inputManager.h.
|
inline |
Close out the underlying root file.
Should only be done once this InputFile is done with, should only really ever be done by the InputManager that holds this object
Definition at line 75 of file inputManager.h.
|
inline |
Print out a more detailed summary of what is contained in the file.
Definition at line 93 of file inputManager.h.
|
inline |
Print out a small summary of what is contained in the file.
Definition at line 83 of file inputManager.h.
std::vector<std::string> MaCh3Plotting::InputFile::availableParams_1dPosteriors |
Definition at line 179 of file inputManager.h.
std::vector<std::string> MaCh3Plotting::InputFile::availableParams_LLH |
The parameters that this file contains likelihood scans for.
Definition at line 126 of file inputManager.h.
std::unordered_map<std::string, bool> MaCh3Plotting::InputFile::availableParams_map_1dPosteriors |
Definition at line 177 of file inputManager.h.
std::unordered_map<std::string, std::unordered_map<std::string, bool> > MaCh3Plotting::InputFile::availableParams_map_LLH |
Whether this file has LLH scans of a particular type for a particular parameter, organised as availableParams_map_LLH.at(LLHType).at(parameter)
Definition at line 134 of file inputManager.h.
std::unordered_map<std::string, std::unordered_map<std::string, bool> > MaCh3Plotting::InputFile::availableParams_map_LLHBySample |
Whether this file has LLH scans of a particular type for a particular parameter, organised as availableParams_map_LLH.at(sample).at(parameter)
Definition at line 150 of file inputManager.h.
std::unordered_map<std::string, bool> MaCh3Plotting::InputFile::availableParams_map_MCMCchain |
whether or not specific parameters exist in the MCMC posterior chain
Definition at line 176 of file inputManager.h.
std::vector<std::string> MaCh3Plotting::InputFile::availableParams_MCMCchain |
Definition at line 180 of file inputManager.h.
std::vector<std::string> MaCh3Plotting::InputFile::availableParams_postFitErrors |
The parameters that this file has post fit errors for.
Definition at line 157 of file inputManager.h.
std::vector<std::string> MaCh3Plotting::InputFile::availableSamples_LLH |
The samples that this file contains individual likelihood scans for.
Definition at line 144 of file inputManager.h.
std::string MaCh3Plotting::InputFile::defaultErrorType |
Definition at line 164 of file inputManager.h.
std::shared_ptr<TFile> MaCh3Plotting::InputFile::file |
Pointer to the underlying file for this InputFile instance.
Definition at line 111 of file inputManager.h.
std::string MaCh3Plotting::InputFile::fileName |
The location of the underlying file.
Definition at line 112 of file inputManager.h.
std::string MaCh3Plotting::InputFile::fitter |
Which fitter this file came from, detected by InputManager::fillFileInfo().
Definition at line 114 of file inputManager.h.
bool MaCh3Plotting::InputFile::has1dPosteriors |
Whether or not the file has processed 1d posteriors.
Definition at line 168 of file inputManager.h.
bool MaCh3Plotting::InputFile::hasLLHScans |
Whether or not this file contains any log likelihood scans.
I think it would be nice to store all the InputFile data in some non root, maybe custom c++ types, and have separate reader classes for potential different input file formats that can convert to these types.
Currently all fitters use root but maybe some wonderful day in the far far future this wont be the case. Doing things this way we could maintain the possible future option of moving away from root???
Definition at line 124 of file inputManager.h.
std::unordered_map<std::string, bool> MaCh3Plotting::InputFile::hasLLHScans_map |
Whether this file contains specific types of likelihood scans, e.g. hasLLHScans_map.at("prior").
Definition at line 128 of file inputManager.h.
bool MaCh3Plotting::InputFile::hasLLHScansBySample |
Whether or not this file contains log likelihood scans broken down per sample.
Definition at line 142 of file inputManager.h.
bool MaCh3Plotting::InputFile::hasMCMCchain |
Whether or not the file has unprocessed MCMC chain steps.
Definition at line 170 of file inputManager.h.
bool MaCh3Plotting::InputFile::hasPostFitErrors |
Whether or not this file contains any processed post fit errors.
Definition at line 155 of file inputManager.h.
bool MaCh3Plotting::InputFile::hasSigmaVars |
Whether or not this file contains Sigma variations.
Definition at line 188 of file inputManager.h.
std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<TGraph> > > MaCh3Plotting::InputFile::LLHScans_map |
The actual graphs of the likelihood scans, organised as LLHScans_map.at(LLHType).at(parameter).
Definition at line 131 of file inputManager.h.
std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<TGraph> > > MaCh3Plotting::InputFile::LLHScansBySample_map |
The actual graphs of the likelihood scans, organised as LLHScans_map.at(sample).at(parameter).
Definition at line 147 of file inputManager.h.
MCMCProcessor* MaCh3Plotting::InputFile::mcmcProc = nullptr |
ptr to an MCMCProcessor instance to be used if this is a MaCh3 input file
Definition at line 108 of file inputManager.h.
std::unordered_map<std::string, double*> MaCh3Plotting::InputFile::MCMCstepParamsMap |
Definition at line 182 of file inputManager.h.
std::unordered_map<std::string, int> MaCh3Plotting::InputFile::MCMCstepTreeIndicesMap |
Definition at line 183 of file inputManager.h.
int MaCh3Plotting::InputFile::nMCMCentries |
The number of steps in the MCMC chain.
Definition at line 173 of file inputManager.h.
std::unordered_map<std::string, std::shared_ptr<TGraph> > MaCh3Plotting::InputFile::posteriors1d_map |
Definition at line 185 of file inputManager.h.
TTree* MaCh3Plotting::InputFile::posteriorTree = nullptr |
Definition at line 109 of file inputManager.h.
std::unordered_map<std::string, std::unordered_map<std::string, double> > MaCh3Plotting::InputFile::postFitErrors |
The actual errors on the parameters, organised as postFitErrors.at(errorType).at(parameter).
Definition at line 159 of file inputManager.h.
std::unordered_map<std::string, std::unordered_map<std::string, double> > MaCh3Plotting::InputFile::postFitValues |
The post fit values of the parameters, organised as postFitValues.at(errorType).at(parameter).
Definition at line 162 of file inputManager.h.