From 65a510d19a69011981e22e9293dbbab57c32f437 Mon Sep 17 00:00:00 2001 From: Aaron Bundock Date: Fri, 13 Jan 2023 14:39:10 +0100 Subject: [PATCH 1/7] L1T: Add jet quality and isolation data emu comparison, and fix object sorting bug --- .../interface/L1TdeStage2CaloLayer2.h | 12 +- DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc | 172 ++++++++++++++---- .../src/L1TStage2CaloLayer2DEClientSummary.cc | 32 +++- 3 files changed, 170 insertions(+), 46 deletions(-) diff --git a/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h b/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h index 2bc12977c59f4..dac2efe809676 100644 --- a/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h +++ b/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h @@ -210,11 +210,11 @@ class L1TdeStage2CaloLayer2 : public DQMEDAnalyzer { SUMMISMATCH // no. events failed due to a sum mismatch }; - enum jetVars { NJETS = 1, JETGOOD, JETPOSOFF, JETETOFF }; + enum jetVars { NJETS = 1, JETGOOD, JETPOSOFF, JETETOFF, JETQUALOFF }; - enum egVars { NEGS = 1, EGGOOD, EGPOSOFF, EGETOFF, NISOEGS, ISOEGGOOD, ISOEGPOSOFF, ISOEGETOFF }; + enum egVars { NEGS = 1, EGGOOD, EGPOSOFF, EGETOFF, NISOEGS, ISOEGGOOD, ISOEGPOSOFF, ISOEGETOFF, EGISOOFF}; - enum tauVars { NTAUS = 1, TAUGOOD, TAUPOSOFF, TAUETOFF, NISOTAUS, ISOTAUGOOD, ISOTAUPOSOFF, ISOTAUETOFF }; + enum tauVars { NTAUS = 1, TAUGOOD, TAUPOSOFF, TAUETOFF, NISOTAUS, ISOTAUGOOD, ISOTAUPOSOFF, ISOTAUETOFF, TAUISOOFF}; enum sumVars { NSUMS = 1, @@ -249,9 +249,11 @@ class L1TdeStage2CaloLayer2 : public DQMEDAnalyzer { MonitorElement* jetEtData; MonitorElement* jetEtaData; MonitorElement* jetPhiData; + MonitorElement* jetQualData; MonitorElement* jetEtEmul; MonitorElement* jetEtaEmul; MonitorElement* jetPhiEmul; + MonitorElement* jetQualEmul; MonitorElement* jet2DEtaPhiData; // This histogram will be filled only if enable2DComp is true MonitorElement* jet2DEtaPhiEmul; // This histogram will be filled only if enable2DComp is true @@ -259,9 +261,11 @@ class L1TdeStage2CaloLayer2 : public DQMEDAnalyzer { MonitorElement* egEtData; MonitorElement* egEtaData; MonitorElement* egPhiData; + MonitorElement* egIsoData; MonitorElement* egEtEmul; MonitorElement* egEtaEmul; MonitorElement* egPhiEmul; + MonitorElement* egIsoEmul; MonitorElement* eg2DEtaPhiData; // This histogram will be filled only if enable2DComp is true MonitorElement* eg2DEtaPhiEmul; // This histogram will be filled only if enable2DComp is true @@ -279,9 +283,11 @@ class L1TdeStage2CaloLayer2 : public DQMEDAnalyzer { MonitorElement* tauEtData; MonitorElement* tauEtaData; MonitorElement* tauPhiData; + MonitorElement* tauIsoData; MonitorElement* tauEtEmul; MonitorElement* tauEtaEmul; MonitorElement* tauPhiEmul; + MonitorElement* tauIsoEmul; MonitorElement* tau2DEtaPhiData; // This histogram will be filled only if enable2DComp is true MonitorElement* tau2DEtaPhiEmul; // This histogram will be filled only if enable2DComp is true diff --git a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc index 5f96ef79af838..5c7794259528b 100644 --- a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc +++ b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc @@ -30,9 +30,11 @@ void L1TdeStage2CaloLayer2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run jetEtData = ibooker.book1D("Problematic Data Jet iEt", "Jet iE_{T}", 1400, 0, 1399); jetEtaData = ibooker.book1D("Problematic Data Jet iEta", "Jet i#eta", 227, -113.5, 113.5); jetPhiData = ibooker.book1D("Problematic Data Jet iPhi", "Jet i#phi", 288, -0.5, 143.5); + jetQualData = ibooker.book1D("Problematic Data Jet Quality", "Jet quality", 16, 0, 16); jetEtEmul = ibooker.book1D("Problematic Emul Jet iEt", "Jet iE_{T}", 1400, 0, 1399); jetEtaEmul = ibooker.book1D("Problematic Emul Jet iEta", "Jet i#eta", 227, -113.5, 113.5); jetPhiEmul = ibooker.book1D("Problematic Emul Jet iPhi", "Jet i#phi", 288, -0.5, 143.5); + jetQualEmul = ibooker.book1D("Problematic Emul Jet Quality", "Jet quality", 16, 0, 16); //if enable2DComp is true book also 2D eta-phi plots if (enable2DComp) { jet2DEtaPhiData = @@ -52,9 +54,11 @@ void L1TdeStage2CaloLayer2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run egEtData = ibooker.book1D("Problematic Data Eg iEt", "Eg iE_{T}", 1400, 0, 1399); egEtaData = ibooker.book1D("Problematic Data Eg iEta", "Eg i#eta", 227, -113.5, 113.5); egPhiData = ibooker.book1D("Problematic Data Eg iPhi", "Eg i#phi", 288, -0.5, 143.5); + egIsoData = ibooker.book1D("Problematic Data Eg iso", "Eg iso", 4, 0, 4); egEtEmul = ibooker.book1D("Problematic Emul Eg iEt", "Eg iE_{T}", 1400, 0, 1399); egEtaEmul = ibooker.book1D("Problematic Emul Eg iEta", "Eg i#eta", 227, -113.5, 113.5); egPhiEmul = ibooker.book1D("Problematic Emul Eg iPhi", "Eg i#phi", 288, -0.5, 143.5); + egIsoEmul = ibooker.book1D("Problematic Emul Eg iso", "Eg iso", 4, 0, 4); //if enable2DComp is true book also 2D eta-phi plots if (enable2DComp) { eg2DEtaPhiData = ibooker.book2D("Problematic Data Eg Eta - Phi", "Eg #eta - #phi map", 30, -3., 3., 25, -3.2, 3.2); @@ -89,9 +93,11 @@ void L1TdeStage2CaloLayer2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run tauEtData = ibooker.book1D("Problematic Data Tau iEt", "Tau iE_{T}", 1400, 0, 1399); tauEtaData = ibooker.book1D("Problematic Data Tau iEta", "Tau i#eta", 227, -113.5, 113.5); tauPhiData = ibooker.book1D("Problematic Data Tau iPhi", "Tau i#phi", 288, -0.5, 143.5); + tauIsoData = ibooker.book1D("Problematic Data Tau iso", "Tau iso", 4, 0, 4); tauEtEmul = ibooker.book1D("Problematic Emul Tau iEt", "Tau iE_{T}", 1400, 0, 1399); tauEtaEmul = ibooker.book1D("Problematic Emul Tau iEta", "Tau i#eta", 227, -113.5, 113.5); tauPhiEmul = ibooker.book1D("Problematic Emul Tau iPhi", "Tau i#phi", 288, -0.5, 143.5); + tauIsoEmul = ibooker.book1D("Problematic Emul Tau iso", "Tau iso", 4, 0, 4); // enable2DComp is true book also 2D eta-phi plots if (enable2DComp) { tau2DEtaPhiData = @@ -211,13 +217,14 @@ void L1TdeStage2CaloLayer2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run agreementSummary->setBinLabel(NSUMS_S, "total sums"); agreementSummary->setBinLabel(SUMGOOD_S, "good sums"); - jetSummary = ibooker.book1D("Jet Agreement Summary", "Jet Agreement Summary", 4, 1, 5); + jetSummary = ibooker.book1D("Jet Agreement Summary", "Jet Agreement Summary", 5, 1, 6); jetSummary->setBinLabel(NJETS, "total jets"); jetSummary->setBinLabel(JETGOOD, "good jets"); jetSummary->setBinLabel(JETPOSOFF, "jets pos off only"); jetSummary->setBinLabel(JETETOFF, "jets Et off only "); + jetSummary->setBinLabel(JETQUALOFF, "jets Qual off only "); - egSummary = ibooker.book1D("EG Agreement Summary", "EG Agreement Summary", 8, 1, 9); + egSummary = ibooker.book1D("EG Agreement Summary", "EG Agreement Summary", 9, 1, 10); egSummary->setBinLabel(NEGS, "total non-iso e/gs"); egSummary->setBinLabel(EGGOOD, "good non-iso e/gs"); egSummary->setBinLabel(EGPOSOFF, "non-iso e/gs pos off"); @@ -226,8 +233,9 @@ void L1TdeStage2CaloLayer2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run egSummary->setBinLabel(ISOEGGOOD, "good iso e/gs"); egSummary->setBinLabel(ISOEGPOSOFF, "iso e/gs pos off"); egSummary->setBinLabel(ISOEGETOFF, "iso e/gs Et off"); + egSummary->setBinLabel(EGISOOFF, "e/gs Iso off"); - tauSummary = ibooker.book1D("Tau Agreement Summary", "Tau Agreement Summary", 8, 1, 9); + tauSummary = ibooker.book1D("Tau Agreement Summary", "Tau Agreement Summary", 9, 1, 10); tauSummary->setBinLabel(NTAUS, "total taus"); tauSummary->setBinLabel(TAUGOOD, "good non-iso taus"); tauSummary->setBinLabel(TAUPOSOFF, "non-iso taus pos off"); @@ -236,6 +244,7 @@ void L1TdeStage2CaloLayer2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run tauSummary->setBinLabel(ISOTAUGOOD, "good iso taus"); tauSummary->setBinLabel(ISOTAUPOSOFF, "iso taus pos off"); tauSummary->setBinLabel(ISOTAUETOFF, "iso taus Et off"); + tauSummary->setBinLabel(TAUISOOFF, "tau Iso off"); sumSummary = ibooker.book1D("Energy Sum Agreement Summary", "Sum Agreement Summary", 18, 1, 19); sumSummary->setBinLabel(NSUMS, "total sums"); @@ -379,6 +388,7 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& jetEtData->Fill(dataIt->hwPt()); jetEtaData->Fill(dataIt->hwEta()); jetPhiData->Fill(dataIt->hwPhi()); + jetQualData->Fill(dataIt->hwQual()); if (enable2DComp) jet2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi()); @@ -396,6 +406,7 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& jetEtEmul->Fill(emulIt->hwPt()); jetEtaEmul->Fill(emulIt->hwEta()); jetPhiEmul->Fill(emulIt->hwPhi()); + jetQualEmul->Fill(emulIt->hwQual()); if (enable2DComp) jet2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); @@ -417,39 +428,60 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& bool posGood = true; bool etGood = true; + bool qualGood = true; // object pt mismatch if (dataIt->hwPt() != emulIt->hwPt()) { etGood = false; - eventGood = false; } // object position mismatch (phi) if (dataIt->hwPhi() != emulIt->hwPhi()) { posGood = false; - eventGood = false; } // object position mismatch (eta) if (dataIt->hwEta() != emulIt->hwEta()) { posGood = false; - eventGood = false; } - // if both position and energy agree, jet is good - if (etGood && posGood) { + // object quality mismatch + if (dataIt->hwQual() != emulIt->hwQual()) { + qualGood = false; + } + + //bypass sorting bug + if (etGood && !posGood) { + l1t::JetBxCollection::const_iterator emulItCheckSort; + for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) { + if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && + dataIt->hwEta() == emulItCheckSort->hwEta()){ + posGood = true; + if (dataIt->hwQual() == emulItCheckSort->hwQual()) + qualGood = true; + else + qualGood = false; + } + } + } + + // if position, energy & qual agree, jet is good + if (etGood && posGood && qualGood) { agreementSummary->Fill(JETGOOD_S); jetSummary->Fill(JETGOOD); } else { + eventGood = false; jetEtData->Fill(dataIt->hwPt()); jetEtaData->Fill(dataIt->hwEta()); jetPhiData->Fill(dataIt->hwPhi()); + jetQualData->Fill(dataIt->hwQual()); if (enable2DComp) jet2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi()); jetEtEmul->Fill(emulIt->hwPt()); jetEtaEmul->Fill(emulIt->hwEta()); jetPhiEmul->Fill(emulIt->hwPhi()); + jetQualEmul->Fill(emulIt->hwQual()); if (enable2DComp) jet2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); @@ -461,20 +493,27 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet phi = " << emulIt->hwPhi() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data jet eta = " << dataIt->hwEta() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet eta = " << emulIt->hwEta() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "data jet qual = " << dataIt->hwQual() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet qual = " << emulIt->hwQual() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "---" << std::endl; } } - // if only position agrees + // if energy is wrong if (posGood && !etGood) { jetSummary->Fill(JETETOFF); } - // if only energy agrees + // if position is wrong if (!posGood && etGood) { jetSummary->Fill(JETPOSOFF); } + // if only qual is wrong + if (posGood && etGood && !qualGood) { + jetSummary->Fill(JETQUALOFF); + } + // keep track of jets agreementSummary->Fill(NJETS_S); jetSummary->Fill(NJETS); @@ -526,6 +565,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(dataIt->eta(), dataIt->phi()); } + egIsoData->Fill(dataIt->hwIso()); ++dataIt; @@ -551,7 +591,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(emulIt->eta(), emulIt->phi()); } - + egIsoEmul->Fill(emulIt->hwIso()); ++emulIt; if (emulIt == emulCol->end(currBx)) @@ -568,38 +608,57 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandlehwIso(); + bool isoGood = true; + bool hwIso = dataIt->hwIso(); // object pt mismatch if (dataIt->hwPt() != emulIt->hwPt()) { etGood = false; - eventGood = false; } // object position mismatch (phi) if (dataIt->hwPhi() != emulIt->hwPhi()) { posGood = false; - eventGood = false; } // object position mismatch (eta) if (dataIt->hwEta() != emulIt->hwEta()) { posGood = false; - eventGood = false; } - // if both position and energy agree, object is good - if (posGood && etGood) { + // object isolation mismatch + if (dataIt->hwIso() != emulIt->hwIso()) { + isoGood = false; + } + + //bypass sorting bug + if (etGood && !posGood) { + l1t::EGammaBxCollection::const_iterator emulItCheckSort; + for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) { + if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && + dataIt->hwEta() == emulItCheckSort->hwEta()){ + posGood = true; + if (dataIt->hwIso() == emulItCheckSort->hwIso()) + isoGood = true; + else + isoGood = false; + } + } + } + + // if position, energy and isolation agree, object is good + if (posGood && etGood && isoGood) { agreementSummary->Fill(EGGOOD_S); - if (iso) { + if (hwIso) { egSummary->Fill(ISOEGGOOD); } else { egSummary->Fill(EGGOOD); } } else { - if (iso) { + eventGood = false; + if (hwIso) { isoEgEtData->Fill(dataIt->hwPt()); isoEgEtaData->Fill(dataIt->hwEta()); isoEgPhiData->Fill(dataIt->hwPhi()); @@ -624,6 +683,8 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(emulIt->eta(), emulIt->phi()); } + egIsoData->Fill(dataIt->hwIso()); + egIsoEmul->Fill(emulIt->hwIso()); if (verbose) { edm::LogInfo("L1TdeStage2CaloLayer2") << "--- eg ---" << std::endl; @@ -633,30 +694,37 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(ISOEGETOFF); } else { egSummary->Fill(EGETOFF); } } - // if only energy agrees + // if position wrong if (!posGood && etGood) { - if (iso) { + if (hwIso) { egSummary->Fill(ISOEGPOSOFF); } else { egSummary->Fill(EGPOSOFF); } } + // if only isolation wrong + if (posGood && etGood && !isoGood) { + egSummary->Fill(EGISOOFF); + } + // keep track of number of objects - if (iso) { + if (hwIso) { egSummary->Fill(NISOEGS); } else { egSummary->Fill(NEGS); @@ -712,6 +780,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) tau2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi()); } + tauIsoData->Fill(dataIt->hwIso()); ++dataIt; @@ -740,6 +809,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) tau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); } + tauIsoEmul->Fill(emulIt->hwIso()); ++emulIt; @@ -757,37 +827,56 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& while (true) { bool posGood = true; bool etGood = true; - bool iso = dataIt->hwIso(); + bool isoGood = true; + bool hwIso = dataIt->hwIso(); // object Et mismatch if (dataIt->hwPt() != emulIt->hwPt()) { etGood = false; - eventGood = false; } // object position mismatch (phi) if (dataIt->hwPhi() != emulIt->hwPhi()) { posGood = false; - eventGood = false; } // object position mismatch (eta) if (dataIt->hwEta() != emulIt->hwEta()) { posGood = false; - eventGood = false; } - // if both position and energy agree, object is good - if (posGood && etGood) { + // object isolation mismatch + if (dataIt->hwIso() != emulIt->hwIso()) { + isoGood = false; + } + + //bypass sorting bug + if (etGood && !posGood) { + l1t::TauBxCollection::const_iterator emulItCheckSort; + for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) { + if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && + dataIt->hwEta() == emulItCheckSort->hwEta()){ + posGood = true; + if (dataIt->hwIso() == emulItCheckSort->hwIso()) + isoGood = true; + else + isoGood = false; + } + } + } + + // if position, energy and isolation agree, object is good + if (posGood && etGood && isoGood) { agreementSummary->Fill(TAUGOOD_S); - if (iso) { + if (hwIso) { tauSummary->Fill(ISOTAUGOOD); } else { tauSummary->Fill(TAUGOOD); } } else { - if (iso) { + eventGood = false; + if (hwIso) { isoTauEtData->Fill(dataIt->hwPt()); isoTauEtaData->Fill(dataIt->hwEta()); isoTauPhiData->Fill(dataIt->hwPhi()); @@ -813,6 +902,8 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) tau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); } + tauIsoData->Fill(dataIt->hwIso()); + tauIsoEmul->Fill(emulIt->hwIso()); if (verbose) { edm::LogInfo("L1TdeStage2CaloLayer2") << "--- tau ---" << std::endl; @@ -822,30 +913,37 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau phi = " << emulIt->hwPhi() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data tau eta = " << dataIt->hwEta() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau eta = " << emulIt->hwEta() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "data tau iso = " << dataIt->hwIso() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau iso = " << emulIt->hwIso() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "---" << std::endl; } } - // if only position agrees + // if energy is wrong if (posGood && !etGood) { - if (iso) { + if (hwIso) { tauSummary->Fill(ISOTAUETOFF); } else { tauSummary->Fill(TAUETOFF); } } - // if only energy agrees + // if position is wrong if (!posGood && etGood) { - if (iso) { + if (hwIso) { tauSummary->Fill(ISOTAUPOSOFF); } else { tauSummary->Fill(TAUPOSOFF); } } + // if only isolation is wrong + if (posGood && etGood && !isoGood) { + tauSummary->Fill(TAUISOOFF); + } + // keep track of number of objects - if (iso) { + if (hwIso) { tauSummary->Fill(NISOTAUS); } else { tauSummary->Fill(NTAUS); diff --git a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc index 813bbf5929484..ac5bbd411dd93 100644 --- a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc +++ b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc @@ -37,34 +37,37 @@ void L1TStage2CaloLayer2DEClientSummary::book(DQMStore::IBooker &ibooker) { } if (jetSummary == nullptr) { - jetSummary = ibooker.book1D("Jet Agreement Summary", "Jet Agreement Summary", 3, 1, 4); + jetSummary = ibooker.book1D("Jet Agreement Summary", "Jet Agreement Summary", 4, 1, 5); jetSummary->setBinLabel(1, "good jets"); jetSummary->setBinLabel(2, "jets pos off only"); jetSummary->setBinLabel(3, "jets Et off only "); + jetSummary->setBinLabel(4, "jets qual off only "); } else { jetSummary->Reset(); } if (egSummary == nullptr) { - egSummary = ibooker.book1D("EG Agreement Summary", "EG Agreement Summary", 6, 1, 7); + egSummary = ibooker.book1D("EG Agreement Summary", "EG Agreement Summary", 7, 1, 8); egSummary->setBinLabel(1, "good non-iso e/gs"); egSummary->setBinLabel(2, "non-iso e/gs pos off"); egSummary->setBinLabel(3, "non-iso e/gs Et off"); egSummary->setBinLabel(4, "good iso e/gs"); egSummary->setBinLabel(5, "iso e/gs pos off"); egSummary->setBinLabel(6, "iso e/gs Et off"); + egSummary->setBinLabel(7, "e/gs Iso off"); } else { egSummary->Reset(); } if (tauSummary == nullptr) { - tauSummary = ibooker.book1D("Tau Agreement Summary", "Tau Agremeent Summary", 6, 1, 7); + tauSummary = ibooker.book1D("Tau Agreement Summary", "Tau Agremeent Summary", 7, 1, 8); tauSummary->setBinLabel(1, "good non-iso taus"); tauSummary->setBinLabel(2, "non-iso taus pos off"); tauSummary->setBinLabel(3, "non-iso taus Et off"); tauSummary->setBinLabel(4, "good iso taus"); tauSummary->setBinLabel(5, "iso taus pos off"); tauSummary->setBinLabel(6, "iso taus Et off"); + tauSummary->setBinLabel(7, "taus Iso off"); } else { tauSummary->Reset(); } @@ -152,7 +155,7 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // double totalJets = 0, goodJets = 0, jetPosOff = 0, jetEtOff = 0; // by default show 0% agreement (for edge case when no objects are found) - double goodRatio = 0, posOffRatio = 0, etOffRatio = 0; + double goodRatio = 0, posOffRatio = 0, etOffRatio = 0, qualOffRatio = 0; // hist = jetSummary_->getTH1F(); // newHist = jetSummary->getTH1F(); @@ -161,16 +164,19 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig double goodJets = jetSummary_->getBinContent(2); double jetPosOff = jetSummary_->getBinContent(3); double jetEtOff = jetSummary_->getBinContent(4); + double jetQualOff = jetSummary_->getBinContent(5); if (totalJets != 0) { goodRatio = goodJets / totalJets; posOffRatio = jetPosOff / totalJets; etOffRatio = jetEtOff / totalJets; + qualOffRatio = jetQualOff / totalJets; } jetSummary->setBinContent(1, goodRatio); jetSummary->setBinContent(2, posOffRatio); jetSummary->setBinContent(3, etOffRatio); + jetSummary->setBinContent(4, qualOffRatio); } if (egSummary_) { @@ -179,7 +185,7 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // by default show 0% agreement (for edge case when no objects are found) double goodEgRatio = 0, egPosOffRatio = 0, egEtOffRatio = 0, goodIsoEgRatio = 0, isoEgPosOffRatio = 0, - isoEgEtOffRatio = 0; + isoEgEtOffRatio = 0, egIsoOffRatio = 0; // hist = egSummary_->getTH1F(); // newHist = egSummary->getTH1F(); @@ -194,6 +200,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig double isoEgPosOff = egSummary_->getBinContent(7); double isoEgEtOff = egSummary_->getBinContent(8); + double egIsoOff = egSummary_->getBinContent(9); + if (totalEgs != 0) { goodEgRatio = goodEgs / totalEgs; egPosOffRatio = egPosOff / totalEgs; @@ -206,6 +214,9 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig isoEgEtOffRatio = isoEgEtOff / totalIsoEgs; } + if((totalEgs + totalIsoEgs) > 0) + egIsoOffRatio = egIsoOff / (totalEgs+totalIsoEgs); + egSummary->setBinContent(1, goodEgRatio); egSummary->setBinContent(2, egPosOffRatio); egSummary->setBinContent(3, egEtOffRatio); @@ -213,6 +224,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig egSummary->setBinContent(4, goodIsoEgRatio); egSummary->setBinContent(5, isoEgPosOffRatio); egSummary->setBinContent(6, isoEgEtOffRatio); + + egSummary->setBinContent(7, egIsoOffRatio); } if (tauSummary_) { @@ -221,7 +234,7 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // by default show 0% agreement (for edge case when no objects are found) double goodTauRatio = 0, tauPosOffRatio = 0, tauEtOffRatio = 0, goodIsoTauRatio = 0, isoTauPosOffRatio = 0, - isoTauEtOffRatio = 0; + isoTauEtOffRatio = 0, tauIsoOffRatio = 0; // hist = tauSummary_->getTH1F(); // newHist = tauSummary->getTH1F(); @@ -236,6 +249,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig double isoTauPosOff = tauSummary_->getBinContent(7); double isoTauEtOff = tauSummary_->getBinContent(8); + double tauIsoOff = tauSummary_->getBinContent(9); + if (totalTaus != 0) { goodTauRatio = goodTaus / totalTaus; tauPosOffRatio = tauPosOff / totalTaus; @@ -248,6 +263,9 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig isoTauEtOffRatio = isoTauEtOff / totalIsoTaus; } + if((totalTaus + totalIsoTaus) > 0) + tauIsoOffRatio = tauIsoOff / (totalTaus+totalIsoTaus); + tauSummary->setBinContent(1, goodTauRatio); tauSummary->setBinContent(2, tauPosOffRatio); tauSummary->setBinContent(3, tauEtOffRatio); @@ -255,6 +273,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig tauSummary->setBinContent(4, goodIsoTauRatio); tauSummary->setBinContent(5, isoTauPosOffRatio); tauSummary->setBinContent(6, isoTauEtOffRatio); + + tauSummary->setBinContent(7, tauIsoOffRatio); } if (sumSummary_) { From 29bfe55fd69d831430c27ed50a67dea0576d6d9b Mon Sep 17 00:00:00 2001 From: Aaron Bundock Date: Fri, 13 Jan 2023 16:14:51 +0100 Subject: [PATCH 2/7] L1T: code-format --- .../interface/L1TdeStage2CaloLayer2.h | 4 +- DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc | 80 +++++++++---------- .../src/L1TStage2CaloLayer2DEClientSummary.cc | 12 +-- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h b/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h index dac2efe809676..10d6a5b6c7536 100644 --- a/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h +++ b/DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h @@ -212,9 +212,9 @@ class L1TdeStage2CaloLayer2 : public DQMEDAnalyzer { enum jetVars { NJETS = 1, JETGOOD, JETPOSOFF, JETETOFF, JETQUALOFF }; - enum egVars { NEGS = 1, EGGOOD, EGPOSOFF, EGETOFF, NISOEGS, ISOEGGOOD, ISOEGPOSOFF, ISOEGETOFF, EGISOOFF}; + enum egVars { NEGS = 1, EGGOOD, EGPOSOFF, EGETOFF, NISOEGS, ISOEGGOOD, ISOEGPOSOFF, ISOEGETOFF, EGISOOFF }; - enum tauVars { NTAUS = 1, TAUGOOD, TAUPOSOFF, TAUETOFF, NISOTAUS, ISOTAUGOOD, ISOTAUPOSOFF, ISOTAUETOFF, TAUISOOFF}; + enum tauVars { NTAUS = 1, TAUGOOD, TAUPOSOFF, TAUETOFF, NISOTAUS, ISOTAUGOOD, ISOTAUPOSOFF, ISOTAUETOFF, TAUISOOFF }; enum sumVars { NSUMS = 1, diff --git a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc index 5c7794259528b..482860701d8c0 100644 --- a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc +++ b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc @@ -454,15 +454,15 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& if (etGood && !posGood) { l1t::JetBxCollection::const_iterator emulItCheckSort; for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) { - if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && - dataIt->hwEta() == emulItCheckSort->hwEta()){ - posGood = true; - if (dataIt->hwQual() == emulItCheckSort->hwQual()) - qualGood = true; - else - qualGood = false; - } - } + if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && + dataIt->hwEta() == emulItCheckSort->hwEta()) { + posGood = true; + if (dataIt->hwQual() == emulItCheckSort->hwQual()) + qualGood = true; + else + qualGood = false; + } + } } // if position, energy & qual agree, jet is good @@ -470,7 +470,7 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& agreementSummary->Fill(JETGOOD_S); jetSummary->Fill(JETGOOD); } else { - eventGood = false; + eventGood = false; jetEtData->Fill(dataIt->hwPt()); jetEtaData->Fill(dataIt->hwEta()); jetPhiData->Fill(dataIt->hwPhi()); @@ -565,7 +565,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(dataIt->eta(), dataIt->phi()); } - egIsoData->Fill(dataIt->hwIso()); + egIsoData->Fill(dataIt->hwIso()); ++dataIt; @@ -591,7 +591,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(emulIt->eta(), emulIt->phi()); } - egIsoEmul->Fill(emulIt->hwIso()); + egIsoEmul->Fill(emulIt->hwIso()); ++emulIt; if (emulIt == emulCol->end(currBx)) @@ -635,15 +635,15 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handlebegin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) { - if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && - dataIt->hwEta() == emulItCheckSort->hwEta()){ - posGood = true; - if (dataIt->hwIso() == emulItCheckSort->hwIso()) - isoGood = true; - else - isoGood = false; - } - } + if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && + dataIt->hwEta() == emulItCheckSort->hwEta()) { + posGood = true; + if (dataIt->hwIso() == emulItCheckSort->hwIso()) + isoGood = true; + else + isoGood = false; + } + } } // if position, energy and isolation agree, object is good @@ -657,7 +657,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(dataIt->hwPt()); isoEgEtaData->Fill(dataIt->hwEta()); @@ -683,8 +683,8 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(emulIt->eta(), emulIt->phi()); } - egIsoData->Fill(dataIt->hwIso()); - egIsoEmul->Fill(emulIt->hwIso()); + egIsoData->Fill(dataIt->hwIso()); + egIsoEmul->Fill(emulIt->hwIso()); if (verbose) { edm::LogInfo("L1TdeStage2CaloLayer2") << "--- eg ---" << std::endl; @@ -720,7 +720,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(EGISOOFF); + egSummary->Fill(EGISOOFF); } // keep track of number of objects @@ -780,7 +780,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) tau2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi()); } - tauIsoData->Fill(dataIt->hwIso()); + tauIsoData->Fill(dataIt->hwIso()); ++dataIt; @@ -809,7 +809,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) tau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); } - tauIsoEmul->Fill(emulIt->hwIso()); + tauIsoEmul->Fill(emulIt->hwIso()); ++emulIt; @@ -854,15 +854,15 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (etGood && !posGood) { l1t::TauBxCollection::const_iterator emulItCheckSort; for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) { - if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && - dataIt->hwEta() == emulItCheckSort->hwEta()){ - posGood = true; - if (dataIt->hwIso() == emulItCheckSort->hwIso()) - isoGood = true; - else - isoGood = false; - } - } + if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && + dataIt->hwEta() == emulItCheckSort->hwEta()) { + posGood = true; + if (dataIt->hwIso() == emulItCheckSort->hwIso()) + isoGood = true; + else + isoGood = false; + } + } } // if position, energy and isolation agree, object is good @@ -875,7 +875,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& tauSummary->Fill(TAUGOOD); } } else { - eventGood = false; + eventGood = false; if (hwIso) { isoTauEtData->Fill(dataIt->hwPt()); isoTauEtaData->Fill(dataIt->hwEta()); @@ -902,8 +902,8 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) tau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); } - tauIsoData->Fill(dataIt->hwIso()); - tauIsoEmul->Fill(emulIt->hwIso()); + tauIsoData->Fill(dataIt->hwIso()); + tauIsoEmul->Fill(emulIt->hwIso()); if (verbose) { edm::LogInfo("L1TdeStage2CaloLayer2") << "--- tau ---" << std::endl; @@ -939,7 +939,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& // if only isolation is wrong if (posGood && etGood && !isoGood) { - tauSummary->Fill(TAUISOOFF); + tauSummary->Fill(TAUISOOFF); } // keep track of number of objects diff --git a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc index ac5bbd411dd93..976ed87d7af74 100644 --- a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc +++ b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc @@ -185,7 +185,7 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // by default show 0% agreement (for edge case when no objects are found) double goodEgRatio = 0, egPosOffRatio = 0, egEtOffRatio = 0, goodIsoEgRatio = 0, isoEgPosOffRatio = 0, - isoEgEtOffRatio = 0, egIsoOffRatio = 0; + isoEgEtOffRatio = 0, egIsoOffRatio = 0; // hist = egSummary_->getTH1F(); // newHist = egSummary->getTH1F(); @@ -214,8 +214,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig isoEgEtOffRatio = isoEgEtOff / totalIsoEgs; } - if((totalEgs + totalIsoEgs) > 0) - egIsoOffRatio = egIsoOff / (totalEgs+totalIsoEgs); + if ((totalEgs + totalIsoEgs) > 0) + egIsoOffRatio = egIsoOff / (totalEgs + totalIsoEgs); egSummary->setBinContent(1, goodEgRatio); egSummary->setBinContent(2, egPosOffRatio); @@ -234,7 +234,7 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // by default show 0% agreement (for edge case when no objects are found) double goodTauRatio = 0, tauPosOffRatio = 0, tauEtOffRatio = 0, goodIsoTauRatio = 0, isoTauPosOffRatio = 0, - isoTauEtOffRatio = 0, tauIsoOffRatio = 0; + isoTauEtOffRatio = 0, tauIsoOffRatio = 0; // hist = tauSummary_->getTH1F(); // newHist = tauSummary->getTH1F(); @@ -263,8 +263,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig isoTauEtOffRatio = isoTauEtOff / totalIsoTaus; } - if((totalTaus + totalIsoTaus) > 0) - tauIsoOffRatio = tauIsoOff / (totalTaus+totalIsoTaus); + if ((totalTaus + totalIsoTaus) > 0) + tauIsoOffRatio = tauIsoOff / (totalTaus + totalIsoTaus); tauSummary->setBinContent(1, goodTauRatio); tauSummary->setBinContent(2, tauPosOffRatio); From 6d7df0cb8caf6ee0114d6c3b5f67d1f9078bc69a Mon Sep 17 00:00:00 2001 From: Aaron Bundock Date: Mon, 16 Jan 2023 14:44:05 +0100 Subject: [PATCH 3/7] Remove comments --- .../src/L1TStage2CaloLayer2DEClientSummary.cc | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc index 976ed87d7af74..b45d69fe7baf4 100644 --- a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc +++ b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc @@ -96,9 +96,6 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // - jet agreement summary // - tau agreement summary - // TH1F * hist; - // TH1F * newHist; - MonitorElement *hlSummary_ = igetter.get(monitor_dir_ + "/expert/CaloL2 Object Agreement Summary"); MonitorElement *jetSummary_ = igetter.get(monitor_dir_ + "/expert/Jet Agreement Summary"); MonitorElement *egSummary_ = igetter.get(monitor_dir_ + "/expert/EG Agreement Summary"); @@ -107,13 +104,6 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // check for existance of object if (hlSummary_) { - // reference the histogram in MonitorElement - // hist = hlSummary_->getTH1F(); - // newHist = hlSummary->getTH1F(); - - // double totalEvents = 0, goodEvents = 0, totalJets = 0, goodJets = 0, - // totalEg = 0, goodEg = 0, totalTau = 0, goodTau = 0, totalSums = 0, - // goodSums = 0; // by default show 0% agreement (for edge case when no objects are found) double evtRatio = 0, jetRatio = 0, egRatio = 0, tauRatio = 0, sumRatio = 0; @@ -152,14 +142,10 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (jetSummary_) { - // double totalJets = 0, goodJets = 0, jetPosOff = 0, jetEtOff = 0; // by default show 0% agreement (for edge case when no objects are found) double goodRatio = 0, posOffRatio = 0, etOffRatio = 0, qualOffRatio = 0; - // hist = jetSummary_->getTH1F(); - // newHist = jetSummary->getTH1F(); - double totalJets = jetSummary_->getBinContent(1); double goodJets = jetSummary_->getBinContent(2); double jetPosOff = jetSummary_->getBinContent(3); @@ -180,15 +166,11 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (egSummary_) { - // double totalEgs = 0, goodEgs = 0, egPosOff = 0, egEtOff = 0, - // totalIsoEgs = 0, goodIsoEgs = 0, isoEgPosOff = 0, isoEgEtOff = 0; // by default show 0% agreement (for edge case when no objects are found) double goodEgRatio = 0, egPosOffRatio = 0, egEtOffRatio = 0, goodIsoEgRatio = 0, isoEgPosOffRatio = 0, isoEgEtOffRatio = 0, egIsoOffRatio = 0; - // hist = egSummary_->getTH1F(); - // newHist = egSummary->getTH1F(); double totalEgs = egSummary_->getBinContent(1); double goodEgs = egSummary_->getBinContent(2); @@ -229,16 +211,11 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (tauSummary_) { - // double totalTaus = 0, goodTaus = 0, tauPosOff = 0, tauEtOff = 0, - // totalIsoTaus = 0, goodIsoTaus = 0, isoTauPosOff = 0, isoTauEtOff = 0; // by default show 0% agreement (for edge case when no objects are found) double goodTauRatio = 0, tauPosOffRatio = 0, tauEtOffRatio = 0, goodIsoTauRatio = 0, isoTauPosOffRatio = 0, isoTauEtOffRatio = 0, tauIsoOffRatio = 0; - // hist = tauSummary_->getTH1F(); - // newHist = tauSummary->getTH1F(); - double totalTaus = tauSummary_->getBinContent(1); double goodTaus = tauSummary_->getBinContent(2); double tauPosOff = tauSummary_->getBinContent(3); @@ -278,9 +255,6 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (sumSummary_) { - // double totalSums = 0, goodSums = 0, totalETT = 0, goodETT = 0, totalHTT = 0, - // goodHTT = 0, totalMET = 0, goodMET = 0, totalMHT = 0, goodMHT = 0, - // totalMBHF = 0, goodMBHF = 0, totalTowCount = 0, goodTowCount = 0 // by default show 0% agreement (for edge case when no objects are found) double goodSumRatio = 0, goodETTRatio = 0, goodHTTRatio = 0, goodMETRatio = 0, goodMHTRatio = 0, goodMBHFRatio = 0, From bf0f984eb8b3b705051d2fce2daddac613439284 Mon Sep 17 00:00:00 2001 From: Aaron Bundock Date: Mon, 16 Jan 2023 15:19:50 +0100 Subject: [PATCH 4/7] Fix whitespace --- .../src/L1TStage2CaloLayer2DEClientSummary.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc index b45d69fe7baf4..c110b2108e7b5 100644 --- a/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc +++ b/DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc @@ -104,7 +104,6 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig // check for existance of object if (hlSummary_) { - // by default show 0% agreement (for edge case when no objects are found) double evtRatio = 0, jetRatio = 0, egRatio = 0, tauRatio = 0, sumRatio = 0; @@ -142,7 +141,6 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (jetSummary_) { - // by default show 0% agreement (for edge case when no objects are found) double goodRatio = 0, posOffRatio = 0, etOffRatio = 0, qualOffRatio = 0; @@ -166,12 +164,10 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (egSummary_) { - // by default show 0% agreement (for edge case when no objects are found) double goodEgRatio = 0, egPosOffRatio = 0, egEtOffRatio = 0, goodIsoEgRatio = 0, isoEgPosOffRatio = 0, isoEgEtOffRatio = 0, egIsoOffRatio = 0; - double totalEgs = egSummary_->getBinContent(1); double goodEgs = egSummary_->getBinContent(2); double egPosOff = egSummary_->getBinContent(3); @@ -211,7 +207,6 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (tauSummary_) { - // by default show 0% agreement (for edge case when no objects are found) double goodTauRatio = 0, tauPosOffRatio = 0, tauEtOffRatio = 0, goodIsoTauRatio = 0, isoTauPosOffRatio = 0, isoTauEtOffRatio = 0, tauIsoOffRatio = 0; @@ -255,7 +250,6 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig } if (sumSummary_) { - // by default show 0% agreement (for edge case when no objects are found) double goodSumRatio = 0, goodETTRatio = 0, goodHTTRatio = 0, goodMETRatio = 0, goodMHTRatio = 0, goodMBHFRatio = 0, goodTowCountRatio = 0, goodAsymCountRatio = 0, goodCentrCountRatio = 0; From 8816d116eb4f0be2b5a4dd93766b80589d91f77c Mon Sep 17 00:00:00 2001 From: Aaron Bundock Date: Tue, 7 Feb 2023 21:06:36 +0100 Subject: [PATCH 5/7] L1T: Tidy code, fix mismatch histos for emu objects --- DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc | 100 +++++--------------- 1 file changed, 24 insertions(+), 76 deletions(-) diff --git a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc index 482860701d8c0..a8a5e88003201 100644 --- a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc +++ b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc @@ -426,29 +426,12 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& while (true) { ++nJets; - bool posGood = true; - bool etGood = true; - bool qualGood = true; - // object pt mismatch - if (dataIt->hwPt() != emulIt->hwPt()) { - etGood = false; - } - - // object position mismatch (phi) - if (dataIt->hwPhi() != emulIt->hwPhi()) { - posGood = false; - } - - // object position mismatch (eta) - if (dataIt->hwEta() != emulIt->hwEta()) { - posGood = false; - } - + bool etGood = dataIt->hwPt() == emulIt->hwPt(); + // object position mismatch + bool posGood = dataIt->hwPhi() == emulIt->hwPhi() && dataIt->hwEta() == emulIt->hwEta(); // object quality mismatch - if (dataIt->hwQual() != emulIt->hwQual()) { - qualGood = false; - } + bool qualGood = dataIt->hwQual() == emulIt->hwQual(); //bypass sorting bug if (etGood && !posGood) { @@ -457,10 +440,9 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - if (dataIt->hwQual() == emulItCheckSort->hwQual()) - qualGood = true; - else - qualGood = false; + emulIt = emulItCheckSort; + qualGood = dataIt->hwQual() == emulItCheckSort->hwQual(); + break; } } } @@ -606,30 +588,14 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handleend(currBx) || emulIt != emulCol->end(currBx)) { while (true) { - bool posGood = true; - bool etGood = true; - bool isoGood = true; bool hwIso = dataIt->hwIso(); // object pt mismatch - if (dataIt->hwPt() != emulIt->hwPt()) { - etGood = false; - } - - // object position mismatch (phi) - if (dataIt->hwPhi() != emulIt->hwPhi()) { - posGood = false; - } - - // object position mismatch (eta) - if (dataIt->hwEta() != emulIt->hwEta()) { - posGood = false; - } - - // object isolation mismatch - if (dataIt->hwIso() != emulIt->hwIso()) { - isoGood = false; - } + bool etGood = dataIt->hwPt() == emulIt->hwPt(); + // object position mismatch + bool posGood = dataIt->hwPhi() == emulIt->hwPhi() && dataIt->hwEta() == emulIt->hwEta(); + // object quality mismatch + bool isoGood = dataIt->hwIso() == emulIt->hwIso(); //bypass sorting bug if (etGood && !posGood) { @@ -638,10 +604,9 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandlehwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - if (dataIt->hwIso() == emulItCheckSort->hwIso()) - isoGood = true; - else - isoGood = false; + emulIt = emulItCheckSort; + isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); + break; } } } @@ -825,30 +790,14 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& // processing continues only of length of data collections is the same if (dataIt != dataCol->end(currBx) || emulIt != emulCol->end(currBx)) { while (true) { - bool posGood = true; - bool etGood = true; - bool isoGood = true; bool hwIso = dataIt->hwIso(); - // object Et mismatch - if (dataIt->hwPt() != emulIt->hwPt()) { - etGood = false; - } - - // object position mismatch (phi) - if (dataIt->hwPhi() != emulIt->hwPhi()) { - posGood = false; - } - - // object position mismatch (eta) - if (dataIt->hwEta() != emulIt->hwEta()) { - posGood = false; - } - - // object isolation mismatch - if (dataIt->hwIso() != emulIt->hwIso()) { - isoGood = false; - } + // object pt mismatch + bool etGood = dataIt->hwPt() == emulIt->hwPt(); + // object position mismatch + bool posGood = dataIt->hwPhi() == emulIt->hwPhi() && dataIt->hwEta() == emulIt->hwEta(); + // object quality mismatch + bool isoGood = dataIt->hwIso() == emulIt->hwIso(); //bypass sorting bug if (etGood && !posGood) { @@ -857,10 +806,9 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - if (dataIt->hwIso() == emulItCheckSort->hwIso()) - isoGood = true; - else - isoGood = false; + emulIt = emulItCheckSort; + isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); + break; } } } From 58ed08dc40ab6e296c587bcddafd12d8fc3a9181 Mon Sep 17 00:00:00 2001 From: Aaron Bundock Date: Tue, 7 Feb 2023 21:21:10 +0100 Subject: [PATCH 6/7] L1T: code format --- DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc index a8a5e88003201..3e6b939807a7b 100644 --- a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc +++ b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc @@ -440,9 +440,9 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - emulIt = emulItCheckSort; - qualGood = dataIt->hwQual() == emulItCheckSort->hwQual(); - break; + emulIt = emulItCheckSort; + qualGood = dataIt->hwQual() == emulItCheckSort->hwQual(); + break; } } } @@ -604,9 +604,9 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandlehwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - emulIt = emulItCheckSort; - isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); - break; + emulIt = emulItCheckSort; + isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); + break; } } } @@ -806,9 +806,9 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - emulIt = emulItCheckSort; - isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); - break; + emulIt = emulItCheckSort; + isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); + break; } } } From 7ed8fed74e1ef1767eac05b631d979ee135d8260 Mon Sep 17 00:00:00 2001 From: Aaron Bundock Date: Wed, 8 Feb 2023 01:25:58 +0100 Subject: [PATCH 7/7] L1T: Bugfix to emulated object iterator --- DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc | 84 +++++++++++---------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc index 3e6b939807a7b..a08e4c32c5adf 100644 --- a/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc +++ b/DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc @@ -376,6 +376,7 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& l1t::JetBxCollection::const_iterator dataIt = dataCol->begin(currBx); l1t::JetBxCollection::const_iterator emulIt = emulCol->begin(currBx); + l1t::JetBxCollection::const_iterator matchedEmulIt = emulIt; // process jets if (dataCol->size(currBx) != emulCol->size(currBx)) { @@ -425,6 +426,7 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& if (dataIt != dataCol->end(currBx) || emulIt != emulCol->end(currBx)) { while (true) { ++nJets; + matchedEmulIt = emulIt; // object pt mismatch bool etGood = dataIt->hwPt() == emulIt->hwPt(); @@ -440,7 +442,7 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - emulIt = emulItCheckSort; + matchedEmulIt = emulItCheckSort; qualGood = dataIt->hwQual() == emulItCheckSort->hwQual(); break; } @@ -460,23 +462,23 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle& if (enable2DComp) jet2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi()); - jetEtEmul->Fill(emulIt->hwPt()); - jetEtaEmul->Fill(emulIt->hwEta()); - jetPhiEmul->Fill(emulIt->hwPhi()); - jetQualEmul->Fill(emulIt->hwQual()); + jetEtEmul->Fill(matchedEmulIt->hwPt()); + jetEtaEmul->Fill(matchedEmulIt->hwEta()); + jetPhiEmul->Fill(matchedEmulIt->hwPhi()); + jetQualEmul->Fill(matchedEmulIt->hwQual()); if (enable2DComp) - jet2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); + jet2DEtaPhiEmul->Fill(matchedEmulIt->eta(), matchedEmulIt->phi()); if (verbose) { edm::LogInfo("L1TdeStage2CaloLayer2") << "--- jet ---" << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data jet Et = " << dataIt->hwPt() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet Et = " << emulIt->hwPt() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet Et = " << matchedEmulIt->hwPt() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data jet phi = " << dataIt->hwPhi() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet phi = " << emulIt->hwPhi() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet phi = " << matchedEmulIt->hwPhi() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data jet eta = " << dataIt->hwEta() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet eta = " << emulIt->hwEta() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet eta = " << matchedEmulIt->hwEta() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data jet qual = " << dataIt->hwQual() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet qual = " << emulIt->hwQual() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul jet qual = " << matchedEmulIt->hwQual() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "---" << std::endl; } } @@ -524,6 +526,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handlebegin(currBx); l1t::EGammaBxCollection::const_iterator emulIt = emulCol->begin(currBx); + l1t::EGammaBxCollection::const_iterator matchedEmulIt = emulCol->begin(currBx); // check length of collections if (dataCol->size(currBx) != emulCol->size(currBx)) { @@ -588,6 +591,8 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handleend(currBx) || emulIt != emulCol->end(currBx)) { while (true) { + matchedEmulIt = emulIt; + bool hwIso = dataIt->hwIso(); // object pt mismatch @@ -604,7 +609,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandlehwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - emulIt = emulItCheckSort; + matchedEmulIt = emulItCheckSort; isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); break; } @@ -630,11 +635,11 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(dataIt->eta(), dataIt->phi()); - isoEgEtEmul->Fill(emulIt->hwPt()); - isoEgEtaEmul->Fill(emulIt->hwEta()); - isoEgPhiEmul->Fill(emulIt->hwPhi()); + isoEgEtEmul->Fill(matchedEmulIt->hwPt()); + isoEgEtaEmul->Fill(matchedEmulIt->hwEta()); + isoEgPhiEmul->Fill(matchedEmulIt->hwPhi()); if (enable2DComp) - isoEg2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); + isoEg2DEtaPhiEmul->Fill(matchedEmulIt->eta(), matchedEmulIt->phi()); } else { egEtData->Fill(dataIt->hwPt()); egEtaData->Fill(dataIt->hwEta()); @@ -642,25 +647,25 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::HandleFill(dataIt->eta(), dataIt->phi()); - egEtEmul->Fill(emulIt->hwPt()); - egEtaEmul->Fill(emulIt->hwEta()); - egPhiEmul->Fill(emulIt->hwPhi()); + egEtEmul->Fill(matchedEmulIt->hwPt()); + egEtaEmul->Fill(matchedEmulIt->hwEta()); + egPhiEmul->Fill(matchedEmulIt->hwPhi()); if (enable2DComp) - eg2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); + eg2DEtaPhiEmul->Fill(matchedEmulIt->eta(), matchedEmulIt->phi()); } egIsoData->Fill(dataIt->hwIso()); - egIsoEmul->Fill(emulIt->hwIso()); + egIsoEmul->Fill(matchedEmulIt->hwIso()); if (verbose) { edm::LogInfo("L1TdeStage2CaloLayer2") << "--- eg ---" << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data eg Et = " << dataIt->hwPt() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg Et = " << emulIt->hwPt() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg Et = " << matchedEmulIt->hwPt() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data eg phi = " << dataIt->hwPhi() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg phi = " << emulIt->hwPhi() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg phi = " << matchedEmulIt->hwPhi() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data eg eta = " << dataIt->hwEta() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg eta = " << emulIt->hwEta() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg eta = " << matchedEmulIt->hwEta() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data eg iso = " << dataIt->hwIso() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg iso = " << emulIt->hwIso() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul eg iso = " << matchedEmulIt->hwIso() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "---" << std::endl; } } @@ -720,6 +725,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& l1t::TauBxCollection::const_iterator dataIt = dataCol->begin(currBx); l1t::TauBxCollection::const_iterator emulIt = emulCol->begin(currBx); + l1t::TauBxCollection::const_iterator matchedEmulIt = emulCol->begin(currBx); // check length of collections if (dataCol->size(currBx) != emulCol->size(currBx)) { @@ -790,6 +796,8 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& // processing continues only of length of data collections is the same if (dataIt != dataCol->end(currBx) || emulIt != emulCol->end(currBx)) { while (true) { + matchedEmulIt = emulIt; + bool hwIso = dataIt->hwIso(); // object pt mismatch @@ -806,7 +814,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() && dataIt->hwEta() == emulItCheckSort->hwEta()) { posGood = true; - emulIt = emulItCheckSort; + matchedEmulIt = emulItCheckSort; isoGood = dataIt->hwIso() == emulItCheckSort->hwIso(); break; } @@ -831,11 +839,11 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) isoTau2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi()); - isoTauEtEmul->Fill(emulIt->hwPt()); - isoTauEtaEmul->Fill(emulIt->hwEta()); - isoTauPhiEmul->Fill(emulIt->hwPhi()); + isoTauEtEmul->Fill(matchedEmulIt->hwPt()); + isoTauEtaEmul->Fill(matchedEmulIt->hwEta()); + isoTauPhiEmul->Fill(matchedEmulIt->hwPhi()); if (enable2DComp) - isoTau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); + isoTau2DEtaPhiEmul->Fill(matchedEmulIt->eta(), matchedEmulIt->phi()); } else { tauEtData->Fill(dataIt->hwPt()); @@ -844,25 +852,25 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle& if (enable2DComp) tau2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi()); - tauEtEmul->Fill(emulIt->hwPt()); - tauEtaEmul->Fill(emulIt->hwEta()); - tauPhiEmul->Fill(emulIt->hwPhi()); + tauEtEmul->Fill(matchedEmulIt->hwPt()); + tauEtaEmul->Fill(matchedEmulIt->hwEta()); + tauPhiEmul->Fill(matchedEmulIt->hwPhi()); if (enable2DComp) - tau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi()); + tau2DEtaPhiEmul->Fill(matchedEmulIt->eta(), matchedEmulIt->phi()); } tauIsoData->Fill(dataIt->hwIso()); - tauIsoEmul->Fill(emulIt->hwIso()); + tauIsoEmul->Fill(matchedEmulIt->hwIso()); if (verbose) { edm::LogInfo("L1TdeStage2CaloLayer2") << "--- tau ---" << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data tau Et = " << dataIt->hwPt() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau Et = " << emulIt->hwPt() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau Et = " << matchedEmulIt->hwPt() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data tau phi = " << dataIt->hwPhi() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau phi = " << emulIt->hwPhi() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau phi = " << matchedEmulIt->hwPhi() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data tau eta = " << dataIt->hwEta() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau eta = " << emulIt->hwEta() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau eta = " << matchedEmulIt->hwEta() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "data tau iso = " << dataIt->hwIso() << std::endl; - edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau iso = " << emulIt->hwIso() << std::endl; + edm::LogInfo("L1TdeStage2CaloLayer2") << "emul tau iso = " << matchedEmulIt->hwIso() << std::endl; edm::LogInfo("L1TdeStage2CaloLayer2") << "---" << std::endl; } }