5 stage2CaloLayer2JetToken_(
7 stage2CaloLayer2EGammaToken_(
9 stage2CaloLayer2TauToken_(
11 stage2CaloLayer2EtSumToken_(
14 monitorDir_(ps.getUntrackedParameter<
std::
string>(
"monitorDir")),
15 verbose_(ps.getUntrackedParameter<
bool>(
"verbose")),
16 gtUtil_(new
l1t::L1TGlobalUtil(ps,
21 algoBitFirstBxInTrain_(-1),
22 algoBitLastBxInTrain_(-1),
24 algoNameFirstBxInTrain_(ps.getUntrackedParameter<
std::
string>(
"firstBXInTrainAlgo",
"")),
25 algoNameLastBxInTrain_(ps.getUntrackedParameter<
std::
string>(
"lastBXInTrainAlgo",
"")),
26 algoNameIsoBx_(ps.getUntrackedParameter<
std::
string>(
"isoBXAlgo",
"")),
28 egammaPtCuts_(ps.getUntrackedParameter<
std::
vector<double>>(
"egammaPtCuts")),
29 jetPtCut_(ps.getUntrackedParameter<double>(
"jetPtCut")),
31 tauPtCut_(ps.getUntrackedParameter<double>(
"tauPtCut")),
32 etsumPtCut_(ps.getUntrackedParameter<double>(
"etsumPtCut")),
33 muonPtCut_(ps.getUntrackedParameter<double>(
"muonPtCut")),
34 muonQualCut_(ps.getUntrackedParameter<
int>(
"muonQualCut")) {
56 desc.add<
edm::InputTag>(
"stage2CaloLayer2EGammaProducer")->setComment(
"L1T egamma");
58 desc.add<
edm::InputTag>(
"stage2CaloLayer2EtSumProducer")->setComment(
"L1T etsums");
61 ->setComment(
"Target directory in the DQM file. Will be created if not existing.");
62 desc.addUntracked<
bool>(
"verbose",
false);
64 ->setComment(
"Pick the right algo name for L1 First Collision In Train");
66 ->setComment(
"Pick the right algo name for L1 Last Collision In Train");
67 desc.addUntracked<
std::string>(
"isoBXAlgo",
"")->setComment(
"Pick the right algo name for L1 Isolated Bunch");
69 ->setComment(
"Which algo decision should be checked [initial, intermediate, final].");
70 desc.addUntracked<std::vector<double>>(
"egammaPtCuts", {20., 10., 30.})->setComment(
"List if min egamma pT vaules");
71 desc.addUntracked<
double>(
"jetPtCut", 20.)->setComment(
"Min jet pT");
72 desc.addUntracked<
double>(
"tauPtCut", 20.)->setComment(
"Min tau pT");
73 desc.addUntracked<
double>(
"etsumPtCut", 20.)->setComment(
"Min etsum pT");
74 desc.addUntracked<
double>(
"muonPtCut", 8.)->setComment(
"Min muon pT");
75 desc.addUntracked<
int>(
"muonQualCut", 12)->setComment(
"Min muon quality");
76 descriptions.
add(
"l1tObjectsTiming",
desc);
86 <<
gtUtil_->gtTriggerMenuName() <<
". Could not retrieve algo bit number.";
91 <<
gtUtil_->gtTriggerMenuName() <<
". Could not retrieve algo bit number.";
96 <<
gtUtil_->gtTriggerMenuName() <<
". Could not retrieve algo bit number.";
101 std::array<std::string, 5> bx_obj{{
"minus2",
"minus1",
"0",
"plus1",
"plus2"}};
105 auto muonPtCutStr = std::to_string(
muonPtCut_);
106 muonPtCutStr.resize(muonPtCutStr.size() - 5);
108 auto jetPtCutStr = std::to_string(
jetPtCut_);
109 jetPtCutStr.resize(jetPtCutStr.size() - 5);
112 egammaPtCutStr.resize(egammaPtCutStr.size() - 5);
114 auto tauPtCutStr = std::to_string(
tauPtCut_);
115 tauPtCutStr.resize(tauPtCutStr.size() - 5);
118 etsumPtCutStr.resize(etsumPtCutStr.size() - 5);
124 "L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr +
125 " #eta vs #phi BX=" + bx_obj[
i] +
";#eta;#phi",
135 "Denominator for L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr +
";#eta;#phi",
146 ibooker.
book2D(
"jet_eta_phi_bx_" + bx_obj[
i],
147 "L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV #eta vs #phi BX=" + bx_obj[
i] +
";#eta;#phi",
156 "Denominator for L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV;#eta;#phi",
167 ibooker.
book2D(
"egamma_eta_phi_bx_" + bx_obj[
i],
168 "L1T EGamma p_{T}#geq" + egammaPtCutStr +
" GeV #eta vs #phi BX=" + bx_obj[
i] +
";#eta;#phi",
177 "Denominator for L1T EGamma p_{T}#geq" + egammaPtCutStr +
" GeV;#eta;#phi",
188 ibooker.
book2D(
"tau_eta_phi_bx_" + bx_obj[
i],
189 "L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV #eta vs #phi BX=" + bx_obj[
i] +
";#eta;#phi",
198 "Denominator for L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV;#eta;#phi",
209 ibooker.
book1D(
"etsum_phi_bx_MET_" + bx_obj[
i],
210 "L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV #phi BX=" + bx_obj[
i] +
";#phi",
215 ibooker.
book1D(
"etsum_phi_bx_METHF_" + bx_obj[
i],
216 "L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi BX=" + bx_obj[
i] +
";#phi",
221 ibooker.
book1D(
"etsum_phi_bx_MHT_" + bx_obj[
i],
222 "L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV #phi BX=" + bx_obj[
i] +
";#phi",
227 ibooker.
book1D(
"etsum_phi_bx_MHTHF_" + bx_obj[
i],
228 "L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi BX=" + bx_obj[
i] +
";#phi",
234 "denominator_etsum_MET",
"Denominator for L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV;#phi", 25, -3.2, 3.2);
236 "Denominator for L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
241 "denominator_etsum_MHT",
"Denominator for L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV;#phi", 25, -3.2, 3.2);
243 "Denominator for L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
253 ibooker.
book2D(
"muons_eta_phi_bx_isolated_" + bx_obj[
i],
254 "L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr +
255 " #eta vs #phi for isolated bunch BX=" + bx_obj[
i] +
";#eta;#phi",
264 "denominator_muons_isolated",
265 "Denominator for Isolated Bunch for L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr,
276 "jet_eta_phi_bx_isolated_" + bx_obj[
i],
277 "L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV #eta vs #phi for isolated bunch BX=" + bx_obj[
i] +
";#eta;#phi",
286 ibooker.
book2D(
"denominator_jet_isolated",
287 "Denominator for Isolated Bunch for L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV;#eta;#phi",
297 egammaPtCutStr.resize(egammaPtCutStr.size() - 5);
298 auto egammaPtCutStrAlpha = egammaPtCutStr;
300 egammaPtCutStrAlpha.end(),
305 std::vector<MonitorElement*> vHelper;
307 vHelper.push_back(ibooker.
book2D(
"egamma_eta_phi_bx_isolated_" + bx_obj[
i],
308 "L1T EGamma p_{T}#geq" + egammaPtCutStr +
309 " GeV #eta vs #phi for first bunch BX=" + bx_obj[
i] +
";#eta;#phi",
320 ibooker.
book2D(
"denominator_egamma_isolated",
321 "Denominator for Isolated Bunch for L1T EGamma p_{T}#geq" + egammaPtCutStr +
" GeV;#eta;#phi",
330 ibooker.
book2D(
"egamma_iso_bx_ieta_isolated_ptmin" + egammaPtCutStrAlpha,
331 "L1T EGamma iso with pT#geq" + egammaPtCutStr +
332 " GeV BX vs. i#eta for first bunch in train;BX in event (corrected);i#eta",
341 ibooker.
book2D(
"egamma_noniso_bx_ieta_isolated_ptmin" + egammaPtCutStrAlpha,
342 "L1T EGamma non iso with pT#geq" + egammaPtCutStr +
343 " GeV BX vs. i#eta for first bunch in train;BX in event (corrected);i#eta",
355 "tau_eta_phi_bx_isolated_" + bx_obj[
i],
356 "L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV #eta vs #phi for isolated bunch BX=" + bx_obj[
i] +
";#eta;#phi",
365 ibooker.
book2D(
"denominator_tau_isolated",
366 "Denominator for Isolated Bunch for L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV;#eta;#phi",
377 "etsum_phi_bx_MET_isolated_" + bx_obj[
i],
378 "L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV #phi for isolated bunch BX=" + bx_obj[
i] +
";#phi",
383 "etsum_phi_bx_METHF_isolated_" + bx_obj[
i],
384 "L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi for isolated bunch BX=" + bx_obj[
i] +
";#phi",
389 "etsum_phi_bx_MHT_isolated_" + bx_obj[
i],
390 "L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV #phi for isolated bunch BX=" + bx_obj[
i] +
";#phi",
395 "etsum_phi_bx_MHTHF_isolated_" + bx_obj[
i],
396 "L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi for isolated bunch BX=" + bx_obj[
i] +
";#phi",
402 ibooker.
book1D(
"denominator_etsum_isolated_MET",
403 "Denominator for Isolated Bunch for L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
408 ibooker.
book1D(
"denominator_etsum_isolated_METHF",
409 "Denominator for Isolated Bunch for L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
414 ibooker.
book1D(
"denominator_etsum_isolated_MHT",
415 "Denominator for Isolated Bunch for L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
420 ibooker.
book1D(
"denominator_etsum_isolated_MHTHF",
421 "Denominator for Isolated Bunch for L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
432 ibooker.
book2D(
"muons_eta_phi_bx_firstbunch_" + bx_obj[
i],
433 "L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr +
434 " #eta vs #phi for first bunch BX=" + bx_obj[
i] +
";#eta;#phi",
443 "denominator_muons_firstbunch",
444 "Denominator for First Bunch for L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr,
455 "jet_eta_phi_bx_firstbunch_" + bx_obj[
i],
456 "L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV #eta vs #phi for first bunch BX=" + bx_obj[
i] +
";#eta;#phi",
465 ibooker.
book2D(
"denominator_jet_firstbunch",
466 "Denominator for First Bunch for L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV;#eta;#phi",
476 egammaPtCutStr.resize(egammaPtCutStr.size() - 5);
477 auto egammaPtCutStrAlpha = egammaPtCutStr;
479 egammaPtCutStrAlpha.end(),
484 std::vector<MonitorElement*> vHelper;
486 vHelper.push_back(ibooker.
book2D(
"egamma_eta_phi_bx_firstbunch_" + bx_obj[
i],
487 "L1T EGamma p_{T}#geq" + egammaPtCutStr +
488 " GeV #eta vs #phi for first bunch BX=" + bx_obj[
i] +
";#eta;#phi",
499 ibooker.
book2D(
"denominator_egamma_firstbunch",
500 "Denominator for First Bunch for L1T EGamma p_{T}#geq" + egammaPtCutStr +
" GeV;#eta;#phi",
509 ibooker.
book2D(
"egamma_iso_bx_ieta_firstbunch_ptmin" + egammaPtCutStrAlpha,
510 "L1T EGamma iso with pT#geq" + egammaPtCutStr +
511 " GeV BX vs. i#eta for first bunch in train;BX in event (corrected);i#eta",
520 ibooker.
book2D(
"egamma_noniso_bx_ieta_firstbunch_ptmin" + egammaPtCutStrAlpha,
521 "L1T EGamma non iso with pT#geq" + egammaPtCutStr +
522 " GeV BX vs. i#eta for first bunch in train;BX in event (corrected);i#eta",
534 "tau_eta_phi_bx_firstbunch_" + bx_obj[
i],
535 "L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV #eta vs #phi for first bunch BX=" + bx_obj[
i] +
";#eta;#phi",
544 ibooker.
book2D(
"denominator_tau_firstbunch",
545 "Denominator for First Bunch for L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV;#eta;#phi",
556 "etsum_phi_bx_MET_firstbunch_" + bx_obj[
i],
557 "L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV #phi for firstbunch bunch BX=" + bx_obj[
i] +
";#phi",
562 "etsum_phi_bx_METHF_firstbunch_" + bx_obj[
i],
563 "L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi for firstbunch bunch BX=" + bx_obj[
i] +
";#phi",
568 "etsum_phi_bx_MHT_firstbunch_" + bx_obj[
i],
569 "L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV #phi for firstbunch bunch BX=" + bx_obj[
i] +
";#phi",
574 "etsum_phi_bx_MHTHF_firstbunch_" + bx_obj[
i],
575 "L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi for firstbunch bunch BX=" + bx_obj[
i] +
";#phi",
581 ibooker.
book1D(
"denominator_etsum_firstbunch_MET",
582 "Denominator for First Bunch for L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
587 ibooker.
book1D(
"denominator_etsum_firstbunch_METHF",
588 "Denominator for First Bunch for L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
593 ibooker.
book1D(
"denominator_etsum_firstbunch_MHT",
594 "Denominator for First Bunch for L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
599 ibooker.
book1D(
"denominator_etsum_firstbunch_MHTHF",
600 "Denominator for First Bunch for L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
611 ibooker.
book2D(
"muons_eta_phi_bx_lastbunch_" + bx_obj[
i + 2],
612 "L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr +
613 " #eta vs #phi for last bunch BX=" + bx_obj[
i] +
";#eta;#phi",
622 "denominator_muons_lastbunch",
623 "Denominator for Last Bunch for L1T Muon p_{T}#geq" + muonPtCutStr +
" GeV qual#geq" + muonQualCutStr,
634 "jet_eta_phi_bx_lastbunch_" + bx_obj[
i + 2],
635 "L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV #eta vs #phi for last bunch BX=" + bx_obj[
i] +
";#eta;#phi",
644 ibooker.
book2D(
"denominator_jet_lastbunch",
645 "Denominator for Last Bunch for L1T Jet p_{T}#geq" + jetPtCutStr +
" GeV;#eta;#phi",
655 egammaPtCutStr.resize(egammaPtCutStr.size() - 5);
656 auto egammaPtCutStrAlpha = egammaPtCutStr;
658 egammaPtCutStrAlpha.end(),
663 std::vector<MonitorElement*> vHelper;
665 vHelper.push_back(ibooker.
book2D(
"egamma_eta_phi_bx_lastbunch_" + bx_obj[
i + 2],
666 "L1T EGamma p_{T}#geq" + egammaPtCutStr +
667 " GeV #eta vs #phi for first bunch BX=" + bx_obj[
i] +
";#eta;#phi",
678 ibooker.
book2D(
"denominator_egamma_lastbunch",
679 "Denominator for Last Bunch for L1T EGamma p_{T}#geq" + egammaPtCutStr +
" GeV;#eta;#phi",
688 ibooker.
book2D(
"egamma_iso_bx_ieta_lastbunch_ptmin" + egammaPtCutStrAlpha,
689 "L1T EGamma iso with pT#geq" + egammaPtCutStr +
690 " GeV BX vs. i#eta for first bunch in train;BX in event (corrected);i#eta",
699 ibooker.
book2D(
"egamma_noniso_bx_ieta_lastbunch_ptmin" + egammaPtCutStrAlpha,
700 "L1T EGamma non iso with pT#geq" + egammaPtCutStr +
701 " GeV BX vs. i#eta for first bunch in train;BX in event (corrected);i#eta",
713 "tau_eta_phi_bx_lastbunch_" + bx_obj[
i + 2],
714 "L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV #eta vs #phi for last bunch BX=" + bx_obj[
i] +
";#eta;#phi",
723 ibooker.
book2D(
"denominator_tau_lastbunch",
724 "Denominator for Last Bunch for L1T Tau p_{T}#geq" + tauPtCutStr +
" GeV;#eta;#phi",
735 "etsum_phi_bx_MET_lastbunch_" + bx_obj[
i + 2],
736 "L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV #phi for lastbunch bunch BX=" + bx_obj[
i] +
";#phi",
741 "etsum_phi_bx_METHF_lastbunch_" + bx_obj[
i + 2],
742 "L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi for lastbunch bunch BX=" + bx_obj[
i] +
";#phi",
747 "etsum_phi_bx_MHT_lastbunch_" + bx_obj[
i + 2],
748 "L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV #phi for lastbunch bunch BX=" + bx_obj[
i] +
";#phi",
753 "etsum_phi_bx_MHTHF_lastbunch_" + bx_obj[
i + 2],
754 "L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV #phi for lastbunch bunch BX=" + bx_obj[
i] +
";#phi",
760 ibooker.
book1D(
"denominator_etsum_lastbunch_MET",
761 "Denominator for Last Bunch for L1T EtSum MET p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
766 ibooker.
book1D(
"denominator_etsum_lastbunch_METHF",
767 "Denominator for Last Bunch for L1T EtSum METHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
772 ibooker.
book1D(
"denominator_etsum_lastbunch_MHT",
773 "Denominator for Last Bunch for L1T EtSum MHT p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
778 ibooker.
book1D(
"denominator_etsum_lastbunch_MHTHF",
779 "Denominator for Last Bunch for L1T EtSum MHTHF p_{T}#geq" + etsumPtCutStr +
" GeV;#phi",
788 edm::LogInfo(
"L1TObjectsTiming") <<
"L1TObjectsTiming: analyze..." << std::endl;
906 int bxShiftFirst = -999;
907 int bxShiftIso = -999;
908 int bxShiftLast = -999;
969 if (bxShiftFirst > -999) {
1015 if ((
bool)
egamma->hwIso()) {
1076 if (bxShiftLast > -999) {
1081 auto correctedBx = itBX - bxShiftLast;
1097 auto correctedBx = itBX - bxShiftLast;
1112 auto correctedBx = itBX - bxShiftLast;
1122 if ((
bool)
egamma->hwIso()) {
1134 auto correctedBx = itBX - bxShiftLast;
1149 auto correctedBx = itBX - bxShiftLast;
1150 if (correctedBx >= 0) {
1183 if (bxShiftIso > -999) {
1229 if ((
bool)
egamma->hwIso()) {