Update 'Selection code'

Renata Kopecná 2022-02-09 17:57:11 +01:00
parent bb46b68d04
commit 9806694e2b

@ -1,5 +1,7 @@
The selection code is a set of C++ scripts. First, the running of the code is introduced. Then, each part of the code is explained. The main file of the selection code is [[B2Kstmumu.cpp|B2Kstmumu]]. However, as the code required a lot of reruns and checks at different places, the main code execution became obsolete and the scripts are compiled and run in ROOT step by step. However, the file [[B2Kstmumu.pro|B2Kstmumu.pro]] can be used by the QtCreator IDE.
The selection takes about two days to fully run. I recommend to run the preselection step over night, as it loops over about 800GB of data and selects only the interesting events. The second bottleneck is the multiple candidates removal, as it checks all subarrays of an array. Lastly, the adding of variables is not very optimized and takes about an hour.
## Table of Contents TODO UPDATE
* [Setting up ROOT](#setting-up-root)
* [Running the code](#running-the-code)
@ -217,12 +219,12 @@ python RemoveMultipleCandidates.py -all
[[Add variables|AddVariable.cpp]] to the MC samples
```
root
.L AddVariable.cpp+
.L Scripts/AddVariable.cpp+
addAllVariablesAllMCSamples(1); addAllVariablesAllMCSamples(2);
.q
```
Get the eficiencies needed for the estimation of the best MVA response cut, defined in [[Efficiency.cpp|Efficiency.cpp]]
Get the eficiencies needed for the estimation of the best MVA response cut, defined in [[Efficiency.cpp|Efficiency.cpp]]. In order to get the selection efficiency, the generator level sample must be present!
```
root
.L Efficiency.cpp+
@ -241,7 +243,7 @@ getMaxBDTresponse("2016",2,true,false,0,false,false)
.q
```
Make a nice TGraph from the scan; when creating the scan, it can happen that eg an estimation at cut at 0.95 happens before a cut at 0.92. [[This script|ReorganizeTGraph.py]] just takes it and makes a pretty clean plot.
Make a nice TGraph from the scan; when creating the scan, it can happen that eg an estimation at cut at 0.95 happens before a cut at 0.92. [[This script|ReorganizeTGraph.py]] just takes it and makes a pretty clean plot. Do not forget to set the correct path in ReorganizeTGraph.py.
```
python ReorganizeTGraph.py
```
@ -308,9 +310,13 @@ plotTM(1,false); plotTM(2,false)
.q
```
# Backup of the tuples
# Backup of the tuples and code
In order to be able to perform cross-checks and just to have a general backup, the tuples are saved in Heidelberg at
`/auto/data/kopecna/B2KstMuMu/data/`.
`/auto/data/kopecna/B2KstMuMu/data/`. The code is stored here, however it was developed here:
https://gitlab.cern.ch/LHCb-RD/ewp-Bplus2Kstmumu-AngAna/-/tree/work_renata
The tuples and some other files used in the KshortPiplus analysis are saved at
`/auto/data/dgerick/B2Kstmumu/`. This was created with the code on the `master` branch in the ewp-Bplus2Kstmumu-AngAna project on gitlab:
https://gitlab.cern.ch/LHCb-RD/ewp-Bplus2Kstmumu-AngAna/-/tree/master
**TODO** add David's folder when you know from Alexey what I can do