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 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
< 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 Attributes

std::unique_ptr
< GenericTriggerEventFlag
den_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::PFMETCollection
metToken_
 
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::MuonCollection
muonToken_
 
ObjME muonVsLS_
 
std::vector< double > muPt_variable_binning_2D_
 
unsigned int nelectrons_
 
unsigned int nmuons_
 
std::unique_ptr
< GenericTriggerEventFlag
num_genTriggerEventFlag_
 
const MEbinning phi_binning_ {N_PHI, -MAX_PHI, MAX_PHI}
 
const bool requireValidHLTPaths_
 
edm::EDGetTokenT
< reco::VertexCollection
vtxToken_
 

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

Definition at line 27 of file MuonMonitor.cc.

Definition at line 26 of file MuonMonitor.cc.

Constructor & Destructor Documentation

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
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
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< double > eleEta_variable_binning_2D_
Definition: MuonMonitor.cc:68
StringCutObjectSelector< reco::Muon, true > muonSelection_
Definition: MuonMonitor.cc:88
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

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, alignCSCRings::e, HI_PhotonSkim_cff::electrons, eleEta_muEta_, eleEtaME_, eleME_variableBinning_, elePt_muPt_, eleSelection_, eleToken_, PVValHelper::eta, dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), hltPathsAreValid_, edm::EventBase::id(), eostools::ls(), edm::EventID::luminosityBlock(), metSelection_, metToken_, muondxy_, muondz_, muonEtaME_, muonEtaPhiME_, muonME_, muonME_variableBinning_, muonPhiME_, patZpeak::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()) {
303  muonME_.denominator->Fill(muons[0].pt());
305  muonPhiME_.denominator->Fill(muons[0].phi());
306  muonEtaME_.denominator->Fill(muons[0].eta());
307  muonVsLS_.denominator->Fill(ls, muons[0].pt());
308  muonEtaPhiME_.denominator->Fill(muons[0].eta(), muons[0].phi());
309  muondxy_.denominator->Fill(muons[0].muonBestTrack()->dxy(pv));
310  muondz_.denominator->Fill(muons[0].muonBestTrack()->dz(pv));
311  if (!electrons.empty()) {
312  eleME_variableBinning_.denominator->Fill(electrons[0].pt());
313  eleEtaME_.denominator->Fill(electrons[0].eta());
314  eleEta_muEta_.denominator->Fill(electrons[0].eta(), muons[0].eta());
315  elePt_muPt_.denominator->Fill(electrons[0].pt(), muons[0].pt());
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());
327  muonPhiME_.numerator->Fill(muons[0].phi());
328  muonEtaME_.numerator->Fill(muons[0].eta());
329  muonVsLS_.numerator->Fill(ls, muons[0].pt());
330  muonEtaPhiME_.numerator->Fill(muons[0].eta(), muons[0].phi());
331  muondxy_.numerator->Fill(muons[0].muonBestTrack()->dxy(pv));
332  muondz_.numerator->Fill(muons[0].muonBestTrack()->dz(pv));
333  if (!electrons.empty()) {
334  eleME_variableBinning_.numerator->Fill(electrons[0].pt());
335  eleEtaME_.numerator->Fill(electrons[0].eta());
336  eleEta_muEta_.numerator->Fill(electrons[0].eta(), muons[0].eta());
337  elePt_muPt_.numerator->Fill(electrons[0].pt(), muons[0].pt());
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
def ls
Definition: eostools.py:349
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
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: MuonMonitor.cc:45
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
tuple muons
Definition: patZpeak.py:39
ObjME muonME_
Definition: MuonMonitor.cc:70
StringCutObjectSelector< reco::Muon, true > muonSelection_
Definition: MuonMonitor.cc:88
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
void MuonMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 342 of file MuonMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, defaults_cfi::etabins, TriggerDQMBase::fillHistoLSPSetDescription(), TriggerDQMBase::fillHistoPSetDescription(), HLT_FULL_cff::InputTag, DQMOffline_LumiMontiroring_cff::lsPSet, 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 
357  edm::ParameterSetDescription genericTriggerEventPSet;
358  genericTriggerEventPSet.add<bool>("andOr");
359  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi"));
360  genericTriggerEventPSet.add<std::vector<int>>("dcsPartitions", {});
361  genericTriggerEventPSet.add<bool>("andOrDcs", false);
362  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
363  genericTriggerEventPSet.add<std::string>("dbLabel", "");
364  genericTriggerEventPSet.add<bool>("andOrHlt", true);
365  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT"));
366  genericTriggerEventPSet.add<std::vector<std::string>>("hltPaths", {});
367  genericTriggerEventPSet.add<std::string>("hltDBKey", "");
368  genericTriggerEventPSet.add<bool>("errorReplyHlt", false);
369  genericTriggerEventPSet.add<bool>("errorReplyL1", false);
370  genericTriggerEventPSet.add<unsigned int>("verbosityLevel", 1);
371  genericTriggerEventPSet.add<bool>("andOrL1", false);
372  genericTriggerEventPSet.add<bool>("l1BeforeMask", false);
373  genericTriggerEventPSet.add<std::vector<std::string>>("l1Algorithms", {});
374 
375  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
376  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
377 
380  fillHistoPSetDescription(metPSet);
381  histoPSet.add<edm::ParameterSetDescription>("muonPSet", metPSet);
382  std::vector<double> bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
383  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
384  histoPSet.add<std::vector<double>>("muonBinning", bins);
385 
386  std::vector<double> etabins = {-3., -2.5, -2., -1.5, -1., -.5, 0., .5, 1., 1.5, 2., 2.5, 3.};
387  histoPSet.add<std::vector<double>>("muonetaBinning", etabins);
388 
389  std::vector<double> bins_2D = {0., 40., 80., 100., 120., 140., 160., 180., 200., 240., 280., 350., 450., 1000.};
390  std::vector<double> eta_bins_2D = {-3., -2., -1., 0., 1., 2., 3.};
391  std::vector<double> phi_bins_2D = {
392  -3.1415, -2.5132, -1.8849, -1.2566, -0.6283, 0, 0.6283, 1.2566, 1.8849, 2.5132, 3.1415};
393  histoPSet.add<std::vector<double>>("elePtBinning2D", bins_2D);
394  histoPSet.add<std::vector<double>>("muPtBinning2D", bins_2D);
395  histoPSet.add<std::vector<double>>("eleEtaBinning2D", eta_bins_2D);
396  histoPSet.add<std::vector<double>>("muEtaBinning2D", eta_bins_2D);
397 
400  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
401 
402  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
403 
404  descriptions.add("muonMonitoring", desc);
405 }
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)

Member Data Documentation

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

Definition at line 85 of file MuonMonitor.cc.

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

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

Definition at line 55 of file MuonMonitor.cc.

Referenced by bookHistograms().

ObjME MuonMonitor::eleEta_muEta_
private

Definition at line 81 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 68 of file MuonMonitor.cc.

Referenced by bookHistograms().

ObjME MuonMonitor::eleEtaME_
private

Definition at line 80 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME MuonMonitor::eleME_variableBinning_
private

Definition at line 79 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME MuonMonitor::elePt_muPt_
private

Definition at line 82 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 66 of file MuonMonitor.cc.

Referenced by bookHistograms().

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

Definition at line 89 of file MuonMonitor.cc.

Referenced by analyze().

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

Definition at line 47 of file MuonMonitor.cc.

Referenced by analyze().

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

Definition at line 59 of file MuonMonitor.cc.

Referenced by bookHistograms().

const std::string MuonMonitor::folderName_
private

Definition at line 39 of file MuonMonitor.cc.

Referenced by bookHistograms().

bool MuonMonitor::hltPathsAreValid_
private

Definition at line 42 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

MEbinning MuonMonitor::ls_binning_
private

Definition at line 64 of file MuonMonitor.cc.

Referenced by bookHistograms().

constexpr double MuonMonitor::MAX_dxy = 2.5
staticprivate

Definition at line 53 of file MuonMonitor.cc.

constexpr double MuonMonitor::MAX_ETA = 2.4
staticprivate

Definition at line 57 of file MuonMonitor.cc.

constexpr double MuonMonitor::MAX_PHI = 3.2
staticprivate

Definition at line 49 of file MuonMonitor.cc.

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

Definition at line 87 of file MuonMonitor.cc.

Referenced by analyze().

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

Definition at line 44 of file MuonMonitor.cc.

Referenced by analyze().

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

Definition at line 67 of file MuonMonitor.cc.

Referenced by bookHistograms().

MEbinning MuonMonitor::muon_binning_
private

Definition at line 63 of file MuonMonitor.cc.

Referenced by bookHistograms().

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

Definition at line 61 of file MuonMonitor.cc.

Referenced by bookHistograms().

ObjME MuonMonitor::muondxy_
private

Definition at line 76 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME MuonMonitor::muondz_
private

Definition at line 77 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 62 of file MuonMonitor.cc.

Referenced by bookHistograms().

ObjME MuonMonitor::muonEtaME_
private

Definition at line 71 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME MuonMonitor::muonEtaME_variableBinning_
private

Definition at line 78 of file MuonMonitor.cc.

Referenced by bookHistograms().

ObjME MuonMonitor::muonEtaPhiME_
private

Definition at line 75 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME MuonMonitor::muonME_
private

Definition at line 70 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME MuonMonitor::muonME_variableBinning_
private

Definition at line 73 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

ObjME MuonMonitor::muonPhiME_
private

Definition at line 72 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 88 of file MuonMonitor.cc.

Referenced by analyze().

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

Definition at line 45 of file MuonMonitor.cc.

Referenced by analyze().

ObjME MuonMonitor::muonVsLS_
private

Definition at line 74 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 65 of file MuonMonitor.cc.

Referenced by bookHistograms().

constexpr int MuonMonitor::N_dxy = 50
staticprivate

Definition at line 54 of file MuonMonitor.cc.

constexpr int MuonMonitor::N_ETA = 68
staticprivate

Definition at line 58 of file MuonMonitor.cc.

constexpr int MuonMonitor::N_PHI = 64
staticprivate

Definition at line 50 of file MuonMonitor.cc.

unsigned int MuonMonitor::nelectrons_
private

Definition at line 92 of file MuonMonitor.cc.

Referenced by analyze().

unsigned int MuonMonitor::nmuons_
private

Definition at line 91 of file MuonMonitor.cc.

Referenced by analyze().

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

Definition at line 84 of file MuonMonitor.cc.

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

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

Definition at line 51 of file MuonMonitor.cc.

Referenced by bookHistograms().

const bool MuonMonitor::requireValidHLTPaths_
private

Definition at line 41 of file MuonMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 46 of file MuonMonitor.cc.

Referenced by analyze().