Update 'BDTcutScanner.cpp'
parent
4ad27de152
commit
0bc72d76fd
@ -1,4 +1,5 @@
|
|||||||
## Global variables
|
## Global variables
|
||||||
|
[comment]: # (This actually is the most platform independent comment)
|
||||||
bool FixShape = true (When performing the B+ mass fit to obtain the yields, fix the shape to TMed MC/MVAed data?)
|
bool FixShape = true (When performing the B+ mass fit to obtain the yields, fix the shape to TMed MC/MVAed data?)
|
||||||
bool RemoveMultiple = true (When performing the B+ mass fit, remove multiple events first?)
|
bool RemoveMultiple = true (When performing the B+ mass fit, remove multiple events first?)
|
||||||
|
|
||||||
@ -62,27 +63,28 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* bool sig
|
* bool sig
|
||||||
* **Return**
|
* **Return**
|
||||||
* The selection efficiency for given TMVA cut read from efficiency file created by [[Efficiency.cpp|Efficiency.cpp]]
|
* The selection efficiency for given TMVA cut read from efficiency file created by [[Efficiency.cpp|Efficiency.cpp]]
|
||||||
*
|
|
||||||
### string GetBackgroundFunction()
|
### string GetBackgroundFunction()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* bool KshortDecaysInVelo
|
* bool KshortDecaysInVelo
|
||||||
* **Return**
|
* **Return**
|
||||||
* Either a double or signle exponential. For K+pi, always \"SingleExponential\".
|
* Either a double or signle exponential. For K+pi, always \"SingleExponential\".
|
||||||
*
|
|
||||||
### YieldInfo GetSigAndBkgEstimation()
|
### YieldInfo GetSigAndBkgEstimation()
|
||||||
|
Opens (and possibly also runs) the B mass fit file, loads it into the YieldInfo. Removal of multiple candidates is assumed. Retrievs the MVA efficiency files to get the estimation on the signal yield. Retrieves the estimated background from the upper mass sideband.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year
|
* string year
|
||||||
* int Run
|
* int Run
|
||||||
* bool KshortDecaysInVelo
|
* bool KshortDecaysInVelo
|
||||||
* bool UseLowQ2Range
|
* bool UseLowQ2Range
|
||||||
* Double_t TMVAcut
|
* Double_t TMVAcut
|
||||||
* bool scan
|
* bool scan = false (If false, run the fit. If true, just open the files)
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* The YieldInfo class with loaded information from the fit and efficiency files. Background obtianed by upper mass sideband fit.
|
||||||
|
|
||||||
### YieldInfo GetSigAndBkgEstimationFromData()
|
### YieldInfo GetSigAndBkgEstimationFromData()
|
||||||
|
Opens (and possibly also runs) the B mass fit file, loads it into the YieldInfo. Removal of multiple candidates is assumed. Retrievs the MVA efficiency files to get the estimation on the signal yield. Retrieves the estimated background from the number of signal candidates: Number of events = number of signal + number of background events.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year = "2011"
|
* string year = "2011"
|
||||||
* int Run = 0
|
* int Run = 0
|
||||||
@ -90,11 +92,12 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* bool KshortDecaysInVelo = false
|
* bool KshortDecaysInVelo = false
|
||||||
* bool UseLowQ2Range = false
|
* bool UseLowQ2Range = false
|
||||||
* Double_t TMVAcut = -1.0
|
* Double_t TMVAcut = -1.0
|
||||||
* bool scan = false
|
* bool scan = false (If false, run the fit. If true, just open the files)
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* The YieldInfo class with loaded information from the fit and efficiency files. Background obtianed from counting.
|
||||||
|
|
||||||
### int SaveTGraphs()
|
### int SaveTGraphs()
|
||||||
|
Calls [designYieldGraph()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/Design.cpp#user-content-void-designyieldgraph) to plot and save the signal and background yields, the significance and the total amount of events.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string path
|
* string path
|
||||||
* bool fineScan
|
* bool fineScan
|
||||||
@ -109,8 +112,10 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* TGraphErrors \*significance
|
* TGraphErrors \*significance
|
||||||
* TGraphErrors \*significanceFromAllEvts
|
* TGraphErrors \*significanceFromAllEvts
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Always 1
|
||||||
|
|
||||||
### int ScanSignalAndBckgndEstimation()
|
### int ScanSignalAndBckgndEstimation()
|
||||||
|
Performs a scan of the MVA cut efficiency. Loads the information into a `YieldInfo`, if scan is set to false, it also performs the fits. The steps are either done in steps of `BDTstep` defined in [[GlobalFunctions.hh|GlobalFunctions.hh]] (set `section` inside the function to false) or in iterative steps (defined by `n_divisions`). Let's say we set `n_divisions` to three. It starts by diving the MVA response into three regons (assuming the MVA response range is 0.0-1.0, we would have 0,0.33,0.66,1.0) and calculating the significance in these points. Then it divides 0.33,1.0 into three regions and performs the calculations acordingly. This is done until the starting point reaches 0.999 (so until it wants to perform fits in 0.99933, 0.99966). The results of the scan, ie the signal yields, the bkg yields from upper mass sideband fit and counting, the reference channel yields and the significances are saved as TGraphs.
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year
|
* string year
|
||||||
@ -118,12 +123,15 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* Double_t BDTstep
|
* Double_t BDTstep
|
||||||
* bool KshortDecaysInVelo
|
* bool KshortDecaysInVelo
|
||||||
* bool UseLowQ2Range
|
* bool UseLowQ2Range
|
||||||
* bool scan
|
* bool scan (If false, run the fit. If true, just open the files)
|
||||||
* bool fineScan
|
* bool fineScan (If false, start at the starting MVA response point, if true, start at 0.9)
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Always 1
|
||||||
|
|
||||||
### int ScanSignalAndBckgndEstimationPerYear()
|
### int ScanSignalAndBckgndEstimationPerYear()
|
||||||
|
|
||||||
|
|
||||||
|
Calls [ScanSignalAndBckgndEstimation()](#int-scansignalandbckgndestimation) for the given year.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year = "2011"
|
* string year = "2011"
|
||||||
* Double_t BDTstep = 0.01
|
* Double_t BDTstep = 0.01
|
||||||
@ -132,9 +140,10 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* bool scan = false
|
* bool scan = false
|
||||||
* bool fineScan = false
|
* bool fineScan = false
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Always 1
|
||||||
|
|
||||||
### int ScanSignalAndBckgndEstimationAllYears()
|
### int ScanSignalAndBckgndEstimationAllYears()
|
||||||
|
Calls [ScanSignalAndBckgndEstimationPerYear()](#int-scansignalandbckgndestimationperyear) for all years.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* Double_t BDTstep = 0.01
|
* Double_t BDTstep = 0.01
|
||||||
* bool KshortDecaysInVelo = true
|
* bool KshortDecaysInVelo = true
|
||||||
@ -144,6 +153,7 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* **Return**
|
* **Return**
|
||||||
|
|
||||||
### int ScanSignalAndBckgndEstimationSimple()
|
### int ScanSignalAndBckgndEstimationSimple()
|
||||||
|
[comment]: # (int-scansignalandbckgndestimationsimple)
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year = "2011"
|
* string year = "2011"
|
||||||
@ -157,6 +167,7 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* **Return**
|
* **Return**
|
||||||
|
|
||||||
### int ScanSignalAndBckgndEstimationSimplePerYear()
|
### int ScanSignalAndBckgndEstimationSimplePerYear()
|
||||||
|
[comment]: # (int-scansignalandbckgndestimationsimpleperyear)
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year = "2011"
|
* string year = "2011"
|
||||||
@ -169,6 +180,7 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* **Return**
|
* **Return**
|
||||||
|
|
||||||
### int ScanSignalAndBckgndEstimationSimpleAllYears()
|
### int ScanSignalAndBckgndEstimationSimpleAllYears()
|
||||||
|
[comment]: # (int-scansignalandbckgndestimationsimpleallyears)
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* Double_t BDTstep = 0.01
|
* Double_t BDTstep = 0.01
|
||||||
@ -180,6 +192,7 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* **Return**
|
* **Return**
|
||||||
|
|
||||||
### double getMaxBDTresponse()
|
### double getMaxBDTresponse()
|
||||||
|
[comment]: # (double-getmaxbdtresponse)
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year = "2011"
|
* string year = "2011"
|
||||||
@ -192,6 +205,7 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* **Return**
|
* **Return**
|
||||||
|
|
||||||
### int optimizeBDTCut()
|
### int optimizeBDTCut()
|
||||||
|
[comment]: # (int-optimizebdtcut)
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year = "2011"
|
* string year = "2011"
|
||||||
@ -203,4 +217,4 @@ Fits the upper mass sideband (defined by `range`) with an exponential, creates t
|
|||||||
* bool scan = false
|
* bool scan = false
|
||||||
* bool fineScan = false
|
* bool fineScan = false
|
||||||
* bool directScan = false
|
* bool directScan = false
|
||||||
* **Return**
|
* **Return**
|
Loading…
Reference in New Issue
Block a user