From 106a330353e40d8ed791e0a98917e85218dec34b Mon Sep 17 00:00:00 2001 From: Dustin Date: Sat, 16 May 2015 18:14:26 +0200 Subject: [PATCH 1/3] Commit of hotline trigger DQM code --- DQMOffline/Trigger/interface/HotlineDQM.h | 87 +++++++ DQMOffline/Trigger/python/hotlineDQM_cfi.py | 163 +++++++++++++ DQMOffline/Trigger/src/HotlineDQM.cc | 248 ++++++++++++++++++++ 3 files changed, 498 insertions(+) create mode 100644 DQMOffline/Trigger/interface/HotlineDQM.h create mode 100644 DQMOffline/Trigger/python/hotlineDQM_cfi.py create mode 100644 DQMOffline/Trigger/src/HotlineDQM.cc diff --git a/DQMOffline/Trigger/interface/HotlineDQM.h b/DQMOffline/Trigger/interface/HotlineDQM.h new file mode 100644 index 0000000000000..b4cca17fc4be0 --- /dev/null +++ b/DQMOffline/Trigger/interface/HotlineDQM.h @@ -0,0 +1,87 @@ +#ifndef HotlineDQM_H +#define HotlineDQM_H + +//event +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" + +//DQM +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +//Muon +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/MuonReco/interface/MuonFwd.h" + +// MET +#include "DataFormats/METReco/interface/PFMET.h" +#include "DataFormats/METReco/interface/PFMETCollection.h" +#include "DataFormats/METReco/interface/CaloMET.h" +#include "DataFormats/METReco/interface/CaloMETCollection.h" + +// Jets +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DataFormats/JetReco/interface/CaloJet.h" + +//Photons +#include "DataFormats/EgammaCandidates/interface/Photon.h" +#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h" + +// Trigger +#include "DataFormats/Common/interface/TriggerResults.h" +#include "DataFormats/HLTReco/interface/TriggerObject.h" +#include "DataFormats/HLTReco/interface/TriggerEvent.h" +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" +#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" + +class HotlineDQM: public DQMEDAnalyzer{ + + public: + HotlineDQM(const edm::ParameterSet& ps); + virtual ~HotlineDQM(); + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + protected: + void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void analyze(edm::Event const& e, edm::EventSetup const& eSetup); + void beginLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup) ; + void endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup); + void endRun(edm::Run const& run, edm::EventSetup const& eSetup); + + private: + //histos booking function + void bookHistos(DQMStore::IBooker &); + + //variables from config file + edm::EDGetTokenT theMuonCollection_; + edm::EDGetTokenT thePfMETCollection_; + edm::EDGetTokenT theMETCollection_; + edm::EDGetTokenT theCaloJetCollection_; + edm::EDGetTokenT thePhotonCollection_; + edm::EDGetTokenT triggerResults_; + edm::EDGetTokenT theTrigSummary_; + + std::string triggerPath_; + edm::InputTag triggerFilter_; + + bool useMuons, useMet, usePFMet, useHT, usePhotons; + + // Histograms + MonitorElement* h_MuPt; + MonitorElement* h_PhotonPt; + MonitorElement* h_HT; + MonitorElement* h_MetPt; + MonitorElement* h_PFMetPt; + + MonitorElement* h_OnlineMuPt; + MonitorElement* h_OnlinePhotonPt; + MonitorElement* h_OnlineHT; + MonitorElement* h_OnlineMetPt; + MonitorElement* h_OnlinePFMetPt; +}; + +#endif diff --git a/DQMOffline/Trigger/python/hotlineDQM_cfi.py b/DQMOffline/Trigger/python/hotlineDQM_cfi.py new file mode 100644 index 0000000000000..eba9ec7712037 --- /dev/null +++ b/DQMOffline/Trigger/python/hotlineDQM_cfi.py @@ -0,0 +1,163 @@ +import FWCore.ParameterSet.Config as cms + +hotlineDQM_HT = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_HT2000_v'), + triggerFilter = cms.InputTag('hltHT2000', '', 'HLT'), + + useHT = cms.bool(True) +) + +hotlineDQM_HT_Tight = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_HT2500_v'), + triggerFilter = cms.InputTag('hltHT2500', '', 'HLT'), + + useHT = cms.bool(True) +) + +hotlineDQM_Photon = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_Photon500_v'), + triggerFilter = cms.InputTag('hltEG500HEFilter', '', 'HLT'), + + usePhotons = cms.bool(True) +) + +hotlineDQM_Photon_Tight = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_Photon600_v'), + triggerFilter = cms.InputTag('hltEG600HEFilter', '', 'HLT'), + + usePhotons = cms.bool(True) +) + +hotlineDQM_MET = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_MET250_v'), + triggerFilter = cms.InputTag('hltMETClean250', '', 'HLT'), + + useMet = cms.bool(True) +) + +hotlineDQM_MET_Tight = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_MET300_v'), + triggerFilter = cms.InputTag('hltMETClean300', '', 'HLT'), + + useMet = cms.bool(True) +) + +hotlineDQM_PFMET = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_PFMET300_NoiseCleaned_v'), + triggerFilter = cms.InputTag('hltPFMET300Filter', '', 'HLT'), + + usePFMet = cms.bool(True) +) + +hotlineDQM_PFMET_Tight = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_PFMET400_NoiseCleaned_v'), + triggerFilter = cms.InputTag('hltPFMET400Filter', '', 'HLT'), + + usePFMet = cms.bool(True) +) + +hotlineDQM_Muon = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_Mu300_v'), + triggerFilter = cms.InputTag('hltL3fL1sMu16orMu25L1f0L2f16QL3Filtered300Q', '', 'HLT'), + + useMuons = cms.bool(True) +) + +hotlineDQM_Muon_Tight = cms.EDAnalyzer('HotlineDQM', + photonCollection = cms.InputTag('photons'), + muonCollection = cms.InputTag('muons'), + caloJetCollection = cms.InputTag('ak4CaloJets'), + pfMetCollection = cms.InputTag('pfMet'), + caloMetCollection = cms.InputTag('caloMet'), + + triggerResults = cms.InputTag('TriggerResults','','HLT'), + trigSummary = cms.InputTag('hltTriggerSummaryAOD','','HLT'), + + triggerPath = cms.string('HLT_Mu350_v'), + triggerFilter = cms.InputTag('hltL3fL1sMu16orMu25L1f0L2f16QL3Filtered350Q', '', 'HLT'), + + useMuons = cms.bool(True) +) + +hotlineDQMSequence = cms.Sequence(hotlineDQM_HT*hotlineDQM_HT_Tight*hotlineDQM_Photon*hotlineDQM_Photon_Tight*hotlineDQM_Muon*hotlineDQM_Muon_Tight*hotlineDQM_MET*hotlineDQM_MET_Tight*hotlineDQM_PFMET*hotlineDQM_PFMET_Tight) diff --git a/DQMOffline/Trigger/src/HotlineDQM.cc b/DQMOffline/Trigger/src/HotlineDQM.cc new file mode 100644 index 0000000000000..1c57b7bffd798 --- /dev/null +++ b/DQMOffline/Trigger/src/HotlineDQM.cc @@ -0,0 +1,248 @@ +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Common/interface/TriggerNames.h" +#include "DataFormats/HLTReco/interface/TriggerObject.h" +#include "DQMOffline/Trigger/interface/HotlineDQM.h" + +HotlineDQM::HotlineDQM(const edm::ParameterSet& ps) +{ + + edm::LogInfo("HotlineDQM") << "Constructor HotlineDQM::HotlineDQM " << std::endl; + // Get parameters from configuration file + theMuonCollection_ = consumes(ps.getParameter("muonCollection")); + thePfMETCollection_ = consumes(ps.getParameter("pfMetCollection")); + theMETCollection_ = consumes(ps.getParameter("caloMetCollection")); + theCaloJetCollection_ = consumes(ps.getParameter("caloJetCollection")); + thePhotonCollection_ = consumes(ps.getParameter("photonCollection")); + theTrigSummary_ = consumes(ps.getParameter("trigSummary")); + triggerResults_ = consumes(ps.getParameter("triggerResults")); + triggerPath_ = ps.getParameter("triggerPath"); + triggerFilter_ = ps.getParameter("triggerFilter"); + useMuons = ps.getParameter("useMuons"); + useMet = ps.getParameter("useMet"); + usePFMet = ps.getParameter("usePFMet"); + useHT = ps.getParameter("useHT"); + usePhotons = ps.getParameter("usePhotons"); +} + +HotlineDQM::~HotlineDQM() +{ + edm::LogInfo("HotlineDQM") << "Destructor HotlineDQM::~HotlineDQM " << std::endl; +} + +void HotlineDQM::dqmBeginRun(edm::Run const &run, edm::EventSetup const &e) +{ + edm::LogInfo("HotlineDQM") << "HotlineDQM::beginRun" << std::endl; +} + +void HotlineDQM::bookHistograms(DQMStore::IBooker & ibooker_, edm::Run const &, edm::EventSetup const &) +{ + edm::LogInfo("HotlineDQM") << "HotlineDQM::bookHistograms" << std::endl; + //book at beginRun + bookHistos(ibooker_); +} + +void HotlineDQM::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, + edm::EventSetup const& context) +{ + edm::LogInfo("HotlineDQM") << "HotlineDQM::beginLuminosityBlock" << std::endl; +} + +void HotlineDQM::analyze(edm::Event const& e, edm::EventSetup const& eSetup){ + edm::LogInfo("HotlineDQM") << "HotlineDQM::analyze" << std::endl; + + //------------------------------- + //--- MET + //------------------------------- + edm::Handle pfMETCollection; + e.getByToken(thePfMETCollection_, pfMETCollection); + if ( !pfMETCollection.isValid() ){ + edm::LogError ("HotlineDQM") << "invalid collection: PFMET" << "\n"; + return; + } + edm::Handle caloMETCollection; + e.getByToken(theMETCollection_, caloMETCollection); + if ( !caloMETCollection.isValid() ){ + edm::LogError ("HotlineDQM") << "invalid collection: CaloMET" << "\n"; + return; + } + + //------------------------------- + //--- Jets + //------------------------------- + edm::Handle caloJetCollection; + e.getByToken (theCaloJetCollection_,caloJetCollection); + if ( !caloJetCollection.isValid() ){ + edm::LogError ("HotlineDQM") << "invalid collection: CaloJets" << "\n"; + return; + } + + //------------------------------- + //--- Muon + //------------------------------- + edm::Handle MuonCollection; + e.getByToken (theMuonCollection_, MuonCollection); + if ( !MuonCollection.isValid() ){ + edm::LogError ("HotlineDQM") << "invalid collection: Muons " << "\n"; + return; + } + + //------------------------------- + //--- Photon + //------------------------------- + edm::Handle PhotonCollection; + e.getByToken (thePhotonCollection_, PhotonCollection); + if ( !PhotonCollection.isValid() ){ + edm::LogError ("HotlineDQM") << "invalid collection: Photons " << "\n"; + return; + } + + //------------------------------- + //--- Trigger + //------------------------------- + edm::Handle hltresults; + e.getByToken(triggerResults_,hltresults); + if(!hltresults.isValid()){ + edm::LogError ("HotlineDQM") << "invalid collection: TriggerResults" << "\n"; + return; + } + edm::Handle triggerSummary; + e.getByToken(theTrigSummary_, triggerSummary); + if(!triggerSummary.isValid()) { + edm::LogError ("HotlineDQM") << "invalid collection: TriggerSummary" << "\n"; + return; + } + + bool hasFired = false; + const edm::TriggerNames& trigNames = e.triggerNames(*hltresults); + unsigned int numTriggers = trigNames.size(); + for( unsigned int hltIndex=0; hltIndexwasrun(hltIndex) && hltresults->accept(hltIndex)){ + hasFired = true; + } + } + + //get online objects + float ptMuon=-1, ptPhoton=-1, met=-1, pfMet=-1, ht = 0; + size_t filterIndex = triggerSummary->filterIndex( triggerFilter_ ); + trigger::TriggerObjectCollection triggerObjects = triggerSummary->getObjects(); + if( !(filterIndex >= triggerSummary->sizeFilters()) ){ + const trigger::Keys& keys = triggerSummary->filterKeys( filterIndex ); + for( size_t j = 0; j < keys.size(); ++j ){ + trigger::TriggerObject foundObject = triggerObjects[keys[j]]; + if(useMuons && fabs(foundObject.id()) == 13){ //muon + if(foundObject.pt() > ptMuon) ptMuon = foundObject.pt(); + } + else if(usePhotons && fabs(foundObject.id()) == 0){ //photon + if(foundObject.pt() > ptPhoton) ptPhoton = foundObject.pt(); + } + else if(useMet && fabs(foundObject.id()) == 0){ //MET + met = foundObject.pt(); + } + else if(usePFMet && fabs(foundObject.id()) == 0){ //PFMET + pfMet = foundObject.pt(); + } + else if(useHT && fabs(foundObject.id()) == 89){ //HT + ht = foundObject.pt(); + } + } + } + + if(hasFired) { + //fill appropriate online histogram + if(useMuons) h_OnlineMuPt->Fill(ptMuon); + if(usePhotons) h_OnlinePhotonPt->Fill(ptPhoton); + if(useMet) h_OnlineMetPt->Fill(met); + if(usePFMet) h_OnlinePFMetPt->Fill(pfMet); + if(useHT) h_OnlineHT->Fill(ht); + + //fill muon pt histogram + if(MuonCollection->size() > 0){ + float maxMuPt = -1.0; + for(auto &mu : *MuonCollection){ + if(mu.pt() > maxMuPt) maxMuPt = mu.pt(); + } + h_MuPt->Fill(maxMuPt); + } + + //fill photon pt histogram + if(PhotonCollection->size() > 0){ + float maxPhoPt = -1.0; + for(auto &pho : *PhotonCollection){ + if(pho.pt() > maxPhoPt) maxPhoPt = pho.pt(); + } + h_PhotonPt->Fill(maxPhoPt); + } + + //fill HT histogram + float caloHT = 0.0; + for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); ++i_calojet){ + if (i_calojet->pt() < 40) continue; + if (fabs(i_calojet->eta()) > 3.0) continue; + caloHT += i_calojet->pt(); + } + h_HT->Fill(caloHT); + + //fill CaloMET histogram + h_MetPt->Fill(caloMETCollection->front().et()); + + //fill PFMET histogram + h_PFMetPt->Fill(pfMETCollection->front().et()); + } +} + + +void HotlineDQM::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& eSetup) +{ + edm::LogInfo("HotlineDQM") << "HotlineDQM::endLuminosityBlock" << std::endl; +} + + +void HotlineDQM::endRun(edm::Run const& run, edm::EventSetup const& eSetup) +{ + edm::LogInfo("HotlineDQM") << "HotlineDQM::endRun" << std::endl; +} + +void HotlineDQM::bookHistos(DQMStore::IBooker & ibooker_) +{ + ibooker_.cd(); + ibooker_.setCurrentFolder("HLT/Hotline/" + triggerPath_); + + //online quantities + h_MuPt = ibooker_.book1D("MuPt", "Muon Pt; GeV", 20, 0.0, 2000.0); + h_PhotonPt = ibooker_.book1D("PhotonPt", "Photon Pt; GeV", 20, 0.0, 4000.0); + h_HT = ibooker_.book1D("HT", "HT; GeV", 20, 0.0, 6000.0); + h_MetPt = ibooker_.book1D("MetPt", "Calo MET; GeV", 20, 0.0, 2000); + h_PFMetPt = ibooker_.book1D("PFMetPt", "PF MET; GeV", 20, 0.0, 2000); + + if(useMuons) h_OnlineMuPt = ibooker_.book1D("OnlineMuPt", "Online Muon Pt; GeV", 20, 0.0, 2000.0); + if(usePhotons) h_OnlinePhotonPt = ibooker_.book1D("OnlinePhotonPt", "Online Photon Pt; GeV", 20, 0.0, 4000.0); + if(useHT) h_OnlineHT = ibooker_.book1D("OnlineHT", "Online HT; GeV", 20, 0.0, 6000.0); + if(useMet) h_OnlineMetPt = ibooker_.book1D("OnlineMetPt", "Online Calo MET; GeV", 20, 0.0, 2000); + if(usePFMet) h_OnlinePFMetPt = ibooker_.book1D("OnlinePFMetPt", "Online PF MET; GeV", 20, 0.0, 2000); + + ibooker_.cd(); +} + +void HotlineDQM::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("photonCollection", edm::InputTag("photons")); + desc.add("muonCollection", edm::InputTag("muons")); + desc.add("caloJetCollection", edm::InputTag("ak4CaloJets")); + desc.add("pfMetCollection", edm::InputTag("pfMet")); + desc.add("caloMetCollection", edm::InputTag("caloMet")); + desc.add("triggerResults",edm::InputTag("TriggerResults","","HLT")); + desc.add("trigSummary",edm::InputTag("hltTriggerSummaryAOD")); + desc.add("triggerPath","HLT_HT2000_v")->setComment("trigger path name"); + desc.add("triggerFilter",edm::InputTag("hltHt2000","","HLT"))->setComment("name of the last filter in the path"); + desc.add("useMuons", false); + desc.add("usePhotons", false); + desc.add("useMet", false); + desc.add("usePFMet", false); + desc.add("useHT", false); + descriptions.add("HotlineDQM",desc); +} + +//define this as a plug-in +DEFINE_FWK_MODULE(HotlineDQM); From 5157cc983e0f178d83e175c58b6cc552bba2e9f7 Mon Sep 17 00:00:00 2001 From: Dustin Date: Mon, 18 May 2015 21:34:12 +0200 Subject: [PATCH 2/3] Add hotline DQM to the offline sequence --- DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py b/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py index a2db791ecbc6f..83708f37b375b 100644 --- a/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py +++ b/DQMOffline/Trigger/python/DQMOffline_Trigger_cff.py @@ -64,6 +64,9 @@ # photon jet from DQMOffline.Trigger.HigPhotonJetHLTOfflineSource_cfi import * +#hotline +from DQMOffline.Trigger.hotlineDQM_cfi import * + import DQMServices.Components.DQMEnvironment_cfi dqmEnvHLT= DQMServices.Components.DQMEnvironment_cfi.dqmEnv.clone() dqmEnvHLT.subSystemFolder = 'HLT' @@ -85,7 +88,9 @@ sistripMonitorHLTsequence * higPhotonJetHLTOfflineSource* dqmEnvHLT * - topHLTriggerOfflineDQM) + topHLTriggerOfflineDQM * + hotlineDQMSequence + ) #triggerOfflineDQMSource = cms.Sequence(onlineHLTSource*offlineHLTSource) triggerOfflineDQMSource = cms.Sequence(offlineHLTSource) From 5c853322b7149075ee39e7301da854e8604ba82f Mon Sep 17 00:00:00 2001 From: Dustin Date: Wed, 27 May 2015 17:53:27 +0200 Subject: [PATCH 3/3] Removed unnecessary functions from hotline DQM module --- DQMOffline/Trigger/interface/HotlineDQM.h | 7 --- DQMOffline/Trigger/src/HotlineDQM.cc | 62 +++++++---------------- 2 files changed, 17 insertions(+), 52 deletions(-) diff --git a/DQMOffline/Trigger/interface/HotlineDQM.h b/DQMOffline/Trigger/interface/HotlineDQM.h index b4cca17fc4be0..5154f091ff3a0 100644 --- a/DQMOffline/Trigger/interface/HotlineDQM.h +++ b/DQMOffline/Trigger/interface/HotlineDQM.h @@ -45,17 +45,10 @@ class HotlineDQM: public DQMEDAnalyzer{ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); protected: - void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(edm::Event const& e, edm::EventSetup const& eSetup); - void beginLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup) ; - void endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup); - void endRun(edm::Run const& run, edm::EventSetup const& eSetup); private: - //histos booking function - void bookHistos(DQMStore::IBooker &); - //variables from config file edm::EDGetTokenT theMuonCollection_; edm::EDGetTokenT thePfMETCollection_; diff --git a/DQMOffline/Trigger/src/HotlineDQM.cc b/DQMOffline/Trigger/src/HotlineDQM.cc index 1c57b7bffd798..4229c3120f7c0 100644 --- a/DQMOffline/Trigger/src/HotlineDQM.cc +++ b/DQMOffline/Trigger/src/HotlineDQM.cc @@ -31,22 +31,27 @@ HotlineDQM::~HotlineDQM() edm::LogInfo("HotlineDQM") << "Destructor HotlineDQM::~HotlineDQM " << std::endl; } -void HotlineDQM::dqmBeginRun(edm::Run const &run, edm::EventSetup const &e) -{ - edm::LogInfo("HotlineDQM") << "HotlineDQM::beginRun" << std::endl; -} - void HotlineDQM::bookHistograms(DQMStore::IBooker & ibooker_, edm::Run const &, edm::EventSetup const &) { edm::LogInfo("HotlineDQM") << "HotlineDQM::bookHistograms" << std::endl; - //book at beginRun - bookHistos(ibooker_); -} -void HotlineDQM::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, - edm::EventSetup const& context) -{ - edm::LogInfo("HotlineDQM") << "HotlineDQM::beginLuminosityBlock" << std::endl; + ibooker_.cd(); + ibooker_.setCurrentFolder("HLT/Hotline/" + triggerPath_); + + //online quantities + h_MuPt = ibooker_.book1D("MuPt", "Muon Pt; GeV", 20, 0.0, 2000.0); + h_PhotonPt = ibooker_.book1D("PhotonPt", "Photon Pt; GeV", 20, 0.0, 4000.0); + h_HT = ibooker_.book1D("HT", "HT; GeV", 20, 0.0, 6000.0); + h_MetPt = ibooker_.book1D("MetPt", "Calo MET; GeV", 20, 0.0, 2000); + h_PFMetPt = ibooker_.book1D("PFMetPt", "PF MET; GeV", 20, 0.0, 2000); + + if(useMuons) h_OnlineMuPt = ibooker_.book1D("OnlineMuPt", "Online Muon Pt; GeV", 20, 0.0, 2000.0); + if(usePhotons) h_OnlinePhotonPt = ibooker_.book1D("OnlinePhotonPt", "Online Photon Pt; GeV", 20, 0.0, 4000.0); + if(useHT) h_OnlineHT = ibooker_.book1D("OnlineHT", "Online HT; GeV", 20, 0.0, 6000.0); + if(useMet) h_OnlineMetPt = ibooker_.book1D("OnlineMetPt", "Online Calo MET; GeV", 20, 0.0, 2000); + if(usePFMet) h_OnlinePFMetPt = ibooker_.book1D("OnlinePFMetPt", "Online PF MET; GeV", 20, 0.0, 2000); + + ibooker_.cd(); } void HotlineDQM::analyze(edm::Event const& e, edm::EventSetup const& eSetup){ @@ -192,39 +197,6 @@ void HotlineDQM::analyze(edm::Event const& e, edm::EventSetup const& eSetup){ } } - -void HotlineDQM::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& eSetup) -{ - edm::LogInfo("HotlineDQM") << "HotlineDQM::endLuminosityBlock" << std::endl; -} - - -void HotlineDQM::endRun(edm::Run const& run, edm::EventSetup const& eSetup) -{ - edm::LogInfo("HotlineDQM") << "HotlineDQM::endRun" << std::endl; -} - -void HotlineDQM::bookHistos(DQMStore::IBooker & ibooker_) -{ - ibooker_.cd(); - ibooker_.setCurrentFolder("HLT/Hotline/" + triggerPath_); - - //online quantities - h_MuPt = ibooker_.book1D("MuPt", "Muon Pt; GeV", 20, 0.0, 2000.0); - h_PhotonPt = ibooker_.book1D("PhotonPt", "Photon Pt; GeV", 20, 0.0, 4000.0); - h_HT = ibooker_.book1D("HT", "HT; GeV", 20, 0.0, 6000.0); - h_MetPt = ibooker_.book1D("MetPt", "Calo MET; GeV", 20, 0.0, 2000); - h_PFMetPt = ibooker_.book1D("PFMetPt", "PF MET; GeV", 20, 0.0, 2000); - - if(useMuons) h_OnlineMuPt = ibooker_.book1D("OnlineMuPt", "Online Muon Pt; GeV", 20, 0.0, 2000.0); - if(usePhotons) h_OnlinePhotonPt = ibooker_.book1D("OnlinePhotonPt", "Online Photon Pt; GeV", 20, 0.0, 4000.0); - if(useHT) h_OnlineHT = ibooker_.book1D("OnlineHT", "Online HT; GeV", 20, 0.0, 6000.0); - if(useMet) h_OnlineMetPt = ibooker_.book1D("OnlineMetPt", "Online Calo MET; GeV", 20, 0.0, 2000); - if(usePFMet) h_OnlinePFMetPt = ibooker_.book1D("OnlinePFMetPt", "Online PF MET; GeV", 20, 0.0, 2000); - - ibooker_.cd(); -} - void HotlineDQM::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; desc.add("photonCollection", edm::InputTag("photons"));