CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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
< GenericTriggerEventFlag
den_genTriggerEventFlag_
 
MEbinning eta_binning_
 
const std::string folderName_
 
edm::InputTag hltMetCleanTag_
 
edm::InputTag hltMetTag_
 
bool hltPathsAreValid_
 
StringCutObjectSelector
< reco::PFJet, true > 
jetSelection_
 
edm::EDGetTokenT
< reco::PFJetCollection
jetToken_
 
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::CaloMETCollection
metToken_
 
ObjME metVsHltMet_
 
ObjME metVsHltMetClean_
 
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::MuonCollection
muonToken_
 
unsigned njets_
 
unsigned nmuons_
 
std::unique_ptr
< GenericTriggerEventFlag
num_genTriggerEventFlag_
 
MEbinning phi_binning_
 
MEbinning pt_binning_
 
bool requireLeadMatched_
 
const bool requireValidHLTPaths_
 
edm::EDGetTokenT
< trigger::TriggerEvent
theTrigSummary_
 
edm::InputTag trackLegFilterTag_
 
StringCutObjectSelector
< reco::Vertex, true > 
vtxSelection_
 
edm::EDGetTokenT
< reco::VertexCollection
vtxToken_
 

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

Definition at line 26 of file METplusTrackMonitor.cc.

Definition at line 25 of file METplusTrackMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 95 of file METplusTrackMonitor.cc.

96  : folderName_(iConfig.getParameter<std::string>("FolderName")),
97  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
98  hltPathsAreValid_(false),
99  metToken_(consumes<reco::CaloMETCollection>(iConfig.getParameter<edm::InputTag>("met"))),
100  muonToken_(consumes<reco::MuonCollection>(iConfig.getParameter<edm::InputTag>("muons"))),
101  jetToken_(consumes<reco::PFJetCollection>(iConfig.getParameter<edm::InputTag>("jets"))),
102  vtxToken_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertices"))),
103  theTrigSummary_(consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("trigSummary"))),
104  hltMetTag_(iConfig.getParameter<edm::InputTag>("hltMetFilter")),
105  hltMetCleanTag_(iConfig.getParameter<edm::InputTag>("hltMetCleanFilter")),
106  trackLegFilterTag_(iConfig.getParameter<edm::InputTag>("trackLegFilter")),
108  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning")),
110  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("ptBinning")),
112  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("metPSet"))),
113  ls_binning_(
114  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("lsPSet"))),
115  pt_binning_(
116  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("ptPSet"))),
118  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("etaPSet"))),
120  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("phiPSet"))),
122  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
124  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
125  metSelection_(iConfig.getParameter<std::string>("metSelection")),
126  muonSelection_(iConfig.getParameter<std::string>("muonSelection")),
127  jetSelection_(iConfig.getParameter<std::string>("jetSelection")),
128  vtxSelection_(iConfig.getParameter<std::string>("vtxSelection")),
129  nmuons_(iConfig.getParameter<unsigned>("nmuons")),
130  njets_(iConfig.getParameter<unsigned>("njets")),
131  leadJetEtaCut_(iConfig.getParameter<double>("leadJetEtaCut")),
132  requireLeadMatched_(iConfig.getParameter<bool>("requireLeadMatched")),
133  maxMatchDeltaR_(iConfig.getParameter<double>("maxMatchDeltaR")) {}
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
edm::InputTag hltMetCleanTag_
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_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
METplusTrackMonitor::~METplusTrackMonitor ( )
inlineoverridenoexcept

Definition at line 29 of file METplusTrackMonitor.cc.

29 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 264 of file METplusTrackMonitor.cc.

References CaloMET_cfi::caloMet, srCondWrite_cfg::deltaPhi, deltaphimetj1ME_, deltaphimetmuonME_, HLT_FULL_cff::deltaR, den_genTriggerEventFlag_, TriggerDQMBase::ObjME::denominator, PVValHelper::eta, dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), getHLTObj(), hltMetCleanTag_, hltMetTag_, hltPathsAreValid_, edm::EventBase::id(), muon::isTightMuon(), edm::HandleBase::isValid(), dqmiolumiharvest::j, fwrapper::jets, jetSelection_, jetToken_, leadJetEtaCut_, eostools::ls(), edm::EventID::luminosityBlock(), visualization-live-secondInstance_cfg::m, maxMatchDeltaR_, objects.METAnalyzer::met, metME_variableBinning_, metPhiME_, metSelection_, metToken_, metVsHltMet_, metVsHltMetClean_, metVsLS_, reco::HitPattern::MISSING_INNER_HITS, muonEtaME_, muonEtaVsPhi_, muonPtME_variableBinning_, muonPtVsLS_, patZpeak::muons, muonSelection_, muonToken_, njets_, nmuons_, num_genTriggerEventFlag_, TriggerDQMBase::ObjME::numerator, phi, reco::LeafCandidate::phi(), HLT_FULL_cff::primaryVertices, DiDispStaMuonMonitor_cfi::pt, trigger::TriggerObject::pt(), reco::LeafCandidate::pt(), MetAnalyzer::pv(), requireLeadMatched_, requireValidHLTPaths_, theTrigSummary_, reco::HitPattern::TRACK_HITS, trackLegFilterTag_, findQualityFiles::v, vtxSelection_, and vtxToken_.

264  {
265  // if valid HLT paths are required,
266  // analyze event only if all paths are valid
268  return;
269  }
270 
271  // Filter out events if Trigger Filtering is requested
272  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
273  return;
274 
276  iEvent.getByToken(metToken_, metHandle);
277  reco::CaloMET caloMet = metHandle->front();
278  if (!metSelection_(caloMet))
279  return;
280 
281  float met = caloMet.pt();
282  float metPhi = caloMet.phi();
283 
285  iEvent.getByToken(jetToken_, jetsHandle);
286  if (jetsHandle->size() < njets_)
287  return;
288  std::vector<reco::PFJet> jets;
289  for (auto const& j : *jetsHandle) {
290  if (jetSelection_(j))
291  jets.push_back(j);
292  }
293  if (jets.size() < njets_)
294  return;
295  if (njets_ > 0 && !(jets.empty()) && fabs(jets[0].eta()) > leadJetEtaCut_)
296  return;
297  float deltaphi_metjet1 = !(jets.empty()) ? fabs(deltaPhi(caloMet.phi(), jets[0].phi())) : 10.0;
298 
300  iEvent.getByToken(vtxToken_, primaryVertices);
301  if (primaryVertices->empty())
302  return;
303  const reco::Vertex* pv = nullptr;
304  for (auto const& v : *primaryVertices) {
305  if (!vtxSelection_(v))
306  continue;
307  pv = &v;
308  break;
309  }
310  if (pv == nullptr)
311  return;
312 
314  iEvent.getByToken(muonToken_, muonHandle);
315  if (muonHandle->size() < nmuons_)
316  return;
317  std::vector<reco::Muon> muons;
318  for (auto const& m : *muonHandle) {
319  bool passTightID =
320  muon::isTightMuon(m, *pv) &&
321  m.innerTrack()->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::MISSING_INNER_HITS) == 0 &&
322  m.innerTrack()->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::TRACK_HITS) == 0;
323  if (muonSelection_(m) && passTightID)
324  muons.push_back(m);
325  }
326  if (muons.size() < nmuons_)
327  return;
328 
329  // Filling MET leg histograms (denominator)
331  metPhiME_.denominator->Fill(metPhi);
332  deltaphimetj1ME_.denominator->Fill(deltaphi_metjet1);
333 
334  int ls = iEvent.id().luminosityBlock();
335  metVsLS_.denominator->Fill(ls, met);
336 
337  // Apply the selection for the MET leg numerator
338  edm::Handle<trigger::TriggerEvent> triggerSummary;
339  iEvent.getByToken(theTrigSummary_, triggerSummary);
340  if (!triggerSummary.isValid()) {
341  edm::LogError("METplusTrackMonitor") << "Invalid collection: TriggerSummary"
342  << "\n";
343  return;
344  }
345 
346  trigger::TriggerObject hltMet, hltMetClean;
347  bool passesHltMetFilter = getHLTObj(triggerSummary, hltMetTag_, hltMet);
348  bool passesHltMetCleanFilter = getHLTObj(triggerSummary, hltMetCleanTag_, hltMetClean);
349 
350  if (!passesHltMetFilter || !passesHltMetCleanFilter)
351  return;
352 
353  // Filling MET leg histograms (numerator)
355  metPhiME_.numerator->Fill(metPhi);
356  deltaphimetj1ME_.numerator->Fill(deltaphi_metjet1);
357  metVsLS_.numerator->Fill(ls, met);
358  metVsHltMet_.numerator->Fill(hltMet.pt(), met);
359  metVsHltMetClean_.numerator->Fill(hltMetClean.pt(), met);
360 
361  // Filling track leg histograms (denominator)
362  double leadMuonPt = !(muons.empty()) ? muons[0].pt() : -1.0;
363  double leadMuonEta = !(muons.empty()) ? muons[0].eta() : 10.0;
364  double leadMuonPhi = !(muons.empty()) ? muons[0].phi() : 10.0;
365  float deltaphi_metmuon = !(muons.empty()) ? fabs(deltaPhi(caloMet.phi(), muons[0].phi())) : 10.0;
366 
368  muonPtVsLS_.denominator->Fill(ls, leadMuonPt);
369  muonEtaME_.denominator->Fill(leadMuonEta);
370  deltaphimetmuonME_.denominator->Fill(deltaphi_metmuon);
371  muonEtaVsPhi_.denominator->Fill(leadMuonPhi, leadMuonEta);
372 
373  // Apply the selection for the track leg numerator
374  trigger::TriggerObject isoTrk;
375  bool passesTrackLegFilter = getHLTObj(triggerSummary, trackLegFilterTag_, isoTrk);
376 
377  // require track leg filter
378  if (!passesTrackLegFilter)
379  return;
380 
381  // if requested, require lead selected muon is matched to the track leg filter object
382  if (requireLeadMatched_ && !(muons.empty()) && deltaR(muons[0], isoTrk) < maxMatchDeltaR_)
383  return;
384 
385  // require the full HLT path is fired
386  if (num_genTriggerEventFlag_->on() && !num_genTriggerEventFlag_->accept(iEvent, iSetup))
387  return;
388 
389  // Filling track leg histograms (denominator)
391  muonPtVsLS_.numerator->Fill(ls, leadMuonPt);
392  muonEtaME_.numerator->Fill(leadMuonEta);
393  deltaphimetmuonME_.numerator->Fill(deltaphi_metmuon);
394  muonEtaVsPhi_.numerator->Fill(leadMuonPhi, leadMuonEta);
395 }
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
edm::InputTag hltMetCleanTag_
double pt() const final
transverse momentum
bool getHLTObj(const edm::Handle< trigger::TriggerEvent > &trigSummary, const edm::InputTag &filterTag, trigger::TriggerObject &obj) const
tuple caloMet
____________________________________________________________________________||
Definition: CaloMET_cfi.py:4
tuple primaryVertices
def ls
Definition: eostools.py:349
Log< level::Error, false > LogError
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_
vector< PseudoJet > jets
MonitorElement * denominator
MonitorElement * numerator
bool isValid() const
Definition: HandleBase.h:70
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_
tuple muons
Definition: patZpeak.py:41
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
double phi() const final
momentum azimuthal angle
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
void METplusTrackMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 135 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_, metVsHltMetClean_, 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.

137  {
138  // Initialize the GenericTriggerEventFlag
140  num_genTriggerEventFlag_->initRun(iRun, iSetup);
141  }
143  den_genTriggerEventFlag_->initRun(iRun, iSetup);
144  }
145 
146  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
148  den_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->allHLTPathsAreValid() &&
149  den_genTriggerEventFlag_->allHLTPathsAreValid());
150 
151  // if valid HLT paths are required,
152  // create DQM outputs only if all paths are valid
154  return;
155  }
156 
157  std::string histname, histtitle;
158 
159  std::string currentFolder = folderName_;
160  ibooker.setCurrentFolder(currentFolder);
161 
162  // MET leg histograms
163  histname = "met_variable";
164  histtitle = "CaloMET";
165  bookME(ibooker, metME_variableBinning_, histname, histtitle, met_variable_binning_);
166  setMETitle(metME_variableBinning_, "CaloMET [GeV]", "events / [GeV]");
167 
168  histname = "metVsLS";
169  histtitle = "CaloMET vs LS";
170  bookME(ibooker,
171  metVsLS_,
172  histname,
173  histtitle,
179  setMETitle(metVsLS_, "LS", "CaloMET [GeV]");
180 
181  histname = "metPhi";
182  histtitle = "CaloMET phi";
183  bookME(ibooker, metPhiME_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
184  setMETitle(metPhiME_, "CaloMET #phi", "events / 0.2 rad");
185 
186  histname = "deltaphi_metjet1";
187  histtitle = "dPhi(CaloMET, jet1)";
188  bookME(ibooker, deltaphimetj1ME_, histname, histtitle, phi_binning_.nbins, 0, phi_binning_.xmax);
189  setMETitle(deltaphimetj1ME_, "#Delta#phi (CaloMET, j1)", "events / 0.1 rad");
190 
191  histname = "metVsHltMet";
192  histtitle = "CaloMET vs hltMet";
193  bookME(ibooker,
194  metVsHltMet_,
195  histname,
196  histtitle,
203  setMETitle(metVsHltMet_, "hltMet (online) [GeV]", "CaloMET (offline) [GeV]");
204 
205  histname = "metVsHltMetClean";
206  histtitle = "CaloMET vs hltMetClean";
207  bookME(ibooker,
209  histname,
210  histtitle,
217  setMETitle(metVsHltMetClean_, "hltMetClean (online) [GeV]", "CaloMET (offline) [GeV]");
218 
219  // Track leg histograms
220 
221  histname = "muonPt_variable";
222  histtitle = "Muon PT";
223  bookME(ibooker, muonPtME_variableBinning_, histname, histtitle, muonPt_variable_binning_);
224  setMETitle(muonPtME_variableBinning_, "Muon p_{T} [GeV]", "events / [GeV]");
225 
226  histname = "muonEta";
227  histtitle = "Muon eta";
228  bookME(ibooker, muonEtaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
229  setMETitle(muonEtaME_, "Muon #eta", "events / 0.2");
230 
231  histname = "deltaphi_muonmet";
232  histtitle = "dPhi(Muon, CaloMET)";
233  bookME(ibooker, deltaphimetmuonME_, histname, histtitle, phi_binning_.nbins, 0, phi_binning_.xmax);
234  setMETitle(deltaphimetmuonME_, "#Delta#phi (Muon, CaloMET)", "events / 0.1 rad");
235 
236  histname = "muonEtaVsPhi";
237  histtitle = "Muon eta vs phi";
238  bookME(ibooker,
240  histname,
241  histtitle,
248  setMETitle(muonEtaVsPhi_, "Muon #phi", "Muon #eta");
249 
250  histname = "muonPtVsLS";
251  histtitle = "Muon PT vs LS";
252  bookME(ibooker,
253  muonPtVsLS_,
254  histname,
255  histtitle,
260  pt_binning_.xmax);
261  setMETitle(muonPtVsLS_, "LS", "Muon p_{T} [GeV]");
262 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
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)
void METplusTrackMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 419 of file METplusTrackMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, TriggerDQMBase::fillHistoLSPSetDescription(), TriggerDQMBase::fillHistoPSetDescription(), GenericTriggerEventFlag::fillPSetDescription(), HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

419  {
421  desc.add<std::string>("FolderName", "HLT/MET");
422  desc.add<bool>("requireValidHLTPaths", true);
423 
424  desc.add<edm::InputTag>("met", edm::InputTag("caloMet"));
425  desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsCHS"));
426  desc.add<edm::InputTag>("electrons", edm::InputTag("gedGsfElectrons"));
427  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
428  desc.add<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
429  desc.add<edm::InputTag>("trigSummary", edm::InputTag("hltTriggerSummaryAOD"));
430  desc.add<edm::InputTag>("hltMetFilter", edm::InputTag("hltMET105", "", "HLT"));
431  desc.add<edm::InputTag>("hltMetCleanFilter", edm::InputTag("hltMETClean65", "", "HLT"));
432  desc.add<edm::InputTag>("trackLegFilter", edm::InputTag("hltTrk50Filter", "", "HLT"));
433 
434  desc.add<std::string>("metSelection", "pt > 0");
435  desc.add<std::string>("jetSelection", "pt > 0");
436  desc.add<std::string>("muonSelection", "pt > 0");
437  desc.add<std::string>("vtxSelection", "!isFake");
438  desc.add<unsigned>("njets", 0);
439  desc.add<unsigned>("nmuons", 0);
440  desc.add<double>("leadJetEtaCut", 2.4);
441  desc.add<bool>("requireLeadMatched", true);
442  desc.add<double>("maxMatchDeltaR", 0.1);
443 
444  edm::ParameterSetDescription genericTriggerEventPSet;
445  GenericTriggerEventFlag::fillPSetDescription(genericTriggerEventPSet);
446  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
447  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
448 
454 
455  fillHistoPSetDescription(metPSet);
456  fillHistoPSetDescription(phiPSet);
457  fillHistoPSetDescription(ptPSet);
458  fillHistoPSetDescription(etaPSet);
459 
460  histoPSet.add<edm::ParameterSetDescription>("metPSet", metPSet);
461  histoPSet.add<edm::ParameterSetDescription>("phiPSet", phiPSet);
462  histoPSet.add<edm::ParameterSetDescription>("ptPSet", ptPSet);
463  histoPSet.add<edm::ParameterSetDescription>("etaPSet", etaPSet);
464 
465  std::vector<double> bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
466  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
467 
468  histoPSet.add<std::vector<double> >("metBinning", bins);
469  histoPSet.add<std::vector<double> >("ptBinning", bins);
470 
473  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
474 
475  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
476 
477  descriptions.add("metPlusTrackMonitoring", desc);
478 }
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
bool METplusTrackMonitor::getHLTObj ( const edm::Handle< trigger::TriggerEvent > &  trigSummary,
const edm::InputTag filterTag,
trigger::TriggerObject obj 
) const
private

Definition at line 397 of file METplusTrackMonitor.cc.

References submitPVResolutionJobs::key, relativeConstraints::keys, and trigger::TriggerObject::pt().

Referenced by analyze().

399  {
400  double leadingPt = -1.0;
401 
402  size_t filterIndex = trigSummary->filterIndex(filterTag);
403  trigger::TriggerObjectCollection triggerObjects = trigSummary->getObjects();
404 
405  if (!(filterIndex >= trigSummary->sizeFilters())) {
406  const trigger::Keys& keys = trigSummary->filterKeys(filterIndex);
407  for (unsigned short key : keys) {
408  trigger::TriggerObject foundObject = triggerObjects[key];
409  if (foundObject.pt() > leadingPt) {
410  obj = foundObject;
411  leadingPt = obj.pt();
412  }
413  }
414  }
415 
416  return (leadingPt > 0.0);
417 }
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
tuple 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

ObjME METplusTrackMonitor::deltaphimetj1ME_
private

Definition at line 68 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::deltaphimetmuonME_
private

Definition at line 75 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 79 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

MEbinning METplusTrackMonitor::eta_binning_
private

Definition at line 62 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

const std::string METplusTrackMonitor::folderName_
private

Definition at line 41 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

edm::InputTag METplusTrackMonitor::hltMetCleanTag_
private

Definition at line 53 of file METplusTrackMonitor.cc.

Referenced by analyze().

edm::InputTag METplusTrackMonitor::hltMetTag_
private

Definition at line 52 of file METplusTrackMonitor.cc.

Referenced by analyze().

bool METplusTrackMonitor::hltPathsAreValid_
private

Definition at line 44 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 83 of file METplusTrackMonitor.cc.

Referenced by analyze().

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

Definition at line 48 of file METplusTrackMonitor.cc.

Referenced by analyze().

double METplusTrackMonitor::leadJetEtaCut_
private

Definition at line 89 of file METplusTrackMonitor.cc.

Referenced by analyze().

MEbinning METplusTrackMonitor::ls_binning_
private

Definition at line 60 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

double METplusTrackMonitor::maxMatchDeltaR_
private

Definition at line 92 of file METplusTrackMonitor.cc.

Referenced by analyze().

MEbinning METplusTrackMonitor::met_binning_
private

Definition at line 59 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

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

Definition at line 56 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

ObjME METplusTrackMonitor::metME_variableBinning_
private

Definition at line 65 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::metPhiME_
private

Definition at line 67 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 81 of file METplusTrackMonitor.cc.

Referenced by analyze().

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

Definition at line 46 of file METplusTrackMonitor.cc.

Referenced by analyze().

ObjME METplusTrackMonitor::metVsHltMet_
private

Definition at line 69 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::metVsHltMetClean_
private

Definition at line 70 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::metVsLS_
private

Definition at line 66 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::muonEtaME_
private

Definition at line 74 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::muonEtaVsPhi_
private

Definition at line 76 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 57 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

ObjME METplusTrackMonitor::muonPtME_variableBinning_
private

Definition at line 72 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME METplusTrackMonitor::muonPtVsLS_
private

Definition at line 73 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 82 of file METplusTrackMonitor.cc.

Referenced by analyze().

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

Definition at line 47 of file METplusTrackMonitor.cc.

Referenced by analyze().

unsigned METplusTrackMonitor::njets_
private

Definition at line 87 of file METplusTrackMonitor.cc.

Referenced by analyze().

unsigned METplusTrackMonitor::nmuons_
private

Definition at line 86 of file METplusTrackMonitor.cc.

Referenced by analyze().

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

Definition at line 78 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

MEbinning METplusTrackMonitor::phi_binning_
private

Definition at line 63 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

MEbinning METplusTrackMonitor::pt_binning_
private

Definition at line 61 of file METplusTrackMonitor.cc.

Referenced by bookHistograms().

bool METplusTrackMonitor::requireLeadMatched_
private

Definition at line 91 of file METplusTrackMonitor.cc.

Referenced by analyze().

const bool METplusTrackMonitor::requireValidHLTPaths_
private

Definition at line 43 of file METplusTrackMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 50 of file METplusTrackMonitor.cc.

Referenced by analyze().

edm::InputTag METplusTrackMonitor::trackLegFilterTag_
private

Definition at line 54 of file METplusTrackMonitor.cc.

Referenced by analyze().

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

Definition at line 84 of file METplusTrackMonitor.cc.

Referenced by analyze().

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

Definition at line 49 of file METplusTrackMonitor.cc.

Referenced by analyze().