Update 'Utils.hpp'

Renata Kopecná 2022-02-01 11:32:06 +01:00
parent 152fb00432
commit 9c5bda0f7e

@ -1 +1,537 @@
**TODO** To be filled
## Global variables:
* double generated_basic_events = 10000.0
* double generated_basic_events_PHSP = 1000.0
* vector\<int> generated_signal_events_down
* vector\<int> generated_signal_events_up
* vector\<int> generated_reference_events_down
* vector\<int> generated_reference_events_up
* vector\<int> generated_PHSP_events_down
* vector\<int> generated_PHSP_events_up
* vector\<double> gen_tables_signal_efficiency_down
* vector\<double> gen_tables_signal_efficiency_up
* vector\<double> gen_tables_reference_efficiency_down
* vector\<double> gen_tables_reference_efficiency_up
* vector\<int> yield_signal_events
* vector\<int> yield_signal_events_err
* vector\<int> yield_reference_events
* vector\<int> yield_reference_events_err
* vector\<int> yield_PHSP_events
* vector\<int> yield_PHSP_events_err
* vector\<int> yield_signal_events_notTM
* vector\<int> yield_signal_events_notTM_err
* vector\<int> yield_reference_events_notTM
* vector\<int> yield_reference_events_notTM_err
* vector\<int> yield_signal_events_notTM_unique
* vector\<int> yield_signal_events_notTM_unique_err
* vector\<int> yield_reference_events_notTM_unique
* vector\<int> yield_reference_events_notTM_unique_err
# Functions
### string GetInputFile()
* **Parameters**
* string year
* string magnet
* bool preSelected
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool B0
* bool K1
* bool Inc
* bool smallSample);
* **Return**
### string GetBDTinputFile()
* **Parameters**
* string year
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo);
* **Return**
### string GetBDToutputFile()
* **Parameters**
* string year
* int Run
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo
* bool UseLowQ2Range
* bool reweighted);
* **Return**
### string GetBDToutputFile()
* **Parameters**
* int Run
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo
* bool UseLowQ2Range
* bool reweighted);
* **Return**
### string returnFileAddress()
* **Parameters**
* string year
* int Run
* string magnet
* bool Preselected
* bool BDTed
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo);
* **Return**
### string correct_magnet_string()
* **Parameters**
* string magnet
* **Return**
### string treeName()
* **Parameters**
* bool MC
* bool Preselected
* **Return**
### vector \<string> get_magnet_vector()
* **Parameters**
* string magnet
* **Return**
### TChain \*get_basic_TChain()
* **Parameters**
* string magnet
* vector\<string> years
* bool Preselected
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool B0
* bool K1
* bool Inc
* **Return**
### TChain \*get_weighted_TChain()
* **Parameters**
* vector\<string> years
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo
* **Return**
### TChain \*get_BDT_TChain()
* **Parameters**
* vector\<string> years
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo
* bool reweighted
* **Return**
### TChain \*get_BDT_TChain()
* **Parameters**
* string year
* int Run
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo
* bool reweighted
* **Return**
### TChain \*get_FinalOutput_TChain()
* **Parameters**
* vector\<string> years
* bool MC
* bool ReferenceChannel
* bool PHSP
* bool KshortDecayInVelo //TODO fix Run vs year
* **Return**
### string getTMcut()
* **Parameters**
* bool TM
* bool notTM
* string customTMbranch
* bool gammaTM
* **Return**
### string getJpsicut()
* **Parameters**
*
* **Return**
### string getMuMucut()
* **Parameters**
*
* **Return**
### string getFullCut()
* **Parameters**
* bool UseOnlyMuMuEvents
* bool UseOnlyJpsiEvents
* bool SplitInQ2
* bool UseLowQ2Range
* bool useExtraVar
* TMefficiencyClass extraVar
* int nExtraBin
* double TMVAcut
* **Return**
### string getAloneBranch()
* **Parameters**
* bool MC
* bool TM
* string customTMbranch
* bool gammaTM
* **Return**
### string getMultipleCut()
* **Parameters**
* bool MC
* bool TM
* string customTMbranch
* bool gammaTM
* double TMVAcut
* **Return**
### string getFinalCut()
* **Parameters**
* bool MC
* bool TM
* bool notTM
* string customTMbranch
* bool gammaTM
* bool UseOnlyMuMuEvents
* bool UseOnlyJpsiEvents
* bool SplitInQ2
* bool UseLowQ2Range
* bool useExtraVar
* TMefficiencyClass extraVar
* int nExtraBin
* double TMVAcut
* bool removeMultiple
* **Return**
### string checkIf2015MC()
* **Parameters**
* string year
* bool MC
* bool Reference
* bool PHSP
* **Return**
### bool checkMC()
* **Parameters**
* bool &MC
* bool ReferenceChannel
* bool PHSP
* bool mutuallyExclusive
* **Return**
### bool checkMC()
* **Parameters**
* bool ReferenceChannel
* bool PHSP
* **Return**
### bool checkQ2Range()
* **Parameters**
* bool UseOnlyJpsi
* bool UseOnlyMuMu
* **Return**
### bool checkTM()
* **Parameters**
* bool MC
* bool &TM
* bool &nonTM
* bool Preselected
* **Return**
### bool checkKshort()
* **Parameters**
* bool &KshortDecaysInVelo
* **Return**
### bool checkRefYear()
* **Parameters**
* string year
* **Return**
### bool checkEntries()
* **Parameters**
* TTree \*tree
* **Return**
### bool checkYear()
* **Parameters**
* int year
* bool MC
* bool ReferenceChannel
* bool PHSP
* **Return**
### bool checkRun()
* **Parameters**
* int Run
* **Return**
### string getTMtag()
* **Parameters**
* string customTMbranch
* **Return**
### string getTMtag()
* **Parameters**
* string customTMbranch
* bool gammaTM
* **Return**
### string getWeightName()
* **Parameters**
* string customTMbranch
* bool gammaTM
* **Return**
### std::string getDataTypeTag()
* **Parameters**
* bool MC
* bool Reference
* bool PHSP
* bool B0
* bool K1
* bool Inc
* **Return**
### string getDataTypeTag()
* **Parameters**
* bool MC
* bool Reference
* bool PHSP
* **Return**
### string getYearRunTag()
* **Parameters**
* int Run
* string year
* **Return**
### void getSimilarlyPopulatedBins()
* **Parameters**
* TH1D \*histogram
* int desiredBins
* int nBins
* **Return**
### void getSimilarlyPopulatedBinsVar()
* **Parameters**
* string var
* int nBins
* double lowEdge
* double highEdge
* int desiredBins
* string year
* string magnet
* int Run
* bool ReferenceChannel
* bool PHSP
* **Return**
### RooFitResult\* getResult()
* **Parameters**
* TFile \*fitFile
* **Return**
### RooRealVar\* getVarFromResult()
* **Parameters**
* RooFitResult \*fitResult
* string name
* **Return**
### double getBplusMeanFromResult()
* **Parameters**
* TFile\* fitFile
* **Return**
### double getSigYield()
* **Parameters**
* TFile \*fitFile
* **Return**
### double getSigYieldErr()
* **Parameters**
* TFile \*fitFile
* **Return**
### double getBkgYield()
* **Parameters**
* TFile \*fitFile
* **Return**
### double getBkgYieldErr()
* **Parameters**
* TFile \*fitFile
* **Return**
### double getEffSigma()
* **Parameters**
* TFile \*fitFile
* **Return**
### TH1D \*convertTGraph()
* **Parameters**
* TGraph \*graph
* **Return**
### double get_generated_events()
* **Parameters**
* bool PHSP
* **Return**
### int get_position_from_year()
* **Parameters**
* string year
* **Return**
### int get_gen_evts()
* **Parameters**
* string year
* bool ReferenceChannel
* bool PHSP
* **Return**
### int get_gen_evts()
* **Parameters**
* int Run
* bool ReferenceChannel
* bool PHSP
* **Return**
### int get_selected_evts()
* **Parameters**
* string year
* bool ReferenceChannel
* bool PHSP
* **Return**
### int get_selected_evts()
* **Parameters**
* int Run
* bool ReferenceChannel
* bool PHSP
* **Return**
### int get_selected_evts_err()
* **Parameters**
* string year
* bool ReferenceChannel
* bool PHSP
* **Return**
### double get_selection_efficiency()
* **Parameters**
* string year
* bool ReferenceChannel
* bool PHSP
* **Return**
### double get_selection_efficiency()
* **Parameters**
* int Run
* bool ReferenceChannel
* bool PHSP
* **Return**
### double get_tables_eff()
* **Parameters**
* string year
* bool ReferenceChannel //Get efficiency in a year as an average between up and down
* **Return**
### double get_tables_eff()
* **Parameters**
* int Run
* bool ReferenceChannel //Get efficiency of a run as an average between years
* **Return**
### void print_all_yields_and_efficiencies()
* **Parameters**
* bool ReferenceChannel
* bool PHSP
* **Return**