Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
598 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#ifndef TriggerMatchEfficiencyPlotter_H | ||
#define TriggerMatchEfficiencyPlotter_H | ||
/** \class TriggerMatch monitor | ||
* * | ||
* * DQM monitoring source for Trigger matching efficiency plotter feature added to miniAOD | ||
* * | ||
* * \author Bibhuprasad Mahakud (Purdue University, West Lafayette, USA) | ||
* */ | ||
|
||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "DQMServices/Core/interface/DQMEDHarvester.h" | ||
#include "DataFormats/Common/interface/Handle.h" | ||
#include <FWCore/Framework/interface/ESHandle.h> | ||
#include <FWCore/Framework/interface/Event.h> | ||
#include <FWCore/Framework/interface/MakerMacros.h> | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include <FWCore/Framework/interface/LuminosityBlock.h> | ||
|
||
#include "DQMServices/Core/interface/DQMStore.h" | ||
#include "DQMServices/Core/interface/MonitorElement.h" | ||
#include "FWCore/ServiceRegistry/interface/Service.h" | ||
#include "FWCore/Framework/interface/Run.h" | ||
|
||
#include <memory> | ||
#include <iostream> | ||
#include <string> | ||
#include <vector> | ||
#include <map> | ||
#include "TH1F.h" | ||
|
||
class TriggerMatchEfficiencyPlotter: public DQMEDHarvester { | ||
|
||
public: | ||
|
||
/// Constructor | ||
TriggerMatchEfficiencyPlotter(const edm::ParameterSet& ps); | ||
|
||
/// Destructor | ||
~TriggerMatchEfficiencyPlotter() override; | ||
|
||
protected: | ||
|
||
/// DQM Client Diagnostic | ||
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob | ||
|
||
|
||
private: | ||
|
||
DQMStore* theDbe; | ||
edm::ParameterSet parameters; | ||
|
||
std::string triggerhistName1_; | ||
std::string triggerhistName2_; | ||
|
||
// efficiency histograms | ||
MonitorElement* h_eff_Path1_eta_tight; | ||
MonitorElement* h_eff_Path1_pt_tight; | ||
MonitorElement* h_eff_Path1_phi_tight; | ||
|
||
MonitorElement* h_eff_Path2_eta_tight; | ||
MonitorElement* h_eff_Path2_pt_tight; | ||
MonitorElement* h_eff_Path2_phi_tight; | ||
|
||
std::string theFolder; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#ifndef TriggerMatchMonitor_H | ||
#define TriggerMatchMonitor_H | ||
/** \class TriggerMatch monitor | ||
* | ||
* DQM monitoring source for Trigger matching feature added to miniAOD | ||
* | ||
* \author Bibhuprasad Mahakud (Purdue University, West Lafayette, USA) | ||
*/ | ||
|
||
#include <memory> | ||
#include <fstream> | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/ServiceRegistry/interface/Service.h" | ||
#include "DQMServices/Core/interface/DQMStore.h" | ||
#include "DQMServices/Core/interface/MonitorElement.h" | ||
#include "DQMServices/Core/interface/DQMEDAnalyzer.h" | ||
|
||
#include "DataFormats/Common/interface/Handle.h" | ||
#include "DataFormats/MuonReco/interface/Muon.h" | ||
#include "DataFormats/MuonReco/interface/MuonFwd.h" | ||
#include "DataFormats/MuonReco/interface/MuonEnergy.h" | ||
#include "DataFormats/BeamSpot/interface/BeamSpot.h" | ||
#include "DataFormats/VertexReco/interface/Vertex.h" | ||
#include "DataFormats/VertexReco/interface/VertexFwd.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
#include "DataFormats/MuonReco/interface/MuonSelectors.h" | ||
#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h" | ||
#include "FWCore/Common/interface/TriggerNames.h" | ||
#include "DataFormats/Common/interface/TriggerResults.h" | ||
#include "DataFormats/HLTReco/interface/TriggerEvent.h" | ||
#include "DataFormats/PatCandidates/interface/Muon.h" | ||
#include "DataFormats/PatCandidates/interface/TriggerObjectStandAlone.h" | ||
|
||
|
||
class TriggerMatchMonitor : public DQMEDAnalyzer { | ||
public: | ||
|
||
/// Constructor | ||
TriggerMatchMonitor(const edm::ParameterSet& pSet); | ||
|
||
/// Destructor | ||
~TriggerMatchMonitor() override; | ||
|
||
void analyze(const edm::Event&, const edm::EventSetup&) override; | ||
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; | ||
|
||
private: | ||
|
||
// ----------member data --------------------------- | ||
MuonServiceProxy *theService; | ||
DQMStore* theDbe; | ||
edm::ParameterSet parameters; | ||
|
||
// triggerNames to be passed from config | ||
std::string triggerPathName1_; | ||
std::string triggerHistName1_; | ||
double triggerPtThresholdPath1_; | ||
std::string triggerPathName2_; | ||
std::string triggerHistName2_; | ||
double triggerPtThresholdPath2_; | ||
|
||
//Vertex requirements | ||
edm::EDGetTokenT<edm::View<reco::Muon> > theMuonCollectionLabel_; | ||
edm::EDGetTokenT<edm::View<pat::Muon> > thePATMuonCollectionLabel_; | ||
edm::EDGetTokenT<reco::VertexCollection> theVertexLabel_; | ||
edm::EDGetTokenT<reco::BeamSpot> theBeamSpotLabel_; | ||
edm::EDGetTokenT<edm::TriggerResults > triggerResultsToken_; | ||
edm::EDGetTokenT<std::vector<pat::TriggerObjectStandAlone>> triggerObjects_; | ||
|
||
edm::EDGetTokenT<reco::BeamSpot > beamSpotToken_; | ||
edm::EDGetTokenT<std::vector<reco::Vertex> > primaryVerticesToken_; | ||
|
||
// histograms | ||
std::vector<MonitorElement*> matchHists; | ||
MonitorElement* h_passHLTPath1_eta_Tight; | ||
MonitorElement* h_passHLTPath1_pt_Tight; | ||
MonitorElement* h_passHLTPath1_phi_Tight; | ||
MonitorElement* h_totalHLTPath1_eta_Tight; | ||
MonitorElement* h_totalHLTPath1_pt_Tight; | ||
MonitorElement* h_totalHLTPath1_phi_Tight; | ||
|
||
MonitorElement* h_passHLTPath2_eta_Tight; | ||
MonitorElement* h_passHLTPath2_pt_Tight; | ||
MonitorElement* h_passHLTPath2_phi_Tight; | ||
MonitorElement* h_totalHLTPath2_eta_Tight; | ||
MonitorElement* h_totalHLTPath2_pt_Tight; | ||
MonitorElement* h_totalHLTPath2_phi_Tight; | ||
|
||
std::string theFolder; | ||
}; | ||
#endif |
10 changes: 10 additions & 0 deletions
10
DQMOffline/Muon/python/TriggerMatchEfficencyPlotter_cfi.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester | ||
|
||
triggerMatchEffPlotterTightMiniAOD = DQMEDHarvester("TriggerMatchEfficiencyPlotter", | ||
folder = cms.string("Muons_miniAOD/TriggerMatchMonitor"), | ||
triggerhistName1 = cms.string('IsoMu24'), | ||
triggerhistName2 = cms.string('Mu50') | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from RecoMuon.TrackingTools.MuonServiceProxy_cff import * | ||
|
||
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer | ||
triggerMatchMonitor_miniAOD = DQMEDAnalyzer('TriggerMatchMonitor', | ||
MuonServiceProxy, | ||
offlineBeamSpot = cms.untracked.InputTag("offlineBeamSpot"), | ||
offlinePrimaryVertices = cms.untracked.InputTag("offlinePrimaryVertices"), | ||
MuonCollection = cms.InputTag("slimmedMuons"), | ||
patMuonCollection = cms.InputTag("slimmedMuons"), | ||
VertexLabel = cms.InputTag("offlineSlimmedPrimaryVertices"), | ||
BeamSpotLabel = cms.InputTag("offlineBeamSpot"), | ||
triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"), | ||
triggerObjects = cms.InputTag("slimmedPatTrigger"), | ||
hltCollectionFilters = cms.vstring('*'), | ||
triggerNameList = cms.vstring('HLT_Mu27_v*'), | ||
triggerPathName1 = cms.string('HLT_IsoMu24_v*'), | ||
triggerHistName1 = cms.string('IsoMu24'), | ||
triggerPtThresholdPath1 = cms.double(20.0), | ||
triggerPathName2 = cms.string('HLT_Mu50_v*'), | ||
triggerHistName2 = cms.string('Mu50'), | ||
triggerPtThresholdPath2 = cms.double(40.0), | ||
folder = cms.string("Muons_miniAOD/TriggerMatchMonitor") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.