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;
Detector ID class for TOTEM Si strip detectors.
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * get(const std::string &path)
MonitorElement * book1D(Args &&...args)
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 setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
TH1F * getTH1F(void) const
Base class for CTPPS detector IDs.
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