Update 'GlobalFunctions.hh'

Renata Kopecná 2022-01-31 09:44:27 +01:00
parent 76ede8b378
commit 3db793afcc

@ -1,9 +1,46 @@
# 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)
## Table of Contents
* [Global variables](#global-variables)
* [Decay Options](#decay-options)
* [Paths](#paths)
* [Basic options](#basic-options)
* [Weighting options](#weighting-options)
* [Truth-matching options](#truth-matching-options)
* [Cuts](#cuts)
* [Constants](#constants)
* [output levels](#output-levels)
* [colors](#colors)
* [Structs](#structs)
* [Global functions](#global-functions)
* [for_indexed(...)](#for_indexed)
* [for_indexed_v()](#for_indexed_v)
* [Functions](#functions)
* [bool GetKSfromExePath()](#bool-getksfromexepath)
* [bool isTM()](#bool-istm)
* [double getTMVAcut(int Run)](#double-gettmvacutint-run)
* [inline bool exists_test()](#inline-bool-exists_test)
* [void setVerboseLevel()](#void-setverboselevel)
* [bool set_gErrorIgnoreLevel()](#bool-set_gerrorignorelevel)
* [bool get_gErrorIgnoreLevel = set_gErrorIgnoreLevel()](#bool-get_gerrorignorelevel--set_gerrorignorelevel)
* [void coutTest()](#void-couttest)
* [void coutDebug()](#void-coutdebug)
* [void coutInfo()](#void-coutinfo)
* [void coutWarning()](#void-coutwarning)
* [void coutERROR()](#void-couterror)
* [double get_cut_B_plus_M_low()](#double-get_cut_b_plus_m_low)
* [double get_cut_B_plus_M_low()](#double-get_cut_b_plus_m_low-1)
* [bool IsDST()](#bool-isdst)
* [void addLHCbtag()](#void-addlhcbtag)
* [std::string Float2Comma()](#stdstring-float2comma)
* [bool replace()](#bool-replace)
* [void printVector ()](#void-printvector-)
* [std::vector<string> yearsMC ()](#stdvectorstring-yearsmc-)
* [std::vector<string> yearsData ()](#stdvectorstring-yearsdata-)
* [std::vector<string> yearsVector ()](#stdvectorstring-yearsvector-)
* [std::vector<int> yearsVectorInt()](#stdvectorint-yearsvectorint)
* [std::vector<string> yearsInc()](#stdvectorstring-yearsinc)
* [std::vector<string> yearsBkgMC()](#stdvectorstring-yearsbkgmc)
* [int getRunID()](#int-getrunid)
# Global variables
@ -99,7 +136,6 @@
* const Double_t PI_ZERO = 134.98
* const Double_t MU = 105.66
* const Double_t GAMMA = 0
* struct TRUEIDS //IDs of particles (see [Monte Carlo numbering scheme](pdg.lbl.gov/2019/reviews/rpp2019-rev-monte-carlo-numbering.pdf)
* const Int_t B_PLUS = 521
* const Int_t B_ZERO = 511
@ -117,8 +153,7 @@
* const Int_t MU_MINUS = 13
* const Int_t GAMMA = 22
* const Int_t J_PSI = 443
* const Int_t ELECTRON = 11
* const Int_t ELECTRON = 11
* const double BR_sig = 8.668e-7;
* const double BR_sig = 8.668e-7; //BR for B+ -> K*+ mu mu without resonances from flavio (09-05-19)
* const double BR_ref = 1.43e-3 * 5.961e-2; //PDG value for B+ -> J/psi K*+ times J/psi -> mu mu
@ -146,13 +181,23 @@ Colors are defined using \#define as it is a constant everywhere
* cBOLDYELLOW // Bold Yellow
* cRESET // Resets the colors
# Classes
## Structs
* struct SignalFitParameters //Obsolete, used to be the starting parameters in the B mass fit
* struct FixedParameters //Obsolete, used to be the fixed parameters in the B mass fit
* struct stat buffer
# Functions and their parameters:
# Global functions
### for_indexed(...)
Loops over the vector while having access to the index of the vector. The index is stored as `i`.
* **Parameters**
* std::vector
### for_indexed_v()
Loops over the vector while having access to the index of the vector. The index is stored in `my_counter`.
* **Parameters**
* int my_counter
* std::vector
# Functions
### bool GetKSfromExePath()
* **Return**
* Returns 1 if the current directory is in davids folder, else returns 0