Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-07 08:09:54

0001 #ifndef __HERWIGQAPLOTTINGCONFIG_H__
0002 #define __HERWIGQAPLOTTINGCONFIG_H__
0003 
0004 #include <TH1.h>
0005 #include <TH2.h>
0006 #include <TLegend.h>
0007 #include <TDirectory.h>
0008 #include <TFile.h>
0009 #include <TCanvas.h>
0010 #include <TPad.h>
0011 
0012 #include <string>
0013 #include <vector>
0014 #include <format>
0015 
0016 class HerwigQAPlottingConfig
0017 {
0018     public:
0019         HerwigQAPlottingConfig(float herwig_xs=1., float pythia_xs=1.);
0020         ~HerwigQAPlottingConfig(){};
0021         void ExtractType(TFile*);
0022         void DumpHistos(std::string, std::vector<TCanvas*>*);
0023         std::vector<TPad*>* AddPads(TCanvas*);
0024         std::vector<TPad*>* Canvas2DDivide(TCanvas*);
0025         void SetLegend(TLegend*);
0026         void SetsPhenixHeaderLegend(TLegend*, std::string, std::string jettype="null");
0027         void SetsPhenixHeaderLegend(TLegend*, bool, std::string jettype="null");
0028         TH1F* GetRatioPlot(TH1F*, TH1F*);
0029         TH1I* GetRatioPlot(TH1I*, TH1I*);
0030         TH2F* GetRatioPlot(TH2F*, TH2F*);
0031         std::vector<TH2F*>* GetRatioPlots(std::vector<TH2F*>*, std::vector<TH2F*>*);
0032         void ScaleXS(std::vector<TH1F*>*, bool);
0033         void ScaleXS(std::vector<TH1I*>*, bool);
0034         void ScaleXS(TH1F*, bool);
0035         void ScaleXS(TH1I*, bool);
0036         bool isJet(){return jet;}
0037         bool isPhoton(){return photon;}
0038     private:
0039         bool jet=false;
0040         bool photon=false;
0041         bool herwig=false;
0042         bool pythia=false;
0043         float HW_XS=1.;
0044         float PY_XS=1.;
0045         float lookupTrigger(std::string);
0046 
0047 };
0048 #endif