Update 'GlobalFunctions.hh'
parent
690d48a446
commit
114d29cc17
@ -1,40 +1,57 @@
|
||||
# Global functions
|
||||
**TODO**
|
||||
#define for_indexed(...) for_indexed_v(i, __VA_ARGS__)
|
||||
#define for_indexed_v(v, ...) for(bool _i_ = true, _break_ = false; _i_;) for(size_t v = 0; _i_; _i_ = false) for(__VA_ARGS__) if(_break_) break; else for(bool _j_ = true; _j_;) for(_break_ = true; _j_; _j_ = false) for(bool _k_ = true; _k_; v++, _k_ = false, _break_ = false)
|
||||
|
||||
|
||||
## Global variables:
|
||||
|
||||
# Global variables
|
||||
### Decay Options
|
||||
* const bool KshortChannel = [GetKSfromExePath()](bool-getksfromexepath)
|
||||
* const bool SplitDDandLL = KshortChannel ? true : false //for pi0 SplitDDandLL is always false!
|
||||
* const bool Kst2Kpluspi0Resolved = !KshortChannel //keep the old variables
|
||||
* but set global!
|
||||
* const bool Kst2Kpluspi0Merged = false
|
||||
* const bool Kst2Kspiplus = KshortChannel
|
||||
* const bool smallSample = false
|
||||
* std::string TheDecay = (KshortChannel ? "KshortPiplus" : "KplusPi0Resolved")
|
||||
* const bool Kst2Kpluspi0Resolved = !KshortChannel
|
||||
* const bool Kst2Kpluspi0Merged = false //We do not use merged pi0, so set to false. This option is pretty much obsolete.
|
||||
* const bool Kst2Kspiplus = KshortChannel //David's option, no clue what it is good for
|
||||
|
||||
### Paths
|
||||
### Paths
|
||||
**Hardcoded paths to the folders with data**
|
||||
* const std::string path_to_data = "/auto/data/dgerick/B2Kstmumu"
|
||||
* const std::string path_to_output_KshortPiplus = "/auto/data/dgerick/B2Kstmumu"
|
||||
* const std::string path_to_output_KplusPizero = "/home/lhcb/kopecna/B2KstarMuMu/data"
|
||||
* const std::string thePath = Kst2Kspiplus ? path_to_output_KshortPiplus : path_to_output_KplusPizero
|
||||
### TODO
|
||||
|
||||
### Basic options
|
||||
* const bool smallSample = false //option that used to be used in testing, somewhat obsolete but can be easily added
|
||||
* const bool UseDTF = KshortChannel ? true : true //use mass and momenta of particles obtained by DTF?
|
||||
* const bool UsePDGmIn4Dvectors = KshortChannel ? false : true
|
||||
* const bool ReweightByRefChannel = KshortChannel ? true : true
|
||||
* const bool AlwaysUseRefChannelData = KshortChannel ? true : true
|
||||
* const bool Use2017 = KshortChannel ? true : true
|
||||
* const bool Use2018 = KshortChannel ? true : true
|
||||
* const bool UsePIDgen = KshortChannel ? true : false
|
||||
* const UInt_t firstnBins = 75
|
||||
* const UInt_t secondnBins = 50
|
||||
* const double firstMCrange[2] = {-0.5
|
||||
* 149.5}
|
||||
* const std::string firstMClatex = KshortChannel ? "N^{Long}_{Tracks}" : "N^{Long}_{Tracks}"
|
||||
* const bool UseBKGCAT = KshortChannel ? true : false
|
||||
* const bool pi0TM = true
|
||||
* const bool gammaTMdefault = false
|
||||
* const bool SplitInQ2 = KshortChannel ? false : false
|
||||
* TString TMVAmethod = KshortChannel ? "BDTG" : "MLP" //used TMVA method
|
||||
* int verboseLevel = 2
|
||||
* const bool UsePDGmIn4Dvectors = KshortChannel ? false : true //Use PDG values when calculating four-momenta or use the reconstructed mass?
|
||||
* const bool ReweightByRefChannel = KshortChannel ? true : true //Pretty much obsolete, always use reference channel to reweight
|
||||
* const bool AlwaysUseRefChannelData = KshortChannel ? true : true // same as above
|
||||
* const bool Use2017 = KshortChannel ? true : true //Relic from 2017, when we were adding new data
|
||||
* const bool Use2018 = KshortChannel ? true : true //Relic from 2018, when we were adding new data
|
||||
* const bool UsePIDgen = KshortChannel ? true : false //In KS, they used PID weights on top of the 2D weights in MC
|
||||
|
||||
### Weighting options
|
||||
|
||||
const std::string firstMCweight = (KshortChannel ? "nLongTracks" : "nLongTracks") //Name of the branch of the first weight
|
||||
const std::string seconMCweight = KshortChannel ? (UseDTF ? "B_plus_PT_DTF" : "B_plus_PT") : (UseDTF ? "B_plus_PT_DTF" : "B_plus_PT") //Name of the branch of the second weight
|
||||
const UInt_t firstnBins = 75 //number of bins in the weighting histogram
|
||||
const UInt_t secondnBins = 50 //number of bins in the weighting histogram
|
||||
const double firstMCrange[2] = {-0.5, 149.5} //range of the weighting histogram
|
||||
const double seconMCrange[2] = {TMath::Log(1500.), TMath::Log(50000.)} //range of the weighting histogram
|
||||
const std::string firstMClatex = KshortChannel ? "N^{Long}_{Tracks}" : "N^{Long}_{Tracks}" //Latex names of the weight histogram
|
||||
const std::string seconMClatex = KshortChannel ? "p_{T}(B^{+}) ( MeV/c )" : "p_{T}(B^{+}) ( MeV/c )" //Latex names of the weight histogram
|
||||
|
||||
### Truth-matching options
|
||||
* const bool UseBKGCAT = KshortChannel ? true : false //Use background category from [TupleToolMCBackgroundInfo](https://twiki.cern.ch/twiki/bin/view/LHCb/TupleToolMCBackgroundInfo)
|
||||
* const bool pi0TM = true //Truth-match pi0?
|
||||
* const std::string TMtag = UseBKGCAT ? "" : "_TM" + std::string(pi0TM ? "" : "_noPi0TM")
|
||||
* const std::string TMbranch = "TMed" + std::string(UseBKGCAT ? "BKGCAT" : "") + std::string(pi0TM ? "" : "_noPi0")
|
||||
* const std::string gammaTMbranch = "TM_gammas" + std::string(pi0TM ? "" : "_noPi0") //name of the branch with pi0 truth-matching ID
|
||||
* const bool gammaTMdefault = false //Truth-match gammas?
|
||||
|
||||
### Cuts
|
||||
|
||||
|
||||
* const double cut_DTF_status = 0.5
|
||||
* const double cut_DTF_chi2 = 200.0
|
||||
* const double K_star_plus_mass_difference = 100.0 //MeV //difference between K* mass and PDG K* mass
|
||||
@ -60,7 +77,9 @@
|
||||
* const double cut_muon_ProbNNmu = 0.25
|
||||
* const double cut_K_plus_ProbNNk = 0.25
|
||||
* const double cut_gamma_CL = 0.15
|
||||
|
||||
* const bool SplitInQ2 = KshortChannel ? false : false
|
||||
* TString TMVAmethod = KshortChannel ? "BDTG" : "MLP" //used TMVA method
|
||||
* int verboseLevel = 2
|
||||
|
||||
# Classes
|
||||
|
||||
@ -70,80 +89,18 @@
|
||||
|
||||
# Functions and their parameters:
|
||||
### bool GetKSfromExePath()
|
||||
|
||||
* **Parameters**
|
||||
*
|
||||
* **Return**
|
||||
|
||||
### if ()
|
||||
|
||||
* **Parameters**
|
||||
* getcwd
|
||||
* **Return**
|
||||
|
||||
### const bool KshortChannel = GetKSfromExePath()
|
||||
|
||||
* **Parameters**
|
||||
* ); // false := pi0 channel
|
||||
* **Return**
|
||||
|
||||
### std::string TheDecay = ()
|
||||
|
||||
* **Parameters**
|
||||
* KshortChannel ? "KshortPiplus" : "KplusPi0Resolved");
|
||||
* **Return**
|
||||
|
||||
### const std::string firstMCweight = ()
|
||||
|
||||
* **Parameters**
|
||||
* KshortChannel ? "nLongTracks" : "nLongTracks");
|
||||
* **Return**
|
||||
|
||||
### const std::string seconMCweight = KshortChannel ? ()
|
||||
|
||||
* **Parameters**
|
||||
* UseDTF ? "B_plus_PT_DTF" : "B_plus_PT") :
|
||||
* **Return**
|
||||
|
||||
### const double seconMCrange[2] = {TMath::Log()
|
||||
|
||||
* **Parameters**
|
||||
* 1500.)
|
||||
* TMath::Log
|
||||
* **Return**
|
||||
|
||||
### const std::string seconMClatex = KshortChannel ? "p_{T}()
|
||||
|
||||
* **Parameters**
|
||||
* B^{+})
|
||||
* **Return**
|
||||
|
||||
### const std::string TMtag = UseBKGCAT ? "" : "_TM" + std::string()
|
||||
|
||||
* **Parameters**
|
||||
* pi0TM ? "" : "_noPi0TM");
|
||||
* **Return**
|
||||
|
||||
### const std::string TMbranch = "TMed" + std::string()
|
||||
|
||||
* **Parameters**
|
||||
* UseBKGCAT ? "BKGCAT" : "") + std::string
|
||||
* **Return**
|
||||
|
||||
### const std::string gammaTMbranch = "TM_gammas" + std::string()
|
||||
|
||||
* **Parameters**
|
||||
* pi0TM ? "" : "_noPi0");
|
||||
* **Return**
|
||||
* Returns 1 if the current directory is in davids folder, else returns 0
|
||||
|
||||
### bool isTM()
|
||||
|
||||
Takes the truth-matching response and checks whether the event passes the selection. It is useful as there are different ways how to truth-match, so this returns the truth-matching response based on the inputs.
|
||||
* **Parameters**
|
||||
* std::string customTMbranch
|
||||
* bool TM
|
||||
* bool gammaTM
|
||||
* int gTM
|
||||
* **Return**
|
||||
* 1 if event passes truthmatching, 0 if not
|
||||
|
||||
### inline bool exists_test ()
|
||||
|
||||
@ -296,28 +253,28 @@
|
||||
### void printVector ()
|
||||
|
||||
* **Parameters**
|
||||
* std::vector<int> vector
|
||||
* std::vector\<int> vector
|
||||
* **Return**
|
||||
|
||||
### void printVector ()
|
||||
|
||||
* **Parameters**
|
||||
* std::vector<double> vector
|
||||
* std::vector\<double> vector
|
||||
* **Return**
|
||||
|
||||
### void printVector ()
|
||||
|
||||
* **Parameters**
|
||||
* std::vector<float> vector
|
||||
* std::vector\<float> vector
|
||||
* **Return**
|
||||
|
||||
### void printVector ()
|
||||
|
||||
* **Parameters**
|
||||
* std::vector<string> vector
|
||||
* std::vector\<string> vector
|
||||
* **Return**
|
||||
|
||||
### std::vector<string> yearsMC ()
|
||||
### std::vector\<string> yearsMC ()
|
||||
|
||||
* **Parameters**
|
||||
* bool Reference = false
|
||||
@ -325,13 +282,13 @@
|
||||
* int Run = 1
|
||||
* **Return**
|
||||
|
||||
### std::vector<string> yearsData ()
|
||||
### std::vector\<string> yearsData ()
|
||||
|
||||
* **Parameters**
|
||||
* int Run = 1
|
||||
* **Return**
|
||||
|
||||
### std::vector<string> yearsVector ()
|
||||
### std::vector\<string> yearsVector ()
|
||||
|
||||
* **Parameters**
|
||||
* bool MC = false
|
||||
@ -340,7 +297,7 @@
|
||||
* int Run = 1
|
||||
* **Return**
|
||||
|
||||
### std::vector<int> yearsVectorInt()
|
||||
### std::vector\<int> yearsVectorInt()
|
||||
|
||||
* **Parameters**
|
||||
* bool MC = false
|
||||
@ -349,13 +306,13 @@
|
||||
* int Run = 1
|
||||
* **Return**
|
||||
|
||||
### std::vector<string> yearsInc()
|
||||
### std::vector\<string> yearsInc()
|
||||
|
||||
* **Parameters**
|
||||
* int Run
|
||||
* **Return**
|
||||
|
||||
### std::vector<string> yearsBkgMC()
|
||||
### std::vector\<string> yearsBkgMC()
|
||||
|
||||
* **Parameters**
|
||||
* bool Reference
|
||||
|
Loading…
Reference in New Issue
Block a user