Table of Contents
- Functions
- Helpers
- L0Muon trigger efficiency
- MVA efficiency scans
- int ScanBDTEfficiency()
- int ScanBDTEfficiencyAllYears()
- int ScanMultipleCandidatesEfficiencyAllYearsAllSamples()
- int ScanBDTEfficiencyAllSig ()
- int ScanBDTEfficiencyAllPHSP()
- int ScanBDTEfficiencyAllRef ()
- int ScanBDTEfficiencyAll()
- int plotBDTEfficiency()
- int plotBDTEffciencyInAngles()
- Selection efficiency
- TGraphErrors *getSelectionEffTGraph()
- TGraphErrors *getSelectionEffTGraph()
- int plotSelectionEfficiency()
- int plotSelectionEfficiencyAllYearsAll()
- int plotSelectionEfficiencyAll()
- int plotSelectionEfficiencyAll()
- Truth matching efficiency from counting
- TGraphErrors *getTMeffTGraph()
- int plotTruthMatchingEfficiencyAllYearsAll()
- int plotTruthMatchingEfficiencyAllYearsAll()
- Truth matching efficiency from B+ mass fit
- Running everything
The efficiency class and helper functions are saved in a separate file. In this file, the functions for saving and plotting the efficiencies are defined.
Table of Contents
- Global variables:
- Functions
Global variables:
- double defaultBDTstep = 0.005 //Step in what the MVA response is calculated
Functions
Helpers
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 (if True, also check B_plus_L0DiMuonDecision_TOS)
- Return
- Histogram with the L0Muon efficiency for the given sample.
int getAllL0MuonEfficiencies()
Calls 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() 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()
Scans the MVA efficiency in the steps of defaultBDTstep
starting from getLowBDTcut(). Plotsand saves the scan.
- Parameters
- string year
- string magnet
- Double_t BDTstep
- int Run
- bool UseOnlyMuMuEvents
- bool PHSP
- bool KshortDecaysInVelo
- bool IncludeMultipleEff
- bool weighted
- Return
- 1 if everything is fine, 0 if something fails
int ScanBDTEfficiencyAllYears()
Calls ScanBDTEfficiency() for all years.
- Parameters
- bool UseOnlyMuMuEvents
- bool PHSP
- bool weighted
- bool IncludeMultipleEff
- Return
- 1 if everything is fine, 0 if something fails
int ScanMultipleCandidatesEfficiencyAllYearsAllSamples()
Calls ScanBDTEfficiencyAllYears() for all samples.
- Parameters
- bool weighted
- bool IncludeMultipleEff
- Return
- 1 if everything is fine, 0 if something fails
int ScanBDTEfficiencyAllSig ()
Calls ScanBDTEfficiency() using signal MC for all years or Run(s).
- Parameters
- int Run
- Double_t BDTstep
- bool SplitByYears
- bool RemoveMultiple
- bool weighted
- Return
- 1 if everything is fine, 0 if something fails
int ScanBDTEfficiencyAllPHSP()
Calls ScanBDTEfficiency() using PHSP MC for all years or Run(s).
- Parameters
- int Run
- Double_t BDTstep
- bool SplitByYears
- bool RemoveMultiple
- bool weighted
- Return
- 1 if everything is fine, 0 if something fails
int ScanBDTEfficiencyAllRef ()
Calls ScanBDTEfficiency() using reference MC for all years or Run(s).
- Parameters
- int Run
- Double_t BDTstep
- bool SplitByYears
- bool RemoveMultiple
- bool weighted
- Return
- 1 if everything is fine, 0 if something fails
int ScanBDTEfficiencyAll()
Calls ScanBDTEfficiencyAllSig(), ScanBDTEfficiencyAllPHSP(), and ScanBDTEfficiencyAllRef(), for Run 1 and 2.
- Return
- 1 if everything is fine, 0 if something fails
int plotBDTEfficiency()
Calculates the MVA efficiency for given MVA response in bins of sExtraVar
. For the details how to define sExtraVar
see the TM efficiency class definition.
- Parameters
- string year
- int Run
- Double_t TMVAcut
- bool UseOnlyMuMuEvents
- bool PHSP
- bool KshortDecaysInVelo
- bool RemoveMultiple
- bool weighted
- string sExtraVar
- Return
- 1 if everything is fine, 0 if something fails
int plotBDTEffciencyInAngles()
Calls plotBDTEfficiency() for Q2, theta_k, theta_l and phi.
- Parameters
- string year
- int Run
- Return
- 1 if everything is fine, 0 if something fails
Selection efficiency
TGraphErrors *getSelectionEffTGraph()
- Parameters
- bool full
- bool UseOnlyMuMuEvents
- bool PHSP
- bool KshortDecaysInVelo
- bool RemoveMultiple
- bool weighted
- string customTMbrach
- bool gammaTM
- Return
- A TGraph filled with the selection efficiency per year for the given sample.
TGraphErrors *getSelectionEffTGraph()
- Parameters
- bool full
- string year
- int Run
- string customTMbranch
- bool gammaTM
- bool UseOnlyMuMuEvents
- bool Reference
- bool PHSP
- bool RemoveMultiple
- bool weighted
- string sExtraVar
- Return
- A TGraph filled with the selection efficiency in bins of sExtraVar for the given sample.
int plotSelectionEfficiency()
Calls getSelectionEffTGraph(), makes the TGraph pretty and saves the plot.
- Parameters
- bool full
- string year
- int Run
- bool UseOnlyMuMuEvents
- bool Reference
- bool PHSP
- bool weighted
- string sExtraVar
- string customTMbranch
- bool gammaTM
- Return
- 1 if everything is fine, 0 if something fails
int plotSelectionEfficiencyAllYearsAll()
Calls plotSelectionEfficiency() for the resonant and rare sample, plots them together and saves the plot.
- Parameters
- bool full
- bool RemoveMultiple
- bool weighted
- string customTMbrach
- bool gammaTM
- Return
- 1 if everything is fine, 0 if something fails
int plotSelectionEfficiencyAll()
Calls plotSelectionEfficiency() for all years and Run 1 and Run 2
- Parameters
- bool full
- bool UseOnlyMuMuEvents
- bool Reference
- bool PHSP
- bool weighted
- string sExtraVar
- Return
- 1 if everything is fine, 0 if something fails
int plotSelectionEfficiencyAll()
Calls plotSelectionEfficiencyAll() in Q2,
- Parameters
- bool full
- Return
- 1 if everything is fine, 0 if something fails
Truth matching efficiency from counting
TGraphErrors *getTMeffTGraph()
- Parameters
- bool UseOnlyMuMuEvents
- bool PHSP
- bool KshortDecaysInVelo
- bool RemoveMultiple
- bool weighted
- string customTMbrach
- bool gammaTM
- Return
- A TGraph filled with the truth matching efficiency per year for the given sample.
int plotTruthMatchingEfficiencyAllYearsAll()
Plots the truth matching efficiency for the resonant and rare sample, plots them together and saves the plot.
- Parameters
- bool RemoveMultiple
- bool weighted
- string customTMbrach
- bool gammaTM
- Return
- 1 if everything is fine, 0 if something fails
int plotTruthMatchingEfficiencyAllYearsAll()
Calls plotTruthMatchingEfficiencyAllYearsAll() with/out removing multiple candidates and with/out weighting.
- Parameters
- bool gammaTM
- string customTMbranch
- Return
- 1 if everything is fine, 0 if something fails
Truth matching efficiency from B+ mass fit
TGraphErrors *getTMeffTGraph()
- Parameters
- string year
- int Run
- string customTMbranch
- bool gammaTM
- bool UseOnlyMuMuEvents
- bool PHSP
- bool RemoveMultiple
- bool weighted
- string sExtraVar
- Return
- A TGraph filled with the truth matching efficiency per year for the given sample.
int plotTruthMatchingEfficiency()
Calls getTMeffTGraph() in bins of sExtraVar
, makes the TGraph pretty and saves the plot.
- Parameters
- string year
- int Run
- bool UseOnlyMuMuEvents
- bool PHSP
- string sExtraVar
- string customTMbranch
- bool gammaTM
- Return
- 1 if everything is fine, 0 if something fails
Running everything
int runAllEff()
Calls plotSelectionEfficiencyAllYearsAll(), plotSelectionEfficiencyAll, plotSelectionEfficiencyAll and ScanBDTEfficiencyAll
- Return
- Always 1