CMS 3D CMS Logo

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

Classes

struct  MEbinning
 

Public Member Functions

 HLTObjectsMonitor (const edm::ParameterSet &)
 
 ~HLTObjectsMonitor () override=default
 
- 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
 
 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
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
double dxyFinder (double, double, edm::Handle< reco::RecoChargedCandidateCollection >, edm::Handle< reco::BeamSpot >, double)
 
double dzFinder (double, double, double, double, edm::Handle< reco::RecoChargedCandidateCollection >, double)
 
void getPSet ()
 
bool isHEM17 (double eta, double phi)
 
bool isHEP17 (double eta, double phi)
 

Static Private Member Functions

static hltPlot getPlotPSet (edm::ParameterSet pset)
 

Private Attributes

std::string backupFolder_
 
edm::InputTag beamSpot_
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
edm::EDGetTokenT< reco::JetTagCollectioncaloJetBTagsToken_
 
const MEbinning csv_binning_ {N_CSV, -MAX_CSV, MAX_CSV}
 
bool debug_
 
edm::InputTag eleCandidates_
 
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > eleCandidatesToken_
 
const MEbinning eta_binning_hem17_ {N_ETA_HEP17, -MAX_ETA_HEP17, MIN_ETA_HEP17}
 
const MEbinning eta_binning_hep17_ {N_ETA_HEP17, MIN_ETA_HEP17, MAX_ETA_HEP17}
 
MonitorElementeventsPlot_
 
HLTConfigProvider hltConfig_
 
std::vector< hltPlothltPlots_
 
std::string label_
 
std::string mainFolder_
 
const double MASS_MU = .105658
 
double MAX_CSV = 1.
 
double MAX_ETA_HEP17 = 3.0
 
double MAX_PHI = 3.2
 
double MAX_PHI_HEP17 = -0.52
 
double MIN_ETA_HEP17 = 1.3
 
double MIN_PHI_HEP17 = -0.87
 
edm::InputTag muCandidates_
 
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > muCandidatesToken_
 
int N_CSV = 20
 
int N_ETA_HEP17 = 6
 
int N_PHI = 64
 
int N_PHI_HEP17 = 7
 
edm::EDGetTokenT< reco::JetTagCollectionpfJetBTagsToken_
 
const MEbinning phi_binning_ {N_PHI, -MAX_PHI, MAX_PHI}
 
const MEbinning phi_binning_hep17_ {N_PHI_HEP17, MIN_PHI_HEP17, MAX_PHI_HEP17}
 
std::vector< double > phi_variable_binning_
 
std::unordered_map< std::string, int > plotNamesToBins_
 
std::vector< edm::ParameterSetplotPSETS_
 
std::string processName_
 
std::string TopFolder_
 
edm::EDGetTokenT< trigger::TriggerEventtriggerEventToken_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 

Additional Inherited Members

- 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
 
- 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 &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 97 of file HLTObjectsMonitor.cc.

Constructor & Destructor Documentation

◆ HLTObjectsMonitor()

HLTObjectsMonitor::HLTObjectsMonitor ( const edm::ParameterSet iConfig)
explicit

Definition at line 256 of file HLTObjectsMonitor.cc.

References backupFolder_, getPSet(), mps_fire::i, mainFolder_, MAX_PHI, N_PHI, phi_variable_binning_, and TopFolder_.

257  : TopFolder_(iConfig.getParameter<std::string>("TopFolder")),
258  label_(iConfig.getParameter<std::string>("label")),
259  processName_(iConfig.getParameter<std::string>("processName")),
260  plotPSETS_(iConfig.getParameter<std::vector<edm::ParameterSet>>("plots")),
261  debug_(iConfig.getUntrackedParameter<bool>("debug", false)),
262  triggerResultsToken_(consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("TriggerResults"))),
263  triggerEventToken_(consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("TriggerSummary"))),
264  beamSpot_(iConfig.getParameter<edm::InputTag>("beamspot")),
265  beamSpotToken_(consumes<reco::BeamSpot>(beamSpot_)),
266  caloJetBTagsToken_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("caloJetBTags"))),
267  pfJetBTagsToken_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("pfJetBTags"))),
268  muCandidates_(iConfig.getParameter<edm::InputTag>("muCandidates")),
269  muCandidatesToken_(consumes<std::vector<reco::RecoChargedCandidate>>(muCandidates_)),
270  eleCandidates_(iConfig.getParameter<edm::InputTag>("eleCandidates")),
271  eleCandidatesToken_(consumes<std::vector<reco::RecoChargedCandidate>>(eleCandidates_)) {
272  getPSet();
273 
274  //now do what ever initialization is needed
275  mainFolder_ = TopFolder_ + "/MainShifter";
276  backupFolder_ = TopFolder_ + "/Backup";
277 
278  //set Token(s)
279 
280  double step = 2 * MAX_PHI / double(N_PHI);
281  for (int i = 0; i <= N_PHI; i++)
282  phi_variable_binning_.push_back(-MAX_PHI + step * i);
283 }
edm::EDGetTokenT< reco::JetTagCollection > pfJetBTagsToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
edm::InputTag muCandidates_
edm::EDGetTokenT< reco::JetTagCollection > caloJetBTagsToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
edm::InputTag beamSpot_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > eleCandidatesToken_
edm::InputTag eleCandidates_
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > muCandidatesToken_
std::vector< double > phi_variable_binning_
std::vector< edm::ParameterSet > plotPSETS_
step
Definition: StallMonitor.cc:98
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_

◆ ~HLTObjectsMonitor()

HLTObjectsMonitor::~HLTObjectsMonitor ( )
overridedefault

Member Function Documentation

◆ analyze()

void HLTObjectsMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 290 of file HLTObjectsMonitor.cc.

References funct::abs(), HLTObjectsMonitor_cfi::beamspot, beamSpotToken_, HLTObjectsMonitor_cfi::caloJetBTags, caloJetBTagsToken_, gather_cfg::cout, debug_, PbPb_ZMuSkimMuonDPG_cff::deltaR, HGC3DClusterGenMatchSelector_cfi::dR, PVValHelper::dxy, dxyFinder(), PVValHelper::dz, dzFinder(), HLTObjectsMonitor_cfi::eleCandidates, eleCandidatesToken_, hcalRecHitTable_cff::energy, PVValHelper::eta, HLT_2023v12_cff::eta2, eventsPlot_, dqm::impl::MonitorElement::Fill(), hltConfig_, hltPlots_, globals_cff::id2, heavyIonCSV_trainingSettings::idx, iEvent, ProducerED_cfi::InputTag, isHEM17(), isHEP17(), crabWrapper::key, relativeConstraints::keys, LogDebug, EgHLTOffHistBins_cfi::mass, MASS_MU, callgraph::module, HLTConfigProvider::moduleLabels(), EcalCalibMonitorClient_cfi::moduleName, HLTObjectsMonitor_cfi::muCandidates, muCandidatesToken_, HLTObjectsMonitor_cfi::pfJetBTags, pfJetBTagsToken_, phi, plotFactory::plot, plotNamesToBins_, processName_, DiDispStaMuonMonitor_cfi::pt, HLT_2023v12_cff::pt2, HLTConfigProvider::saveTags(), PDWG_DiPhoton_SD_cff::triggerEvent, triggerEventToken_, triggerResults, triggerResultsToken_, and findQualityFiles::v.

290  {
291  // if ( debug_ )
292  // std::cout << "[HLTObjectsMonitor::analyze]" << std::endl;
293 
294  // access trigger results
297  if (!triggerResults.isValid())
298  return;
299 
302  if (!triggerEvent.isValid())
303  return;
304 
307 
309  iEvent.getByToken(pfJetBTagsToken_, pfJetBTags);
310 
313 
316 
318  iEvent.getByToken(beamSpotToken_, beamspot);
319 
320  // loop over path
321  int ibin = -1;
322  std::vector<bool> plottedPathIndices(plotNamesToBins_.size(), false);
323  for (auto& plot : hltPlots_) {
324  ibin++;
325  if (plot.pathIDX <= 0)
326  continue;
327 
328  if (triggerResults->accept(plot.pathIDX)) {
329  //We only want to fill this once per pathNAME per event
330  auto index = plotNamesToBins_[plot.pathNAME];
331  if (not plottedPathIndices[index]) {
332  plottedPathIndices[index] = true;
333  if (debug_)
334  std::cout << plot.pathNAME << " --> bin: " << ibin << std::endl;
336  }
338  if (hltConfig_.saveTags(plot.moduleNAME)) {
339  if (debug_)
340  std::cout << "objects: " << objects.size() << std::endl;
341 
342  bool moduleFOUND = false;
343  std::vector<std::string> moduleNames = hltConfig_.moduleLabels(plot.pathIDX);
344  for (const auto& module : moduleNames) {
345  if (module == plot.moduleNAME)
346  moduleFOUND = true;
347  }
348  if (debug_)
349  std::cout << plot.moduleNAME << (moduleFOUND ? "" : "NOT") << " found in the list of modules" << std::endl;
350 
351  if (debug_)
352  for (const auto& module : moduleNames) {
353  unsigned int idx = triggerEvent->filterIndex(edm::InputTag(module, "", processName_));
354  std::cout << "module: " << module;
355  if (idx < triggerEvent->sizeFilters())
356  std::cout << " --> " << idx;
357  std::cout << std::endl;
358  }
359  //
360  // trigger accepted and collection w/ objects is available
362  unsigned int moduleIDX = triggerEvent->filterIndex(moduleName);
363  if (debug_)
364  std::cout << "moduleNAME: " << plot.moduleNAME << " --> " << moduleIDX << std::endl;
365 
366  if (moduleIDX >= triggerEvent->sizeFilters()) {
367  LogDebug("HLTObjectsMonitor")
368  << plot.pathNAME << " " << plot.moduleNAME
369  << " is not available ! please, fix update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py";
370  return;
371  }
372 
373  const trigger::Keys& keys = triggerEvent->filterKeys(moduleIDX);
374  if (debug_)
375  std::cout << "keys: " << keys.size() << std::endl;
376 
377  plot.nME.first->Fill(keys.size());
378 
379  double MR = 0.;
380  double RSQ = 0.;
381  for (const auto& key : keys) {
382  double pt = objects[key].pt();
383  double eta = objects[key].eta();
384  double phi = objects[key].phi();
385  double mass = objects[key].mass();
386  double energy = objects[key].energy();
387  int id = objects[key].id();
388  if (debug_)
389  std::cout << "object ID " << id << " mass: " << mass << std::endl;
390 
391  // single-object plots
392  plot.ptME.first->Fill(pt);
393  if (plot.doPlotETA)
394  plot.etaME.first->Fill(eta);
395  plot.phiME.first->Fill(phi);
396 
397  if (plot.doPlotCSV) {
398  if (plot.doCALO) {
399  if (!caloJetBTags.isValid())
400  plot.csvME.first->Fill(-10.);
401  else {
402  for (auto it = caloJetBTags->begin(); it != caloJetBTags->end(); ++it) {
403  double dR = deltaR(eta, phi, it->first->eta(), it->first->phi());
404  if (debug_)
405  std::cout << "[HLTObjectsMonitor::analyze] deltaR: " << dR << " matched ? "
406  << (dR <= 0.4 ? "YEAP" : "NOPE") << std::endl;
407  plot.csvME.first->Fill(it->second);
408  }
409  }
410 
411  } else if (plot.doPF) {
412  if (!pfJetBTags.isValid())
413  plot.csvME.first->Fill(-10.);
414  else {
415  for (auto it = pfJetBTags->begin(); it != pfJetBTags->end(); ++it) {
416  double dR = deltaR(eta, phi, it->first->eta(), it->first->phi());
417  if (debug_)
418  std::cout << "[HLTObjectsMonitor::analyze] deltaR: " << dR << " matched ? "
419  << (dR <= 0.4 ? "YEAP" : "NOPE") << std::endl;
420  plot.csvME.first->Fill(it->second);
421  }
422  }
423  }
424  }
425  if (plot.doPlotMASS)
426  plot.massME.first->Fill(mass);
427  if (plot.doPlotENERGY)
428  plot.energyME.first->Fill(energy);
429  if (plot.doPlot2D)
430  plot.etaVSphiME.first->Fill(eta, phi);
431  if (plot.doPlotHEP17) {
432  if (isHEP17(eta, phi))
433  plot.ptMEhep17.first->Fill(pt);
434  if (isHEM17(eta, phi))
435  plot.ptMEhem17.first->Fill(pt);
436  }
437 
438  if (id == 0) { //the MET object containing MR and Rsq will show up with ID = 0
439  MR = objects[key].px(); //razor variables stored in dummy reco::MET objects
440  RSQ = objects[key].py();
441  }
442 
443  if (plot.doPlotDXY) {
444  double dxy = -99.;
445  if (abs(id) == 13)
446  dxy = dxyFinder(eta, phi, muCandidates, beamspot, 0.1); // dRcut = 0.1
447  else
448  dxy = dxyFinder(eta, phi, eleCandidates, beamspot, 0.1); // dRcut = 0.1
449  plot.dxyME.first->Fill(dxy);
450  }
451  } // end loop on keys
452  if (plot.doPlotRazor) {
453  plot.mrME.first->Fill(MR);
454  plot.rsqME.first->Fill(RSQ);
455  }
456 
457  if (keys.size() < 2) {
458  if (plot.doPlotDiMass || plot.doPlotDZ)
459  LogDebug("HLTObjectsMonitor") << plot.pathNAME << " " << plot.moduleNAME << " # objects is (" << keys.size()
460  << ") less than 2 ! you probably want to either change the moduleNAME or "
461  "switch off di-object system plots (doPlotDZ: "
462  << plot.doPlotDZ << " doPlotDiMass: " << plot.doPlotDiMass
463  << ") in DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
464  } else {
465  for (const auto& key : keys) {
466  double pt = objects[key].pt();
467  double eta = objects[key].eta();
468  double phi = objects[key].phi();
469  int id = objects[key].id();
470 
471  unsigned int kCnt0 = 0;
472 
473  TLorentzVector v1;
474  if (abs(id) == 13) // check if it is a muon
475  v1.SetPtEtaPhiM(pt, eta, phi, MASS_MU);
476  else
477  v1.SetPtEtaPhiM(pt, eta, phi, 0);
478 
479  unsigned int kCnt1 = 0;
480  for (const auto& key1 : keys) {
481  if (key != key1 &&
482  kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
483 
484  double pt2 = objects[key1].pt();
485  double eta2 = objects[key1].eta();
486  double phi2 = objects[key1].phi();
487  int id2 = objects[key1].id();
488 
489  double dR = deltaR(eta, phi, eta2, phi2);
490  plot.dRME.first->Fill(dR);
491  plot.dRetaVSphiME.first->Fill(eta, phi, dR);
492 
493  int q1 = (id == 0 ? 0 : id / abs(id));
494  int q2 = (id2 == 0 ? 0 : id2 / abs(id2));
495  int q1q2 = q1 * q2;
496  plot.q1q2ME.first->Fill(q1q2);
497 
498  if ((id + id2) == 0) { // check di-object system charge and flavor
499 
500  TLorentzVector v2;
501  if (abs(id2) == 13) // check if it is a muon
502  v2.SetPtEtaPhiM(pt2, eta2, phi2, MASS_MU);
503  else
504  v2.SetPtEtaPhiM(pt2, eta2, phi2, 0);
505 
506  if (plot.doPlotDiMass) {
507  TLorentzVector v = v1 + v2;
508  plot.dimassME.first->Fill(v.M());
509  }
510 
511  if (plot.doPlotDZ) {
512  double dz = -99.;
513  if (abs(id) == 13)
514  dz = dzFinder(eta, phi, eta2, phi2, muCandidates, 0.1); // dRcut = 0.1
515  else
516  dz = dzFinder(eta, phi, eta2, phi2, eleCandidates, 0.1); // dRcut = 0.1
517  plot.dzME.first->Fill(dz);
518  }
519  }
520  }
521  kCnt1++;
522  }
523  kCnt0++;
524  }
525  }
526  }
527  }
528  }
529 }
edm::EDGetTokenT< reco::JetTagCollection > pfJetBTagsToken_
std::vector< hltPlot > hltPlots_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
std::unordered_map< std::string, int > plotNamesToBins_
edm::EDGetTokenT< reco::JetTagCollection > caloJetBTagsToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void Fill(long long x)
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > eleCandidatesToken_
bool isHEP17(double eta, double phi)
int iEvent
Definition: GenABIO.cc:224
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
double dxyFinder(double, double, edm::Handle< reco::RecoChargedCandidateCollection >, edm::Handle< reco::BeamSpot >, double)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static std::string const triggerResults
Definition: EdmProvDump.cc:47
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
std::vector< size_type > Keys
HLTConfigProvider hltConfig_
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > muCandidatesToken_
bool isHEM17(double eta, double phi)
MonitorElement * eventsPlot_
double dzFinder(double, double, double, double, edm::Handle< reco::RecoChargedCandidateCollection >, double)
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
#define LogDebug(id)

◆ bookHistograms()

void HLTObjectsMonitor::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 569 of file HLTObjectsMonitor.cc.

References backupFolder_, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile2D(), gather_cfg::cout, csv_binning_, debug_, mps_fire::end, eventsPlot_, hltPlots_, mps_fire::i, label_, LogDebug, mainFolder_, Skims_PA_cff::name, LaserClient_cfi::nbins, HLTObjectsMonitor::MEbinning::nbins, hlt_dqm_clientPB-live_cfg::nbinsX, L1THistDefinitions_cff::nbinsY, AlCaHLTBitMon_ParallelJobs::p, plotFactory::plot, plotNamesToBins_, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, runGCPTkAlMap::title, TopFolder_, HLTObjectsMonitor::MEbinning::xmax, and HLTObjectsMonitor::MEbinning::xmin.

571  {
572  if (debug_)
573  std::cout << "[HLTObjectsMonitor::bookHistograms]" << std::endl;
574 
575  ibooker.setCurrentFolder(TopFolder_);
576 
577  std::string name = "eventsPerPath_" + label_;
578  std::string title = " events per path";
579 
580  //We must avoid repeating the same pathNAME
581  {
582  std::unordered_map<std::string, int> uniqueNames;
583  for (auto const& p : hltPlots_) {
584  plotNamesToBins_[p.pathNAME] = -1;
585  }
586  int nbins = plotNamesToBins_.size();
587  eventsPlot_ = ibooker.book1D(name, title, nbins, -0.5, double(nbins) - 0.5);
588  eventsPlot_->setAxisTitle("HLT path");
589  int i = 0;
590  //keep the bin order the same as hltPlots_
591  for (auto const& p : hltPlots_) {
592  //only add a bin if this is the first time we've seen the name
593  if (-1 == plotNamesToBins_[p.pathNAME]) {
594  plotNamesToBins_[p.pathNAME] = ++i;
595  eventsPlot_->setBinLabel(i, p.pathNAME);
596  if (debug_)
597  std::cout << p.pathNAME << " --> bin: " << i << std::endl;
598  }
599  }
600  }
601 
602  for (auto& plot : hltPlots_) {
603  if (debug_)
604  std::cout << "booking plots for " << plot.label << std::endl;
605 
606  if (plot.pathIDX <= 0) {
607  LogDebug("HLTObjectsMonitor") << plot.pathNAME
608  << " is not available in the HLT menu ! no plots are going to be booked for it "
609  "(update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
610  continue;
611  }
612  if (debug_)
613  std::cout << "booking histograms for " << plot.pathNAME << std::endl;
614 
615  {
616  if (plot.nME.second)
617  ibooker.setCurrentFolder(mainFolder_);
618  else
619  ibooker.setCurrentFolder(backupFolder_);
620 
621  name = plot.label + "_nobjects";
622  title = plot.pathNAME + " # objects";
623  plot.nME.first = ibooker.book1D(name, title, 20, -0.5, 19.5);
624  plot.nME.first->setAxisTitle(plot.xTITLE + " # objects");
625  }
626 
627  if (plot.ptME.second)
628  ibooker.setCurrentFolder(mainFolder_);
629  else
630  ibooker.setCurrentFolder(backupFolder_);
631 
632  name = plot.label + "_pt";
633  title = plot.pathNAME + " p_T";
634  int nbins = (plot.ptBINNING).size() - 1;
635  std::vector<float> fbinning((plot.ptBINNING).begin(), (plot.ptBINNING).end());
636  float* arr = &fbinning[0];
637  plot.ptME.first = ibooker.book1D(name, title, nbins, arr);
638  plot.ptME.first->setAxisTitle(plot.xTITLE + " p_{T} [GeV]");
639 
640  {
641  if (plot.phiME.second)
642  ibooker.setCurrentFolder(mainFolder_);
643  else
644  ibooker.setCurrentFolder(backupFolder_);
645 
646  name = plot.label + "_phi";
647  title = plot.pathNAME + " #phi";
648  int nbins = (plot.phiBINNING).size() - 1;
649  std::vector<float> fbinning((plot.phiBINNING).begin(), (plot.phiBINNING).end());
650  float* arr = &fbinning[0];
651  plot.phiME.first = ibooker.book1D(name, title, nbins, arr);
652  plot.phiME.first->setAxisTitle(plot.xTITLE + " #phi [rad]");
653  }
654 
655  if (plot.doPlotETA) {
656  if (plot.etaME.second)
657  ibooker.setCurrentFolder(mainFolder_);
658  else
659  ibooker.setCurrentFolder(backupFolder_);
660 
661  name = plot.label + "_eta";
662  title = plot.pathNAME + " #eta";
663  int nbins = (plot.etaBINNING).size() - 1;
664  std::vector<float> fbinning((plot.etaBINNING).begin(), (plot.etaBINNING).end());
665  float* arr = &fbinning[0];
666 
667  plot.etaME.first = ibooker.book1D(name, title, nbins, arr);
668  plot.etaME.first->setAxisTitle(plot.xTITLE + " #eta");
669  }
670 
671  if (plot.doPlotMASS) {
672  if (plot.massME.second)
673  ibooker.setCurrentFolder(mainFolder_);
674  else
675  ibooker.setCurrentFolder(backupFolder_);
676 
677  name = plot.label + "_mass";
678  title = plot.pathNAME + " mass";
679  int nbins = (plot.massBINNING).size() - 1;
680  std::vector<float> fbinning((plot.massBINNING).begin(), (plot.massBINNING).end());
681  float* arr = &fbinning[0];
682 
683  plot.massME.first = ibooker.book1D(name, title, nbins, arr);
684  plot.massME.first->setAxisTitle(plot.xTITLE + " mass [GeV]");
685  }
686 
687  if (plot.doPlotENERGY) {
688  if (plot.energyME.second)
689  ibooker.setCurrentFolder(mainFolder_);
690  else
691  ibooker.setCurrentFolder(backupFolder_);
692 
693  name = plot.label + "_energy";
694  title = plot.pathNAME + " energy";
695  int nbins = (plot.ptBINNING).size() - 1;
696  std::vector<float> fbinning((plot.ptBINNING).begin(), (plot.ptBINNING).end());
697  float* arr = &fbinning[0];
698 
699  plot.energyME.first = ibooker.book1D(name, title, nbins, arr);
700  plot.energyME.first->setAxisTitle(plot.xTITLE + " energy [GeV]");
701  }
702 
703  if (plot.doPlotCSV) {
704  if (plot.csvME.second)
705  ibooker.setCurrentFolder(mainFolder_);
706  else
707  ibooker.setCurrentFolder(backupFolder_);
708 
709  name = plot.label + "_csv";
710  title = plot.pathNAME + " CSV";
711 
712  plot.csvME.first = ibooker.book1D(name, title, csv_binning_.nbins, csv_binning_.xmin, csv_binning_.xmax);
713  plot.csvME.first->setAxisTitle(plot.xTITLE + " CSV discriminator");
714  }
715 
716  if (plot.doPlot2D) {
717  if (plot.etaVSphiME.second)
718  ibooker.setCurrentFolder(mainFolder_);
719  else
720  ibooker.setCurrentFolder(backupFolder_);
721 
722  name = plot.label + "_etaVSphi";
723  title = plot.pathNAME + " #eta vs #phi";
724  int nbinsX = (plot.etaBINNING).size() - 1;
725  std::vector<float> fbinningX((plot.etaBINNING).begin(), (plot.etaBINNING).end());
726  float* arrX = &fbinningX[0];
727  int nbinsY = (plot.phiBINNING).size() - 1;
728  ;
729  std::vector<float> fbinningY((plot.phiBINNING).begin(), (plot.phiBINNING).end());
730  float* arrY = &fbinningY[0];
731  plot.etaVSphiME.first = ibooker.book2D(name, title, nbinsX, arrX, nbinsY, arrY);
732  plot.etaVSphiME.first->setAxisTitle(plot.xTITLE + " #eta", 1);
733  plot.etaVSphiME.first->setAxisTitle(plot.xTITLE + " #phi", 2);
734  }
735 
736  if (plot.doPlotHEP17) {
737  if (plot.ptMEhep17.second)
738  ibooker.setCurrentFolder(mainFolder_);
739  else
740  ibooker.setCurrentFolder(backupFolder_);
741 
742  int nbins = (plot.ptBINNING).size() - 1;
743  std::vector<float> fbinning((plot.ptBINNING).begin(), (plot.ptBINNING).end());
744  float* arr = &fbinning[0];
745 
746  name = plot.label + "_pt_HEP17";
747  title = plot.pathNAME + " p_{T} HEP17";
748  plot.ptMEhep17.first = ibooker.book1D(name, title, nbins, arr);
749  plot.ptMEhep17.first->setAxisTitle(plot.xTITLE + " p_{T} [GeV]", 1);
750 
751  if (plot.ptMEhem17.second)
752  ibooker.setCurrentFolder(mainFolder_);
753  else
754  ibooker.setCurrentFolder(backupFolder_);
755 
756  name = plot.label + "_pt_HEM17";
757  title = plot.pathNAME + " p_{T} HEM17";
758  plot.ptMEhem17.first = ibooker.book1D(name, title, nbins, arr);
759  plot.ptMEhem17.first->setAxisTitle(plot.xTITLE + " p_{T} [GeV]", 1);
760  }
761 
762  if (plot.doPlotRazor) {
763  if (plot.mrME.second)
764  ibooker.setCurrentFolder(mainFolder_);
765  else
766  ibooker.setCurrentFolder(backupFolder_);
767 
768  name = plot.label + "_mr";
769  title = plot.pathNAME + " M_{R}";
770  plot.mrME.first = ibooker.book1D(name, title, 100, 0., 100.);
771  plot.mrME.first->setAxisTitle(plot.xTITLE + " M_{R} [GeV]", 1);
772 
773  if (plot.rsqME.second)
774  ibooker.setCurrentFolder(mainFolder_);
775  else
776  ibooker.setCurrentFolder(backupFolder_);
777 
778  name = plot.label + "_rsq";
779  title = plot.pathNAME + " RSQ";
780  plot.rsqME.first = ibooker.book1D(name, title, 100, 0., 100.);
781  plot.rsqME.first->setAxisTitle(plot.xTITLE + " RSQ [GeV]", 1);
782  }
783 
784  if (plot.doPlotDXY) {
785  if (plot.dxyME.second)
786  ibooker.setCurrentFolder(mainFolder_);
787  else
788  ibooker.setCurrentFolder(backupFolder_);
789 
790  name = plot.label + "_dxy";
791  title = plot.pathNAME + " d_{xy}";
792  int nbins = (plot.dxyBINNING).size() - 1;
793  std::vector<float> fbinning((plot.dxyBINNING).begin(), (plot.dxyBINNING).end());
794  float* arr = &fbinning[0];
795  plot.dxyME.first = ibooker.book1D(name, title, nbins, arr);
796  plot.dxyME.first->setAxisTitle(plot.xTITLE + " d_{xy} [cm]");
797  }
798 
799  if (plot.doPlotDZ) {
800  if (plot.dzME.second)
801  ibooker.setCurrentFolder(mainFolder_);
802  else
803  ibooker.setCurrentFolder(backupFolder_);
804 
805  name = plot.label + "_dz";
806  title = plot.pathNAME + " d_{z}";
807  int nbins = (plot.dzBINNING).size() - 1;
808  std::vector<float> fbinning((plot.dzBINNING).begin(), (plot.dzBINNING).end());
809  float* arr = &fbinning[0];
810  plot.dzME.first = ibooker.book1D(name, title, nbins, arr);
811  plot.dzME.first->setAxisTitle(plot.xTITLE + " d_{z} [cm]");
812  }
813 
814  if (plot.dRME.second)
815  ibooker.setCurrentFolder(mainFolder_);
816  else
817  ibooker.setCurrentFolder(backupFolder_);
818 
819  name = plot.label + "_dR";
820  title = plot.pathNAME + " di-object dR";
821  plot.dRME.first = ibooker.book1D(name, title, 50, 0., 5.);
822  plot.dRME.first->setAxisTitle(plot.xTITLE + " dR_{obj,obj}");
823 
824  if (plot.dRetaVSphiME.second)
825  ibooker.setCurrentFolder(mainFolder_);
826  else
827  ibooker.setCurrentFolder(backupFolder_);
828 
829  name = plot.label + "_dR_etaVSphi";
830  title = plot.pathNAME + " di-object dR in the #eta-#phi plane (of 1st obj)";
831  plot.dRetaVSphiME.first = ibooker.bookProfile2D(name, title, 60, -3., 3., 64, -3.2, 3.2, 0., 5.);
832  plot.dRetaVSphiME.first->setAxisTitle(plot.xTITLE + " #eta", 1);
833  plot.dRetaVSphiME.first->setAxisTitle(plot.xTITLE + " #phi", 2);
834  plot.dRetaVSphiME.first->setAxisTitle(plot.xTITLE + " dR_{obj,obj}", 3);
835 
836  if (plot.q1q2ME.second)
837  ibooker.setCurrentFolder(mainFolder_);
838  else
839  ibooker.setCurrentFolder(backupFolder_);
840 
841  name = plot.label + "_q1q2";
842  title = plot.pathNAME + " di-object q1xq2";
843  plot.q1q2ME.first = ibooker.book1D(name, title, 3, -1., 1.);
844  plot.q1q2ME.first->setAxisTitle(plot.xTITLE + " q_{obj1} x q_{obj2}");
845 
846  if (plot.doPlotDiMass) {
847  if (plot.dimassME.second)
848  ibooker.setCurrentFolder(mainFolder_);
849  else
850  ibooker.setCurrentFolder(backupFolder_);
851 
852  name = plot.label + "_dimass";
853  title = plot.pathNAME + " di-object mass";
854  int nbins = (plot.dimassBINNING).size() - 1;
855  std::vector<float> fbinning((plot.dimassBINNING).begin(), (plot.dimassBINNING).end());
856  float* arr = &fbinning[0];
857  plot.dimassME.first = ibooker.book1D(name, title, nbins, arr);
858  plot.dimassME.first->setAxisTitle(plot.xTITLE + " m_{obj,obj} [GeV]");
859  }
860  }
861 
862  if (debug_)
863  std::cout << "[HLTObjectsMonitor::bookHistograms] DONE" << std::endl;
864 }
size
Write out results.
std::vector< hltPlot > hltPlots_
std::unordered_map< std::string, int > plotNamesToBins_
const MEbinning csv_binning_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * eventsPlot_
#define LogDebug(id)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ dqmBeginRun()

void HLTObjectsMonitor::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 532 of file HLTObjectsMonitor.cc.

References gather_cfg::cout, debug_, hltConfig_, hltPlots_, HLTConfigProvider::init(), hltMonBTagIPClient_cfi::pathName, plotFactory::plot, processName_, HLTConfigProvider::removeVersion(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerIndex(), HLTConfigProvider::triggerNames(), and triggerPaths.

532  {
533  bool changed = true;
534  if (hltConfig_.init(iRun, iSetup, processName_, changed))
535  if (debug_)
536  std::cout << "[HLTObjectsMonitor::dqmBeginRun] extracting HLTconfig" << std::endl;
537 
538  //get path indicies from menu
539  std::string pathName_noVersion;
540  std::vector<std::string> triggerPaths = hltConfig_.triggerNames();
541 
542  if (debug_)
543  std::cout << "[HLTObjectsMonitor::dqmBeginRun] triggerPaths: " << triggerPaths.size() << " <--> "
544  << hltPlots_.size() << std::endl;
545 
546  for (const auto& pathName : triggerPaths) {
547  if (debug_)
548  std::cout << "[HLTObjectsMonitor::dqmBeginRun] " << pathName << std::endl;
549 
550  pathName_noVersion = hltConfig_.removeVersion(pathName);
551  // std::cout << "pathName: " << pathName << " --> " << pathName_noVersion << std::endl;
552  for (auto& plot : hltPlots_) {
553  if (plot.pathNAME == pathName_noVersion) {
555  // check that the index makes sense, otherwise force pathIDX = -1
556  if (plot.pathIDX <= 0 || plot.pathIDX == int(triggerPaths.size()))
557  plot.pathIDX = -1;
558  }
559  }
560  }
561 
562  if (debug_) {
563  for (const auto& plot : hltPlots_)
564  std::cout << "plot: " << plot.pathNAME << " --> pathIDX: " << plot.pathIDX << std::endl;
565  std::cout << "[HLTObjectsMonitor::dqmBeginRun] DONE" << std::endl;
566  }
567 }
std::vector< hltPlot > hltPlots_
static const std::string removeVersion(const std::string &trigger)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
HLTConfigProvider hltConfig_
const std::vector< std::string > & triggerNames() const
names of trigger paths
static std::string const triggerPaths
Definition: EdmProvDump.cc:48

◆ dxyFinder()

double HLTObjectsMonitor::dxyFinder ( double  eta,
double  phi,
edm::Handle< reco::RecoChargedCandidateCollection candidates,
edm::Handle< reco::BeamSpot beamspot,
double  dRcut = 0.1 
)
private

Definition at line 866 of file HLTObjectsMonitor.cc.

References beamSpot_, HLT_2023v12_cff::candidates, PbPb_ZMuSkimMuonDPG_cff::deltaR, PVValHelper::dxy, eleCandidates_, PVValHelper::eta, LogDebug, muonTagProbeFilters_cff::matched, muCandidates_, and phi.

Referenced by analyze().

870  {
871  double dxy = -99.;
872  if (!candidates.isValid()) {
873  LogDebug("HLTObjectsMonitor") << "either " << muCandidates_ << " or " << eleCandidates_
874  << " is not valid ! please, update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py"
875  << " by switching OFF doPlotDXY or updating the InputTag collection";
876  return dxy;
877  }
878  if (!beamspot.isValid()) {
879  LogDebug("HLTObjectsMonitor") << beamSpot_
880  << " is not valid ! please, update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py"
881  << " by switching OFF doPlotDXY or updating the InputTag collection";
882  return dxy;
883  }
884 
885  bool matched = false;
886  for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
887  candidate != candidates->end();
888  ++candidate) {
889  if (deltaR(eta, phi, candidate->eta(), candidate->phi()) < dRcut) {
890  matched = true;
891  dxy = (-(candidate->vx() - beamspot->x0()) * candidate->py() +
892  (candidate->vy() - beamspot->y0()) * candidate->px()) /
893  candidate->pt();
894  break;
895  }
896  }
897  if (!matched)
898  edm::LogWarning("HLTObjectsMonitor") << "trigger object does not match ( dR > " << dRcut
899  << ") to any of the candidates in either " << muCandidates_ << " or "
900  << eleCandidates_;
901 
902  return dxy;
903 }
edm::InputTag muCandidates_
edm::InputTag beamSpot_
edm::InputTag eleCandidates_
Log< level::Warning, false > LogWarning
#define LogDebug(id)

◆ dzFinder()

double HLTObjectsMonitor::dzFinder ( double  eta1,
double  phi1,
double  eta2,
double  phi2,
edm::Handle< reco::RecoChargedCandidateCollection candidates,
double  dRcut = 0.1 
)
private

Definition at line 905 of file HLTObjectsMonitor.cc.

References HLT_2023v12_cff::candidates, gather_cfg::cout, debug_, PbPb_ZMuSkimMuonDPG_cff::deltaR, PVValHelper::dz, eleCandidates_, reco::LeafCandidate::eta(), HLT_2023v12_cff::eta1, HLT_2023v12_cff::eta2, LogDebug, muCandidates_, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and reco::LeafCandidate::vz().

Referenced by analyze().

910  {
911  double dz = -99.;
912  if (!candidates.isValid()) {
913  LogDebug("HLTObjectsMonitor") << "either " << muCandidates_ << " or " << eleCandidates_
914  << " is not valid ! please, update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py"
915  << " by switching OFF doPlotDZ or updating the InputTag collection";
916  return dz;
917  }
918 
919  const reco::RecoChargedCandidate* cand1;
920  const reco::RecoChargedCandidate* cand2;
921  bool matched1 = false;
922  bool matched2 = false;
923  for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
924  candidate != candidates->end();
925  ++candidate) {
926  if (deltaR(eta1, phi1, candidate->eta(), candidate->phi()) < dRcut) {
927  matched1 = true;
928  cand1 = &*candidate;
929  if (debug_)
930  std::cout << "cand1: " << cand1->pt() << " " << cand1->eta() << " " << cand1->phi() << std::endl;
931  break;
932  }
933  }
934  if (!matched1) {
935  LogDebug("HLTObjectsMonitor") << "trigger object1 does not match ( dR > " << dRcut
936  << ") to any of the candidates in either " << muCandidates_ << " or "
937  << eleCandidates_;
938  return dz;
939  }
940 
941  for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
942  candidate != candidates->end();
943  ++candidate) {
944  if (debug_) {
945  std::cout << "candidate: " << candidate->pt() << " cand1: " << cand1->pt() << std::endl;
946  std::cout << "candidate: " << candidate->eta() << " cand1: " << cand1->eta() << std::endl;
947  std::cout << "candidate: " << candidate->phi() << " cand1: " << cand1->phi() << std::endl;
948  }
949  if (&*candidate == cand1)
950  continue;
951 
952  if (deltaR(eta2, phi2, candidate->eta(), candidate->phi()) < dRcut) {
953  matched2 = true;
954  cand2 = &*candidate;
955  if (debug_)
956  std::cout << "cand2: " << cand2->pt() << " " << cand2->eta() << " " << cand2->phi() << std::endl;
957  break;
958  }
959  }
960  if (!matched2) {
961  LogDebug("HLTObjectsMonitor") << "trigger object2 does not match ( dR > " << dRcut
962  << ") to any of the candidates in either " << muCandidates_ << " or "
963  << eleCandidates_;
964  return dz;
965  }
966 
967  dz = cand1->vz() - cand2->vz();
968  return dz;
969 }
double pt() const final
transverse momentum
double vz() const override
z coordinate of vertex position
edm::InputTag muCandidates_
edm::InputTag eleCandidates_
double phi() const final
momentum azimuthal angle
#define LogDebug(id)
double eta() const final
momentum pseudorapidity

◆ getPlotPSet()

hltPlot HLTObjectsMonitor::getPlotPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 191 of file HLTObjectsMonitor.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getPSet().

191  {
192  return hltPlot{std::make_pair<MonitorElement*, bool>(nullptr, false),
193  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_eta")),
194  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_phi")),
195  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_pt")),
196  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_mass")),
197  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_energy")),
198  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_csv")),
199  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_etaVSphi")),
200  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_pt_HEP17")),
201  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_pt_HEM17")),
202  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_MR")),
203  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_RSQ")),
204  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_dxy")),
205  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_dz")),
206  std::make_pair<MonitorElement*, bool>(nullptr, pset.getParameter<bool>("displayInPrimary_dimass")),
207  std::make_pair<MonitorElement*, bool>(nullptr, false),
208  std::make_pair<MonitorElement*, bool>(nullptr, false),
209  std::make_pair<MonitorElement*, bool>(nullptr, false),
210  pset.getParameter<std::string>("label"),
211  pset.getParameter<std::string>("pathNAME"),
212  -1,
213  pset.getParameter<std::string>("moduleNAME"),
214  pset.getParameter<std::string>("xTITLE"),
215  pset.getParameter<std::vector<double>>("etaBINNING"),
216  pset.getParameter<std::vector<double>>("ptBINNING"),
217  pset.getParameter<std::vector<double>>("phiBINNING"),
218  pset.getParameter<std::vector<double>>("massBINNING"),
219  pset.getParameter<std::vector<double>>("dxyBINNING"),
220  pset.getParameter<std::vector<double>>("dzBINNING"),
221  pset.getParameter<std::vector<double>>("dimassBINNING"),
222  pset.getUntrackedParameter<bool>("doPlot2D", false),
223  pset.getUntrackedParameter<bool>("doPlotETA", true),
224  pset.getUntrackedParameter<bool>("doPlotMASS", false),
225  pset.getUntrackedParameter<bool>("doPlotENERGY", false),
226  pset.getUntrackedParameter<bool>("doPlotHEP17", true),
227  pset.getUntrackedParameter<bool>("doPlotCSV", false),
228  pset.getUntrackedParameter<bool>("doCALO", false),
229  pset.getUntrackedParameter<bool>("doPF", false),
230  pset.getUntrackedParameter<bool>("doPlotRazor", false),
231  pset.getUntrackedParameter<bool>("doPlotDXY", false),
232  pset.getUntrackedParameter<bool>("doPlotDZ", false),
233  pset.getUntrackedParameter<bool>("doPlotDiMass", false)};
234 }

◆ getPSet()

void HLTObjectsMonitor::getPSet ( )
private

Definition at line 236 of file HLTObjectsMonitor.cc.

References getPlotPSet(), hltPlots_, plotPSETS_, and muonDTDigis_cfi::pset.

Referenced by HLTObjectsMonitor().

236  {
237  for (const auto& pset : plotPSETS_)
238  hltPlots_.push_back(getPlotPSet(pset));
239 }
std::vector< hltPlot > hltPlots_
static hltPlot getPlotPSet(edm::ParameterSet pset)
std::vector< edm::ParameterSet > plotPSETS_

◆ isHEM17()

bool HLTObjectsMonitor::isHEM17 ( double  eta,
double  phi 
)
private

Definition at line 247 of file HLTObjectsMonitor.cc.

References PVValHelper::eta, MAX_ETA_HEP17, MAX_PHI_HEP17, MIN_ETA_HEP17, MIN_PHI_HEP17, and phi.

Referenced by analyze().

247  {
248  if ((eta >= -MAX_ETA_HEP17 && eta <= -MIN_ETA_HEP17) && (phi >= MIN_PHI_HEP17 && phi <= MAX_PHI_HEP17))
249  return true;
250  else
251  return false;
252 }

◆ isHEP17()

bool HLTObjectsMonitor::isHEP17 ( double  eta,
double  phi 
)
private

Definition at line 241 of file HLTObjectsMonitor.cc.

References PVValHelper::eta, MAX_ETA_HEP17, MAX_PHI_HEP17, MIN_ETA_HEP17, MIN_PHI_HEP17, and phi.

Referenced by analyze().

241  {
242  if ((eta >= MIN_ETA_HEP17 && eta <= MAX_ETA_HEP17) && (phi >= MIN_PHI_HEP17 && phi <= MAX_PHI_HEP17))
243  return true;
244  else
245  return false;
246 }

Member Data Documentation

◆ backupFolder_

std::string HLTObjectsMonitor::backupFolder_
private

Definition at line 133 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms(), and HLTObjectsMonitor().

◆ beamSpot_

edm::InputTag HLTObjectsMonitor::beamSpot_
private

Definition at line 138 of file HLTObjectsMonitor.cc.

Referenced by dxyFinder().

◆ beamSpotToken_

edm::EDGetTokenT<reco::BeamSpot> HLTObjectsMonitor::beamSpotToken_
private

Definition at line 139 of file HLTObjectsMonitor.cc.

Referenced by analyze().

◆ caloJetBTagsToken_

edm::EDGetTokenT<reco::JetTagCollection> HLTObjectsMonitor::caloJetBTagsToken_
private

Definition at line 141 of file HLTObjectsMonitor.cc.

Referenced by analyze().

◆ csv_binning_

const MEbinning HLTObjectsMonitor::csv_binning_ {N_CSV, -MAX_CSV, MAX_CSV}
private

Definition at line 163 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms().

◆ debug_

bool HLTObjectsMonitor::debug_
private

Definition at line 130 of file HLTObjectsMonitor.cc.

Referenced by analyze(), bookHistograms(), dqmBeginRun(), and dzFinder().

◆ eleCandidates_

edm::InputTag HLTObjectsMonitor::eleCandidates_
private

Definition at line 146 of file HLTObjectsMonitor.cc.

Referenced by dxyFinder(), and dzFinder().

◆ eleCandidatesToken_

edm::EDGetTokenT<std::vector<reco::RecoChargedCandidate> > HLTObjectsMonitor::eleCandidatesToken_
private

Definition at line 147 of file HLTObjectsMonitor.cc.

Referenced by analyze().

◆ eta_binning_hem17_

const MEbinning HLTObjectsMonitor::eta_binning_hem17_ {N_ETA_HEP17, -MAX_ETA_HEP17, MIN_ETA_HEP17}
private

Definition at line 181 of file HLTObjectsMonitor.cc.

◆ eta_binning_hep17_

const MEbinning HLTObjectsMonitor::eta_binning_hep17_ {N_ETA_HEP17, MIN_ETA_HEP17, MAX_ETA_HEP17}
private

Definition at line 179 of file HLTObjectsMonitor.cc.

◆ eventsPlot_

MonitorElement* HLTObjectsMonitor::eventsPlot_
private

Definition at line 126 of file HLTObjectsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ hltConfig_

HLTConfigProvider HLTObjectsMonitor::hltConfig_
private

Definition at line 124 of file HLTObjectsMonitor.cc.

Referenced by analyze(), and dqmBeginRun().

◆ hltPlots_

std::vector<hltPlot> HLTObjectsMonitor::hltPlots_
private

Definition at line 127 of file HLTObjectsMonitor.cc.

Referenced by analyze(), bookHistograms(), dqmBeginRun(), and getPSet().

◆ label_

std::string HLTObjectsMonitor::label_
private

◆ mainFolder_

std::string HLTObjectsMonitor::mainFolder_
private

Definition at line 132 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms(), and HLTObjectsMonitor().

◆ MASS_MU

const double HLTObjectsMonitor::MASS_MU = .105658
private

Definition at line 149 of file HLTObjectsMonitor.cc.

Referenced by analyze().

◆ MAX_CSV

double HLTObjectsMonitor::MAX_CSV = 1.
private

Definition at line 161 of file HLTObjectsMonitor.cc.

◆ MAX_ETA_HEP17

double HLTObjectsMonitor::MAX_ETA_HEP17 = 3.0
private

Definition at line 176 of file HLTObjectsMonitor.cc.

Referenced by isHEM17(), and isHEP17().

◆ MAX_PHI

double HLTObjectsMonitor::MAX_PHI = 3.2
private

Definition at line 157 of file HLTObjectsMonitor.cc.

Referenced by HLTObjectsMonitor().

◆ MAX_PHI_HEP17

double HLTObjectsMonitor::MAX_PHI_HEP17 = -0.52
private

Definition at line 172 of file HLTObjectsMonitor.cc.

Referenced by isHEM17(), and isHEP17().

◆ MIN_ETA_HEP17

double HLTObjectsMonitor::MIN_ETA_HEP17 = 1.3
private

Definition at line 177 of file HLTObjectsMonitor.cc.

Referenced by isHEM17(), and isHEP17().

◆ MIN_PHI_HEP17

double HLTObjectsMonitor::MIN_PHI_HEP17 = -0.87
private

Definition at line 173 of file HLTObjectsMonitor.cc.

Referenced by isHEM17(), and isHEP17().

◆ muCandidates_

edm::InputTag HLTObjectsMonitor::muCandidates_
private

Definition at line 144 of file HLTObjectsMonitor.cc.

Referenced by dxyFinder(), and dzFinder().

◆ muCandidatesToken_

edm::EDGetTokenT<std::vector<reco::RecoChargedCandidate> > HLTObjectsMonitor::muCandidatesToken_
private

Definition at line 145 of file HLTObjectsMonitor.cc.

Referenced by analyze().

◆ N_CSV

int HLTObjectsMonitor::N_CSV = 20
private

Definition at line 162 of file HLTObjectsMonitor.cc.

◆ N_ETA_HEP17

int HLTObjectsMonitor::N_ETA_HEP17 = 6
private

Definition at line 178 of file HLTObjectsMonitor.cc.

◆ N_PHI

int HLTObjectsMonitor::N_PHI = 64
private

Definition at line 158 of file HLTObjectsMonitor.cc.

Referenced by HLTObjectsMonitor().

◆ N_PHI_HEP17

int HLTObjectsMonitor::N_PHI_HEP17 = 7
private

Definition at line 174 of file HLTObjectsMonitor.cc.

◆ pfJetBTagsToken_

edm::EDGetTokenT<reco::JetTagCollection> HLTObjectsMonitor::pfJetBTagsToken_
private

Definition at line 142 of file HLTObjectsMonitor.cc.

Referenced by analyze().

◆ phi_binning_

const MEbinning HLTObjectsMonitor::phi_binning_ {N_PHI, -MAX_PHI, MAX_PHI}
private

Definition at line 159 of file HLTObjectsMonitor.cc.

◆ phi_binning_hep17_

const MEbinning HLTObjectsMonitor::phi_binning_hep17_ {N_PHI_HEP17, MIN_PHI_HEP17, MAX_PHI_HEP17}
private

Definition at line 175 of file HLTObjectsMonitor.cc.

◆ phi_variable_binning_

std::vector<double> HLTObjectsMonitor::phi_variable_binning_
private

Definition at line 165 of file HLTObjectsMonitor.cc.

Referenced by HLTObjectsMonitor().

◆ plotNamesToBins_

std::unordered_map<std::string, int> HLTObjectsMonitor::plotNamesToBins_
private

Definition at line 128 of file HLTObjectsMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ plotPSETS_

std::vector<edm::ParameterSet> HLTObjectsMonitor::plotPSETS_
private

Definition at line 122 of file HLTObjectsMonitor.cc.

Referenced by getPSet().

◆ processName_

std::string HLTObjectsMonitor::processName_
private

Definition at line 121 of file HLTObjectsMonitor.cc.

Referenced by analyze(), and dqmBeginRun().

◆ TopFolder_

std::string HLTObjectsMonitor::TopFolder_
private

Definition at line 119 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms(), and HLTObjectsMonitor().

◆ triggerEventToken_

edm::EDGetTokenT<trigger::TriggerEvent> HLTObjectsMonitor::triggerEventToken_
private

Definition at line 136 of file HLTObjectsMonitor.cc.

Referenced by analyze().

◆ triggerResultsToken_

edm::EDGetTokenT<edm::TriggerResults> HLTObjectsMonitor::triggerResultsToken_
private

Definition at line 135 of file HLTObjectsMonitor.cc.

Referenced by analyze().