116 if (!efficiency_num || !efficiency_den)
120 const string efficiency_name =
"efficiency";
123 if (efficiency ==
nullptr) {
126 TAxis *axis = efficiency_den->
getTH1()->GetXaxis();
128 efficiency = ibooker.
book1D(
129 efficiency_name, title +
";track position (mm)", axis->GetNbins(), axis->GetXmin(), axis->GetXmax());
131 efficiency->
getTH1F()->Reset();
137 const string rp_efficiency_name =
"plane efficiency";
140 if (rp_efficiency ==
nullptr) {
143 TAxis *axis = efficiency_den->
getTH1()->GetXaxis();
145 rp_efficiency = ibooker.
book2D(rp_efficiency_name,
146 title +
";plane;track position (mm)",
153 rpPlotInitialized =
true;
155 if (!rpPlotInitialized)
156 rp_efficiency->
getTH2F()->Reset();
157 rpPlotInitialized =
true;
161 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.
virtual TH2F * getTH2F() const
virtual void setCurrentFolder(std::string const &fullpath)
virtual TH1F * getTH1F() const
virtual int getNbinsX() const
get # of bins in X-axis
virtual MonitorElement * get(std::string const &fullpath) const
void rpName(std::string &name, NameFlag flag=nFull) const
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Base class for CTPPS detector IDs.
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
virtual TH1 * getTH1() const