diff --git a/DQMOffline/Trigger/interface/HLTTauDQMPathPlotter.h b/DQMOffline/Trigger/interface/HLTTauDQMPathPlotter.h index e4498955d684f..5fad01ec22cc0 100644 --- a/DQMOffline/Trigger/interface/HLTTauDQMPathPlotter.h +++ b/DQMOffline/Trigger/interface/HLTTauDQMPathPlotter.h @@ -58,6 +58,7 @@ class HLTTauDQMPathPlotter : private HLTTauDQMPlotter { HLTTauDQMPath hltPath_; + MonitorElement *hCounter_; MonitorElement *hAcceptedEvents_; MonitorElement *hTrigTauEt_; MonitorElement *hTrigTauEta_; diff --git a/DQMOffline/Trigger/python/HLTTauDQMOffline_cff.py b/DQMOffline/Trigger/python/HLTTauDQMOffline_cff.py index 8ab2093d8e022..2896cf1543841 100644 --- a/DQMOffline/Trigger/python/HLTTauDQMOffline_cff.py +++ b/DQMOffline/Trigger/python/HLTTauDQMOffline_cff.py @@ -7,6 +7,7 @@ HLTTauDQMOffline = cms.Sequence(TauRefProducer +hltTauOfflineMonitor_PFTaus + +hltTauOfflineMonitor_PNetTaus +hltTauOfflineMonitor_Inclusive +hltTauOfflineMonitor_TagAndProbe ) diff --git a/DQMOffline/Trigger/python/HLTTauDQMOffline_cfi.py b/DQMOffline/Trigger/python/HLTTauDQMOffline_cfi.py index 8484007f5ef8b..74f2c73ff2713 100644 --- a/DQMOffline/Trigger/python/HLTTauDQMOffline_cfi.py +++ b/DQMOffline/Trigger/python/HLTTauDQMOffline_cfi.py @@ -116,6 +116,11 @@ ), ) +hltTauOfflineMonitor_PNetTaus = hltTauOfflineMonitor_PFTaus.clone( + DQMBaseFolder = cms.untracked.string("HLT/TAU/PNetTaus"), + Paths = cms.untracked.string("PNetTauh") +) + hltTauOfflineMonitor_Inclusive = hltTauOfflineMonitor_PFTaus.clone( DQMBaseFolder = "HLT/TAU/Inclusive", Matching = cms.PSet( diff --git a/DQMOffline/Trigger/python/HLTTauPostProcessor_cfi.py b/DQMOffline/Trigger/python/HLTTauPostProcessor_cfi.py index 89ad4da761b68..41cdfc82428b7 100644 --- a/DQMOffline/Trigger/python/HLTTauPostProcessor_cfi.py +++ b/DQMOffline/Trigger/python/HLTTauPostProcessor_cfi.py @@ -74,10 +74,12 @@ def _addEfficiencies(level, quantities, nameFormat, titleObject="#tau", postfix= (HLTTauPostAnalysisInclusive, HLTTauPostAnalysisInclusive2) = makeInclusiveAnalyzer(hltTauOfflineMonitor_Inclusive) (HLTTauPostAnalysisPFTaus, HLTTauPostAnalysisPFTaus2) = makePFTauAnalyzer(hltTauOfflineMonitor_PFTaus) +(HLTTauPostAnalysisPNetTaus, HLTTauPostAnalysisPNetTaus2) = makePFTauAnalyzer(hltTauOfflineMonitor_PNetTaus) (HLTTauPostAnalysisTP, HLTTauPostAnalysisTP2) = makePFTauAnalyzer(hltTauOfflineMonitor_TagAndProbe) HLTTauPostSeq = cms.Sequence( HLTTauPostAnalysisInclusive+HLTTauPostAnalysisInclusive2+ HLTTauPostAnalysisPFTaus+HLTTauPostAnalysisPFTaus2+ + HLTTauPostAnalysisPNetTaus+HLTTauPostAnalysisPNetTaus2+ HLTTauPostAnalysisTP+HLTTauPostAnalysisTP2 ) diff --git a/DQMOffline/Trigger/src/HLTTauDQMPath.cc b/DQMOffline/Trigger/src/HLTTauDQMPath.cc index 350e4dd971ad7..53cea97149d86 100644 --- a/DQMOffline/Trigger/src/HLTTauDQMPath.cc +++ b/DQMOffline/Trigger/src/HLTTauDQMPath.cc @@ -56,6 +56,8 @@ namespace { continue; if (iLabel->find('-') == 0) // ignore continue; + if (type == "L2TauTagFilter") // gives L1taus as output + continue; if (type == "HLT2PhotonPFTau" || type == "HLT2ElectronPFTau" || type == "HLT2MuonPFTau" || type == "HLT2PhotonTau" || type == "HLT2ElectronTau" || type == "HLT2MuonTau") leptonTauFilters.emplace_back(*iLabel); @@ -98,7 +100,8 @@ namespace { bool isL3TauProducer(const HLTConfigProvider& HLTCP, const std::string& producerLabel) const { const std::string type = HLTCP.moduleType(producerLabel); - if (type == "PFRecoTauProducer" || type == "RecoTauPiZeroUnembedder") { + if (type == "PFRecoTauProducer" || type == "RecoTauPiZeroUnembedder" || + type == "BTagProbabilityToDiscriminator") { LogDebug("HLTTauDQMOffline") << "Found tau producer " << type << " with label " << producerLabel << " from path " << name_; return true; @@ -134,6 +137,8 @@ namespace { return isL3TauProducer(HLTCP, pset.getParameter("inputTag1").label()); if (pset.exists("inputTag2")) return isL3TauProducer(HLTCP, pset.getParameter("inputTag2").label()); + if (pset.exists("taus")) + return isL3TauProducer(HLTCP, pset.getParameter("taus").label()); return false; } @@ -257,6 +262,9 @@ namespace { if (getParameterSafe(HLTCP, filterName, "triggerType") == trigger::TriggerTau) { n.tau = getParameterSafe(HLTCP, filterName, "MinN"); } + } else if (moduleType == "TauTagFilter") { + n.level = 3; + n.tau = getParameterSafe(HLTCP, filterName, "nExpected"); } else if (moduleType == "HLT1PFJet") { n.level = 3; //const edm::ParameterSet& pset = HLTCP.modulePSet(filterName); @@ -406,11 +414,13 @@ HLTTauDQMPath::HLTTauDQMPath(std::string pathName, const std::string& moduleType = HLTCP.moduleType(filterName); TauLeptonMultiplicity n = inferTauLeptonMultiplicity(HLTCP, filterName, moduleType, pathName_); - filterTauN_.push_back(n.tau); - filterElectronN_.push_back(n.electron); - filterMuonN_.push_back(n.muon); - filterMET_.push_back(n.met); - filterLevel_.push_back(n.level); + if (n.level > 0) { + filterTauN_.push_back(n.tau); + filterElectronN_.push_back(n.electron); + filterMuonN_.push_back(n.muon); + filterMET_.push_back(n.met); + filterLevel_.push_back(n.level); + } #ifdef EDM_ML_DEBUG ss << "\n " << i << " " << std::get(filterIndice) << " " << filterName << " " << moduleType diff --git a/DQMOffline/Trigger/src/HLTTauDQMPathPlotter.cc b/DQMOffline/Trigger/src/HLTTauDQMPathPlotter.cc index 29627bd90d1a3..38735168542bc 100644 --- a/DQMOffline/Trigger/src/HLTTauDQMPathPlotter.cc +++ b/DQMOffline/Trigger/src/HLTTauDQMPathPlotter.cc @@ -46,6 +46,7 @@ void HLTTauDQMPathPlotter::bookHistograms(HistoWrapper& iWrapper, DQMStore::IBoo // Book histograms iBooker.setCurrentFolder(triggerTag()); + hCounter_ = iWrapper.book1D(iBooker, "EventCounter", "Accepted events;;entries", 3, 0, 3, kEverything); hAcceptedEvents_ = iWrapper.book1D(iBooker, "EventsPerFilter", "Accepted Events per filter;;entries", @@ -53,6 +54,11 @@ void HLTTauDQMPathPlotter::bookHistograms(HistoWrapper& iWrapper, DQMStore::IBoo 0, hltPath_.filtersSize(), kEverything); + if (hCounter_) { + hCounter_->setBinLabel(1, "all events"); + hCounter_->setBinLabel(2, "ref tau found"); + hCounter_->setBinLabel(3, "passed trg"); + } for (size_t i = 0; i < hltPath_.filtersSize(); ++i) { if (hAcceptedEvents_) hAcceptedEvents_->setBinLabel(i + 1, hltPath_.getFilterName(i)); @@ -111,13 +117,8 @@ void HLTTauDQMPathPlotter::bookHistograms(HistoWrapper& iWrapper, DQMStore::IBoo } if (hltPath_.hasL3Taus()) { - hL3TrigTauEtEffNum_ = iWrapper.book1D(iBooker, - "L3TrigTauEtEffNum", - "L3 #tau p_{T} efficiency;Ref #tau p_{T};entries", - ptbins_, - 0, - ptmax_, - kEverything); + hL3TrigTauEtEffNum_ = iWrapper.book1D( + iBooker, "L3TrigTauEtEffNum", "L3 #tau p_{T} efficiency;Ref #tau p_{T};entries", ptbins_, 0, ptmax_, kVital); hL3TrigTauEtEffDenom_ = iWrapper.book1D(iBooker, "L3TrigTauEtEffDenom", "L3 #tau p_{T} denominator;Ref #tau p_{T};Efficiency", @@ -451,6 +452,14 @@ void HLTTauDQMPathPlotter::analyze(const edm::TriggerResults& triggerResults, int lastMatchedMuonFilter = -1; int lastMatchedTauFilter = -1; int firstMatchedMETFilter = -1; + if (hCounter_) { + hCounter_->Fill(0.5); + if (refCollection.taus.size() > 0) { + hCounter_->Fill(1.5); + if (hltPath_.fired(triggerResults)) + hCounter_->Fill(2.5); + } + } if (doRefAnalysis_) { double matchDr = hltPath_.isFirstFilterL1Seed() ? l1MatchDr_ : hltMatchDr_; @@ -479,7 +488,8 @@ void HLTTauDQMPathPlotter::analyze(const edm::TriggerResults& triggerResults, if (hltPath_.getFilterName(i).find("hltPFTau") < hltPath_.getFilterName(i).length() || hltPath_.getFilterName(i).find("hltHpsPFTau") < hltPath_.getFilterName(i).length() || hltPath_.getFilterName(i).find("hltDoublePFTau") < hltPath_.getFilterName(i).length() || - hltPath_.getFilterName(i).find("hltHpsDoublePFTau") < hltPath_.getFilterName(i).length()) + hltPath_.getFilterName(i).find("hltHpsDoublePFTau") < hltPath_.getFilterName(i).length() || + hltPath_.getFilterName(i).find("PNetTauhTag") < hltPath_.getFilterName(i).length()) lastMatchedTauFilter = i; if (firstMatchedMETFilter < 0 && hltPath_.getFilterName(i).find("hltMET") < hltPath_.getFilterName(i).length()) firstMatchedMETFilter = i; diff --git a/HLTriggerOffline/Tau/python/Validation/HLTTauPostValidation_cfi.py b/HLTriggerOffline/Tau/python/Validation/HLTTauPostValidation_cfi.py index d1a5f039a2a92..22766b10c02d4 100644 --- a/HLTriggerOffline/Tau/python/Validation/HLTTauPostValidation_cfi.py +++ b/HLTriggerOffline/Tau/python/Validation/HLTTauPostValidation_cfi.py @@ -5,9 +5,11 @@ (HLTTauValPostAnalysisMC, HLTTauValPostAnalysisMC2) = postProcessor.makePFTauAnalyzer(hltTauValIdealMonitorMC) (HLTTauValPostAnalysisPF, HLTTauValPostAnalysisPF2) = postProcessor.makePFTauAnalyzer(hltTauValIdealMonitorPF) +(HLTTauValPostAnalysisPN, HLTTauValPostAnalysisPN2) = postProcessor.makePFTauAnalyzer(hltTauValIdealMonitorPNet) (HLTTauValPostAnalysisTP, HLTTauValPostAnalysisTP2) = postProcessor.makePFTauAnalyzer(hltTauValTagAndProbe) HLTTauPostVal = cms.Sequence( HLTTauValPostAnalysisMC+HLTTauValPostAnalysisMC2+ HLTTauValPostAnalysisPF+HLTTauValPostAnalysisPF2+ + HLTTauValPostAnalysisPN+HLTTauValPostAnalysisPN2+ HLTTauValPostAnalysisTP+HLTTauValPostAnalysisTP2 ) diff --git a/HLTriggerOffline/Tau/python/Validation/HLTTauValidation_cfi.py b/HLTriggerOffline/Tau/python/Validation/HLTTauValidation_cfi.py index 8a6d8605da4f1..6dcd3d347e5d1 100644 --- a/HLTriggerOffline/Tau/python/Validation/HLTTauValidation_cfi.py +++ b/HLTriggerOffline/Tau/python/Validation/HLTTauValidation_cfi.py @@ -66,6 +66,11 @@ ), ) +hltTauValIdealMonitorPNet = hltTauValIdealMonitorMC.clone( + DQMBaseFolder = cms.untracked.string("HLT/TAU/RelVal/PNet"), + Paths = cms.untracked.string("PNetTau") +) + from DQMOffline.Trigger.HLTTauDQMOffline_cfi import hltTauOfflineMonitor_TagAndProbe hltTauValTagAndProbe = hltTauValIdealMonitorMC.clone( DQMBaseFolder = cms.untracked.string("HLT/TAU/RelVal/TagAndProbe"), @@ -94,5 +99,5 @@ ) #hltTauValIdeal = cms.Sequence(hltTauValIdealMonitorMC+hltTauValIdealMonitorPF) -hltTauValIdeal = cms.Sequence(hltTauValIdealMonitorMC+hltTauValIdealMonitorPF+hltTauValTagAndProbe) +hltTauValIdeal = cms.Sequence(hltTauValIdealMonitorMC+hltTauValIdealMonitorPF+hltTauValIdealMonitorPNet+hltTauValTagAndProbe)