Table of Contents
This file contains functions that take the tuples produced in Ganga (aka stripped data) and applies further selection. The results are saved in the local folders defined in Paths.hpp
Table of Contents
Function parameters
-
string magnet
Refers to the polarity of the sample, it is either "down" or "up" -
string year
Year of the sample, 2011, 2012, 2015, 2016, 2017 or 2018 -
int Run
1 or 2: Run 1 is 2011+2012, Run 2 is 2015+2016+2017+2018 -
bool MC
false = use data
true = use MC -
bool ReferenceChannel
false = use the signal Q2 region
true = use the Jpsi Q2 region -
bool PHSP
false = do not use PHSP MC
true = use PHSP MC\ -
bool B0
false = do not use the B0toKstMuMu sample or B0toKstJpsi sample (depends on bool ReferenceChannel)
true = use the B0toKstMuMu sample or B0toKstJpsi sample (depends on bool ReferenceChannel)\ -
bool K1
false = do not use the B0toK1MuMu or B0toK1Jpsi sample (depends on bool ReferenceChannel)
true = use the B0toK1MuMu or B0toK1Jpsi sample (depends on bool ReferenceChannel)\ -
bool Inc
false = do not use the B0toXMuMu or B0toXJpsi sample (depends on bool ReferenceChannel)
true = use the B0toXMuMu or B0toXJpsi sample (depends on bool ReferenceChannel)\
Functions
copyDataForTMVA()
This fuction takes the preselected data files, adds a branch for the TruthMatching variables and saves the files again. Since root does not allow to just add a branch easily, it creates a new file with a new name, deletes the old one and lastly renames the new file to match the original tuple file.
- Parameters: year, magnet
- Return: 1 if everything is okay; 0 if something failed
copyDataForTMVAAll()
Performs copyDataForTMVA() for all years and polarities.
preSelection()
Loops over all .root-files created by subjobs in ganga and converts them into one tuple, saving them in a folder defined in Paths.hpp. Trigger, kinematic, PID and some more cuts are applied. Q^2-Binning is applied, Kshort becomes extra branch for decay inside or outside of VELO. Histograms of inv. mass distributions and more are created and saved in separate .root-file
- Parameters: year, magnet, MC, ReferenceChannel, PHSP, B0, K1, Inc
- Return: 1 if everything is okay 0, if something failed
runAllYearsAndMagPol()
Executes preSelection() for all years and polarities for a given Run
- Parameters: MC, ReferenceChannel, PHSP, B0, K1, Inc, Run
runAllSignalData()
Executes runAllYearsAndMagPol() for data for a given Run
- Parameters: Run
runAllSignalMC()
Executes runAllYearsAndMagPol() for Signal MC for a given Run
- Parameters: Run
runAllRefMC()
Executes runAllYearsAndMagPol() for Ref MC for a given Run
- Parameters: Run
runAllPHSPMC()
Executes runAllYearsAndMagPol() for PHSP MC for a given Run
- Parameters: Run
runAllB0MC()
Executes runAllYearsAndMagPol() for B0toKstMuMu MC sample or B0toKstJpsi MC sample for a given Run
- Parameters: Run, ReferenceChannel
runAllK1MC()
Executes runAllYearsAndMagPol() for BtoK1MuMu sample or BtoK1Jpsi sample MC
- Parameters: ReferenceChannel
runAllIncMC()
Executes runAllYearsAndMagPol() for BtoXJpsi MC for a given Run
- Parameters: Run
runAllBkgMC()
Executes runAllB0MC(), runAllK1MC() and runAllIncMC() for both Runs and Jpsi and MuMu
- Parameters:
Functions not used/created by me
getTCKs()
Return the exact events numbers for every MagDown and MagUp, Year and TCK configuration.
ExclusiveTriggerLineSelection()
plotHistos()
Selected histograms generated in the preSelection() function are plotted and nicely formatted before saved as .eps file