71 for (
int ibin = 1; ibin <= den->
getNbinsX(); ibin++) {
79 result->setBinContent(ibin, eff);
80 result->setBinError(ibin, bin_err);
85 double integral =
h->getTH1F()->Integral();
87 for (
int ibin = 1; ibin <=
h->getNbinsX(); ibin++) {
88 double eff =
h->getBinContent(ibin) * norma;
89 double bin_err =
h->getBinError(ibin) * norma;
90 h->setBinContent(ibin, eff);
91 h->setBinError(ibin, bin_err);
152 if (!meBTLTrackEffEtaTot || !meBTLTrackEffPhiTot || !meBTLTrackEffPtTot || !meBTLTrackEffEtaMtd ||
153 !meBTLTrackEffPhiMtd || !meBTLTrackEffPtMtd || !meETLTrackEffEtaTotZneg || !meETLTrackEffPhiTotZneg ||
154 !meETLTrackEffPtTotZneg || !meETLTrackEffEtaMtdZneg || !meETLTrackEffPhiMtdZneg || !meETLTrackEffPtMtdZneg ||
155 !meETLTrackEffEta2MtdZneg || !meETLTrackEffPhi2MtdZneg || !meETLTrackEffPt2MtdZneg || !meETLTrackEffEtaTotZpos ||
156 !meETLTrackEffPhiTotZpos || !meETLTrackEffPtTotZpos || !meETLTrackEffEtaMtdZpos || !meETLTrackEffPhiMtdZpos ||
157 !meETLTrackEffPtMtdZpos || !meETLTrackEffEta2MtdZpos || !meETLTrackEffPhi2MtdZpos || !meETLTrackEffPt2MtdZpos ||
158 !meMVATrackEffPtTot || !meMVATrackMatchedEffPtTot || !meMVATrackMatchedEffPtMtd || !meMVATrackEffEtaTot ||
159 !meMVATrackMatchedEffEtaTot || !meMVATrackMatchedEffEtaMtd || !meTrackMatchedTPEffPtTot ||
160 !meTrackMatchedTPEffPtMtd || !meTrackMatchedTPEffPtEtl2Mtd || !meTrackMatchedTPmtdEffPtTot ||
161 !meTrackMatchedTPmtdEffPtMtd || !meTrackMatchedTPEffEtaTot || !meTrackMatchedTPEffEtaMtd ||
162 !meTrackMatchedTPEffEtaEtl2Mtd || !meTrackMatchedTPmtdEffEtaTot || !meTrackMatchedTPmtdEffEtaMtd ||
163 !meTrackNumHits || !meTrackNumHitsNT || !meTrackPtTot || !meTrackEtaTot || !meExtraPtMtd || !meExtraPtEtl2Mtd ||
164 !meExtraEtaMtd || !meExtraEtaEtl2Mtd || !meExtraPhiAtBTL || !meExtraPhiAtBTLmatched || !meExtraBTLeneInCone ||
165 !meExtraMTDfailExtenderEta || !meExtraMTDfailExtenderPt) {
166 edm::LogError(
"MtdTracksHarvester") <<
"Monitoring histograms not found!" << std::endl;
173 " Track Efficiency VS Eta;#eta;Efficiency",
175 meBTLTrackEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
176 meBTLTrackEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
181 "Track Efficiency VS Phi;#phi [rad];Efficiency",
183 meBTLTrackEffPhiTot->
getTH1()->GetXaxis()->GetXmin(),
184 meBTLTrackEffPhiTot->
getTH1()->GetXaxis()->GetXmax());
189 "Track Efficiency VS Pt;Pt [GeV];Efficiency",
191 meBTLTrackEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
192 meBTLTrackEffPtTot->
getTH1()->GetXaxis()->GetXmax());
197 " Track Efficiency VS Eta (-Z);#eta;Efficiency",
199 meETLTrackEffEtaTotZneg->
getTH1()->GetXaxis()->GetXmin(),
200 meETLTrackEffEtaTotZneg->
getTH1()->GetXaxis()->GetXmax());
205 "Track Efficiency VS Phi (-Z);#phi [rad];Efficiency",
207 meETLTrackEffPhiTotZneg->
getTH1()->GetXaxis()->GetXmin(),
208 meETLTrackEffPhiTotZneg->
getTH1()->GetXaxis()->GetXmax());
213 "Track Efficiency VS Pt (-Z);Pt [GeV];Efficiency",
215 meETLTrackEffPtTotZneg->
getTH1()->GetXaxis()->GetXmin(),
216 meETLTrackEffPtTotZneg->
getTH1()->GetXaxis()->GetXmax());
221 " Track Efficiency VS Eta (+Z);#eta;Efficiency",
223 meETLTrackEffEtaTotZpos->
getTH1()->GetXaxis()->GetXmin(),
224 meETLTrackEffEtaTotZpos->
getTH1()->GetXaxis()->GetXmax());
229 "Track Efficiency VS Phi (+Z);#phi [rad];Efficiency",
231 meETLTrackEffPhiTotZpos->
getTH1()->GetXaxis()->GetXmin(),
232 meETLTrackEffPhiTotZpos->
getTH1()->GetXaxis()->GetXmax());
237 "Track Efficiency VS Pt (+Z);Pt [GeV];Efficiency",
239 meETLTrackEffPtTotZpos->
getTH1()->GetXaxis()->GetXmin(),
240 meETLTrackEffPtTotZpos->
getTH1()->GetXaxis()->GetXmax());
245 " Track Efficiency VS Eta (-Z, 2 hit);#eta;Efficiency",
247 meETLTrackEffEtaTotZneg->
getTH1()->GetXaxis()->GetXmin(),
248 meETLTrackEffEtaTotZneg->
getTH1()->GetXaxis()->GetXmax());
253 "Track Efficiency VS Phi (-Z, 2 hit);#phi [rad];Efficiency",
255 meETLTrackEffPhiTotZneg->
getTH1()->GetXaxis()->GetXmin(),
256 meETLTrackEffPhiTotZneg->
getTH1()->GetXaxis()->GetXmax());
261 "Track Efficiency VS Pt (-Z, 2 hit);Pt [GeV];Efficiency",
263 meETLTrackEffPtTotZneg->
getTH1()->GetXaxis()->GetXmin(),
264 meETLTrackEffPtTotZneg->
getTH1()->GetXaxis()->GetXmax());
269 "Track Efficiency VS Eta (+Z, 2 hit);#eta;Efficiency",
271 meETLTrackEffEtaTotZpos->
getTH1()->GetXaxis()->GetXmin(),
272 meETLTrackEffEtaTotZpos->
getTH1()->GetXaxis()->GetXmax());
277 "Track Efficiency VS Phi (+Z, 2 hit);#phi [rad];Efficiency",
279 meETLTrackEffPhiTotZpos->
getTH1()->GetXaxis()->GetXmin(),
280 meETLTrackEffPhiTotZpos->
getTH1()->GetXaxis()->GetXmax());
285 "Track Efficiency VS Pt (+Z, 2 hit);Pt [GeV];Efficiency",
287 meETLTrackEffPtTotZpos->
getTH1()->GetXaxis()->GetXmin(),
288 meETLTrackEffPtTotZpos->
getTH1()->GetXaxis()->GetXmax());
293 "MTD matching efficiency wrt extrapolated track VS Pt;Pt [GeV];Efficiency",
295 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
296 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmax());
301 "MTD matching efficiency (2 ETL) wrt extrapolated track VS Pt;Pt [GeV];Efficiency",
303 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
304 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmax());
309 "MTD matching efficiency wrt extrapolated track VS Eta;Eta;Efficiency",
311 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
312 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
317 "MTD matching efficiency (2 ETL) wrt extrapolated track VS Eta;Eta;Efficiency",
319 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
320 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
325 "Track selected efficiency VS Pt;Pt [GeV];Efficiency",
327 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
328 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmax());
333 "Track selected efficiency VS Eta;Eta;Efficiency",
335 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
336 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
341 "Track matched to GEN efficiency VS Pt;Pt [GeV];Efficiency",
343 meMVATrackMatchedEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
344 meMVATrackMatchedEffPtTot->
getTH1()->GetXaxis()->GetXmax());
349 "Track matched to GEN efficiency VS Eta;Eta;Efficiency",
351 meMVATrackMatchedEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
352 meMVATrackMatchedEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
357 "Track selected efficiency TP VS Pt;Pt [GeV];Efficiency",
359 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
360 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmax());
365 "Track selected efficiency TP VS Eta;Eta;Efficiency",
367 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
368 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
373 "Track matched to TP efficiency VS Pt;Pt [GeV];Efficiency",
375 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
376 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmax());
381 "Track matched to TP efficiency VS Eta;Eta;Efficiency",
383 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
384 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
389 "Track matched to TP efficiency VS Pt, 2 ETL hits;Pt [GeV];Efficiency",
391 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
392 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmax());
397 "Track matched to TP efficiency VS Eta, 2 ETL hits;Eta;Efficiency",
399 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
400 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
405 "Track selected efficiency TP-mtd hit VS Pt;Pt [GeV];Efficiency",
407 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
408 meMVATrackEffPtTot->
getTH1()->GetXaxis()->GetXmax());
413 "Track selected efficiency TPmtd hit VS Eta;Eta;Efficiency",
415 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
416 meMVATrackEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
421 "Track matched to TP-mtd hit efficiency VS Pt;Pt [GeV];Efficiency",
422 meTrackMatchedTPmtdEffPtTot->
getNbinsX(),
423 meTrackMatchedTPmtdEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
424 meTrackMatchedTPmtdEffPtTot->
getTH1()->GetXaxis()->GetXmax());
429 "Track matched to TP-mtd hit efficiency VS Eta;Eta;Efficiency",
430 meTrackMatchedTPmtdEffEtaTot->
getNbinsX(),
431 meTrackMatchedTPmtdEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
432 meTrackMatchedTPmtdEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
437 "Fraction of tracks with MTD hits and no time associated; Num. of hits",
439 meTrackNumHits->
getTH1()->GetXaxis()->GetXmin(),
440 meTrackNumHits->
getTH1()->GetXaxis()->GetXmax());
447 for (
int i = 0;
i < 2;
i++) {
461 "Efficiency to match hits at BTL surface",
463 meExtraPhiAtBTL->
getTH1()->GetXaxis()->GetXmin(),
464 meExtraPhiAtBTL->
getTH1()->GetXaxis()->GetXmax());
471 ibook.
book1D(
"ExtraMTDfailExtenderEtaEff",
472 "Track extrapolated at MTD surface no extender efficiency VS Eta;Eta;Efficiency",
474 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
475 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
480 ibook.
book1D(
"ExtraMTDfailExtenderPtEff",
481 "Track extrapolated at MTD surface no extender efficiency VS Pt;Pt [GeV];Efficiency",
483 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
484 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmax());
495 descriptions.
add(
"MtdTracksPostProcessor",
desc);
MonitorElement * meExtraPtEff_
MonitorElement * meTPEtaMatchEtl2Eff_
MonitorElement * meExtraMTDfailExtenderPtEff_
MtdTracksHarvester(const edm::ParameterSet &iConfig)
MonitorElement * meTPEtaSelEff_
MonitorElement * meEtlEtaEff2_[2]
MonitorElement * meTPEtaMatchEff_
MonitorElement * meExtraEtaEtl2Eff_
MonitorElement * meMVAEtaMatchEff_
MonitorElement * meExtraPhiAtBTLEff_
Log< level::Error, false > LogError
MonitorElement * meTPmtdEtaMatchEff_
MonitorElement * meTPPtSelEff_
MonitorElement * meEtlPhiEff2_[2]
void computeEfficiency1D(MonitorElement *num, MonitorElement *den, MonitorElement *result)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * meMVAPtSelEff_
MonitorElement * meEtlPhiEff_[2]
MonitorElement * meTPPtMatchEtl2Eff_
MonitorElement * meMVAPtMatchEff_
#define DEFINE_FWK_MODULE(type)
MonitorElement * meEtlPtEff_[2]
const std::string folder_
MonitorElement * meBtlPtEff_
Integral< F, X >::type integral(const F &f)
MonitorElement * meTPmtdEtaSelEff_
void normalize(MonitorElement *h, double scale)
MonitorElement * meTPPtMatchEff_
MonitorElement * meEtlPtEff2_[2]
MonitorElement * meExtraPtEtl2Eff_
MonitorElement * meExtraEtaEff_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meBtlEtaEff_
virtual MonitorElement * get(std::string const &fullpath) const
virtual TH1 * getTH1() const
~MtdTracksHarvester() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meBtlPhiEff_
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * meNoTimeFraction_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * meMVAEtaSelEff_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
MonitorElement * meEtlEtaEff_[2]
MonitorElement * meTPmtdPtSelEff_
MonitorElement * meExtraMTDfailExtenderEtaEff_
Power< A, B >::type pow(const A &a, const B &b)
MonitorElement * meTPmtdPtMatchEff_
virtual double getBinContent(int binx) const
get content of bin (1-D)