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
OOTResult
Definition: OOTMultiplicityPlotMacros.h:33
OOTResult::ngoodbx
int ngoodbx
Definition: OOTMultiplicityPlotMacros.h:40
OOTSummary::hootfracsum
TH1F * hootfracsum
Definition: OOTMultiplicityPlotMacros.h:50
OOTSummary::OOTSummary
OOTSummary()
Definition: OOTMultiplicityPlotMacros.h:52
OOTSummary::hootfrac
TH1F * hootfrac
Definition: OOTMultiplicityPlotMacros.h:49
OOTSummary::~OOTSummary
~OOTSummary()
Definition: OOTMultiplicityPlotMacros.h:62
OOTResult::ootfracsumerr
float ootfracsumerr
Definition: OOTMultiplicityPlotMacros.h:39
ComputeOOTFractionvsRun
OOTSummary * ComputeOOTFractionvsRun(TFile *ff, const char *itmodule, const char *ootmodule, const char *etmodule, const char *hname, OOTSummary *ootsumm=nullptr)
Definition: OOTMultiplicityPlotMacros.cc:47
OOTResult::hratio
TH1F * hratio
Definition: OOTMultiplicityPlotMacros.h:35
FillingSchemeFromProfile
std::vector< int > FillingSchemeFromProfile(TFile *ff, const char *path, const char *hname, const float thr=0.)
Definition: OOTMultiplicityPlotMacros.cc:232
alignCSCRings.ff
ff
Definition: alignCSCRings.py:148
OOTSummary::hngoodbx
TH1F * hngoodbx
Definition: OOTMultiplicityPlotMacros.h:51
OOTResult::nfilledbx
int nfilledbx
Definition: OOTMultiplicityPlotMacros.h:41
OOTResult::ootfrac
float ootfrac
Definition: OOTMultiplicityPlotMacros.h:36
FillingScheme
std::vector< int > FillingScheme(TFile *ff, const char *path, const float thr=0.)
Definition: OOTMultiplicityPlotMacros.cc:198
ComputeOOTFraction
OOTResult * ComputeOOTFraction(TFile *ff, const char *itmodule, const char *ootmodule, const char *etmodule, const int run, const char *hname, const bool &perFill=false)
Definition: OOTMultiplicityPlotMacros.cc:83
OOTResult::ootfracerr
float ootfracerr
Definition: OOTMultiplicityPlotMacros.h:37
writedatasetfile.run
run
Definition: writedatasetfile.py:27
OOTSummary
Definition: OOTMultiplicityPlotMacros.h:47
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
OOTResult::ootfracsum
float ootfracsum
Definition: OOTMultiplicityPlotMacros.h:38
OOTResult::OOTResult
OOTResult()
Definition: OOTMultiplicityPlotMacros.h:42
OOTResult::~OOTResult
~OOTResult()
Definition: OOTMultiplicityPlotMacros.h:44
ComputeOOTFractionvsFill
OOTSummary * ComputeOOTFractionvsFill(TFile *ff, const char *itmodule, const char *ootmodule, const char *etmodule, const char *hname, OOTSummary *ootsumm=nullptr)
Definition: OOTMultiplicityPlotMacros.cc:12