70 const string hit_ratio_name =
"hit ratio in hot spot";
73 if (hit_ratio ==
nullptr)
78 hit_ratio = ibooker.
book1D(hit_ratio_name, title+
";plane;N_hits(320<strip<440) / N_hits(all)", 10, -0.5, 9.5);
84 TAxis *y_axis = activity->
getTH2F()->GetYaxis();
85 for (
int bix = 1; bix <= activity->
getNbinsX(); ++bix)
87 double S_full = 0., S_sel = 0.;
88 for (
int biy = 1; biy <= activity->
getNbinsY(); ++biy)
91 double s = y_axis->GetBinCenter(biy);
95 if (s > 320. && s < 440.)
99 double r = (S_full > 0.) ? S_sel / S_full : 0.;
119 if (!efficiency_num || !efficiency_den)
123 const string efficiency_name =
"efficiency";
126 if (efficiency ==
nullptr)
130 TAxis *axis = efficiency_den->
getTH1()->GetXaxis();
132 efficiency = ibooker.
book1D(efficiency_name, title+
";track position (mm)", axis->GetNbins(), axis->GetXmin(), axis->GetXmax());
134 efficiency->
getTH1F()->Reset();
140 const string rp_efficiency_name =
"plane efficiency";
143 if (rp_efficiency ==
nullptr)
147 TAxis *axis = efficiency_den->
getTH1()->GetXaxis();
149 rp_efficiency = ibooker.
book2D(rp_efficiency_name, title+
";plane;track position (mm)",
150 10, -0.5, 9.5, axis->GetNbins(), axis->GetXmin(), axis->GetXmax());
151 rpPlotInitialized =
true;
153 if (!rpPlotInitialized)
154 rp_efficiency->
getTH2F()->Reset();
155 rpPlotInitialized =
true;
159 for (
signed int bi = 1; bi <= efficiency->
getNbinsX(); bi++)
166 double p = num / den;
167 double p_unc =
sqrt(p * (1. - p) / den);
171 int pl_bi = detId.
plane() + 1;
185 for (
unsigned int arm = 0;
arm < 2;
arm++)
188 for (
unsigned int st = 0; st < 3; st += 2)
191 for (
unsigned int rp = 0; rp < 6; ++rp)
208 bool rpPlotInitialized =
false;
211 for (
unsigned int pl = 0; pl < 10; ++pl)
Detector ID class for TOTEM Si strip detectors.
void setBinContent(int binx, double content)
set content of bin (1-D)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
~TotemRPDQMHarvester() override
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
MonitorElement * book1D(Args &&...args)
void MakeHitNumberRatios(unsigned int id, DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void rpName(std::string &name, NameFlag flag=nFull) const
CTPPSDetId getRPId() const
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
MonitorElement * get(std::string const &path)
MonitorElement * book2D(Args &&...args)
void MakePlaneEfficiencyHistograms(unsigned int id, DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, bool &rpPlotInitialized)
int getNbinsY() const
get # of bins in Y-axis
Base class for CTPPS detector IDs.
double getBinContent(int binx) const
get content of bin (1-D)
void planeName(std::string &name, NameFlag flag=nFull) const
int getNbinsX() const
get # of bins in X-axis
TotemRPDQMHarvester(const edm::ParameterSet &ps)