![]() |
MaCh3
2.6.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 <Utils/Plotting/InputManager.h>
Public Member Functions | |
| InputFile (const std::string &fName) | |
| Create InputFile instance based on a specified file. More... | |
| InputFile (const InputFile &)=delete | |
| InputFile (InputFile &&)=default | |
| ~InputFile () | |
| Destructor. More... | |
| void | Close () |
| Close out the underlying root file. More... | |
| void | Summarise () const |
| Print out a small summary of what is contained in the file. More... | |
| void | Dump () const |
| Print out a more detailed summary of what is contained in the file. More... | |
Public Attributes | |
| std::unique_ptr< MCMCProcessor > | mcmcProc |
| ptr to an MCMCProcessor instance to be used if this is a MaCh3 input file More... | |
| TTree * | posteriorTree = nullptr |
| std::shared_ptr< TFile > | file |
| Pointer to the underlying file for this InputFile instance. More... | |
| std::string | fileName |
| The location of the underlying file. More... | |
| std::string | fitter |
| Which fitter this file came from, detected by InputManager::fillFileInfo(). More... | |
| bool | hasLLHScans |
| Whether or not this file contains any log likelihood scans. More... | |
| std::vector< std::string > | availableParams_LLH |
| The parameters that this file contains likelihood scans for. More... | |
| 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. More... | |
| std::vector< std::string > | availableParams_postFitErrors |
| The parameters that this file has post fit errors for. More... | |
| 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. More... | |
| bool | hasMCMCchain |
| Whether or not the file has unprocessed MCMC chain steps. More... | |
| int | nMCMCentries |
| The number of steps in the MCMC chain. More... | |
| std::unordered_map< std::string, bool > | availableParams_map_MCMCchain |
| whether or not specific parameters exist in the MCMC posterior chain More... | |
| 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. More... | |
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 36 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 45 of file InputManager.h.
|
delete |
|
default |
|
inline |
Destructor.
Definition at line 73 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 80 of file InputManager.h.
|
inline |
Print out a more detailed summary of what is contained in the file.
Definition at line 98 of file InputManager.h.
|
inline |
Print out a small summary of what is contained in the file.
Definition at line 88 of file InputManager.h.
| std::vector<std::string> M3::Plotting::InputFile::availableParams_1dPosteriors |
Definition at line 184 of file InputManager.h.
| std::vector<std::string> M3::Plotting::InputFile::availableParams_LLH |
The parameters that this file contains likelihood scans for.
Definition at line 131 of file InputManager.h.
| std::unordered_map<std::string, bool> M3::Plotting::InputFile::availableParams_map_1dPosteriors |
Definition at line 182 of file InputManager.h.
| std::unordered_map<std::string, std::unordered_map<std::string, bool> > M3::Plotting::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 139 of file InputManager.h.
| std::unordered_map<std::string, std::unordered_map<std::string, bool> > M3::Plotting::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 155 of file InputManager.h.
| std::unordered_map<std::string, bool> M3::Plotting::InputFile::availableParams_map_MCMCchain |
whether or not specific parameters exist in the MCMC posterior chain
Definition at line 181 of file InputManager.h.
| std::vector<std::string> M3::Plotting::InputFile::availableParams_MCMCchain |
Definition at line 185 of file InputManager.h.
| std::vector<std::string> M3::Plotting::InputFile::availableParams_postFitErrors |
The parameters that this file has post fit errors for.
Definition at line 162 of file InputManager.h.
| std::vector<std::string> M3::Plotting::InputFile::availableSamples_LLH |
The samples that this file contains individual likelihood scans for.
Definition at line 149 of file InputManager.h.
| std::string M3::Plotting::InputFile::defaultErrorType |
Definition at line 169 of file InputManager.h.
| std::shared_ptr<TFile> M3::Plotting::InputFile::file |
Pointer to the underlying file for this InputFile instance.
Definition at line 116 of file InputManager.h.
| std::string M3::Plotting::InputFile::fileName |
The location of the underlying file.
Definition at line 117 of file InputManager.h.
| std::string M3::Plotting::InputFile::fitter |
Which fitter this file came from, detected by InputManager::fillFileInfo().
Definition at line 119 of file InputManager.h.
| bool M3::Plotting::InputFile::has1dPosteriors |
Whether or not the file has processed 1d posteriors.
Definition at line 173 of file InputManager.h.
| bool M3::Plotting::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 129 of file InputManager.h.
| std::unordered_map<std::string, bool> M3::Plotting::InputFile::hasLLHScans_map |
Whether this file contains specific types of likelihood scans, e.g. hasLLHScans_map.at("prior").
Definition at line 133 of file InputManager.h.
| bool M3::Plotting::InputFile::hasLLHScansBySample |
Whether or not this file contains log likelihood scans broken down per sample.
Definition at line 147 of file InputManager.h.
| bool M3::Plotting::InputFile::hasMCMCchain |
Whether or not the file has unprocessed MCMC chain steps.
Definition at line 175 of file InputManager.h.
| bool M3::Plotting::InputFile::hasPostFitErrors |
Whether or not this file contains any processed post fit errors.
Definition at line 160 of file InputManager.h.
| bool M3::Plotting::InputFile::hasSigmaVars |
Whether or not this file contains Sigma variations.
Definition at line 193 of file InputManager.h.
| std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<TGraph> > > M3::Plotting::InputFile::LLHScans_map |
The actual graphs of the likelihood scans, organised as LLHScans_map.at(LLHType).at(parameter).
Definition at line 136 of file InputManager.h.
| std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<TGraph> > > M3::Plotting::InputFile::LLHScansBySample_map |
The actual graphs of the likelihood scans, organised as LLHScans_map.at(sample).at(parameter).
Definition at line 152 of file InputManager.h.
| std::unique_ptr<MCMCProcessor> M3::Plotting::InputFile::mcmcProc |
ptr to an MCMCProcessor instance to be used if this is a MaCh3 input file
Definition at line 113 of file InputManager.h.
| std::unordered_map<std::string, double*> M3::Plotting::InputFile::MCMCstepParamsMap |
Definition at line 187 of file InputManager.h.
| std::unordered_map<std::string, int> M3::Plotting::InputFile::MCMCstepTreeIndicesMap |
Definition at line 188 of file InputManager.h.
| int M3::Plotting::InputFile::nMCMCentries |
The number of steps in the MCMC chain.
Definition at line 178 of file InputManager.h.
| std::unordered_map<std::string, std::shared_ptr<TGraph> > M3::Plotting::InputFile::posteriors1d_map |
Definition at line 190 of file InputManager.h.
| TTree* M3::Plotting::InputFile::posteriorTree = nullptr |
Definition at line 114 of file InputManager.h.
| std::unordered_map<std::string, std::unordered_map<std::string, double> > M3::Plotting::InputFile::postFitErrors |
The actual errors on the parameters, organised as postFitErrors.at(errorType).at(parameter).
Definition at line 164 of file InputManager.h.
| std::unordered_map<std::string, std::unordered_map<std::string, double> > M3::Plotting::InputFile::postFitValues |
The post fit values of the parameters, organised as postFitValues.at(errorType).at(parameter).
Definition at line 167 of file InputManager.h.