122 std::map<ObjectType, TFileDirectory>
dirs_;
123 std::map<ObjectType, TH1F*>
het_;
126 std::map<ObjectType, TH1F*>
hbx_;
176 : doText_(iConfig.getUntrackedParameter<
bool>(
"doText",
true)),
177 doHistos_(iConfig.getUntrackedParameter<
bool>(
"doHistos",
true)) {
184 m_gmuToken = consumes<l1t::MuonBxCollection>(gmuTag);
188 m_dmxEGToken = consumes<l1t::EGammaBxCollection>(dmxEGTag);
208 m_egToken = consumes<l1t::EGammaBxCollection>(egTag);
220 m_sumToken = consumes<l1t::EtSumBxCollection>(sumTag);
224 m_gtAlgToken = consumes<GlobalAlgBlkBxCollection>(gtAlgTag);
271 std::stringstream
text;
278 for (
int ibx = gmuons->getFirstBX(); ibx <= gmuons->getLastBX(); ++ibx) {
279 for (
auto itr = gmuons->begin(ibx);
itr != gmuons->end(ibx); ++
itr) {
287 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEtaAtVtx()
288 <<
" iphi=" <<
itr->hwPhiAtVtx() << std::endl;
298 for (
int ibx = dmxegs->getFirstBX(); ibx <= dmxegs->getLastBX(); ++ibx) {
299 for (
auto itr = dmxegs->begin(ibx);
itr != dmxegs->end(ibx); ++
itr) {
307 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta() <<
" iphi=" <<
itr->hwPhi()
318 for (
int ibx = dmxtaus->getFirstBX(); ibx <= dmxtaus->getLastBX(); ++ibx) {
319 for (
auto itr = dmxtaus->begin(ibx);
itr != dmxtaus->end(ibx); ++
itr) {
327 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta() <<
" iphi=" <<
itr->hwPhi()
338 for (
int ibx = dmxjets->getFirstBX(); ibx <= dmxjets->getLastBX(); ++ibx) {
339 for (
auto itr = dmxjets->begin(ibx);
itr != dmxjets->end(ibx); ++
itr) {
347 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta() <<
" iphi=" <<
itr->hwPhi()
358 for (
int ibx = dmxsums->getFirstBX(); ibx <= dmxsums->getLastBX(); ++ibx) {
359 for (
auto itr = dmxsums->begin(ibx);
itr != dmxsums->end(ibx); ++
itr) {
367 <<
" type=" <<
itr->getType() <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta()
368 <<
" iphi=" <<
itr->hwPhi() << std::endl;
378 for (
int ibx =
muons->getFirstBX(); ibx <=
muons->getLastBX(); ++ibx) {
387 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEtaAtVtx()
388 <<
" iphi=" <<
itr->hwPhiAtVtx() << std::endl;
398 for (
int ibx = egs->getFirstBX(); ibx <= egs->getLastBX(); ++ibx) {
399 for (
auto itr = egs->begin(ibx);
itr != egs->end(ibx); ++
itr) {
407 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta() <<
" iphi=" <<
itr->hwPhi()
418 for (
int ibx =
taus->getFirstBX(); ibx <=
taus->getLastBX(); ++ibx) {
427 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta() <<
" iphi=" <<
itr->hwPhi()
438 for (
int ibx =
jets->getFirstBX(); ibx <=
jets->getLastBX(); ++ibx) {
447 <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta() <<
" iphi=" <<
itr->hwPhi()
458 for (
int ibx = sums->getFirstBX(); ibx <= sums->getLastBX(); ++ibx) {
459 for (
auto itr = sums->begin(ibx);
itr != sums->end(ibx); ++
itr) {
466 <<
" type=" <<
itr->getType() <<
" BX=" << ibx <<
" ipt=" <<
itr->hwPt() <<
" ieta=" <<
itr->hwEta()
467 <<
" iphi=" <<
itr->hwPhi() << std::endl;
477 for (
int ibx = algs->getFirstBX(); ibx <= algs->getLastBX(); ++ibx) {
478 for (
auto itr = algs->begin(ibx);
itr != algs->end(ibx); ++
itr) {
479 for (
int algBit = 0; algBit < 128;
481 if (
itr->getAlgoDecisionFinal(algBit)) {
483 text <<
"HW Fired Alg Bit : " << algBit << std::endl;
495 for (
int ibx = emulGtAlgs->getFirstBX(); ibx <= emulGtAlgs->getLastBX(); ++ibx) {
496 for (
auto itr = emulGtAlgs->begin(ibx);
itr != emulGtAlgs->end(ibx); ++
itr) {
497 for (
int algBit = 0; algBit < 128;
499 if (
itr->getAlgoDecisionFinal(algBit)) {
501 text <<
"Emul w/ GTInput Fired Alg Bit : " << algBit << std::endl;
513 for (
int ibx = emulDxAlgs->getFirstBX(); ibx <= emulDxAlgs->getLastBX(); ++ibx) {
514 for (
auto itr = emulDxAlgs->begin(ibx);
itr != emulDxAlgs->end(ibx); ++
itr) {
515 for (
int algBit = 0; algBit < 128;
517 if (
itr->getAlgoDecisionFinal(algBit)) {
519 text <<
"Emul w/ Demux output Fired Alg Bit : " << algBit << std::endl;
534 for (
int ibx = mus->getFirstBX(); ibx <= mus->getLastBX(); ++ibx) {
536 for (
unsigned int igtMU = 0; igtMU < mus->size(ibx); igtMU++) {
537 double gtMUEt = mus->at(ibx, igtMU).hwPt();
538 double gmtMUEt = 0.0;
539 if (gmtmus->size(ibx) > igtMU)
540 gmtMUEt = gmtmus->at(ibx, igtMU).hwPt();
543 double gtMUEta = mus->at(ibx, igtMU).hwEtaAtVtx();
544 double gmtMUEta = 0.0;
545 if (gmtmus->size(ibx) > igtMU)
546 gmtMUEta = gmtmus->at(ibx, igtMU).hwEtaAtVtx();
549 double gtMUPhi = mus->at(ibx, igtMU).hwPhiAtVtx();
550 double gmtMUPhi = 0.0;
551 if (gmtmus->size(ibx) > igtMU)
552 gmtMUPhi = gmtmus->at(ibx, igtMU).hwPhiAtVtx();
556 for (
unsigned int igmtMU = mus->size(ibx); igmtMU < gmtmus->size(ibx); igmtMU++) {
558 double gmtMUEt = gmtmus->at(ibx, igmtMU).hwPt();
561 double gtMUEta = 0.0;
562 double gmtMUEta = gmtmus->at(ibx, igmtMU).hwEtaAtVtx();
565 double gtMUPhi = 0.0;
566 double gmtMUPhi = gmtmus->at(ibx, igmtMU).hwPhiAtVtx();
580 for (
int ibx = egs->getFirstBX(); ibx <= egs->getLastBX(); ++ibx) {
582 for (
unsigned int igtEG = 0; igtEG < egs->size(ibx); igtEG++) {
583 double gtEGEt = egs->at(ibx, igtEG).hwPt();
584 double dmxEGEt = 0.0;
585 if (dmxegs->size(ibx) > igtEG)
586 dmxEGEt = dmxegs->at(ibx, igtEG).hwPt();
589 double gtEGEta = egs->at(ibx, igtEG).hwEta();
590 double dmxEGEta = 0.0;
591 if (dmxegs->size(ibx) > igtEG)
592 dmxEGEta = dmxegs->at(ibx, igtEG).hwEta();
595 double gtEGPhi = egs->at(ibx, igtEG).hwPhi();
596 double dmxEGPhi = 0.0;
597 if (dmxegs->size(ibx) > igtEG)
598 dmxEGPhi = dmxegs->at(ibx, igtEG).hwPhi();
602 for (
unsigned int idmEG = egs->size(ibx); idmEG < dmxegs->size(ibx); idmEG++) {
604 double dmxEGEt = dmxegs->at(ibx, idmEG).hwPt();
607 double gtEGEta = 0.0;
608 double dmxEGEta = dmxegs->at(ibx, idmEG).hwEta();
611 double gtEGPhi = 0.0;
612 double dmxEGPhi = dmxegs->at(ibx, idmEG).hwPhi();
626 for (
int ibx =
taus->getFirstBX(); ibx <=
taus->getLastBX(); ++ibx) {
628 for (
unsigned int igtTau = 0; igtTau <
taus->size(ibx); igtTau++) {
629 double gtTauEt =
taus->at(ibx, igtTau).hwPt();
630 double dmxTauEt = 0.0;
631 if (dmxtaus->size(ibx) > igtTau)
632 dmxTauEt = dmxtaus->at(ibx, igtTau).hwPt();
635 double gtTauEta =
taus->at(ibx, igtTau).hwEta();
636 double dmxTauEta = 0.0;
637 if (dmxtaus->size(ibx) > igtTau)
638 dmxTauEta = dmxtaus->at(ibx, igtTau).hwEta();
641 double gtTauPhi =
taus->at(ibx, igtTau).hwPhi();
642 double dmxTauPhi = 0.0;
643 if (dmxtaus->size(ibx) > igtTau)
644 dmxTauPhi = dmxtaus->at(ibx, igtTau).hwPhi();
648 for (
unsigned int idmTau =
taus->size(ibx); idmTau < dmxtaus->size(ibx); idmTau++) {
649 double gtTauEt = 0.0;
650 double dmxTauEt = dmxtaus->at(ibx, idmTau).hwPt();
653 double gtTauEta = 0.0;
654 double dmxTauEta = dmxtaus->at(ibx, idmTau).hwEta();
657 double gtTauPhi = 0.0;
658 double dmxTauPhi = dmxtaus->at(ibx, idmTau).hwPhi();
672 for (
int ibx =
jets->getFirstBX(); ibx <=
jets->getLastBX(); ++ibx) {
674 for (
unsigned int igtJ = 0; igtJ <
jets->size(ibx); igtJ++) {
675 double gtJetEt =
jets->at(ibx, igtJ).hwPt();
676 double dmxJetEt = 0.0;
677 if (dmxjets->size(ibx) > igtJ)
678 dmxJetEt = dmxjets->at(ibx, igtJ).hwPt();
681 double gtJetEta =
jets->at(ibx, igtJ).hwEta();
682 double dmxJetEta = 0.0;
683 if (dmxjets->size(ibx) > igtJ)
684 dmxJetEta = dmxjets->at(ibx, igtJ).hwEta();
687 double gtJetPhi =
jets->at(ibx, igtJ).hwPhi();
688 double dmxJetPhi = 0.0;
689 if (dmxjets->size(ibx) > igtJ)
690 dmxJetPhi = dmxjets->at(ibx, igtJ).hwPhi();
694 for (
unsigned int idmJ =
jets->size(ibx); idmJ < dmxjets->size(ibx); idmJ++) {
695 double gtJetEt = 0.0;
696 double dmxJetEt = dmxjets->at(ibx, idmJ).hwPt();
699 double gtJetEta = 0.0;
700 double dmxJetEta = dmxjets->at(ibx, idmJ).hwEta();
703 double gtJetPhi = 0.0;
704 double dmxJetPhi = dmxjets->at(ibx, idmJ).hwPhi();
718 for (
int ibx = sums->getFirstBX(); ibx <= sums->getLastBX(); ++ibx) {
720 for (
unsigned int igtS = 0; igtS < sums->size(ibx); igtS++) {
721 double gtSumEt = sums->at(ibx, igtS).hwPt();
722 double dmxSumEt = 0.0;
723 if (dmxSums->size(ibx) > igtS)
724 dmxSumEt = dmxSums->at(ibx, igtS).hwPt();
726 double gtSumPhi = sums->at(ibx, igtS).hwPhi();
727 double dmxSumPhi = 0.0;
728 if (dmxSums->size(ibx) > igtS)
729 dmxSumPhi = dmxSums->at(ibx, igtS).hwPhi();
731 if (sums->at(ibx, igtS).getType() == dmxSums->at(ibx, igtS).getType()) {
732 switch (sums->at(ibx, igtS).getType()) {
773 text <<
"WARNING: EtSum Types do not line up between DeMux and uGT " << std::endl;
777 for (
unsigned int idmS = sums->size(ibx); idmS < dmxSums->size(ibx); idmS++) {
778 double gtSumEt = -1.0;
779 double dmxSumEt = dmxSums->at(ibx, idmS).hwPt();
781 double gtSumPhi = -1.0;
782 double dmxSumPhi = dmxSums->at(ibx, idmS).hwPhi();
784 switch (dmxSums->at(ibx, idmS).getType()) {
827 auto itr = hwalgs->begin(ibx);
828 auto itr_emul = emulAlgs->begin(ibx);
830 for (
int algBit = 0; algBit < 128;
832 bool hw =
itr->getAlgoDecisionFinal(algBit);
833 bool em = itr_emul->getAlgoDecisionFinal(algBit);
836 }
else if (hw & !em) {
838 text <<
"WARNING: HW Fnd Alg Bit " << algBit <<
" but emulation did not " << std::endl;
839 }
else if (!hw & em) {
841 text <<
"WARNING: Emul. Fnd Alg Bit " << algBit <<
" but hardware did not " << std::endl;
859 auto itr = hwalgs->begin(ibx);
860 auto itr_emul = emulAlgs->begin(ibx);
862 for (
int algBit = 0; algBit < 128;
864 bool hw =
itr->getAlgoDecisionFinal(algBit);
865 bool em = itr_emul->getAlgoDecisionFinal(algBit);
868 }
else if (hw & !em) {
870 }
else if (!hw & em) {
898 het_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"et",
"", 500, -0.5, etmax)));
900 hbx_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"bx",
"", 11, -5.5, 5.5)));
902 heta_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"eta",
"", 229, -114.5, 114.5)));
903 hphi_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"phi",
"", 144, -0.5, 143.5)));
904 hetaphi_.insert(std::pair<ObjectType, TH2F*>(
905 *
itr,
dirs_.at(*itr).make<TH2F>(
"etaphi",
"", 229, -114.5, 114.5, 144, -0.5, 143.5)));
907 double etmax = 511.5;
910 het_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"et",
"", 512, -0.5, etmax)));
912 hbx_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"bx",
"", 11, -5.5, 5.5)));
914 heta_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"eta",
"", 549, -224.5, 224.5)));
915 hphi_.insert(std::pair<ObjectType, TH1F*>(*
itr,
dirs_.at(*itr).make<TH1F>(
"phi",
"", 576, -0.5, 575.5)));
916 hetaphi_.insert(std::pair<ObjectType, TH2F*>(
917 *
itr,
dirs_.at(*itr).make<TH2F>(
"etaphi",
"", 549, -224.5, 224.5, 576, -0.5, 575.5)));
925 "hAlgoBitsEmulGtVsHw",
"Algorithm Bits (GT) Emulation vs Hardware", 129, -1.5, 127.5, 129, -1.5, 127.5);
928 "hAlgoBitsEmulDxVsHw",
"Algorithm Bits (Dx) Emulation vs Hardware", 129, -1.5, 127.5, 129, -1.5, 127.5);
933 dmxVGtDir_.
make<TH2F>(
"hGmtVsGTMUEt",
"Gmt MU Et versus GT MU Et", 512, -0.5, 511.5, 512, -0.5, 511.5);
935 dmxVGtDir_.
make<TH2F>(
"hGmtVsGTMUEta",
"Gmt MU Eta versus GT MU Eta", 549, -224.5, 224.5, 549, -224.5, 224.5);
937 dmxVGtDir_.
make<TH2F>(
"hGmtVsGTMUPhi",
"Gmt MU Phi versus GT MU Phi", 576, -0.5, 575.5, 576, -0.5, 575.5);
940 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTEGEt",
"Dmx EG Et versus GT EG Et", 500, -0.5, 499.5, 500, -0.5, 499.5);
942 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTEGEta",
"Dmx EG Eta versus GT EG Eta", 229, -114.5, 114.5, 229, -114.5, 114.5);
944 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTEGPhi",
"Dmx EG Phi versus GT EG Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
947 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTTauEt",
"Dmx Tau Et versus GT Tau Et", 500, -0.5, 499.5, 500, -0.5, 499.5);
949 "hDmxVsGTTauEta",
"Dmx Tau Eta versus GT Tau Eta", 229, -114.5, 114.5, 229, -114.5, 114.5);
951 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTTauPhi",
"Dmx Tau Phi versus GT Tau Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
954 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTJetEt",
"Dmx Jet Et versus GT Jet Et", 500, -0.5, 499.5, 500, -0.5, 499.5);
956 "hDmxVsGTJetEta",
"Dmx Jet Eta versus GT Jet Eta", 229, -114.5, 114.5, 229, -114.5, 114.5);
958 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTJetPhi",
"Dmx Jet Phi versus GT Jet Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
961 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_ETT",
"Dmx ETT versus GT ETT", 256, -0.5, 2047.5, 256, -0.5, 2047.5);
963 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_ETTem",
"Dmx ETTem versus GT ETTem", 256, -0.5, 2047.5, 256, -0.5, 2047.5);
965 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_HTT",
"Dmx HTT versus GT HTT", 256, -0.5, 2047.5, 256, -0.5, 2047.5);
967 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_ETM",
"Dmx ETM versus GT ETM", 500, -0.5, 499.5, 500, -0.5, 499.5);
969 "hDmxVsGTSumPhi_ETM",
"Dmx ETM Phi versus GT ETM Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
971 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_ETMHF",
"Dmx ETMHF versus GT ETMHF", 500, -0.5, 499.5, 500, -0.5, 499.5);
973 "hDmxVsGTSumPhi_ETMHF",
"Dmx ETMHF Phi versus GT ETMHF Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
975 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_HTM",
"Dmx HTM versus GT HTM", 500, -0.5, 499.5, 500, -0.5, 499.5);
977 "hDmxVsGTSumPhi_HTM",
"Dmx HTM Phi versus GT HTM Phi", 144, -0.5, 143.5, 144, -0.5, 143.5);
980 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_HFP0",
"Dmx versus GT HFP0", 16, -0.5, 15.5, 16, -0.5, 15.5);
982 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_HFM0",
"Dmx versus GT HFM0", 16, -0.5, 15.5, 16, -0.5, 15.5);
984 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_HFP1",
"Dmx versus GT HFP1", 16, -0.5, 15.5, 16, -0.5, 15.5);
986 dmxVGtDir_.
make<TH2F>(
"hDmxVsGTSumEt_HFM1",
"Dmx versus GT HFM1", 16, -0.5, 15.5, 16, -0.5, 15.5);
1035 using namespace l1t;