Update 'Paths.hpp'

Renata Kopecná 2022-02-01 11:21:23 +01:00
parent 39fc634fd3
commit 0c4d7055b5

@ -1,8 +1,9 @@
# Functions and their parameters # Functions and their parameters
## Preselection files
### string getOriginalFiles() ### string getOriginalFiles()
* **Parameters** * **Parameters**
@ -81,6 +82,7 @@ Dedicated function needed as the background samples were saved in a different pl
* **Return** * **Return**
* The path of the histogram file created by [preSelection()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/BDTSelection#preselection) * The path of the histogram file created by [preSelection()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/BDTSelection#preselection)
## Generator level files
### string GetGenLevelFile() ### string GetGenLevelFile()
@ -90,6 +92,7 @@ Dedicated function needed as the background samples were saved in a different pl
* **Return** * **Return**
* Path to the generator-level MC samples * Path to the generator-level MC samples
## MVA files
### string GetBDTinputFile() ### string GetBDTinputFile()
@ -143,6 +146,8 @@ Dedicated function needed as the background samples were saved in a different pl
* **Return** * **Return**
* Path to the config file created by [MVA_b2kmm()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/MVA-Class#int_t-mva_b2kmm). * Path to the config file created by [MVA_b2kmm()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/MVA-Class#int_t-mva_b2kmm).
## Final selection files
### string GetFinalOutputFile() ### string GetFinalOutputFile()
* **Parameters** * **Parameters**
@ -169,6 +174,7 @@ Dedicated function needed as the background samples were saved in a different pl
* **Return** * **Return**
* [string GetFinalOutputFile()](#string-getfinaloutputfile) with no year * [string GetFinalOutputFile()](#string-getfinaloutputfile) with no year
## Mass fit files
### string GetControlPlots() ### string GetControlPlots()
@ -180,6 +186,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool sWeightUse * bool sWeightUse
* int canvas * int canvas
* **Return** * **Return**
* Adress of control plots when applying weighting
### string GetMassFitFile() ### string GetMassFitFile()
@ -191,22 +198,23 @@ Dedicated function needed as the background samples were saved in a different pl
* bool Preselected * bool Preselected
* bool TM * bool TM
* bool PHSP * bool PHSP
* //input/output file selectionbool UseOnlyJpsiEvents * //input/output file selection
* bool UseOnlyJpsiEvents
* bool UseOnlyMuMuEvents * bool UseOnlyMuMuEvents
* //signal/referencebool GetShapeFromMC * bool GetShapeFromMC
* string SignalType * string SignalType
* string BckGndType * string BckGndType
* bool ConstrainParameters * bool ConstrainParameters
* //shape from MC?bool KshortDecaysInVelo * bool KshortDecaysInVelo
* bool UseLowQ2Range * bool UseLowQ2Range
* //LL/DD? // q2 rangeDouble_t TMVAcut * Double_t TMVAcut
* int randomSubset * int randomSubset
* //TMVA optionsbool fixedMassRegion * bool fixedMassRegion
* bool yieldOverFullRange * bool yieldOverFullRange
* //fit range optionsstring sExtraVar * string sExtraVar
* int nExtraBin * int nExtraBin
* //Efficiency in different variable * binned
* binnedbool removeMultiple * bool removeMultiple
* bool weighted * bool weighted
* bool weightedFromPi0 * bool weightedFromPi0
* string whichWeight * string whichWeight
@ -215,6 +223,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool gammaTM * bool gammaTM
* bool InclusiveSample * bool InclusiveSample
* **Return** * **Return**
* Return the path to the file with the mass fit created by [massFit()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/MassFit.cpp#user-content-double-massfit).
### string GetMassFitFile() ### string GetMassFitFile()
@ -228,9 +237,10 @@ Dedicated function needed as the background samples were saved in a different pl
* string SignalType * string SignalType
* string BckGndType * string BckGndType
* bool ConstrainParameters * bool ConstrainParameters
* //shape from MC?bool fixedMassRegion * bool fixedMassRegion
* bool weighted //fit range options * bool weighted
* **Return** * **Return**
* Return the path to the file with the mass fit created by [quickFit()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/MassFit.cpp#user-content-double-quickfit).
### string GetMassFitFile() ### string GetMassFitFile()
@ -239,18 +249,21 @@ Dedicated function needed as the background samples were saved in a different pl
* int Run * int Run
* bool MC * bool MC
* bool PHSP * bool PHSP
* //input/output file selectionbool UseOnlyJpsiEvents * bool UseOnlyJpsiEvents
* bool UseOnlyMuMuEvents * bool UseOnlyMuMuEvents
* //signal/referencebool GetShapeFromMC * bool GetShapeFromMC
* string SignalType * string SignalType
* string BckGndType * string BckGndType
* bool ConstrainParameters * bool ConstrainParameters
* //shape from MC?bool KshortDecaysInVelo * bool KshortDecaysInVelo
* bool UseLowQ2Range * bool UseLowQ2Range
* //LL/DD? // q2 rangeDouble_t TMVAcut * Double_t TMVAcut
* //TMVA optionsbool fixedMassRegion * bool fixedMassRegion
* //fit range optionsbool removeMultiple //fit range options * bool removeMultiple
* **Return** * **Return**
* Return the path to the file with the mass fit created by [basicYieldFit()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/MassFit.cpp#int-basicyieldfit).
## Efficiency files
### string GetEfficiencyMassFitFile() ### string GetEfficiencyMassFitFile()
@ -261,26 +274,26 @@ Dedicated function needed as the background samples were saved in a different pl
* bool Preselected * bool Preselected
* bool TM * bool TM
* bool PHSP * bool PHSP
* //input/output file selectionbool UseOnlyJpsiEvents * bool UseOnlyJpsiEvents
* bool UseOnlyMuMuEvents * bool UseOnlyMuMuEvents
* //signal/referencebool GetShapeFromMC * bool GetShapeFromMC
* string SignalType * string SignalType
* string BckGndType * string BckGndType
* bool ConstrainParameters * bool ConstrainParameters
* //shape from MC?bool KshortDecaysInVelo * bool KshortDecaysInVelo
* bool UseLowQ2Range * bool UseLowQ2Range
* //LL/DD? // q2 rangeDouble_t TMVAcut * Double_t TMVAcut
* //TMVA optionsbool fixedMassRegion * bool fixedMassRegion
* //fit range optionsstring sExtraVar * string sExtraVar
* int nExtraBin * int nExtraBin
* //Efficiency in different variable * bool removeMultiple
* binnedbool removeMultiple
* bool weighted * bool weighted
* bool weightedFromPi0 * bool weightedFromPi0
* string whichWeight * string whichWeight
* string customTMbranch * string customTMbranch
* bool gammaTM * bool gammaTM
* **Return** * **Return**
* Calls [GetMassFitFile()](string-getmassfitfile). In the path, replaces the folder MassFits to Efficiencies/MassFits
### string GetEfficiencyPi0MassFitFile() ### string GetEfficiencyPi0MassFitFile()
@ -306,6 +319,7 @@ Dedicated function needed as the background samples were saved in a different pl
* string sExtraVar * string sExtraVar
* int nExtraBin * int nExtraBin
* **Return** * **Return**
* Returns a path for the efficinecy mass fit files with extra tags used to check the pi0 TM and using pi0 weights.
### string GetEfficiencyFile() ### string GetEfficiencyFile()
@ -314,7 +328,7 @@ Dedicated function needed as the background samples were saved in a different pl
* string year * string year
* string magnet * string magnet
* int Run * int Run
* //input/output file selectionbool UseOnlyJpsiEvents * bool UseOnlyJpsiEvents
* bool UseOnlyMuMuEvents * bool UseOnlyMuMuEvents
* bool PHSP * bool PHSP
* bool KshortDecayInVelo * bool KshortDecayInVelo
@ -334,6 +348,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool binnedFit * bool binnedFit
* bool sigEff * bool sigEff
* **Return** * **Return**
* Path to the efficeny file defined by the options.
### string GetEfficiencyFileTM() ### string GetEfficiencyFileTM()
@ -342,7 +357,7 @@ Dedicated function needed as the background samples were saved in a different pl
* string year * string year
* string magnet * string magnet
* int Run * int Run
* //input/output file selectionbool UseOnlyJpsiEvents * bool UseOnlyJpsiEvents
* bool UseOnlyMuMuEvents * bool UseOnlyMuMuEvents
* bool PHSP * bool PHSP
* bool KshortDecayInVelo * bool KshortDecayInVelo
@ -357,13 +372,14 @@ Dedicated function needed as the background samples were saved in a different pl
* string customTMbranch * string customTMbranch
* bool gammaTM * bool gammaTM
* **Return** * **Return**
* Calls [string GetEfficiencyFile()](string-getefficiencyfile) with settings set to truth matching efficiency.
### string GetEfficiencyFilePi0TM() ### string GetEfficiencyFilePi0TM()
* **Parameters** * **Parameters**
* string year * string year
* int Run * int Run
* //input/output file selectionbool UseOnlyJpsiEvents * bool UseOnlyJpsiEvents
* bool UseOnlyMuMuEvents * bool UseOnlyMuMuEvents
* bool PHSP * bool PHSP
* bool weightedFromPi0 * bool weightedFromPi0
@ -372,6 +388,7 @@ Dedicated function needed as the background samples were saved in a different pl
* string sExtraVar * string sExtraVar
* bool sigEff * bool sigEff
* **Return** * **Return**
* Calls [string GetEfficiencyFile()](string-getefficiencyfile) with settings set to pi0-related truth matching efficiency.
### string GetEfficiencyFile() ### string GetEfficiencyFile()
@ -380,7 +397,7 @@ Dedicated function needed as the background samples were saved in a different pl
* string year * string year
* string magnet * string magnet
* int Run * int Run
* //input/output file selectionbool UseOnlyJpsiEvents * bool UseOnlyJpsiEvents
* bool UseOnlyMuMuEvents * bool UseOnlyMuMuEvents
* bool PHSP * bool PHSP
* bool KshortDecayInVelo * bool KshortDecayInVelo
@ -392,9 +409,10 @@ Dedicated function needed as the background samples were saved in a different pl
* string customTMbranch * string customTMbranch
* bool gammaTM * bool gammaTM
* **Return** * **Return**
* Calls [string GetEfficiencyFile()](string-getefficiencyfile) with settings ignoring the pi0 tests.
### string GetEfficiencyFile() ### string GetEfficiencyFile()
Calls [string GetEfficiencyFile()](string-getefficiencyfile).
* **Parameters** * **Parameters**
* string effType * string effType
* string year * string year
@ -410,6 +428,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool useFancyFit * bool useFancyFit
* string sExtraVar * string sExtraVar
* **Return** * **Return**
* Path to the default efficiency files used to calculate the expected yield in [[BDTcutScanner.cpp|BDTcutScanner.cpp]], for given year and run.
### string GetEfficiencyFile() ### string GetEfficiencyFile()
@ -427,6 +446,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool useFancyFit * bool useFancyFit
* string sExtraVar * string sExtraVar
* **Return** * **Return**
* Path to the default efficiency files used to calculate the expected yield in [[BDTcutScanner.cpp|BDTcutScanner.cpp]], for given year.
### string GetEfficiencyFile() ### string GetEfficiencyFile()
@ -444,6 +464,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool useFancyFit * bool useFancyFit
* string sExtraVar * string sExtraVar
* **Return** * **Return**
* Path to the default efficiency files used to calculate the expected yield in [[BDTcutScanner.cpp|BDTcutScanner.cpp]], for given Run.
### string GetBDTScanFile() ### string GetBDTScanFile()
@ -451,20 +472,24 @@ Dedicated function needed as the background samples were saved in a different pl
* string year * string year
* string magnet * string magnet
* int Run * int Run
* //input/output file selectionbool KshortDecayInVelo * bool KshortDecayInVelo
* bool UseLowQ2Range * bool UseLowQ2Range
* bool fineScan * bool fineScan
* **Return** * **Return**
* Path to the default efficiency files used to calculate the expected yield in [[BDTcutScanner.cpp|BDTcutScanner.cpp]], for given year.
### string GetBDTScanBackgroundFitFile() ### string GetBDTScanBackgroundFitFile()
* **Parameters** * **Parameters**
* string year * string year
* int Run * int Run
* //input/output file selectionbool KshortDecayInVelo * bool KshortDecayInVelo
* bool UseLowQ2Range * bool UseLowQ2Range
* double TMVAcut * double TMVAcut
* **Return** * **Return**
* Path to the simple background only fit to the upper mass sideband
## TMVA plots
### string GetTMVAplotsFolder() ### string GetTMVAplotsFolder()
@ -475,20 +500,13 @@ Dedicated function needed as the background samples were saved in a different pl
* bool KshortDecaysInVelo * bool KshortDecaysInVelo
* int nConfiguration * int nConfiguration
* bool UseLowQ2Range * bool UseLowQ2Range
* string customTMbranch * (string customTMbranch)
* bool gammaTM * (bool gammaTM)
* **Return** * **Return**
* Path to the folder with pretty TMVA plots
### string GetTMVAplotsFolder()
* **Parameters** ## Resolution plots
* int year
* int Run
* bool SplitYears
* bool KshortDecaysInVelo
* int nConfiguration
* bool UseLowQ2Range
* **Return**
### string getResolutionFile() ### string getResolutionFile()
@ -502,7 +520,9 @@ Dedicated function needed as the background samples were saved in a different pl
* bool PHSP * bool PHSP
* bool KshortDecayInVelo * bool KshortDecayInVelo
* **Return** * **Return**
* Reslution plot adress.
## Other paths
### string returnFileAddress() ### string returnFileAddress()
* **Parameters** * **Parameters**
@ -516,9 +536,10 @@ Dedicated function needed as the background samples were saved in a different pl
* bool PHSP * bool PHSP
* bool KshortDecayInVelo * bool KshortDecayInVelo
* **Return** * **Return**
* Returns either [GetFinalOutputFile()](#string-getfinaloutputfile) or [GetBDTinputFile()](#string-getbdtinputfile) or [GetInputFile()](#string-getinputfile)
## Truth matching control plots
### std::string dataTypeString() ### std::string dataTypeString()
* **Parameters** * **Parameters**
* bool MC * bool MC
* bool Reference * bool Reference
@ -527,6 +548,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool K1 * bool K1
* bool Inc * bool Inc
* **Return** * **Return**
* Tag for the given sample (eg. "data", "RefMC" or "BtoXJpsi")
### string getTMplotsFolder() ### string getTMplotsFolder()
@ -538,6 +560,7 @@ Dedicated function needed as the background samples were saved in a different pl
* bool K1 * bool K1
* bool Inc * bool Inc
* **Return** * **Return**
* Folder where the control truth-matching plots are stored.
### string getTMplotsPath() ### string getTMplotsPath()
@ -550,9 +573,13 @@ Dedicated function needed as the background samples were saved in a different pl
* bool K1 * bool K1
* bool Inc * bool Inc
* **Return** * **Return**
* Return the control truth-matching plot file (calls [getTMplotsFolder()](#string-gettmplotsfolder)).
## Restoring preselected data from backup
Useuful when the selection changes, one does not have to run the whole [preSelection()](https://git.physi.uni-heidelberg.de/kopecna/EWP-BplusToKstMuMu-AngAna/wiki/BDTSelection#preselection).
### bool restore_from_backup() ### bool restore_from_backup()
Replace the current preselected file by the one from backup.
* **Parameters** * **Parameters**
* string year * string year
* string magnet * string magnet
@ -560,44 +587,48 @@ Dedicated function needed as the background samples were saved in a different pl
* bool ReferenceChannel * bool ReferenceChannel
* bool PHSP * bool PHSP
* **Return** * **Return**
* Always one
### bool restore_allYears_from_backup() ### bool restore_allYears_from_backup()
Calls [restore_from_backup()](#bool-restore_from_backup) for all years and both polarities.
* **Parameters** * **Parameters**
* bool MC * bool MC
* bool ReferenceChannel * bool ReferenceChannel
* bool PHSP * bool PHSP
* **Return** * **Return**
* Always one
### bool restore_allData_from_backup() ### bool restore_allData_from_backup()
Calls [restore_allYears_from_backup()](#bool-restore_allYears_from_backup) for data.
* **Parameters**
*
* **Return** * **Return**
* Always one
### int restore_allMCsig_from_backup() ### int restore_allMCsig_from_backup()
* **Parameters** Calls [restore_allYears_from_backup()](#bool-restore_allYears_from_backup) for signal MC.
*
* **Return** * **Return**
* Always one
### int restore_allMCref_from_backup() ### int restore_allMCref_from_backup()
Calls [restore_allYears_from_backup()](#bool-restore_allYears_from_backup) for reference MC.
* **Parameters**
*
* **Return** * **Return**
* Always one
### int restore_allPHSP_from_backup() ### int restore_allPHSP_from_backup()
* **Parameters** Calls [restore_allYears_from_backup()](#bool-restore_allYears_from_backup) for PHSP MC.
*
* **Return** * **Return**
* Always one
### int restore_allMC_from_backup() ### int restore_allMC_from_backup()
Restores all the MC samples from backup (see the three functions above)
* **Parameters**
*
* **Return** * **Return**
* Always one
## Create backups
### bool create_backup() ### bool create_backup()