CMS 3D CMS Logo

OOTMultiplicityPlotMacros.h
Go to the documentation of this file.
1 #ifndef DPGAnalysis_SiStripTools_OOTMultiplicityPlotMacros_h
2 #define DPGAnalysis_SiStripTools_OOTMultiplicityPlotMacros_h
3 
4 #include "TH1F.h"
5 
6 class TH1F;
7 class TFile;
8 class OOTResult;
9 class OOTSummary;
10 
12  const char* itmodule,
13  const char* ootmodule,
14  const char* etmodule,
15  const char* hname,
16  OOTSummary* ootsumm = nullptr);
18  const char* itmodule,
19  const char* ootmodule,
20  const char* etmodule,
21  const char* hname,
22  OOTSummary* ootsumm = nullptr);
24  const char* itmodule,
25  const char* ootmodule,
26  const char* etmodule,
27  const int run,
28  const char* hname,
29  const bool& perFill = false);
30 std::vector<int> FillingScheme(TFile* ff, const char* path, const float thr = 0.);
31 std::vector<int> FillingSchemeFromProfile(TFile* ff, const char* path, const char* hname, const float thr = 0.);
32 
33 class OOTResult {
34 public:
35  TH1F* hratio;
36  float ootfrac;
37  float ootfracerr;
38  float ootfracsum;
40  int ngoodbx;
41  int nfilledbx;
43  : hratio(nullptr), ootfrac(-1.), ootfracerr(0.), ootfracsum(-1.), ootfracsumerr(0.), ngoodbx(0), nfilledbx(0) {}
44  ~OOTResult() { delete hratio; }
45 };
46 
47 class OOTSummary {
48 public:
49  TH1F* hootfrac;
50  TH1F* hootfracsum;
51  TH1F* hngoodbx;
53  hootfrac = new TH1F("ootfrac", "OOT fraction vs fill/run", 10, 0., 10.);
54  hootfrac->SetCanExtend(TH1::kXaxis);
55 
56  hootfracsum = new TH1F("ootfracsum", "OOT summed fraction vs fill/run", 10, 0., 10.);
57  hootfracsum->SetCanExtend(TH1::kXaxis);
58 
59  hngoodbx = new TH1F("ngoodbx", "Number of good BX pairs vs fill/run", 10, 0., 10.);
60  hngoodbx->SetCanExtend(TH1::kXaxis);
61  }
63  delete hootfrac;
64  delete hootfracsum;
65  delete hngoodbx;
66  }
67 };
68 
69 #endif // DPGAnalysis_SiStripTools_OOTMultiplicityPlotMacros_h
OOTSummary * ComputeOOTFractionvsRun(TFile *ff, const char *itmodule, const char *ootmodule, const char *etmodule, const char *hname, OOTSummary *ootsumm=nullptr)
OOTSummary * ComputeOOTFractionvsFill(TFile *ff, const char *itmodule, const char *ootmodule, const char *etmodule, const char *hname, OOTSummary *ootsumm=nullptr)
std::vector< int > FillingSchemeFromProfile(TFile *ff, const char *path, const char *hname, const float thr=0.)
std::vector< int > FillingScheme(TFile *ff, const char *path, const float thr=0.)
OOTResult * ComputeOOTFraction(TFile *ff, const char *itmodule, const char *ootmodule, const char *etmodule, const int run, const char *hname, const bool &perFill=false)