Table of Contents
- Functions
- TFile *GetTMVAfile()
- TH2F *GetCorrelationMatrix()
- TH2F *GetCorrelationMatrixSignal()
- TH2F *GetCorrelationMatrixBackground()
- string oberFolder()
- TH1F *GetTMVAresponse()
- TH1F *GetTMVAresponseSignal()
- TH1F *GetTMVAresponseBackground()
- TH1F *GetTMVAresponseTrainingSignal()
- TH1F *GetTMVAresponseTrainingBackground()
- TH1F *GetVariableSignal()
- TH1F *GetVariableBackground()
- TH1F *GetEfficiencySignal()
- TH1F *GetEfficiencyBackground()
- TH1F *GetROC()
- TTree *GetTrainTree()
- TTree *GetTestTree()
- int GetTrainEvents()
- int GetTrainSignalEvents()
- int GetTrainBackgroundEvents()
- bool SaveCorrelationPlot()
- vector <string> v_variables()
- bool SaveVariablesSignalVsBackground()
- bool SaveMVAResponse()
- bool SaveMVAOvertraining()
- bool SaveEfficiency()
- string getROCmethod()
- bool SaveROCs()
- bool SaveMultipleROCS()
- void nEvents()
- bool SaveAllFromOneFile()
- bool SaveMultipleROCS()
Table of Contents
- Functions
- TFile *GetTMVAfile()
- TH2F *GetCorrelationMatrix()
- TH2F *GetCorrelationMatrixSignal()
- TH2F *GetCorrelationMatrixBackground()
- string oberFolder()
- TH1F *GetTMVAresponse()
- TH1F *GetTMVAresponseSignal()
- TH1F *GetTMVAresponseBackground()
- TH1F *GetTMVAresponseTrainingSignal()
- TH1F *GetTMVAresponseTrainingBackground()
- TH1F *GetVariableSignal()
- TH1F *GetVariableBackground()
- TH1F *GetEfficiencySignal()
- TH1F *GetEfficiencyBackground()
- TH1F *GetROC()
- TTree *GetTrainTree()
- TTree *GetTestTree()
- int GetTrainEvents()
- int GetTrainSignalEvents()
- int GetTrainBackgroundEvents()
- bool SaveCorrelationPlot()
- vector <string> v_variables()
- bool SaveVariablesSignalVsBackground()
- bool SaveMVAResponse()
- bool SaveMVAOvertraining()
- bool SaveEfficiency()
- string getROCmethod()
- bool SaveROCs()
- bool SaveMultipleROCS()
- void nEvents()
- bool SaveAllFromOneFile()
- bool SaveMultipleROCS()
Functions
TFile *GetTMVAfile()
- Parameters
- int year
- int Run
- bool SplitYears
- bool KShortDecaysInVelo
- int nConfiguration
- bool UseLowQ2Range
- string customTMbranch
- bool gammaTM
- Return
- Opens and returns the TFile with the MVA training information (config file)
TH2F *GetCorrelationMatrix()
- Parameters
- TFile *file
- string type //S or B (for signal or background)
- Return
- Returns the signal or background correlation matrix from the config file
TH2F *GetCorrelationMatrixSignal()
- Parameters
- TFile *file
- Return
- Returns the signal correlation matrix from the config file
TH2F *GetCorrelationMatrixBackground()
- Parameters
- TFile *file
- Return
- Returns the background correlation matrix from the config file
string oberFolder()
- Parameters
- string method
- Return
- A string with the name of the folder where the histograms are saved in the TFile
TH1F *GetTMVAresponse()
- Parameters
- TFile *file
- string method
- string type // S, B, Train_S, Train_B
- Return
- Histogram with the MVA responses for the signal and background either from training or from all
TH1F *GetTMVAresponseSignal()
- Parameters
- TFile *file
- string method
- Return
- Histogram with the signal MVA response
TH1F *GetTMVAresponseBackground()
- Parameters
- TFile *file
- string method
- Return
- Histogram with the background MVA response
TH1F *GetTMVAresponseTrainingSignal()
- Parameters
- TFile *file
- string method
- Return
- Histogram with the signal MVA response in the training sample
TH1F *GetTMVAresponseTrainingBackground()
- Parameters
- TFile *file
- string method
- Return
- Histogram with the background MVA response in the training sample
TH1F *GetVariableSignal()
- Parameters
- TFile *file
- string variable
- Return
- Histogram with the disrtibution of the desired variable, signal events only
TH1F *GetVariableBackground()
- Parameters
- TFile *file
- string variable
- Return
- Histogram with the disrtibution of the desired variable, background events only
TH1F *GetEfficiencySignal()
- Parameters
- TFile *file
- string method
- Return
- Histogram with the MVA efficiency for signal
TH1F *GetEfficiencyBackground()
- Parameters
- TFile *file
- string method
- Return
- Histogram with the MVA efficiency for signal
TH1F *GetROC()
- Parameters
- TFile *file
- string method
- Return
- Histogram with the ROC curve for the given method
TTree *GetTrainTree()
- Parameters
- TFile *file
- Return
- The TTree used for the MVA training
TTree *GetTestTree()
- Parameters
- TFile *file
- Return
- The TTree used for the MVA testing
int GetTrainEvents()
- Parameters
- TFile *file
- Return
- The number of events used for the MVA training
int GetTrainSignalEvents()
- Parameters
- TFile *file
- Return
- The number of signal events used for the MVA training
int GetTrainBackgroundEvents()
- Parameters
- TFile *file
- Return
- The number of background events used for the MVA training
bool SaveCorrelationPlot()
Read the correlation histograms from the file, makes them pretty and saves them.
- Parameters
- TFile *file
- string type
- string savePath
- Return
- True if everything is fine, False if something fails
vector <string> v_variables()
- Parameters
- string DL="" //LL or DD
- Return
- A vector with all variable names from the MVA reader (see MVA.cpp )
bool SaveVariablesSignalVsBackground()
Loads the variable distributions in the signal and background sample, plots them both and saves the plot.
- Parameters
- TFile *file
- string savePath
- string DL="" //LL or DD
- Return
- True if everything is fine, False if something fails
bool SaveMVAResponse()
Loads the MVA response in the signal and background samples,plots them both and saves the plot.
- Parameters
- TFile *file
- string savePath
- string method
- Return
- True if everything is fine, False if something fails
bool SaveMVAOvertraining()
Retrieves and plots the training and test sample MVA response for the signal and background. The plot is saved.
- Parameters
- TFile *file
- string savePath
- string method
- Return
- True if everything is fine, False if something fails
bool SaveEfficiency()
Retrieves and plots the MVA efficiency, purity, and significance of the signal and background. The plot is saved.
- Parameters
- TFile *file
- string savePath
- string method
- int nSig
- int nBkg
- Return
- True if everything is fine, False if something fails
string getROCmethod()
- Parameters
- TH1F *h_ROC
- Return
- The name of the ROC histogram stripped of the MVA_ at the begining.
bool SaveROCs()
Retrieves the ROC curves for listed methods, plots them in one canvas, saves the plot.
- Parameters
- TFile *file
- string savePath
- vector <string> methods
- Return
- True if everything is fine, False if something fails
bool SaveMultipleROCS()
Retrieves the ROC curves from the listed files, plots them in one canvas, saves the plot.
- Parameters
- vector <TFile *> files
- string savePath
- string method
- Return
- True if everything is fine, False if something fails
void nEvents()
Saves the number of signal and background events into nSig
and nBkg
. It has to be checked, as the input is hardcoded!
- Parameters
- int year
- int Run
- bool SplitYears
- bool KshortDecaysInVelo
- int nConfiguration
- bool UseLowQ2Range
- int& nSig
- int& nBkg
bool SaveAllFromOneFile()
Effectivelly saves all plots needed for the MVA training. Calls SaveAllFromOneFile(), SaveVariablesSignalVsBackground(), nEvents(), SaveMVAOvertraining(), SaveEfficiency() and SaveROCs() for the given file.
- Parameters
- int year
- int Run
- bool SplitYears
- bool KshortDecaysInVelo
- int nConfiguration
- bool UseLowQ2Range
- string customTMbranch
- bool gammaTM
- Return
- True if everything is fine, False if something fails
bool SaveMultipleROCS()
Gets a list of config files and calls SaveMultipleROCS().
- Parameters
- int Run
- int nLow (lower nConfig number)
- int nHigh (upper nConfig number)
- Return
- True if everything is fine, False if something fails