CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
METplusTrackMonitor Class Reference
Inheritance diagram for METplusTrackMonitor:
DQMEDAnalyzer TriggerDQMBase edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Types inherited from TriggerDQMBase
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

 METplusTrackMonitor (const edm::ParameterSet &)
 
 ~METplusTrackMonitor () noexcept(true) override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
- Public Member Functions inherited from TriggerDQMBase
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const double ymin, const double ymax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const uint nbinsY, const double ymin, const double ymax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY, const bool bookDen=true)
 
void setMETitle (ObjME &me, const std::string &titleX, const std::string &titleY)
 
 TriggerDQMBase ()=default
 
virtual ~TriggerDQMBase ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Static Public Member Functions inherited from TriggerDQMBase
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

Protected Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

bool getHLTObj (const edm::Handle< trigger::TriggerEvent > &trigSummary, const edm::InputTag &filterTag, trigger::TriggerObject &obj) const
 

Private Attributes

ObjME deltaphimetj1ME_
 
ObjME deltaphimetmuonME_
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
MEbinning eta_binning_
 
const std::string folderName_
 
edm::InputTag hltMetTag_
 
bool hltPathsAreValid_
 
StringCutObjectSelector< reco::PFJet, true > jetSelection_
 
edm::EDGetTokenT< reco::PFJetCollectionjetToken_
 
double leadJetEtaCut_
 
MEbinning ls_binning_
 
double maxMatchDeltaR_
 
MEbinning met_binning_
 
std::vector< double > met_variable_binning_
 
ObjME metME_variableBinning_
 
ObjME metPhiME_
 
StringCutObjectSelector< reco::CaloMET, true > metSelection_
 
edm::EDGetTokenT< reco::CaloMETCollectionmetToken_
 
ObjME metVsHltMet_
 
ObjME metVsLS_
 
ObjME muonEtaME_
 
ObjME muonEtaVsPhi_
 
std::vector< double > muonPt_variable_binning_
 
ObjME muonPtME_variableBinning_
 
ObjME muonPtVsLS_
 
StringCutObjectSelector< reco::Muon, true > muonSelection_
 
edm::EDGetTokenT< reco::MuonCollectionmuonToken_
 
unsigned njets_
 
unsigned nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
MEbinning phi_binning_
 
MEbinning pt_binning_
 
bool requireLeadMatched_
 
const bool requireValidHLTPaths_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag trackLegFilterTag_
 
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
 
edm::EDGetTokenT< reco::VertexCollectionvtxToken_
 

Additional Inherited Members

- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 23 of file METplusTrackMonitor.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 26 of file METplusTrackMonitor.cc.

◆ MonitorElement

Definition at line 25 of file METplusTrackMonitor.cc.

Constructor & Destructor Documentation

◆ METplusTrackMonitor()

METplusTrackMonitor::METplusTrackMonitor ( const edm::ParameterSet iConfig)

Definition at line 93 of file METplusTrackMonitor.cc.

94  : folderName_(iConfig.getParameter<std::string>("FolderName")),
95  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
96  hltPathsAreValid_(false),
97  metToken_(consumes<reco::CaloMETCollection>(iConfig.getParameter<edm::InputTag>("met"))),
98  muonToken_(consumes<reco::MuonCollection>(iConfig.getParameter<edm::InputTag>("muons"))),
99  jetToken_(consumes<reco::PFJetCollection>(iConfig.getParameter<edm::InputTag>("jets"))),
100  vtxToken_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertices"))),
101  theTrigSummary_(consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("trigSummary"))),
102  hltMetTag_(iConfig.getParameter<edm::InputTag>("hltMetFilter")),
103  trackLegFilterTag_(iConfig.getParameter<edm::InputTag>("trackLegFilter")),
105  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning")),
107  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("ptBinning")),
109  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("metPSet"))),
110  ls_binning_(
111  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("lsPSet"))),
112  pt_binning_(
113  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("ptPSet"))),
115  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("etaPSet"))),
117  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("phiPSet"))),
119  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
121  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
122  metSelection_(iConfig.getParameter<std::string>("metSelection")),
123  muonSelection_(iConfig.getParameter<std::string>("muonSelection")),
124  jetSelection_(iConfig.getParameter<std::string>("jetSelection")),
125  vtxSelection_(iConfig.getParameter<std::string>("vtxSelection")),
126  nmuons_(iConfig.getParameter<unsigned>("nmuons")),
127  njets_(iConfig.getParameter<unsigned>("njets")),
128  leadJetEtaCut_(iConfig.getParameter<double>("leadJetEtaCut")),
129  requireLeadMatched_(iConfig.getParameter<bool>("requireLeadMatched")),
130  maxMatchDeltaR_(iConfig.getParameter<double>("maxMatchDeltaR")) {}
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
const std::string folderName_
edm::InputTag trackLegFilterTag_
std::vector< double > muonPt_variable_binning_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< double > met_variable_binning_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
StringCutObjectSelector< reco::CaloMET, true > metSelection_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
StringCutObjectSelector< reco::Muon, true > muonSelection_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_

◆ ~METplusTrackMonitor()

METplusTrackMonitor::~METplusTrackMonitor ( )
inlineoverridenoexcept

Definition at line 29 of file METplusTrackMonitor.cc.

29 {}

Member Function Documentation

◆ analyze()

void METplusTrackMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 247 of file METplusTrackMonitor.cc.

References heavyionUCCDQM_cfi::caloMet, SiPixelRawToDigiRegional_cfi::deltaPhi, deltaphimetj1ME_, deltaphimetmuonME_, PbPb_ZMuSkimMuonDPG_cff::deltaR, den_genTriggerEventFlag_, TriggerDQMBase::ObjME::denominator, PVValHelper::eta, dqm::impl::MonitorElement::Fill(), getHLTObj(), HLT_2024v14_cff::hltMet, hltMetTag_, hltPathsAreValid_, iEvent, muon::isTightMuon(), dqmiolumiharvest::j, PDWG_EXODelayedJetMET_cff::jets, jetSelection_, jetToken_, leadJetEtaCut_, eostools::ls(), visualization-live-secondInstance_cfg::m, maxMatchDeltaR_, BTaggingMonitor_cfi::met, metME_variableBinning_, metPhiME_, metSelection_, metToken_, metVsHltMet_, metVsLS_, reco::HitPattern::MISSING_INNER_HITS, muonEtaME_, muonEtaVsPhi_, muonPtME_variableBinning_, muonPtVsLS_, DiMuonV_cfg::muons, muonSelection_, muonToken_, njets_, nmuons_, num_genTriggerEventFlag_, TriggerDQMBase::ObjME::numerator, phi, HLT_2024v14_cff::primaryVertices, DiDispStaMuonMonitor_cfi::pt, requireLeadMatched_, requireValidHLTPaths_, theTrigSummary_, reco::HitPattern::TRACK_HITS, trackLegFilterTag_, HLTMuonOfflineAnalyzer_cfi::triggerSummary, findQualityFiles::v, vtxSelection_, and vtxToken_.

247  {
248  // if valid HLT paths are required,
249  // analyze event only if all paths are valid
251  return;
252  }
253 
254  // Filter out events if Trigger Filtering is requested
255  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
256  return;
257 
259  iEvent.getByToken(metToken_, metHandle);
260  reco::CaloMET caloMet = metHandle->front();
261  if (!metSelection_(caloMet))
262  return;
263 
264  float met = caloMet.pt();
265  float metPhi = caloMet.phi();
266 
268  iEvent.getByToken(jetToken_, jetsHandle);
269  if (jetsHandle->size() < njets_)
270  return;
271  std::vector<reco::PFJet> jets;
272  for (auto const& j : *jetsHandle) {
273  if (jetSelection_(j))
274  jets.push_back(j);
275  }
276  if (jets.size() < njets_)
277  return;
278  if (njets_ > 0 && !(jets.empty()) && fabs(jets[0].eta()) > leadJetEtaCut_)
279  return;
280  float deltaphi_metjet1 = !(jets.empty()) ? fabs(deltaPhi(caloMet.phi(), jets[0].phi())) : 10.0;
281 
283  iEvent.getByToken(vtxToken_, primaryVertices);
284  if (primaryVertices->empty())
285  return;
286  const reco::Vertex* pv = nullptr;
287  for (auto const& v : *primaryVertices) {
288  if (!vtxSelection_(v))
289  continue;
290  pv = &v;
291  break;
292  }
293  if (pv == nullptr)
294  return;
295 
297  iEvent.getByToken(muonToken_, muonHandle);
298  if (muonHandle->size() < nmuons_)
299  return;
300  std::vector<reco::Muon> muons;
301  for (auto const& m : *muonHandle) {
302  bool passTightID =
303  muon::isTightMuon(m, *pv) &&
304  m.innerTrack()->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::MISSING_INNER_HITS) == 0 &&
305  m.innerTrack()->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::TRACK_HITS) == 0;
306  if (muonSelection_(m) && passTightID)
307  muons.push_back(m);
308  }
309  if (muons.size() < nmuons_)
310  return;
311 
312  // Filling MET leg histograms (denominator)
314  metPhiME_.denominator->Fill(metPhi);
315  deltaphimetj1ME_.denominator->Fill(deltaphi_metjet1);
316 
317  int ls = iEvent.id().luminosityBlock();
319 
320  // Apply the selection for the MET leg numerator
323  if (!triggerSummary.isValid()) {
324  edm::LogError("METplusTrackMonitor") << "Invalid collection: TriggerSummary"
325  << "\n";
326  return;
327  }
328 
330  bool passesHltMetFilter = getHLTObj(triggerSummary, hltMetTag_, hltMet);
331 
332  if (!passesHltMetFilter)
333  return;
334 
335  // Filling MET leg histograms (numerator)
337  metPhiME_.numerator->Fill(metPhi);
338  deltaphimetj1ME_.numerator->Fill(deltaphi_metjet1);
341 
342  // Filling track leg histograms (denominator)
343  double leadMuonPt = !(muons.empty()) ? muons[0].pt() : -1.0;
344  double leadMuonEta = !(muons.empty()) ? muons[0].eta() : 10.0;
345  double leadMuonPhi = !(muons.empty()) ? muons[0].phi() : 10.0;
346  float deltaphi_metmuon = !(muons.empty()) ? fabs(deltaPhi(caloMet.phi(), muons[0].phi())) : 10.0;
347 
349  muonPtVsLS_.denominator->Fill(ls, leadMuonPt);
350  muonEtaME_.denominator->Fill(leadMuonEta);
351  deltaphimetmuonME_.denominator->Fill(deltaphi_metmuon);
352  muonEtaVsPhi_.denominator->Fill(leadMuonPhi, leadMuonEta);
353 
354  // Apply the selection for the track leg numerator
355  trigger::TriggerObject isoTrk;
356  bool passesTrackLegFilter = getHLTObj(triggerSummary, trackLegFilterTag_, isoTrk);
357 
358  // require track leg filter
359  if (!passesTrackLegFilter)
360  return;
361 
362  // if requested, require lead selected muon is matched to the track leg filter object
363  if (requireLeadMatched_ && !(muons.empty()) && deltaR(muons[0], isoTrk) < maxMatchDeltaR_)
364  return;
365 
366  // require the full HLT path is fired
367  if (num_genTriggerEventFlag_->on() && !num_genTriggerEventFlag_->accept(iEvent, iSetup))
368  return;
369 
370  // Filling track leg histograms (denominator)
372  muonPtVsLS_.numerator->Fill(ls, leadMuonPt);
373  muonEtaME_.numerator->Fill(leadMuonEta);
374  deltaphimetmuonME_.numerator->Fill(deltaphi_metmuon);
375  muonEtaVsPhi_.numerator->Fill(leadMuonPhi, leadMuonEta);
376 }
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Log< level::Error, false > LogError
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
Definition: DiMuonV_cfg.py:214
edm::InputTag trackLegFilterTag_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
MonitorElement * denominator
MonitorElement * numerator
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
StringCutObjectSelector< reco::CaloMET, true > metSelection_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
def ls(path, rec=False)
Definition: eostools.py:349
StringCutObjectSelector< reco::Muon, true > muonSelection_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
bool getHLTObj(const edm::Handle< trigger::TriggerEvent > &trigSummary, const edm::InputTag &filterTag, trigger::TriggerObject &obj) const

◆ bookHistograms()

void METplusTrackMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 132 of file METplusTrackMonitor.cc.

References TriggerDQMBase::bookME(), deltaphimetj1ME_, deltaphimetmuonME_, den_genTriggerEventFlag_, eta_binning_, folderName_, hltPathsAreValid_, ls_binning_, met_binning_, met_variable_binning_, metME_variableBinning_, metPhiME_, metVsHltMet_, metVsLS_, muonEtaME_, muonEtaVsPhi_, muonPt_variable_binning_, muonPtME_variableBinning_, muonPtVsLS_, TriggerDQMBase::MEbinning::nbins, num_genTriggerEventFlag_, phi_binning_, pt_binning_, requireValidHLTPaths_, dqm::implementation::NavigatorBase::setCurrentFolder(), TriggerDQMBase::setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

134  {
135  // Initialize the GenericTriggerEventFlag
137  num_genTriggerEventFlag_->initRun(iRun, iSetup);
138  }
140  den_genTriggerEventFlag_->initRun(iRun, iSetup);
141  }
142 
143  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
145  den_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->allHLTPathsAreValid() &&
146  den_genTriggerEventFlag_->allHLTPathsAreValid());
147 
148  // if valid HLT paths are required,
149  // create DQM outputs only if all paths are valid
151  return;
152  }
153 
154  std::string histname, histtitle;
155 
156  std::string currentFolder = folderName_;
157  ibooker.setCurrentFolder(currentFolder);
158 
159  // MET leg histograms
160  histname = "met_variable";
161  histtitle = "CaloMET";
162  bookME(ibooker, metME_variableBinning_, histname, histtitle, met_variable_binning_);
163  setMETitle(metME_variableBinning_, "CaloMET [GeV]", "events / [GeV]");
164 
165  histname = "metVsLS";
166  histtitle = "CaloMET vs LS";
167  bookME(ibooker,
168  metVsLS_,
169  histname,
170  histtitle,
176  setMETitle(metVsLS_, "LS", "CaloMET [GeV]");
177 
178  histname = "metPhi";
179  histtitle = "CaloMET phi";
180  bookME(ibooker, metPhiME_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
181  setMETitle(metPhiME_, "CaloMET #phi", "events / 0.2 rad");
182 
183  histname = "deltaphi_metjet1";
184  histtitle = "dPhi(CaloMET, jet1)";
185  bookME(ibooker, deltaphimetj1ME_, histname, histtitle, phi_binning_.nbins, 0, phi_binning_.xmax);
186  setMETitle(deltaphimetj1ME_, "#Delta#phi (CaloMET, j1)", "events / 0.1 rad");
187 
188  histname = "metVsHltMet";
189  histtitle = "CaloMET vs hltMet";
190  bookME(ibooker,
191  metVsHltMet_,
192  histname,
193  histtitle,
200  setMETitle(metVsHltMet_, "hltMet (online) [GeV]", "CaloMET (offline) [GeV]");
201 
202  // Track leg histograms
203 
204  histname = "muonPt_variable";
205  histtitle = "Muon PT";
206  bookME(ibooker, muonPtME_variableBinning_, histname, histtitle, muonPt_variable_binning_);
207  setMETitle(muonPtME_variableBinning_, "Muon p_{T} [GeV]", "events / [GeV]");
208 
209  histname = "muonEta";
210  histtitle = "Muon eta";
211  bookME(ibooker, muonEtaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
212  setMETitle(muonEtaME_, "Muon #eta", "events / 0.2");
213 
214  histname = "deltaphi_muonmet";
215  histtitle = "dPhi(Muon, CaloMET)";
216  bookME(ibooker, deltaphimetmuonME_, histname, histtitle, phi_binning_.nbins, 0, phi_binning_.xmax);
217  setMETitle(deltaphimetmuonME_, "#Delta#phi (Muon, CaloMET)", "events / 0.1 rad");
218 
219  histname = "muonEtaVsPhi";
220  histtitle = "Muon eta vs phi";
221  bookME(ibooker,
223  histname,
224  histtitle,
231  setMETitle(muonEtaVsPhi_, "Muon #phi", "Muon #eta");
232 
233  histname = "muonPtVsLS";
234  histtitle = "Muon PT vs LS";
235  bookME(ibooker,
236  muonPtVsLS_,
237  histname,
238  histtitle,
243  pt_binning_.xmax);
244  setMETitle(muonPtVsLS_, "LS", "Muon p_{T} [GeV]");
245 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
const std::string folderName_
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
std::vector< double > muonPt_variable_binning_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< double > met_variable_binning_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)

◆ fillDescriptions()

void METplusTrackMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 400 of file METplusTrackMonitor.cc.

References edm::ConfigurationDescriptions::add(), trigObjTnPSource_cfi::bins, submitPVResolutionJobs::desc, V0Monitor_cfi::etaPSet, TriggerDQMBase::fillHistoLSPSetDescription(), TriggerDQMBase::fillHistoPSetDescription(), GenericTriggerEventFlag::fillPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, V0Monitor_cff::histoPSet, ProducerED_cfi::InputTag, V0Monitor_cfi::lsPSet, BTaggingMonitor_cfi::metPSet, BPHMonitor_cff::phiPSet, V0Monitor_cfi::ptPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

400  {
402  desc.add<std::string>("FolderName", "HLT/MET");
403  desc.add<bool>("requireValidHLTPaths", true);
404 
405  desc.add<edm::InputTag>("met", edm::InputTag("caloMet"));
406  desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsCHS"));
407  desc.add<edm::InputTag>("electrons", edm::InputTag("gedGsfElectrons"));
408  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
409  desc.add<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
410  desc.add<edm::InputTag>("trigSummary", edm::InputTag("hltTriggerSummaryAOD"));
411  desc.add<edm::InputTag>("hltMetFilter", edm::InputTag("hltMET105", "", "HLT"));
412  desc.add<edm::InputTag>("trackLegFilter", edm::InputTag("hltTrk50Filter", "", "HLT"));
413 
414  desc.add<std::string>("metSelection", "pt > 0");
415  desc.add<std::string>("jetSelection", "pt > 0");
416  desc.add<std::string>("muonSelection", "pt > 0");
417  desc.add<std::string>("vtxSelection", "!isFake");
418  desc.add<unsigned>("njets", 0);
419  desc.add<unsigned>("nmuons", 0);
420  desc.add<double>("leadJetEtaCut", 2.4);
421  desc.add<bool>("requireLeadMatched", true);
422  desc.add<double>("maxMatchDeltaR", 0.1);
423 
426  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
427  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
428 
434 
439 
444 
445  std::vector<double> bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
446  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
447 
448  histoPSet.add<std::vector<double> >("metBinning", bins);
449  histoPSet.add<std::vector<double> >("ptBinning", bins);
450 
454 
455  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
456 
457  descriptions.add("metPlusTrackMonitoring", desc);
458 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)

◆ getHLTObj()

bool METplusTrackMonitor::getHLTObj ( const edm::Handle< trigger::TriggerEvent > &  trigSummary,
const edm::InputTag filterTag,
trigger::TriggerObject obj 
) const
private

Definition at line 378 of file METplusTrackMonitor.cc.

References submitPVResolutionJobs::key, relativeConstraints::keys, getGTfromDQMFile::obj, trigger::TriggerObject::pt(), triggerMatchMonitor_cfi::triggerObjects, and hotlineDQM_cfi::trigSummary.

Referenced by analyze().

380  {
381  double leadingPt = -1.0;
382 
383  size_t filterIndex = trigSummary->filterIndex(filterTag);
385 
386  if (!(filterIndex >= trigSummary->sizeFilters())) {
387  const trigger::Keys& keys = trigSummary->filterKeys(filterIndex);
388  for (unsigned short key : keys) {
390  if (foundObject.pt() > leadingPt) {
391  obj = foundObject;
392  leadingPt = obj.pt();
393  }
394  }
395  }
396 
397  return (leadingPt > 0.0);
398 }
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
key
prepare the HTCondor submission files and eventually submit them
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
std::vector< size_type > Keys

Member Data Documentation

◆ deltaphimetj1ME_

ObjME METplusTrackMonitor::deltaphimetj1ME_
private

Definition at line 67 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ deltaphimetmuonME_

ObjME METplusTrackMonitor::deltaphimetmuonME_
private

Definition at line 73 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ den_genTriggerEventFlag_

std::unique_ptr<GenericTriggerEventFlag> METplusTrackMonitor::den_genTriggerEventFlag_
private

Definition at line 77 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ eta_binning_

MEbinning METplusTrackMonitor::eta_binning_
private

Definition at line 61 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ folderName_

const std::string METplusTrackMonitor::folderName_
private

Definition at line 41 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ hltMetTag_

edm::InputTag METplusTrackMonitor::hltMetTag_
private

Definition at line 52 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ hltPathsAreValid_

bool METplusTrackMonitor::hltPathsAreValid_
private

Definition at line 44 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ jetSelection_

StringCutObjectSelector<reco::PFJet, true> METplusTrackMonitor::jetSelection_
private

Definition at line 81 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ jetToken_

edm::EDGetTokenT<reco::PFJetCollection> METplusTrackMonitor::jetToken_
private

Definition at line 48 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ leadJetEtaCut_

double METplusTrackMonitor::leadJetEtaCut_
private

Definition at line 87 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ ls_binning_

MEbinning METplusTrackMonitor::ls_binning_
private

Definition at line 59 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ maxMatchDeltaR_

double METplusTrackMonitor::maxMatchDeltaR_
private

Definition at line 90 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ met_binning_

MEbinning METplusTrackMonitor::met_binning_
private

Definition at line 58 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ met_variable_binning_

std::vector<double> METplusTrackMonitor::met_variable_binning_
private

Definition at line 55 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ metME_variableBinning_

ObjME METplusTrackMonitor::metME_variableBinning_
private

Definition at line 64 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ metPhiME_

ObjME METplusTrackMonitor::metPhiME_
private

Definition at line 66 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ metSelection_

StringCutObjectSelector<reco::CaloMET, true> METplusTrackMonitor::metSelection_
private

Definition at line 79 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ metToken_

edm::EDGetTokenT<reco::CaloMETCollection> METplusTrackMonitor::metToken_
private

Definition at line 46 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ metVsHltMet_

ObjME METplusTrackMonitor::metVsHltMet_
private

Definition at line 68 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ metVsLS_

ObjME METplusTrackMonitor::metVsLS_
private

Definition at line 65 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonEtaME_

ObjME METplusTrackMonitor::muonEtaME_
private

Definition at line 72 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonEtaVsPhi_

ObjME METplusTrackMonitor::muonEtaVsPhi_
private

Definition at line 74 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonPt_variable_binning_

std::vector<double> METplusTrackMonitor::muonPt_variable_binning_
private

Definition at line 56 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ muonPtME_variableBinning_

ObjME METplusTrackMonitor::muonPtME_variableBinning_
private

Definition at line 70 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonPtVsLS_

ObjME METplusTrackMonitor::muonPtVsLS_
private

Definition at line 71 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonSelection_

StringCutObjectSelector<reco::Muon, true> METplusTrackMonitor::muonSelection_
private

Definition at line 80 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ muonToken_

edm::EDGetTokenT<reco::MuonCollection> METplusTrackMonitor::muonToken_
private

Definition at line 47 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ njets_

unsigned METplusTrackMonitor::njets_
private

Definition at line 85 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ nmuons_

unsigned METplusTrackMonitor::nmuons_
private

Definition at line 84 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ num_genTriggerEventFlag_

std::unique_ptr<GenericTriggerEventFlag> METplusTrackMonitor::num_genTriggerEventFlag_
private

Definition at line 76 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ phi_binning_

MEbinning METplusTrackMonitor::phi_binning_
private

Definition at line 62 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ pt_binning_

MEbinning METplusTrackMonitor::pt_binning_
private

Definition at line 60 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

◆ requireLeadMatched_

bool METplusTrackMonitor::requireLeadMatched_
private

Definition at line 89 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ requireValidHLTPaths_

const bool METplusTrackMonitor::requireValidHLTPaths_
private

Definition at line 43 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ theTrigSummary_

edm::EDGetTokenT<trigger::TriggerEvent> METplusTrackMonitor::theTrigSummary_
private

Definition at line 50 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ trackLegFilterTag_

edm::InputTag METplusTrackMonitor::trackLegFilterTag_
private

Definition at line 53 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ vtxSelection_

StringCutObjectSelector<reco::Vertex, true> METplusTrackMonitor::vtxSelection_
private

Definition at line 82 of file METplusTrackMonitor.cc.

Referenced by analyze().

◆ vtxToken_

edm::EDGetTokenT<reco::VertexCollection> METplusTrackMonitor::vtxToken_
private

Definition at line 49 of file METplusTrackMonitor.cc.

Referenced by analyze().