62 path.replace(0, 2,
"CTPPS/TrackingStrip");
70 const string hit_ratio_name =
"hit ratio in hot spot";
73 if (hit_ratio ==
NULL)
77 hit_ratio = ibooker.
book1D(hit_ratio_name, title+
";plane;N_hits(320<strip<440) / N_hits(all)", 10, -0.5, 9.5);
83 TAxis *y_axis = activity->
getTH2F()->GetYaxis();
84 for (
int bix = 1; bix <= activity->
getNbinsX(); ++bix)
86 double S_full = 0., S_sel = 0.;
87 for (
int biy = 1; biy <= activity->
getNbinsY(); ++biy)
90 double s = y_axis->GetBinCenter(biy);
94 if (s > 320. && s < 440.)
98 double r = (S_full > 0.) ? S_sel / S_full : 0.;
111 path.replace(0, 2,
"CTPPS/TrackingStrip");
116 if (!efficiency_num || !efficiency_den)
120 const string efficiency_name =
"efficiency";
123 if (efficiency ==
NULL)
126 TAxis *axis = efficiency_den->
getTH1()->GetXaxis();
128 efficiency = ibooker.
book1D(efficiency_name, title+
";track position (mm)", axis->GetNbins(), axis->GetXmin(), axis->GetXmax());
130 efficiency->
getTH1F()->Reset();
135 path.replace(0, 2,
"CTPPS/TrackingStrip");
136 const string rp_efficiency_name =
"plane efficiency";
139 if (rp_efficiency ==
NULL)
142 TAxis *axis = efficiency_den->
getTH1()->GetXaxis();
144 rp_efficiency = ibooker.
book2D(rp_efficiency_name, title+
";plane;track position (mm)",
145 10, -0.5, 9.5, axis->GetNbins(), axis->GetXmin(), axis->GetXmax());
146 rpPlotInitialized =
true;
148 if (!rpPlotInitialized)
149 rp_efficiency->
getTH2F()->Reset();
150 rpPlotInitialized =
true;
154 for (
signed int bi = 1; bi <= efficiency->
getNbinsX(); bi++)
161 double p = num / den;
162 double p_unc =
sqrt(p * (1. - p) / den);
166 int pl_bi = (
id%10) + 1;
180 for (
unsigned int arm = 0; arm < 2; arm++)
183 for (
unsigned int st = 0; st < 3; st += 2)
185 unsigned int stId = 10*arm + st;
188 for (
unsigned int rp = 0; rp < 6; ++rp)
190 unsigned int rpId = 10*stId + rp;
192 MakeHitNumberRatios(rpId, ibooker, igetter);
194 bool rpPlotInitialized =
false;
197 for (
unsigned int pl = 0; pl < 10; ++pl)
199 unsigned int plId = 10*rpId + pl;
201 MakePlaneEfficiencyHistograms(plId, ibooker, igetter, rpPlotInitialized);
static std::string rpName(unsigned int id, NameFlag flag=nFull)
returns official name of a RP characterized by ''id''; if ''full'' is true, name of station is prefix...
void setBinContent(int binx, double content)
set content of bin (1-D)
static std::string planeName(unsigned int id, NameFlag flag=nFull)
returns official name of a plane characterized by ''id''; if ''full'' is true, name of RP is prefixed...
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
virtual ~TotemRPDQMHarvester()
int getNbinsY(void) const
get # of bins in Y-axis
MonitorElement * book1D(Args &&...args)
void MakeHitNumberRatios(unsigned int id, DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, const edm::LuminosityBlock &, const edm::EventSetup &) override
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
TH1F * getTH1F(void) const
void MakePlaneEfficiencyHistograms(unsigned int id, DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, bool &rpPlotInitialized)
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis
TH2F * getTH2F(void) const
TotemRPDQMHarvester(const edm::ParameterSet &ps)