102 for (
int ibin = 1; ibin <= den->
getNbinsX(); ibin++) {
110 result->setBinContent(ibin, eff);
111 result->setBinError(ibin, bin_err);
116 double ent =
h->getEntries();
117 for (
int ibin = 1; ibin <=
h->getNbinsX(); ibin++) {
118 double eff =
h->getBinContent(ibin) *
scale;
119 double bin_err =
h->getBinError(ibin) *
scale;
120 h->setBinContent(ibin, eff);
121 h->setBinError(ibin, bin_err);
128 for (
int ibin = 1; ibin <=
base->getNbinsX(); ibin++) {
131 base->setBinContent(ibin, newC);
132 base->setBinError(ibin, newE);
152 if (!meTrackEffPtTot || !meTrackMatchedTPEffPtTot || !meTrackMatchedTPEffPtMtd || !meTrackEffEtaTot ||
153 !meTrackMatchedTPEffEtaTot || !meTrackMatchedTPEffEtaMtd || !meRecVerNumber || !meRecVerZ || !meRecVerT ||
154 !meSimVerNumber || !meSimVerZ || !meSimVerT) {
155 edm::LogError(
"Primary4DVertexHarvester") <<
"Monitoring histograms not found!" << std::endl;
176 "Track associated to LV selected efficiency TP VS Pt;Pt [GeV];Efficiency",
178 meTrackEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
179 meTrackEffPtTot->
getTH1()->GetXaxis()->GetXmax());
184 "Track associated to LV selected efficiency TP VS Eta;Eta;Efficiency",
186 meTrackEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
187 meTrackEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
192 "Track associated to LV matched to TP efficiency VS Pt;Pt [GeV];Efficiency",
194 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmin(),
195 meTrackMatchedTPEffPtTot->
getTH1()->GetXaxis()->GetXmax());
200 "Track associated to LV matched to TP efficiency VS Eta;Eta;Efficiency",
202 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmin(),
203 meTrackMatchedTPEffEtaTot->
getTH1()->GetXaxis()->GetXmax());
238 if (!meBarrelPIDp || !meEndcapPIDp || !meBarrelTruePiNoPID || !meBarrelTrueKNoPID || !meBarrelTruePNoPID ||
239 !meEndcapTruePiNoPID || !meEndcapTrueKNoPID || !meEndcapTruePNoPID || !meBarrelTruePiAsPi || !meBarrelTrueKAsPi ||
240 !meBarrelTruePAsPi || !meEndcapTruePiAsPi || !meEndcapTrueKAsPi || !meEndcapTruePAsPi || !meBarrelTruePiAsK ||
241 !meBarrelTrueKAsK || !meBarrelTruePAsK || !meEndcapTruePiAsK || !meEndcapTrueKAsK || !meEndcapTruePAsK ||
242 !meBarrelTruePiAsP || !meBarrelTrueKAsP || !meBarrelTruePAsP || !meEndcapTruePiAsP || !meEndcapTrueKAsP ||
244 edm::LogWarning(
"Primary4DVertexHarvester") <<
"PID Monitoring histograms not found!" << std::endl;
249 "Barrel True Pi P;P [GeV]",
251 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
252 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
259 "Endcap True Pi P;P [GeV]",
261 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
262 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
269 "Barrel True K P;P [GeV]",
271 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
272 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
279 "Endcap True K P;P [GeV]",
281 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
282 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
289 "Barrel True P P;P [GeV]",
291 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
292 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
299 "Endcap True P P;P [GeV]",
301 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
302 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
309 "Barrel True pi as pi id. fraction VS P;P [GeV]",
311 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
312 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
317 "Barrel True pi as k id. fraction VS P;P [GeV]",
319 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
320 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
325 "Barrel True pi as p id. fraction VS P;P [GeV]",
327 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
328 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
333 "Barrel True pi no PID id. fraction VS P;P [GeV]",
335 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
336 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
341 "Barrel True k as pi id. fraction VS P;P [GeV]",
343 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
344 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
349 "Barrel True k as k id. fraction VS P;P [GeV]",
351 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
352 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
357 "Barrel True k as p id. fraction VS P;P [GeV]",
359 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
360 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
365 "Barrel True k no PID id. fraction VS P;P [GeV]",
367 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
368 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
373 "Barrel True p as pi id. fraction VS P;P [GeV]",
375 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
376 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
381 "Barrel True p as k id. fraction VS P;P [GeV]",
383 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
384 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
389 "Barrel True p as p id. fraction VS P;P [GeV]",
391 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
392 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
397 "Barrel True p no PID id. fraction VS P;P [GeV]",
399 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
400 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
405 "Endcap True pi as pi id. fraction VS P;P [GeV]",
407 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
408 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
413 "Endcap True pi as k id. fraction VS P;P [GeV]",
415 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
416 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
421 "Endcap True pi as p id. fraction VS P;P [GeV]",
423 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
424 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
429 "Endcap True pi no PID id. fraction VS P;P [GeV]",
431 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
432 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
437 "Endcap True k as pi id. fraction VS P;P [GeV]",
439 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
440 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
445 "Endcap True k as k id. fraction VS P;P [GeV]",
447 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
448 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
453 "Endcap True k as p id. fraction VS P;P [GeV]",
455 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
456 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
461 "Endcap True k no PID id. fraction VS P;P [GeV]",
463 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
464 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
469 "Endcap True p as pi id. fraction VS P;P [GeV]",
471 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
472 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
477 "Endcap True p as k id. fraction VS P;P [GeV]",
479 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
480 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
485 "Endcap True p as p id. fraction VS P;P [GeV]",
487 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
488 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
493 "Endcap True p no PID id. fraction VS P;P [GeV]",
495 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
496 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
501 "Barrel Identified Pi P;P [GeV]",
503 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
504 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
510 "Endcap Identified Pi P;P [GeV]",
512 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
513 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
519 "Barrel Identified K P;P [GeV]",
521 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
522 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
528 "Endcap Identified K P;P [GeV]",
530 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
531 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
537 "Barrel Identified P P;P [GeV]",
539 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
540 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
546 "Endcap Identified P P;P [GeV]",
548 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
549 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
555 "Barrel NoPID P;P [GeV]",
557 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
558 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
564 "Endcap NoPID P;P [GeV]",
566 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
567 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
573 "Barrel pi id. fraction true pi VS P;P [GeV]",
575 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
576 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
581 "Barrel k id. fraction true k VS P;P [GeV]",
583 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
584 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
589 "Barrel p id. fraction true p VS P;P [GeV]",
591 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmin(),
592 meBarrelPIDp->
getTH1()->GetXaxis()->GetXmax());
597 "Endcap pi id. fraction true pi VS P;P [GeV]",
599 meEndcapPIDp->
getTH1()->GetXaxis()->GetXmin(),
600 meEndcapPIDp->
getTH1()->GetXaxis()->GetXmax());
605 "Endcap k id. fraction true k VS P;P [GeV]",
607 meEndcapPIDp->
getTH1()->GetXaxis()->GetXmin(),
608 meEndcapPIDp->
getTH1()->GetXaxis()->GetXmax());
613 "Endcap p id. fraction true p VS P;P [GeV]",
615 meEndcapPIDp->
getTH1()->GetXaxis()->GetXmin(),
616 meEndcapPIDp->
getTH1()->GetXaxis()->GetXmax());
627 descriptions.
add(
"Primary4DVertexPostProcessor",
desc);
MonitorElement * meBarrelPIDPAsKEff_
MonitorElement * meEndcapPIDKAsPiEff_
void scaleby(MonitorElement *h, double scale)
~Primary4DVertexHarvester() override
MonitorElement * meBarrelPIDPiNoPIDEff_
MonitorElement * meBarrelPPurity_
MonitorElement * meEndcapPIDKNoPIDEff_
MonitorElement * meBarrelAsP_
MonitorElement * meBarrelTruePi_
MonitorElement * meBarrelPIDKAsPEff_
MonitorElement * meEndcapPPurity_
Primary4DVertexHarvester(const edm::ParameterSet &iConfig)
void computeEfficiency1D(MonitorElement *num, MonitorElement *den, MonitorElement *result)
MonitorElement * meTPEtaMatchEff_
MonitorElement * meEndcapPIDPiAsKEff_
MonitorElement * meBarrelPIDKAsKEff_
MonitorElement * meBarrelPIDPAsPiEff_
Log< level::Error, false > LogError
MonitorElement * meTPPtSelEff_
MonitorElement * meEndcapPIDPAsPiEff_
MonitorElement * meBarrelPIDKNoPIDEff_
MonitorElement * meBarrelPIDPiAsKEff_
MonitorElement * meEndcapPIDPiAsPiEff_
MonitorElement * meBarrelPIDPiAsPiEff_
MonitorElement * meEndcapPiPurity_
MonitorElement * meBarrelNoPID_
MonitorElement * meEndcapNoPID_
#define DEFINE_FWK_MODULE(type)
const std::string folder_
MonitorElement * meEndcapAsK_
MonitorElement * meEndcapPIDPAsPEff_
MonitorElement * meBarrelPiPurity_
MonitorElement * meEndcapAsPi_
MonitorElement * meEndcapTruePi_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meEndcapPIDKAsPEff_
MonitorElement * meBarrelKPurity_
MonitorElement * meEndcapPIDPiNoPIDEff_
MonitorElement * meBarrelAsPi_
void incrementME(MonitorElement *base, MonitorElement *toBeAdded)
virtual TH1F * getTH1F() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meEndcapPIDKAsKEff_
MonitorElement * meBarrelTrueK_
virtual MonitorElement * get(std::string const &fullpath) const
virtual TH1 * getTH1() const
MonitorElement * meTPEtaSelEff_
MonitorElement * meEndcapPIDPiAsPEff_
MonitorElement * meBarrelPIDPNoPIDEff_
MonitorElement * meEndcapTrueP_
MonitorElement * meEndcapAsP_
MonitorElement * meEndcapTrueK_
MonitorElement * meEndcapPIDPNoPIDEff_
MonitorElement * meEndcapPIDPAsKEff_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * meBarrelPIDPiAsPEff_
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * meBarrelTrueP_
MonitorElement * meBarrelAsK_
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
MonitorElement * meBarrelPIDPAsPEff_
MonitorElement * meTPPtMatchEff_
Power< A, B >::type pow(const A &a, const B &b)
MonitorElement * meBarrelPIDKAsPiEff_
MonitorElement * meEndcapKPurity_
virtual double getBinContent(int binx) const
get content of bin (1-D)