|
Crombie Tools
|
Can be created using the CrombieTools.SkimmingTools.TMVACorrector module. More...
#include <TMVACorrector.h>
Inheritance diagram for TMVACorrector:Public Member Functions | |
| TMVACorrector (TString name, TString weights_file) | |
| ~TMVACorrector () | |
| TMVACorrector * | Copy () |
| Copy this TMVACorrector for parallelization. More... | |
| void | ReadVarConfig (const char *config) |
| Read a configuration file consisting of two columns: variable name and formula expression. More... | |
Public Member Functions inherited from Corrector | |
| Corrector (TString name="correction") | |
| Constructor setting the name of a branch it would like to write to. More... | |
| virtual | ~Corrector () |
| void | AddInExpression (TString expres) |
| Add an expression to read from the histogram. More... | |
| Bool_t | CompareFileName (TString fileName) |
| Compares the file name to the Regex and returns true if corrections will be applied. More... | |
| Float_t | Evaluate () |
| Evaluate the TTree pointer fInTree at its current entry. More... | |
| std::pair< bool, Float_t > | EvaluateWithFlag () |
| Evaluate the TTree pointer fInTree at its current entry and return a status bit corresponding to cut. More... | |
| virtual std::vector< TString > | GetFormulas () |
| Gets the list of formulas that this corrector is using. More... | |
| TString | GetName () const |
| Get the name of the branch that this Corrector would like to write to. More... | |
| void | SetBinning (UInt_t num, Double_t min, Double_t max) |
| Set the binning when the histograms do not store the correct x values. More... | |
| void | SetCorrectionFile (TString fileName) |
| Set the file containing the correction histogram by name. More... | |
| void | SetCorrectionHist (TString histName) |
| Set the correction histogram name within the correction file. More... | |
| void | SetCorrectionHist (TString hist1, TString hist2) |
| Set two histograms to divide in order to obtain the correction histogram. More... | |
| void | SetHistReader (HistReader reader) |
| Set the type of histogram reader. More... | |
| void | SetInCut (TString cut) |
| Set a cut for the corrector. More... | |
| virtual void | SetInTree (TTree *tree) |
| Set the pointer to the TTree this Corrector is reading. More... | |
| void | SetMatchFileName (TString regexpr) |
| Set a RegEx for the Corrector to check against the filename. If no match, corrections are not applied. More... | |
Public Member Functions inherited from Debug | |
| Debug () | |
| virtual | ~Debug () |
| DebugLevel | GetDebugLevel () |
| Gets the verbosity for a class. More... | |
| template<typename T , typename... V> | |
| void | Message (DebugLevel level, T message, V... more) |
| Sends a message if the verbosity level is appropriate. More... | |
| void | Message (DebugLevel level) |
| void | SetDebugLevel (DebugLevel level) |
| Sets the verbosity for a class. More... | |
Private Member Functions | |
| Float_t | DoEval () |
| Evaluate the MVA weights at the current entry. More... | |
Private Attributes | |
| std::vector< Float_t > | fFormulaResults |
| Results of the formulae are stored in here for the reader. More... | |
| std::vector< TString > | fVarNames |
| Keep the variable names for copy operations. More... | |
| TString | fWeightsFile |
| Keep this variable for copy operations. More... | |
| TMVA::IMethod * | method {} |
| Pointer to method to evaluate. More... | |
| TMVA::Reader * | reader {new TMVA::Reader("Silent")} |
| The reader used by this object. More... | |
Additional Inherited Members | |
Public Types inherited from Corrector | |
| enum | HistReader { eValue = 0, eZeroCenteredUnc, eUnityCenteredUnc } |
| Used to set the way to read the correction histogram. More... | |
Public Types inherited from Debug | |
| enum | DebugLevel { eQuiet = 0, eError, eInfo, eDebug } |
| Different possible debug levels. More... | |
Public Attributes inherited from Corrector | |
| bool | Merge = true |
| Flag determining whether or not to merge into the CorrectorApplicator branch. More... | |
Protected Member Functions inherited from Corrector | |
| Double_t | GetFormulaResult (Int_t index, Bool_t use_mins=true) |
| Evaluate one of the formulae. If use_lims, then don't give a result that would go off the relevant axis. More... | |
| Int_t | GetNumDims () |
| Get the number of dimensions that the formulas hold. More... | |
| void | InitializeTree () |
| Function to initialize TTreeFormula on the tree. More... | |
Protected Member Functions inherited from Debug | |
| void | DisplayFunc (const char *func) |
| Sends the name of the function during debuggin. More... | |
Protected Attributes inherited from Corrector | |
| TTreeFormula * | fCutFormula = NULL |
| Formula for cut. More... | |
| TString | fInCut = "1" |
| Corrector cut. More... | |
| TTree * | fInTree = NULL |
| Pointer to tree being read. More... | |
| Bool_t | fIsCopy = false |
| Track if instance is a copy. More... | |
| Bool_t | fMatchedFileName |
| A flag telling this corrector if the file has been matched. More... | |
| TString | fName |
| Name of branch to write to. More... | |
Can be created using the CrombieTools.SkimmingTools.TMVACorrector module.
A TMVAcorrector Takes a given formulat and saves a branch with the formula result.
Definition at line 30 of file TMVACorrector.h.
| TMVACorrector::TMVACorrector | ( | TString | name, |
| TString | weights_file | ||
| ) |
Referenced by Copy().
| TMVACorrector::~TMVACorrector | ( | ) |
Definition at line 18 of file TMVACorrector.cc.
References reader.
|
virtual |
Copy this TMVACorrector for parallelization.
Reimplemented from Corrector.
Definition at line 52 of file TMVACorrector.cc.
References fFormulaResults, Corrector::fIsCopy, Corrector::fName, fVarNames, fWeightsFile, Corrector::GetNumDims(), method, CrombieTools.SkimmingTools.TMVACorrector::newTMVACorrector, reader, and TMVACorrector().
|
privatevirtual |
Evaluate the MVA weights at the current entry.
Reimplemented from Corrector.
Definition at line 43 of file TMVACorrector.cc.
References fFormulaResults, Corrector::GetFormulaResult(), Corrector::GetNumDims(), and method.
| void TMVACorrector::ReadVarConfig | ( | const char * | config | ) |
Read a configuration file consisting of two columns: variable name and formula expression.
Definition at line 22 of file TMVACorrector.cc.
References Corrector::AddInExpression(), fFormulaResults, Corrector::fName, fVarNames, fWeightsFile, method, and reader.
|
private |
Results of the formulae are stored in here for the reader.
Definition at line 45 of file TMVACorrector.h.
Referenced by Copy(), DoEval(), and ReadVarConfig().
|
private |
Keep the variable names for copy operations.
Definition at line 46 of file TMVACorrector.h.
Referenced by Copy(), and ReadVarConfig().
|
private |
Keep this variable for copy operations.
Definition at line 47 of file TMVACorrector.h.
Referenced by Copy(), and ReadVarConfig().
|
private |
Pointer to method to evaluate.
Definition at line 48 of file TMVACorrector.h.
Referenced by Copy(), DoEval(), and ReadVarConfig().
|
private |
The reader used by this object.
Definition at line 44 of file TMVACorrector.h.
Referenced by Copy(), ReadVarConfig(), and ~TMVACorrector().