Update 'Efficiency.cpp'

Renata Kopecná 2022-02-02 14:51:34 +01:00
parent 93df2bea6f
commit 66ccb4129e

@ -1,48 +1,61 @@
The efficiency class and helper functions are saved in a [[separate file|Efficiency-Class]]. In this file, the functions for saving and plotting the efficiencies are defined.
## Global variables:
* double defaultBDTstep = 0.005
* double defaultBDTstep = 0.005 //Step in what the MVA response is calculated
# Functions
## Helpers
# Functions and their parameters:
### Double_t getLowBDTcut()
* **Parameters**
* bool fineScan
* **Return**
* The lower value od the MVA response used in the efficiency scans
### TH1D \*convertTGraph()
* **Parameters**
* TGraphErrors \*effGraph
* **Return**
* A histogram created from TGraphErrors, ROOT cannot do it on its own
## L0Muon trigger efficiency
### TH1D \* getL0MuonEfficiency()
Returns the efficiency of the B\_plus\_L0MuonDecision_TOS trigger line
* **Parameters**
* string year
* string magnet
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool useDimuon
* bool useDimuon (if True, also check B\_plus\_L0DiMuonDecision_TOS)
* **Return**
* Histogram with the L0Muon efficiency for the given sample.
### int getAllL0MuonEfficiencies()
Calls [getL0MuonEfficiency()](#th1d-getl0muonefficiency) for data, signal MC, reference MC and PHSP MC. Plots them and their ratios, saves the histograms.
* **Parameters**
* string year
* string magnet
* bool useDimuon
* **Return**
* 1 if everything is fine, 0 if something fails
### int getAllL0MuonEfficienciesAllYears()
Calls [getAllL0MuonEfficiencies()](#int-getalll0muonefficiencies) for all years.
* **Parameters**
* int Run
* string magnet
* bool useDimuon
* **Return**
* 1 if everything is fine, 0 if something fails
## MVA efficiency scans
### int ScanBDTEfficiency()
@ -57,6 +70,7 @@
* bool IncludeMultipleEff
* bool weighted
* **Return**
* 1 if everything is fine, 0 if something fails
### int ScanBDTEfficiencyAllYears()
@ -66,6 +80,7 @@
* bool weighted
* bool IncludeMultipleEff
* **Return**
* 1 if everything is fine, 0 if something fails
### int ScanMultipleCandidatesEfficiencyAllYearsAllSamples()
@ -73,6 +88,7 @@
* bool weighted
* bool IncludeMultipleEff
* **Return**
* 1 if everything is fine, 0 if something fails
### int ScanBDTEfficiencyAllSig ()
@ -83,6 +99,7 @@
* bool RemoveMultiple
* bool weighted
* **Return**
* 1 if everything is fine, 0 if something fails
### int ScanBDTEfficiencyAllPHSP()
@ -93,6 +110,7 @@
* bool RemoveMultiple
* bool weighted
* **Return**
* 1 if everything is fine, 0 if something fails
### int ScanBDTEfficiencyAllRef ()
@ -103,12 +121,14 @@
* bool RemoveMultiple
* bool weighted
* **Return**
* 1 if everything is fine, 0 if something fails
### int ScanBDTEfficiencyAll()
* **Parameters**
*
* **Return**
* 1 if everything is fine, 0 if something fails
### int plotBDTEfficiency()
@ -123,6 +143,7 @@
* bool weighted
* string sExtraVar
* **Return**
* 1 if everything is fine, 0 if something fails
### int plotBDTEffciencyInAngles()
@ -130,158 +151,9 @@
* string year
* int Run
* **Return**
* 1 if everything is fine, 0 if something fails
### void ScanKshortBDTGcutOverQ2()
* **Parameters**
*
* **Return**
### plotBDTEfficiency()
* **Parameters**
* "2011"
* 1
* 0.8
* true
* false
* false
* false
* true
* "q2"); //Run1 DD
* **Return**
### plotBDTEfficiency()
* **Parameters**
* "2011"
* 1
* 0.5
* true
* false
* true
* false
* true
* "q2"); //Run1 LL
* **Return**
### plotBDTEfficiency()
* **Parameters**
* "2011"
* 2
* 0.65
* true
* false
* false
* false
* true
* "q2"); //Run2 DD
* **Return**
### plotBDTEfficiency()
* **Parameters**
* "2011"
* 2
* 0.4
* true
* false
* true
* false
* true
* "q2"); //Run2 LL
* **Return**
### void GetKshortBDTeffForJpsi()
* **Parameters**
*
* **Return**
### EffAndError effRun1DD = EffAndError()
* **Parameters**
* );
* **Return**
### EffAndError effRun1LL = EffAndError()
* **Parameters**
* );
* **Return**
### EffAndError effRun2DD = EffAndError()
* **Parameters**
* );
* **Return**
### EffAndError effRun2LL = EffAndError()
* **Parameters**
* );
* **Return**
### effRun1DD = getBDTEfficiencySimple()
* **Parameters**
* "2011"
* 0.8
* 1
* false
* false
* false
* false
* true
* ""
* 0);
* **Return**
### effRun1LL = getBDTEfficiencySimple()
* **Parameters**
* "2011"
* 0.5
* 1
* false
* false
* true
* false
* true
* ""
* 0);
* **Return**
### effRun2DD = getBDTEfficiencySimple()
* **Parameters**
* "2011"
* 0.65
* 2
* false
* false
* false
* false
* true
* ""
* 0);
* **Return**
### effRun2LL = getBDTEfficiencySimple()
* **Parameters**
* "2011"
* 0.4
* 2
* false
* false
* true
* false
* true
* ""
* 0);
* **Return**
## Selection efficiency
### TGraphErrors \*getSelectionEffTGraph()
@ -326,6 +198,7 @@
* string customTMbranch
* bool gammaTM
* **Return**
* 1 if everything is fine, 0 if something fails
### int plotSelectionEfficiencyAllYearsAll()
@ -336,6 +209,7 @@
* string customTMbrach
* bool gammaTM
* **Return**
* 1 if everything is fine, 0 if something fails
### // TGraphErrors \*effGraphPHSP = getSelectionEffTGraph()
@ -360,12 +234,16 @@
* bool weighted
* string sExtraVar
* **Return**
* 1 if everything is fine, 0 if something fails
### int plotSelectionEfficiencyAll()
* **Parameters**
* bool full
* **Return**
* 1 if everything is fine, 0 if something fails
## Truth matching efficiency
### TGraphErrors \*getTMeffTGraph()
@ -387,6 +265,7 @@
* string customTMbrach
* bool gammaTM
* **Return**
* 1 if everything is fine, 0 if something fails
### int plotTruthMatchingEfficiencyAllYearsAll()
@ -394,6 +273,7 @@
* bool gammaTM
* string customTMbranch
* **Return**
* 1 if everything is fine, 0 if something fails
### TGraphErrors \*getTMeffTGraph()
@ -420,6 +300,9 @@
* string customTMbranch
* bool gammaTM //TODO sigEff
* **Return**
* 1 if everything is fine, 0 if something fails
## Running everything
### int runAllEff()