Src files¶
In this section there is a brief explanation for each file in src/ folder. In general, this files are headers called by main files defined on the section Overview.
📄 create_TH2D.h¶
TH2D* create_TH2D(const char* name, const char* title, string xquantity, string yquantity, int nbinsx, int nbinsy,
    double* xbins, double* ybins)
Create a empty TH2D histogram according xquantity and yquantity variables. these varibles supports "Pt", "Eta" and "Phi" values.
📄 create_folder.h¶
void create_folder(const char* folderPath, bool deleteOld = false)
This function creates folder path recursively. If deleteOld is true, it deleted the old folder if the path already exists.
📄 get_efficiency.h¶
TEfficiency* get_efficiency(TH1D* all, TH1D* pass, string quantity, string MuonId, string prefix_name = "", bool shouldWrite = false)
Function used to calculate the efficiency. The MuonId, quantity and prefix_name are used to set the name and title of TEfficiency*. If shouldWrite is true, it writes the result in any root file opened.
📄 get_efficiency_2D.h¶
TEfficiency* get_efficiency_2D(TH2D* all, TH2D* pass, string xquantity, string yquantity, string MuonId, string prefix_name = "", bool shouldWrite = false)
Function used to calculate the 2D efficiency. The MuonId, xquantity, yquantity and prefix_name are used to set the name and title of TEfficiency*. If shouldWrite is true, it writes the result in any root file opened.
📄 get_efficiency_TH2D.h¶
TH2D* get_efficiency_TH2D(TH2D* hall, TH2D* hpass, string xquantity, string yquantity, string MuonId, string prefix_name = "")
Function used to calculate the 2D efficiency. The MuonId, xquantity, yquantity and prefix_name are used to set the name and title of TEfficiency*. If shouldWrite is true, it writes the result in any root file opened.
Same function idea as TEfficiency* get_efficiency_2D(...), but it creates a TH2D objects instead which allows better control of uncertainty calculus.
📄 make_TH1D.h¶
TH1D* make_TH1D(string name, double** values, int index, double* bins, int nbins, string quantity = "", bool draw = false)
Creates TH1D* histogram direclty from values which stores doFit's outputs.
- int indexis related with the information above:- 0means all histogram and- 1means pass histogram. Choose the number due the histogram you are looking to make.
- double* binsis used to set histogram bins limits.
- int nbinsrepresents the number of bins in- double* bins.
- string quantitysupports- "Pt",- "Eta"and- "Phi"values.
- If bool drawit draws the plot on screen.
📄 yields_n_errs_to_TH2Ds_bin.h¶
void yields_n_errs_to_TH2Ds_bin(TH2D* hist2d_all, TH2D* hist2d_pass, int x, int y, double* yields_n_errs)
This function fills hist2d_all and hist2d_pass histogram in cell (x,y) with yields_n_errs which is a output from doFit functions.
📂 dofits¶
Here is stored functions that measures the yields and errors from each bin fit.
The return from each function follows this structure: [yield_all, yield_pass, error_all, error_pass].
Functions in this files are defined by:
double* doFit(string condition, string MuonId, const char* savePath = NULL)
- string conditionselects the bin conditions.
- string MuonIdsupports- "trackerMuon",- "standaloneMuon"and- "globalMuon"values.
- const char* savePathwhere the fit output file from the fit will be saved for further checks.