From 9c5bda0f7e9c4ffff85b139e441bdb4ca09c7578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renata=20Kopecn=C3=A1?= Date: Tue, 1 Feb 2022 11:32:06 +0100 Subject: [PATCH] Update 'Utils.hpp' --- Utils.hpp.md | 538 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 537 insertions(+), 1 deletion(-) diff --git a/Utils.hpp.md b/Utils.hpp.md index d454265..740df54 100644 --- a/Utils.hpp.md +++ b/Utils.hpp.md @@ -1 +1,537 @@ -**TODO** To be filled \ No newline at end of file + + +## Global variables: + +* double generated_basic_events = 10000.0 +* double generated_basic_events_PHSP = 1000.0 +* vector\ generated_signal_events_down +* vector\ generated_signal_events_up +* vector\ generated_reference_events_down +* vector\ generated_reference_events_up +* vector\ generated_PHSP_events_down +* vector\ generated_PHSP_events_up +* vector\ gen_tables_signal_efficiency_down +* vector\ gen_tables_signal_efficiency_up +* vector\ gen_tables_reference_efficiency_down +* vector\ gen_tables_reference_efficiency_up +* vector\ yield_signal_events +* vector\ yield_signal_events_err +* vector\ yield_reference_events +* vector\ yield_reference_events_err +* vector\ yield_PHSP_events +* vector\ yield_PHSP_events_err +* vector\ yield_signal_events_notTM +* vector\ yield_signal_events_notTM_err +* vector\ yield_reference_events_notTM +* vector\ yield_reference_events_notTM_err +* vector\ yield_signal_events_notTM_unique +* vector\ yield_signal_events_notTM_unique_err +* vector\ yield_reference_events_notTM_unique +* vector\ 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 \ get_magnet_vector() + +* **Parameters** + * string magnet +* **Return** + +### TChain \*get_basic_TChain() + +* **Parameters** + * string magnet + * vector\ years + * bool Preselected + * bool MC + * bool ReferenceChannel + * bool PHSP + * bool B0 + * bool K1 + * bool Inc +* **Return** + +### TChain \*get_weighted_TChain() + +* **Parameters** + * vector\ years + * bool MC + * bool ReferenceChannel + * bool PHSP + * bool KshortDecayInVelo +* **Return** + +### TChain \*get_BDT_TChain() + +* **Parameters** + * vector\ 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\ 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**