Update 'GlobalFunctions.hh'
parent
340c84d8ab
commit
76ede8b378
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
|
|
||||||
# Global variables
|
# Global variables
|
||||||
* int verboseLevel = 2
|
|
||||||
### Decay Options
|
### Decay Options
|
||||||
* const bool KshortChannel = [GetKSfromExePath()](bool-getksfromexepath)
|
* const bool KshortChannel = [GetKSfromExePath()](bool-getksfromexepath)
|
||||||
* const bool SplitDDandLL = KshortChannel ? true : false //for pi0 SplitDDandLL is always false!
|
* const bool SplitDDandLL = KshortChannel ? true : false //for pi0 SplitDDandLL is always false!
|
||||||
@ -80,6 +79,9 @@
|
|||||||
* const double cut_K_plus_ProbNNk = 0.25
|
* const double cut_K_plus_ProbNNk = 0.25
|
||||||
* const double cut_gamma_CL = 0.15 //gamma confidence level, explained in my [thesis](http://www.physi.uni-heidelberg.de/Publications/thesis_Kopecna_final.pdf), page 48
|
* const double cut_gamma_CL = 0.15 //gamma confidence level, explained in my [thesis](http://www.physi.uni-heidelberg.de/Publications/thesis_Kopecna_final.pdf), page 48
|
||||||
* const bool SplitInQ2 = KshortChannel ? false : false //rather obsolete, but still allows you to split the sample based on Q2 below and above J/psi
|
* const bool SplitInQ2 = KshortChannel ? false : false //rather obsolete, but still allows you to split the sample based on Q2 below and above J/psi
|
||||||
|
* const float SignalRegionNsigma = 2.; //How many sigmas around the signal peak comprises the signal region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Constants
|
### Constants
|
||||||
|
|
||||||
@ -117,27 +119,37 @@
|
|||||||
* const Int_t J_PSI = 443
|
* 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
|
||||||
|
* const double BR_ref2 = 6.7e-4 * 8.0e-3; //PDG value for B+ -> psi(2s) K*+ times psi(2s) -> mu mu
|
||||||
|
|
||||||
const double BR_sig = 8.668e-7;
|
### output levels
|
||||||
|
* int verboseLevel = 2
|
||||||
|
* verboseLevel 0: cout Tests, Debugs, Infos, Warnings and Errors
|
||||||
|
* verboseLevel 1: cout Debugs, Infos, Warnings and Errors
|
||||||
|
* verboseLevel 2: cout Infos, Warnings and Errors
|
||||||
|
* verboseLevel 3: cout Warnings and Errors
|
||||||
|
* verboseLevel 4: cout Errors (always cout errors)
|
||||||
|
|
||||||
//branching ratios
|
### colors
|
||||||
//const double BR_sig = 9.6e-7; //PDG value for B+ -> K*+ mu mu
|
Colors are defined using \#define as it is a constant everywhere
|
||||||
//const double BR_sig = 6.09576e-7; //BR for B+ -> K*+ mu mu without resonances from LHCb-PAPER-2014-006
|
* cBOLDWHITE // Bold White
|
||||||
const double BR_sig = 8.668e-7; //BR for B+ -> K*+ mu mu without resonances from flavio (09-05-19)
|
* cBOLDRED // Bold Red
|
||||||
const double BR_ref = 1.43e-3 * 5.961e-2; //PDG value for B+ -> J/psi K*+ times J/psi -> mu mu
|
* cBOLDGREEN // Bold Green
|
||||||
const double BR_ref2 = 6.7e-4 * 8.0e-3; //PDG value for B+ -> psi(2s) K*+ times psi(2s) -> mu mu
|
* cGREEN // Green
|
||||||
|
* cBOLDCYAN // Bold Cyan
|
||||||
|
* cCYAN // Cyan
|
||||||
|
* cRED // Red
|
||||||
|
* cBOLDRED // Bold red
|
||||||
|
* cYELLOW // Yellow
|
||||||
|
* cBOLDYELLOW // Bold Yellow
|
||||||
|
* cRESET // Resets the colors
|
||||||
|
|
||||||
const float SignalRegionNsigma = 2.; //How many sigmas around the signal peak comprises the signal region
|
|
||||||
|
|
||||||
double getTMVAcut(int Run){
|
|
||||||
if (Run == 1) return 0.9985;
|
|
||||||
else if (Run == 2) return 0.996;
|
|
||||||
else return 1;
|
|
||||||
}
|
|
||||||
# Classes
|
# Classes
|
||||||
|
|
||||||
* struct SignalFitParameters{ //TODO: possibly add the K1 to ParamValues at some point
|
* struct SignalFitParameters //Obsolete, used to be the starting parameters in the B mass fit
|
||||||
* struct FixedParameters{//TODO: possibly add the K1 to ParamValues at some point
|
* struct FixedParameters //Obsolete, used to be the fixed parameters in the B mass fit
|
||||||
* struct stat buffer
|
* struct stat buffer
|
||||||
|
|
||||||
# Functions and their parameters:
|
# Functions and their parameters:
|
||||||
@ -155,218 +167,155 @@ Takes the truth-matching response and checks whether the event passes the select
|
|||||||
* **Return**
|
* **Return**
|
||||||
* 1 if event passes truthmatching, 0 if not
|
* 1 if event passes truthmatching, 0 if not
|
||||||
|
|
||||||
### inline bool exists_test ()
|
### double getTMVAcut(int Run)
|
||||||
|
* **Parameters**
|
||||||
|
* int Run
|
||||||
|
* **Return**
|
||||||
|
* Returns the TMVA cut for given Run.
|
||||||
|
|
||||||
|
### inline bool exists_test()
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* const std::string& name
|
* const std::string& name
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* True if the `name` exists, false otherwise.
|
||||||
|
|
||||||
### return ()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* stat
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### //verboseLevel 4: cout Errors ()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* always cout errors)
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void setVerboseLevel()
|
### void setVerboseLevel()
|
||||||
|
Changes the [verbosity level](#output-levels).
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* int level
|
* int level
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### bool set_gErrorIgnoreLevel()
|
### bool set_gErrorIgnoreLevel()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
*
|
* Sets root to be quiet based on the [verbosity level](#output-levels).
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Always true
|
||||||
|
|
||||||
### bool get_gErrorIgnoreLevel = set_gErrorIgnoreLevel()
|
### bool get_gErrorIgnoreLevel = set_gErrorIgnoreLevel()
|
||||||
|
I am also confused what would be this good for. Take if for obsoletel.
|
||||||
* **Parameters**
|
|
||||||
* );
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void coutTest()
|
### void coutTest()
|
||||||
|
Prints a test message.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string message
|
* string message
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void coutDebug()
|
### void coutDebug()
|
||||||
|
Prints a debug message.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string message
|
* string message
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void coutInfo()
|
### void coutInfo()
|
||||||
|
Prints an info message.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string message
|
* string message
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void coutWarning()
|
### void coutWarning()
|
||||||
|
Prints a warning message.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string message
|
* string message
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void coutERROR()
|
### void coutERROR()
|
||||||
|
Prints an error message.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string message
|
* string message
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### double get_cut_B_plus_M_low()
|
### double get_cut_B_plus_M_low()
|
||||||
|
We have tested different lower B plus cuts for different Run. Now it is obsolete.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* int Run = 2 //setting lower B mass cut for different run/years
|
* int Run = 2 //setting lower B mass cut for different run/years
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Lower B plus mass cut for given Run.
|
||||||
|
|
||||||
### double get_cut_B_plus_M_low()
|
### double get_cut_B_plus_M_low()
|
||||||
|
We have tested different lower B plus cuts for different years. Now it is obsolete.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* std::string year = "2015"
|
* std::string year = "2015"
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Lower B plus mass cut for given year.
|
||||||
|
|
||||||
### bool IsDST()
|
### bool IsDST()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* std::string year
|
* std::string year
|
||||||
* bool MC
|
* bool MC
|
||||||
* bool ReferenceChannel
|
* bool ReferenceChannel
|
||||||
* bool PHSP
|
* bool PHSP
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* True if the given sample is DST, False if it is mDST
|
||||||
|
|
||||||
### void addLHCbtag()
|
### void addLHCbtag()
|
||||||
|
Creates and draws the LHCb + `suffix` tag.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* Float_t x = 0.6
|
* Float_t x = 0.6
|
||||||
* Float_t y = 0.85
|
* Float_t y = 0.85
|
||||||
* std::string suffix = ""
|
* std::string suffix = ""
|
||||||
* Int_t color = 1
|
* Int_t color = 1
|
||||||
* Float_t Scaling = 1.0
|
* Float_t Scaling = 1.0
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### std::string Float2Comma()
|
### std::string Float2Comma()
|
||||||
|
Takes float and the precision and converts the float to a string.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* Float_t f
|
* Float_t f
|
||||||
* Int_t d
|
* Int_t d
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* String made of floats.
|
||||||
|
|
||||||
### if()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* d > 5
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### if()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* d <= 0)return out;
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### for()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* Int_t n = 0; n <= d; n++
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### N[n] = static_cast<Int_t>()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
*
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### for()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* Int_t m = 0; m < n; m++)N[n] -= N[m] \* TMath::Power
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### if()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* n != 0)out.append
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### bool replace()
|
### bool replace()
|
||||||
|
Takes a string with a substring `from` and replaces it to `to`.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* std::string& str
|
* std::string& str
|
||||||
* const std::string& from
|
* const std::string& from
|
||||||
* const std::string& to
|
* const std::string& to
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* False is the `from` string doesn't exist, otherwise true.
|
||||||
|
|
||||||
### void printVector ()
|
### void printVector ()
|
||||||
|
Overloaded function, takes an int, double or a string vector and prints it as a single string, separated by a space.
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* std::vector\<int> vector
|
* std::vector\<int, double, string> vector
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void printVector ()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* std::vector\<double> vector
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void printVector ()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* std::vector\<float> vector
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### void printVector ()
|
|
||||||
|
|
||||||
* **Parameters**
|
|
||||||
* std::vector\<string> vector
|
|
||||||
* **Return**
|
|
||||||
|
|
||||||
### std::vector\<string> yearsMC ()
|
### std::vector\<string> yearsMC ()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* bool Reference = false
|
* bool Reference = false
|
||||||
* bool PHSP = false
|
* bool PHSP = false
|
||||||
* int Run = 1
|
* int Run = 1
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* A vector of strings containing all available years for the given MC sample.
|
||||||
|
|
||||||
### std::vector\<string> yearsData ()
|
### std::vector\<string> yearsData ()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* int Run = 1
|
* int Run = 1
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* A vector of strings containing the years corresponding to the given Run.
|
||||||
|
|
||||||
### std::vector\<string> yearsVector ()
|
### std::vector\<string> yearsVector ()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* bool MC = false
|
* bool MC = false
|
||||||
* bool Reference = false
|
* bool Reference = false
|
||||||
* bool PHSP = false
|
* bool PHSP = false
|
||||||
* int Run = 1
|
* int Run = 1
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* A vector of strings containing the years corresponding to the given sample and Run.
|
||||||
|
|
||||||
### std::vector\<int> yearsVectorInt()
|
### std::vector\<int> yearsVectorInt()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* bool MC = false
|
* bool MC = false
|
||||||
* bool Reference = false
|
* bool Reference = false
|
||||||
* bool PHSP = false
|
* bool PHSP = false
|
||||||
* int Run = 1
|
* int Run = 1
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* A vector of integers containing the years corresponding to the given sample and Run.
|
||||||
|
|
||||||
|
|
||||||
### std::vector\<string> yearsInc()
|
### std::vector\<string> yearsInc()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* int Run
|
* int Run
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* A vector of strings containing all available years for the inclusive MC sample.
|
||||||
|
|
||||||
### std::vector\<string> yearsBkgMC()
|
### std::vector\<string> yearsBkgMC()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* bool Reference
|
* bool Reference
|
||||||
* bool B0
|
* bool B0
|
||||||
@ -374,9 +323,10 @@ Takes the truth-matching response and checks whether the event passes the select
|
|||||||
* bool Inc
|
* bool Inc
|
||||||
* int Run
|
* int Run
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* A vector of strings containing all available years for the given background MC sample.
|
||||||
|
|
||||||
### int getRunID()
|
### int getRunID()
|
||||||
|
|
||||||
* **Parameters**
|
* **Parameters**
|
||||||
* string year
|
* string year
|
||||||
* **Return**
|
* **Return**
|
||||||
|
* Run number for the given run (eg 2017 will return 2, 2011 will return 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user