#include <HLTMuonMatchAndPlot.h>
Public Member Functions | |
void | analyze (edm::Handle< reco::MuonCollection > &, edm::Handle< reco::BeamSpot > &, edm::Handle< reco::VertexCollection > &, edm::Handle< trigger::TriggerEvent > &, edm::Handle< edm::TriggerResults > &) |
void | beginRun (DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) |
void | endRun (const edm::Run &, const edm::EventSetup &) |
void | fillEdges (size_t &nBins, float *&edges, const std::vector< double > &binning) |
template<class T > | |
void | fillMapFromPSet (std::map< std::string, T > &, const edm::ParameterSet &, std::string) |
template<class T > | |
void | fillMapFromPSet (map< string, T > &m, const ParameterSet &pset, string target) |
HLTMuonMatchAndPlot (const edm::ParameterSet &, std::string, std::string, bool) | |
Constructor. More... | |
template<class T1 , class T2 > | |
std::vector< size_t > | matchByDeltaR (const std::vector< T1 > &, const std::vector< T2 > &, const double maxDeltaR=NOMATCH) |
template<class T1 , class T2 > | |
vector< size_t > | matchByDeltaR (const vector< T1 > &collection1, const vector< T2 > &collection2, const double maxDeltaR) |
Private Member Functions | |
void | book1D (DQMStore::IBooker &, std::string, std::string, std::string) |
void | book2D (DQMStore::IBooker &, std::string, std::string, std::string, std::string) |
reco::MuonCollection | selectedMuons (const reco::MuonCollection &, const reco::BeamSpot &, bool, const StringCutObjectSelector< reco::Muon > &, double, double) |
trigger::TriggerObjectCollection | selectedTriggerObjects (const trigger::TriggerObjectCollection &, const trigger::TriggerEvent &, bool hasTriggerCuts, const StringCutObjectSelector< trigger::TriggerObject > triggerSelector) |
Private Attributes | |
std::map< std::string, std::vector< double > > | binParams_ |
unsigned int | cutMinPt_ |
std::string | destination_ |
bool | hasProbeRecoCuts |
bool | hasTargetRecoCuts |
bool | hasTriggerCuts_ |
std::map< std::string, MonitorElement * > | hists_ |
std::string | hltPath_ |
std::string | hltProcessName_ |
bool | isLastFilter_ |
std::string | moduleLabel_ |
std::map< std::string, double > | plotCuts_ |
double | probeD0Cut_ |
StringCutObjectSelector < reco::Muon > | probeMuonSelector_ |
edm::ParameterSet | probeParams_ |
double | probeZ0Cut_ |
std::vector< std::string > | requiredTriggers_ |
double | targetD0Cut_ |
StringCutObjectSelector < reco::Muon > | targetMuonSelector_ |
edm::ParameterSet | targetParams_ |
double | targetptCutJpsi_ |
double | targetptCutZ_ |
double | targetZ0Cut_ |
std::string | triggerLevel_ |
StringCutObjectSelector < trigger::TriggerObject > | triggerSelector_ |
Match reconstructed muons to HLT objects and plot efficiencies.
Note that this is not a true EDAnalyzer;
Documentation available on the CMS TWiki: https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLTOfflinePerformance
Contanier class to handle vector of reconstructed muons matched to HLT objects used to plot efficiencies.
Note that this is not a true EDAnalyzer; rather, the intent is that one EDAnalyzer would call an instance of HLTMuonMatchAndPlotContainer
Documentation available on the CMS TWiki: https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLTOfflinePerformance
Definition at line 61 of file HLTMuonMatchAndPlot.h.
HLTMuonMatchAndPlot::HLTMuonMatchAndPlot | ( | const edm::ParameterSet & | , |
std::string | , | ||
std::string | , | ||
bool | |||
) |
Constructor.
Definition at line 34 of file HLTMuonMatchAndPlot.cc.
References binParams_, cutMinPt_, fillMapFromPSet(), hltPath_, moduleLabel_, plotCuts_, and triggerLevel_.
void HLTMuonMatchAndPlot::analyze | ( | edm::Handle< reco::MuonCollection > & | allMuons, |
edm::Handle< reco::BeamSpot > & | beamSpot, | ||
edm::Handle< reco::VertexCollection > & | vertices, | ||
edm::Handle< trigger::TriggerEvent > & | triggerSummary, | ||
edm::Handle< edm::TriggerResults > & | triggerResults | ||
) |
for (size_t i = 0; i < requiredTriggers_.size(); i++) { unsigned int triggerIndex = triggerResults->find(requiredTriggers_[i]); if (triggerIndex < triggerResults->size() || !triggerResults->accept(triggerIndex)) return; }
Definition at line 162 of file HLTMuonMatchAndPlot.cc.
References reco::LeafCandidate::charge(), cutMinPt_, deltaR(), reco::TrackBase::dxy(), reco::TrackBase::dz(), EFFICIENCY_SUFFIXES, eta, trigger::TriggerObject::eta(), reco::LeafCandidate::eta(), hasProbeRecoCuts, hasTargetRecoCuts, hasTriggerCuts_, hists_, HLT_FULL_cff::hltMuons, i, reco::Muon::innerTrack(), isLastFilter_, reco::Muon::isStandAloneMuon(), reco::Muon::isTrackerMuon(), j, relval_2017::k, ResonanceBuilder::mass, matchByDeltaR(), matches, metsig::muon, reco::Muon::outerTrack(), reco::LeafCandidate::p4(), phi, trigger::TriggerObject::phi(), reco::LeafCandidate::phi(), plotCuts_, probeD0Cut_, probeMuonSelector_, probeZ0Cut_, EnergyCorrector::pt, trigger::TriggerObject::pt(), reco::LeafCandidate::pt(), selectedMuons(), selectedTriggerObjects(), createPayload::suffix, targetD0Cut_, targetMuonSelector_, targetptCutJpsi_, targetptCutZ_, targetZ0Cut_, triggerLevel_, and triggerSelector_.
void HLTMuonMatchAndPlot::beginRun | ( | DQMStore::IBooker & | iBooker, |
const edm::Run & | iRun, | ||
const edm::EventSetup & | iSetup | ||
) |
Definition at line 85 of file HLTMuonMatchAndPlot.cc.
References book1D(), book2D(), destination_, EFFICIENCY_SUFFIXES, hltPath_, i, isLastFilter_, moduleLabel_, DQMStore::IBooker::setCurrentFolder(), and createPayload::suffix.
|
private |
Definition at line 528 of file HLTMuonMatchAndPlot.cc.
References binParams_, DQMStore::IBooker::book1D(), fillEdges(), hists_, and mergeVDriftHistosByStation::name.
Referenced by beginRun().
|
private |
Definition at line 555 of file HLTMuonMatchAndPlot.cc.
References binParams_, DQMStore::IBooker::book2D(), fillEdges(), hists_, and mergeVDriftHistosByStation::name.
Referenced by beginRun().
void HLTMuonMatchAndPlot::endRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iSetup | ||
) |
Definition at line 154 of file HLTMuonMatchAndPlot.cc.
void HLTMuonMatchAndPlot::fillEdges | ( | size_t & | nBins, |
float *& | edges, | ||
const std::vector< double > & | binning | ||
) |
Definition at line 363 of file HLTMuonMatchAndPlot.cc.
Referenced by book1D(), and book2D().
void HLTMuonMatchAndPlot::fillMapFromPSet | ( | std::map< std::string, T > & | , |
const edm::ParameterSet & | , | ||
std::string | |||
) |
Referenced by HLTMuonMatchAndPlot().
void HLTMuonMatchAndPlot::fillMapFromPSet | ( | map< string, T > & | m, |
const ParameterSet & | pset, | ||
string | target | ||
) |
Definition at line 397 of file HLTMuonMatchAndPlot.cc.
References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSet(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), and cscdqm::h::names.
std::vector<size_t> HLTMuonMatchAndPlot::matchByDeltaR | ( | const std::vector< T1 > & | , |
const std::vector< T2 > & | , | ||
const double | maxDeltaR = NOMATCH |
||
) |
Referenced by analyze().
vector<size_t> HLTMuonMatchAndPlot::matchByDeltaR | ( | const vector< T1 > & | collection1, |
const vector< T2 > & | collection2, | ||
const double | maxDeltaR | ||
) |
Definition at line 426 of file HLTMuonMatchAndPlot.cc.
References deltaR(), i, j, relval_2017::k, HLT_FULL_cff::minDeltaR, NOMATCH, and mps_fire::result.
|
private |
Definition at line 471 of file HLTMuonMatchAndPlot.cc.
References reco::TrackBase::dxy(), reco::TrackBase::dz(), RPCpg::mu, and reco::BeamSpot::position().
Referenced by analyze().
|
private |
Definition at line 500 of file HLTMuonMatchAndPlot.cc.
References trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), hltProcessName_, j, relativeConstraints::keys, moduleLabel_, and trigger::TriggerEvent::sizeFilters().
Referenced by analyze().
|
private |
Definition at line 106 of file HLTMuonMatchAndPlot.h.
Referenced by book1D(), book2D(), and HLTMuonMatchAndPlot().
|
private |
Definition at line 113 of file HLTMuonMatchAndPlot.h.
Referenced by analyze(), and HLTMuonMatchAndPlot().
|
private |
Definition at line 104 of file HLTMuonMatchAndPlot.h.
Referenced by beginRun().
|
private |
Definition at line 121 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 120 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 133 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 117 of file HLTMuonMatchAndPlot.h.
|
private |
Definition at line 114 of file HLTMuonMatchAndPlot.h.
Referenced by beginRun(), and HLTMuonMatchAndPlot().
|
private |
Definition at line 103 of file HLTMuonMatchAndPlot.h.
Referenced by selectedTriggerObjects().
|
private |
Definition at line 116 of file HLTMuonMatchAndPlot.h.
Referenced by analyze(), and beginRun().
|
private |
Definition at line 115 of file HLTMuonMatchAndPlot.h.
Referenced by beginRun(), HLTMuonMatchAndPlot(), Mixins._TypedParameterizable::insertInto(), Modules.ESSource::nameInProcessDesc_(), Modules.ESProducer::nameInProcessDesc_(), and selectedTriggerObjects().
|
private |
Definition at line 107 of file HLTMuonMatchAndPlot.h.
Referenced by analyze(), and HLTMuonMatchAndPlot().
|
private |
Definition at line 130 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 128 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 109 of file HLTMuonMatchAndPlot.h.
|
private |
Definition at line 129 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 105 of file HLTMuonMatchAndPlot.h.
|
private |
Definition at line 125 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 123 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 108 of file HLTMuonMatchAndPlot.h.
|
private |
Definition at line 127 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 126 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 124 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().
|
private |
Definition at line 112 of file HLTMuonMatchAndPlot.h.
Referenced by analyze(), and HLTMuonMatchAndPlot().
|
private |
Definition at line 132 of file HLTMuonMatchAndPlot.h.
Referenced by analyze().