CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
MuonMonitor Class Reference
Inheritance diagram for MuonMonitor:
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

 MuonMonitor (const edm::ParameterSet &)
 
 ~MuonMonitor () override throw ()
 
- 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 Attributes

std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
const MEbinning dxy_binning_ {N_dxy, -MAX_dxy, MAX_dxy}
 
ObjME eleEta_muEta_
 
std::vector< double > eleEta_variable_binning_2D_
 
ObjME eleEtaME_
 
ObjME eleME_variableBinning_
 
ObjME elePt_muPt_
 
std::vector< double > elePt_variable_binning_2D_
 
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
 
edm::EDGetTokenT< edm::View< reco::GsfElectron > > eleToken_
 
const MEbinning eta_binning_ {N_ETA, -MAX_ETA, MAX_ETA}
 
const std::string folderName_
 
bool hltPathsAreValid_
 
MEbinning ls_binning_
 
StringCutObjectSelector< reco::MET, true > metSelection_
 
edm::EDGetTokenT< reco::PFMETCollectionmetToken_
 
std::vector< double > muEta_variable_binning_2D_
 
MEbinning muon_binning_
 
std::vector< double > muon_variable_binning_
 
ObjME muondxy_
 
ObjME muondz_
 
std::vector< double > muoneta_variable_binning_
 
ObjME muonEtaME_
 
ObjME muonEtaME_variableBinning_
 
ObjME muonEtaPhiME_
 
ObjME muonME_
 
ObjME muonME_variableBinning_
 
ObjME muonPhiME_
 
StringCutObjectSelector< reco::Muon, true > muonSelection_
 
edm::EDGetTokenT< reco::MuonCollectionmuonToken_
 
ObjME muonVsLS_
 
std::vector< double > muPt_variable_binning_2D_
 
unsigned int nelectrons_
 
unsigned int nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
const MEbinning phi_binning_ {N_PHI, -MAX_PHI, MAX_PHI}
 
const bool requireValidHLTPaths_
 
edm::EDGetTokenT< reco::VertexCollectionvtxToken_
 

Static Private Attributes

static constexpr double MAX_dxy = 2.5
 
static constexpr double MAX_ETA = 2.4
 
static constexpr double MAX_PHI = 3.2
 
static constexpr int N_dxy = 50
 
static constexpr int N_ETA = 68
 
static constexpr int N_PHI = 64
 

Additional Inherited Members

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

Detailed Description

Definition at line 24 of file MuonMonitor.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 27 of file MuonMonitor.cc.

◆ MonitorElement

Definition at line 26 of file MuonMonitor.cc.

Constructor & Destructor Documentation

◆ MuonMonitor()

MuonMonitor::MuonMonitor ( const edm::ParameterSet iConfig)

Definition at line 95 of file MuonMonitor.cc.

96  : folderName_(iConfig.getParameter<std::string>("FolderName")),
97  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
98  hltPathsAreValid_(false),
99  metToken_(consumes<reco::PFMETCollection>(iConfig.getParameter<edm::InputTag>("met"))),
100  muonToken_(mayConsume<reco::MuonCollection>(iConfig.getParameter<edm::InputTag>("muons"))),
101  vtxToken_(mayConsume<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertices"))),
102  eleToken_(mayConsume<edm::View<reco::GsfElectron>>(iConfig.getParameter<edm::InputTag>("electrons"))),
104  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("muonBinning")),
106  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("muonetaBinning")),
108  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("muonPSet"))),
109  ls_binning_(
110  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("lsPSet"))),
112  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("muPtBinning2D")),
114  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("elePtBinning2D")),
116  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("muEtaBinning2D")),
118  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("eleEtaBinning2D")),
120  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
122  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
123  metSelection_(iConfig.getParameter<std::string>("metSelection")),
124  muonSelection_(iConfig.getParameter<std::string>("muonSelection")),
125  eleSelection_(iConfig.getParameter<std::string>("eleSelection")),
126  nmuons_(iConfig.getParameter<unsigned int>("nmuons")),
127  nelectrons_(iConfig.getParameter<unsigned int>("nelectrons")) {}
std::vector< double > muPt_variable_binning_2D_
Definition: MuonMonitor.cc:65
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: MuonMonitor.cc:87
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: MuonMonitor.cc:44
const bool requireValidHLTPaths_
Definition: MuonMonitor.cc:41
unsigned int nelectrons_
Definition: MuonMonitor.cc:92
std::vector< double > muoneta_variable_binning_
Definition: MuonMonitor.cc:62
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: MuonMonitor.cc:84
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: MuonMonitor.cc:46
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::vector< double > muEta_variable_binning_2D_
Definition: MuonMonitor.cc:67
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: MuonMonitor.cc:89
MEbinning ls_binning_
Definition: MuonMonitor.cc:64
MEbinning muon_binning_
Definition: MuonMonitor.cc:63
edm::EDGetTokenT< edm::View< reco::GsfElectron > > eleToken_
Definition: MuonMonitor.cc:47
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: MuonMonitor.cc:85
const std::string folderName_
Definition: MuonMonitor.cc:39
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: MuonMonitor.cc:45
std::vector< double > elePt_variable_binning_2D_
Definition: MuonMonitor.cc:66
std::vector< double > muon_variable_binning_
Definition: MuonMonitor.cc:61
unsigned int nmuons_
Definition: MuonMonitor.cc:91
bool hltPathsAreValid_
Definition: MuonMonitor.cc:42
std::vector< double > eleEta_variable_binning_2D_
Definition: MuonMonitor.cc:68
StringCutObjectSelector< reco::Muon, true > muonSelection_
Definition: MuonMonitor.cc:88

◆ ~MuonMonitor()

MuonMonitor::~MuonMonitor ( )
throw (
)
override

Definition at line 129 of file MuonMonitor.cc.

References den_genTriggerEventFlag_, and num_genTriggerEventFlag_.

129  {
131  num_genTriggerEventFlag_.reset();
132  }
134  den_genTriggerEventFlag_.reset();
135  }
136 }
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: MuonMonitor.cc:84
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: MuonMonitor.cc:85

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 245 of file MuonMonitor.cc.

References den_genTriggerEventFlag_, TriggerDQMBase::ObjME::denominator, PVValHelper::dxy, PVValHelper::dz, MillePedeFileConverter_cfg::e, pwdgSkimBPark_cfi::electrons, eleEta_muEta_, eleEtaME_, eleME_variableBinning_, elePt_muPt_, eleSelection_, eleToken_, PVValHelper::eta, dqm::impl::MonitorElement::Fill(), hltPathsAreValid_, iEvent, eostools::ls(), metSelection_, metToken_, muondxy_, muondz_, muonEtaME_, muonEtaPhiME_, muonME_, muonME_variableBinning_, muonPhiME_, PDWG_BPHSkim_cff::muons, muonSelection_, muonToken_, muonVsLS_, nelectrons_, nmuons_, num_genTriggerEventFlag_, TriggerDQMBase::ObjME::numerator, AlCaHLTBitMon_ParallelJobs::p, phi, DiDispStaMuonMonitor_cfi::pt, MetAnalyzer::pv(), requireValidHLTPaths_, findQualityFiles::v, and vtxToken_.

245  {
246  // if valid HLT paths are required,
247  // analyze event only if all paths are valid
249  return;
250  }
251 
252  // Filter out events if Trigger Filtering is requested
253  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup)) {
254  return;
255  }
256 
258  iEvent.getByToken(metToken_, metHandle);
259  reco::PFMET pfmet = metHandle->front();
260  if (!metSelection_(pfmet)) {
261  return;
262  }
263 
265  iEvent.getByToken(vtxToken_, vtxHandle);
266 
267  math::XYZPoint pv(0, 0, 0);
268  for (reco::Vertex const& v : *vtxHandle) {
269  if (not v.isFake()) {
270  pv.SetXYZ(v.x(), v.y(), v.z());
271  break;
272  }
273  }
274 
276  iEvent.getByToken(muonToken_, muonHandle);
277  std::vector<reco::Muon> muons;
278  if (muonHandle->size() < nmuons_)
279  return;
280  for (auto const& p : *muonHandle) {
281  if (muonSelection_(p))
282  muons.push_back(p);
283  }
284  if (muons.size() < nmuons_)
285  return;
286 
288  iEvent.getByToken(eleToken_, eleHandle);
289  std::vector<reco::GsfElectron> electrons;
290  if (eleHandle->size() < nelectrons_)
291  return;
292  for (auto const& e : *eleHandle) {
293  if (eleSelection_(e))
294  electrons.push_back(e);
295  }
296  if (electrons.size() < nelectrons_)
297  return;
298 
299  // filling histograms (denominator)
300  const int ls = iEvent.id().luminosityBlock();
301 
302  if (!muons.empty()) {
309  muondxy_.denominator->Fill(muons[0].muonBestTrack()->dxy(pv));
310  muondz_.denominator->Fill(muons[0].muonBestTrack()->dz(pv));
311  if (!electrons.empty()) {
316  }
317  }
318 
319  // applying selection for numerator
320  if (num_genTriggerEventFlag_->on() && !num_genTriggerEventFlag_->accept(iEvent, iSetup))
321  return;
322 
323  // filling histograms (num_genTriggerEventFlag_)
324  if (!muons.empty()) {
325  muonME_.numerator->Fill(muons[0].pt());
329  muonVsLS_.numerator->Fill(ls, muons[0].pt());
331  muondxy_.numerator->Fill(muons[0].muonBestTrack()->dxy(pv));
332  muondz_.numerator->Fill(muons[0].muonBestTrack()->dz(pv));
333  if (!electrons.empty()) {
338  }
339  }
340 }
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: MuonMonitor.cc:87
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: MuonMonitor.cc:44
const bool requireValidHLTPaths_
Definition: MuonMonitor.cc:41
unsigned int nelectrons_
Definition: MuonMonitor.cc:92
ObjME elePt_muPt_
Definition: MuonMonitor.cc:82
ObjME muondxy_
Definition: MuonMonitor.cc:76
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: MuonMonitor.cc:84
ObjME muonVsLS_
Definition: MuonMonitor.cc:74
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: MuonMonitor.cc:46
ObjME muonEtaPhiME_
Definition: MuonMonitor.cc:75
ObjME eleME_variableBinning_
Definition: MuonMonitor.cc:79
ObjME muonEtaME_
Definition: MuonMonitor.cc:71
ObjME muondz_
Definition: MuonMonitor.cc:77
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: MuonMonitor.cc:89
ObjME muonME_variableBinning_
Definition: MuonMonitor.cc:73
ObjME eleEta_muEta_
Definition: MuonMonitor.cc:81
void Fill(long long x)
ObjME muonPhiME_
Definition: MuonMonitor.cc:72
edm::EDGetTokenT< edm::View< reco::GsfElectron > > eleToken_
Definition: MuonMonitor.cc:47
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: MuonMonitor.cc:85
MonitorElement * denominator
MonitorElement * numerator
def pv(vc)
Definition: MetAnalyzer.py:7
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: MuonMonitor.cc:45
def ls(path, rec=False)
Definition: eostools.py:349
unsigned int nmuons_
Definition: MuonMonitor.cc:91
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool hltPathsAreValid_
Definition: MuonMonitor.cc:42
ObjME eleEtaME_
Definition: MuonMonitor.cc:80
ObjME muonME_
Definition: MuonMonitor.cc:70
StringCutObjectSelector< reco::Muon, true > muonSelection_
Definition: MuonMonitor.cc:88

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 138 of file MuonMonitor.cc.

References TriggerDQMBase::bookME(), den_genTriggerEventFlag_, dxy_binning_, eleEta_muEta_, eleEta_variable_binning_2D_, eleEtaME_, eleME_variableBinning_, elePt_muPt_, elePt_variable_binning_2D_, eta_binning_, folderName_, hltPathsAreValid_, ls_binning_, muEta_variable_binning_2D_, muon_binning_, muon_variable_binning_, muondxy_, muondz_, muoneta_variable_binning_, muonEtaME_, muonEtaME_variableBinning_, muonEtaPhiME_, muonME_, muonME_variableBinning_, muonPhiME_, muonVsLS_, muPt_variable_binning_2D_, TriggerDQMBase::MEbinning::nbins, num_genTriggerEventFlag_, phi_binning_, requireValidHLTPaths_, dqm::implementation::NavigatorBase::setCurrentFolder(), TriggerDQMBase::setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

138  {
139  // Initialize the GenericTriggerEventFlag
141  num_genTriggerEventFlag_->initRun(iRun, iSetup);
142  }
144  den_genTriggerEventFlag_->initRun(iRun, iSetup);
145  }
146 
147  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
149  den_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->allHLTPathsAreValid() &&
150  den_genTriggerEventFlag_->allHLTPathsAreValid());
151 
152  // if valid HLT paths are required,
153  // create DQM outputs only if all paths are valid
155  return;
156  }
157 
158  std::string histname, histtitle;
159 
160  ibooker.setCurrentFolder(folderName_);
161 
162  histname = "muon_pt";
163  histtitle = "muon PT";
164  bookME(ibooker, muonME_, histname, histtitle, muon_binning_.nbins, muon_binning_.xmin, muon_binning_.xmax);
165  setMETitle(muonME_, "Muon pT [GeV]", "events / [GeV]");
166 
167  histname = "muon_pt_variable";
168  histtitle = "muon PT";
169  bookME(ibooker, muonME_variableBinning_, histname, histtitle, muon_variable_binning_);
170  setMETitle(muonME_variableBinning_, "Muon pT [GeV]", "events / [GeV]");
171 
172  histname = "muonVsLS";
173  histtitle = "muon pt vs LS";
174  bookME(ibooker,
175  muonVsLS_,
176  histname,
177  histtitle,
183  setMETitle(muonVsLS_, "LS", "Muon pT [GeV]");
184 
185  histname = "muon_phi";
186  histtitle = "Muon phi";
187  bookME(ibooker, muonPhiME_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
188  setMETitle(muonPhiME_, "Muon #phi", "events / 0.1 rad");
189 
190  histname = "muon_eta";
191  histtitle = "Muon eta";
192  bookME(ibooker, muonEtaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
193  setMETitle(muonEtaME_, "Muon #eta", "events");
194 
195  histname = "muon_eta_variablebinning";
196  histtitle = "Muon eta";
197  bookME(ibooker, muonEtaME_variableBinning_, histname, histtitle, muoneta_variable_binning_);
198  setMETitle(muonEtaME_variableBinning_, "Muon #eta", "events");
199 
200  histname = "muon_dxy";
201  histtitle = "Muon dxy";
202  bookME(ibooker, muondxy_, histname, histtitle, dxy_binning_.nbins, dxy_binning_.xmin, dxy_binning_.xmax);
203  setMETitle(muondxy_, "Muon #dxy", "events");
204 
205  histname = "muon_dz";
206  histtitle = "Muon dz";
207  bookME(ibooker, muondz_, histname, histtitle, dxy_binning_.nbins, dxy_binning_.xmin, dxy_binning_.xmax);
208  setMETitle(muondz_, "Muon #dz", "events");
209 
210  histname = "muon_etaphi";
211  histtitle = "Muon eta-phi";
212  bookME(ibooker,
214  histname,
215  histtitle,
222  setMETitle(muonEtaPhiME_, "#eta", "#phi");
223 
224  histname = "electron_pt_variable";
225  histtitle = "electron PT";
226  bookME(ibooker, eleME_variableBinning_, histname, histtitle, muon_variable_binning_);
227  setMETitle(eleME_variableBinning_, "Electron pT [GeV]", "events / [GeV]");
228 
229  histname = "electron_eta";
230  histtitle = "electron eta";
231  bookME(ibooker, eleEtaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
232  setMETitle(eleEtaME_, "Electron #eta", "events");
233 
234  histname = "elePt_muPt";
235  histtitle = "electron pt vs muon pt";
237  setMETitle(elePt_muPt_, "electron pt [GeV]", "muon pt [GeV]");
238 
239  histname = "eleEta_muEta";
240  histtitle = "electron #eta vs muon #eta";
242  setMETitle(eleEta_muEta_, "electron #eta", "muon #eta");
243 }
std::vector< double > muPt_variable_binning_2D_
Definition: MuonMonitor.cc:65
ObjME muonEtaME_variableBinning_
Definition: MuonMonitor.cc:78
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
const bool requireValidHLTPaths_
Definition: MuonMonitor.cc:41
ObjME elePt_muPt_
Definition: MuonMonitor.cc:82
ObjME muondxy_
Definition: MuonMonitor.cc:76
std::vector< double > muoneta_variable_binning_
Definition: MuonMonitor.cc:62
const MEbinning dxy_binning_
Definition: MuonMonitor.cc:55
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: MuonMonitor.cc:84
ObjME muonVsLS_
Definition: MuonMonitor.cc:74
ObjME muonEtaPhiME_
Definition: MuonMonitor.cc:75
ObjME eleME_variableBinning_
Definition: MuonMonitor.cc:79
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
const MEbinning phi_binning_
Definition: MuonMonitor.cc:51
std::vector< double > muEta_variable_binning_2D_
Definition: MuonMonitor.cc:67
ObjME muonEtaME_
Definition: MuonMonitor.cc:71
ObjME muondz_
Definition: MuonMonitor.cc:77
ObjME muonME_variableBinning_
Definition: MuonMonitor.cc:73
MEbinning ls_binning_
Definition: MuonMonitor.cc:64
ObjME eleEta_muEta_
Definition: MuonMonitor.cc:81
MEbinning muon_binning_
Definition: MuonMonitor.cc:63
ObjME muonPhiME_
Definition: MuonMonitor.cc:72
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: MuonMonitor.cc:85
const std::string folderName_
Definition: MuonMonitor.cc:39
std::vector< double > elePt_variable_binning_2D_
Definition: MuonMonitor.cc:66
std::vector< double > muon_variable_binning_
Definition: MuonMonitor.cc:61
bool hltPathsAreValid_
Definition: MuonMonitor.cc:42
ObjME eleEtaME_
Definition: MuonMonitor.cc:80
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)
ObjME muonME_
Definition: MuonMonitor.cc:70
const MEbinning eta_binning_
Definition: MuonMonitor.cc:59
std::vector< double > eleEta_variable_binning_2D_
Definition: MuonMonitor.cc:68

◆ fillDescriptions()

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

Definition at line 342 of file MuonMonitor.cc.

References edm::ConfigurationDescriptions::add(), trigObjTnPSource_cfi::bins, submitPVResolutionJobs::desc, defaults_cfi::etabins, TriggerDQMBase::fillHistoLSPSetDescription(), TriggerDQMBase::fillHistoPSetDescription(), GenericTriggerEventFlag::fillPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, V0Monitor_cff::histoPSet, HLT_2022v12_cff::InputTag, V0Monitor_cfi::lsPSet, BTaggingMonitor_cfi::metPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

342  {
344  desc.add<std::string>("FolderName", "HLT/Muon");
345  desc.add<bool>("requireValidHLTPaths", true);
346 
347  desc.add<edm::InputTag>("met", edm::InputTag("pfMet"));
348  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
349  desc.add<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
350  desc.add<edm::InputTag>("electrons", edm::InputTag("gedGsfElectrons"));
351  desc.add<std::string>("metSelection", "pt > 0");
352  desc.add<std::string>("muonSelection", "pt > 6 && eta<2.4");
353  desc.add<std::string>("eleSelection", "pt > 0");
354  desc.add<unsigned int>("nmuons", 0);
355  desc.add<unsigned int>("nelectrons", 0);
356 
359  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
360  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
361 
366  std::vector<double> bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
367  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
368  histoPSet.add<std::vector<double>>("muonBinning", bins);
369 
370  std::vector<double> etabins = {-3., -2.5, -2., -1.5, -1., -.5, 0., .5, 1., 1.5, 2., 2.5, 3.};
371  histoPSet.add<std::vector<double>>("muonetaBinning", etabins);
372 
373  std::vector<double> bins_2D = {0., 40., 80., 100., 120., 140., 160., 180., 200., 240., 280., 350., 450., 1000.};
374  std::vector<double> eta_bins_2D = {-3., -2., -1., 0., 1., 2., 3.};
375  std::vector<double> phi_bins_2D = {
376  -3.1415, -2.5132, -1.8849, -1.2566, -0.6283, 0, 0.6283, 1.2566, 1.8849, 2.5132, 3.1415};
377  histoPSet.add<std::vector<double>>("elePtBinning2D", bins_2D);
378  histoPSet.add<std::vector<double>>("muPtBinning2D", bins_2D);
379  histoPSet.add<std::vector<double>>("eleEtaBinning2D", eta_bins_2D);
380  histoPSet.add<std::vector<double>>("muEtaBinning2D", eta_bins_2D);
381 
385 
386  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
387 
388  descriptions.add("muonMonitoring", desc);
389 }
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)

Member Data Documentation

◆ den_genTriggerEventFlag_

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

Definition at line 85 of file MuonMonitor.cc.

Referenced by analyze(), bookHistograms(), and ~MuonMonitor().

◆ dxy_binning_

const MEbinning MuonMonitor::dxy_binning_ {N_dxy, -MAX_dxy, MAX_dxy}
private

Definition at line 55 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ eleEta_muEta_

ObjME MuonMonitor::eleEta_muEta_
private

Definition at line 81 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ eleEta_variable_binning_2D_

std::vector<double> MuonMonitor::eleEta_variable_binning_2D_
private

Definition at line 68 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ eleEtaME_

ObjME MuonMonitor::eleEtaME_
private

Definition at line 80 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ eleME_variableBinning_

ObjME MuonMonitor::eleME_variableBinning_
private

Definition at line 79 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ elePt_muPt_

ObjME MuonMonitor::elePt_muPt_
private

Definition at line 82 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ elePt_variable_binning_2D_

std::vector<double> MuonMonitor::elePt_variable_binning_2D_
private

Definition at line 66 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ eleSelection_

StringCutObjectSelector<reco::GsfElectron, true> MuonMonitor::eleSelection_
private

Definition at line 89 of file MuonMonitor.cc.

Referenced by analyze().

◆ eleToken_

edm::EDGetTokenT<edm::View<reco::GsfElectron> > MuonMonitor::eleToken_
private

Definition at line 47 of file MuonMonitor.cc.

Referenced by analyze().

◆ eta_binning_

const MEbinning MuonMonitor::eta_binning_ {N_ETA, -MAX_ETA, MAX_ETA}
private

Definition at line 59 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ folderName_

const std::string MuonMonitor::folderName_
private

Definition at line 39 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ hltPathsAreValid_

bool MuonMonitor::hltPathsAreValid_
private

Definition at line 42 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ ls_binning_

MEbinning MuonMonitor::ls_binning_
private

Definition at line 64 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ MAX_dxy

constexpr double MuonMonitor::MAX_dxy = 2.5
staticprivate

Definition at line 53 of file MuonMonitor.cc.

◆ MAX_ETA

constexpr double MuonMonitor::MAX_ETA = 2.4
staticprivate

Definition at line 57 of file MuonMonitor.cc.

◆ MAX_PHI

constexpr double MuonMonitor::MAX_PHI = 3.2
staticprivate

Definition at line 49 of file MuonMonitor.cc.

◆ metSelection_

StringCutObjectSelector<reco::MET, true> MuonMonitor::metSelection_
private

Definition at line 87 of file MuonMonitor.cc.

Referenced by analyze().

◆ metToken_

edm::EDGetTokenT<reco::PFMETCollection> MuonMonitor::metToken_
private

Definition at line 44 of file MuonMonitor.cc.

Referenced by analyze().

◆ muEta_variable_binning_2D_

std::vector<double> MuonMonitor::muEta_variable_binning_2D_
private

Definition at line 67 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ muon_binning_

MEbinning MuonMonitor::muon_binning_
private

Definition at line 63 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ muon_variable_binning_

std::vector<double> MuonMonitor::muon_variable_binning_
private

Definition at line 61 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ muondxy_

ObjME MuonMonitor::muondxy_
private

Definition at line 76 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muondz_

ObjME MuonMonitor::muondz_
private

Definition at line 77 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muoneta_variable_binning_

std::vector<double> MuonMonitor::muoneta_variable_binning_
private

Definition at line 62 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ muonEtaME_

ObjME MuonMonitor::muonEtaME_
private

Definition at line 71 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonEtaME_variableBinning_

ObjME MuonMonitor::muonEtaME_variableBinning_
private

Definition at line 78 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ muonEtaPhiME_

ObjME MuonMonitor::muonEtaPhiME_
private

Definition at line 75 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonME_

ObjME MuonMonitor::muonME_
private

Definition at line 70 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonME_variableBinning_

ObjME MuonMonitor::muonME_variableBinning_
private

Definition at line 73 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonPhiME_

ObjME MuonMonitor::muonPhiME_
private

Definition at line 72 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muonSelection_

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

Definition at line 88 of file MuonMonitor.cc.

Referenced by analyze().

◆ muonToken_

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

Definition at line 45 of file MuonMonitor.cc.

Referenced by analyze().

◆ muonVsLS_

ObjME MuonMonitor::muonVsLS_
private

Definition at line 74 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muPt_variable_binning_2D_

std::vector<double> MuonMonitor::muPt_variable_binning_2D_
private

Definition at line 65 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ N_dxy

constexpr int MuonMonitor::N_dxy = 50
staticprivate

Definition at line 54 of file MuonMonitor.cc.

◆ N_ETA

constexpr int MuonMonitor::N_ETA = 68
staticprivate

Definition at line 58 of file MuonMonitor.cc.

◆ N_PHI

constexpr int MuonMonitor::N_PHI = 64
staticprivate

Definition at line 50 of file MuonMonitor.cc.

◆ nelectrons_

unsigned int MuonMonitor::nelectrons_
private

Definition at line 92 of file MuonMonitor.cc.

Referenced by analyze().

◆ nmuons_

unsigned int MuonMonitor::nmuons_
private

Definition at line 91 of file MuonMonitor.cc.

Referenced by analyze().

◆ num_genTriggerEventFlag_

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

Definition at line 84 of file MuonMonitor.cc.

Referenced by analyze(), bookHistograms(), and ~MuonMonitor().

◆ phi_binning_

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

Definition at line 51 of file MuonMonitor.cc.

Referenced by bookHistograms().

◆ requireValidHLTPaths_

const bool MuonMonitor::requireValidHLTPaths_
private

Definition at line 41 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ vtxToken_

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

Definition at line 46 of file MuonMonitor.cc.

Referenced by analyze().