Update 'TMVA Class application'

Renata Kopecná 2022-01-31 17:16:24 +01:00
parent 69b67e5edb
commit 79e93a0287

@ -1,15 +1,27 @@
The MVA response is calculated by the [ROOT TMVA](https://root.cern.ch/download/doc/tmva/TMVAUsersGuide.pdf) in `TMVAClassApp.cpp`.
## Table of Contents
* [Functions and their parameters:](#functions-and-their-parameters)
* [string InputToReader()](#string-inputtoreader)
* [Int_t TMVAClassificationApplication_b2kmm()](#int_t-tmvaclassificationapplication_b2kmm)
* [Int_t TMVAClassAppData()](#int_t-tmvaclassappdata)
* [Int_t TMVAClassAppMC()](#int_t-tmvaclassappmc)
* [Int_t TMVAClassAppRefMC()](#int_t-tmvaclassapprefmc)
* [Int_t TMVAClassAppPHSP()](#int_t-tmvaclassappphsp)
* [Int_t TMVAClassAppInc()](#int_t-tmvaclassappinc)
* [Int_t TMVAClassAppAll()](#int_t-tmvaclassappall)
*
# Functions and their parameters:
### string InputToReader()
Gets the `ReaderName` (from the InputVariables) and changes it into a name stripped of the ':=' part. This is needed in order to add the variables into the [TMVA::Reader](https://root.cern.ch/doc/v606/classTMVA_1_1Reader.html).
* **Parameters**
* string ReaderName
* **Return**
* Stripped `ReaderName` string
### Int_t TMVAClassificationApplication_b2kmm()
Calculates the MVA response for each event and saves the response in a new tuple. The MVA response is calculated using the xml file generated by [[MVA.cpp|MVA Class]]. The splitting and the input variables must be exactly the same (variables even in the same order) as in the MVA training! The variables are read from [[TMVA_variables_KplusPi0Resolved.txt|Input-MVA-variables]].
* **Parameters**
* Int_t Run = 1
* Int_t year = 2011
@ -20,39 +32,51 @@
* bool UseLowQ2Range = false
* bool IncSample = false
* **Return**
* 0 if something fails, otherwise 1
### Int_t TMVAClassAppData()
Calls [TMVAClassificationApplication_b2kmm()](#int_t-tmvaclassificationapplication_b2kmm) for data each year (and both DD and LL).
* **Parameters**
* Int_t Run
* **Return**
* 0 if something fails, otherwise 1
### Int_t TMVAClassAppMC()
Calls [TMVAClassificationApplication_b2kmm()](#int_t-tmvaclassificationapplication_b2kmm) for signal MC each year (and both DD and LL).
* **Parameters**
* Int_t Run
* **Return**
* 0 if something fails, otherwise 1
### Int_t TMVAClassAppRefMC()
Calls [TMVAClassificationApplication_b2kmm()](#int_t-tmvaclassificationapplication_b2kmm) for reference MC each year (and both DD and LL).
* **Parameters**
* Int_t Run
* **Return**
* 0 if something fails, otherwise 1
### Int_t TMVAClassAppPHSP()
Calls [TMVAClassificationApplication_b2kmm()](#int_t-tmvaclassificationapplication_b2kmm) for PHSP MC each year (and both DD and LL).
* **Parameters**
* Int_t Run
* **Return**
* 0 if something fails, otherwise 1
### Int_t TMVAClassAppInc()
Calls [TMVAClassificationApplication_b2kmm()](#int_t-tmvaclassificationapplication_b2kmm) for Inclusive MC each year (and both DD and LL).
* **Parameters**
* Int_t Run
* **Return**
* 0 if something fails, otherwise 1
### Int_t TMVAClassAppAll()
Calls TMVAClassApp for data, signal MC, reference MC and PHPS MC.
* **Parameters**
* Int_t Run = 1
* **Return**
* 0 if something fails, otherwise 1