50 static constexpr
int N_PHI = 64;
54 static constexpr
int N_dxy = 50;
58 static constexpr
int N_ETA = 68;
96 : folderName_(iConfig.getParameter<std::
string>(
"FolderName")),
97 requireValidHLTPaths_(iConfig.getParameter<bool>(
"requireValidHLTPaths")),
98 hltPathsAreValid_(
false),
102 eleToken_(mayConsume<edm::
View<
reco::GsfElectron>>(iConfig.getParameter<edm::
InputTag>(
"electrons"))),
103 muon_variable_binning_(
104 iConfig.getParameter<edm::
ParameterSet>(
"histoPSet").getParameter<std::
vector<double>>(
"muonBinning")),
105 muoneta_variable_binning_(
106 iConfig.getParameter<edm::
ParameterSet>(
"histoPSet").getParameter<std::
vector<double>>(
"muonetaBinning")),
107 muon_binning_(getHistoPSet(
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)),
124 muonSelection_(iConfig.getParameter<std::
string>(
"muonSelection")),
126 nmuons_(iConfig.getParameter<unsigned int>(
"nmuons")),
127 nelectrons_(iConfig.getParameter<unsigned int>(
"nelectrons")) {}
162 histname =
"muon_pt";
163 histtitle =
"muon PT";
167 histname =
"muon_pt_variable";
168 histtitle =
"muon PT";
172 histname =
"muonVsLS";
173 histtitle =
"muon pt vs LS";
185 histname =
"muon_phi";
186 histtitle =
"Muon phi";
190 histname =
"muon_eta";
191 histtitle =
"Muon eta";
195 histname =
"muon_eta_variablebinning";
196 histtitle =
"Muon eta";
200 histname =
"muon_dxy";
201 histtitle =
"Muon dxy";
205 histname =
"muon_dz";
206 histtitle =
"Muon dz";
210 histname =
"muon_etaphi";
211 histtitle =
"Muon eta-phi";
224 histname =
"electron_pt_variable";
225 histtitle =
"electron PT";
229 histname =
"electron_eta";
230 histtitle =
"electron eta";
234 histname =
"elePt_muPt";
235 histtitle =
"electron pt vs muon pt";
239 histname =
"eleEta_muEta";
240 histtitle =
"electron #eta vs muon #eta";
269 if (not
v.isFake()) {
270 pv.SetXYZ(
v.x(),
v.y(),
v.z());
277 std::vector<reco::Muon>
muons;
278 if (muonHandle->size() <
nmuons_)
280 for (
auto const&
p : *muonHandle) {
289 std::vector<reco::GsfElectron>
electrons;
292 for (
auto const&
e : *eleHandle) {
294 electrons.push_back(
e);
302 if (!muons.empty()) {
311 if (!electrons.empty()) {
324 if (!muons.empty()) {
333 if (!electrons.empty()) {
345 desc.
add<
bool>(
"requireValidHLTPaths",
true);
354 desc.
add<
unsigned int>(
"nmuons", 0);
355 desc.
add<
unsigned int>(
"nelectrons", 0);
358 genericTriggerEventPSet.
add<
bool>(
"andOr");
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);
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", {});
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);
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);
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);
404 descriptions.
add(
"muonMonitoring", desc);
static constexpr double MAX_PHI
std::vector< double > muPt_variable_binning_2D_
StringCutObjectSelector< reco::MET, true > metSelection_
dqm::reco::DQMStore DQMStore
static constexpr double MAX_dxy
edm::EDGetTokenT< reco::PFMETCollection > metToken_
ObjME muonEtaME_variableBinning_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
virtual void setCurrentFolder(std::string const &fullpath)
const bool requireValidHLTPaths_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("denGenericTriggerEventPSet"), consumesCollector(),*this))
eleSelection_(iConfig.getParameter< std::string >("eleSelection"))
MuonMonitor(const edm::ParameterSet &)
std::vector< double > muoneta_variable_binning_
const MEbinning dxy_binning_
static constexpr int N_ETA
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ls_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("lsPSet")))
ObjME eleME_variableBinning_
std::vector< Vertex > VertexCollection
LuminosityBlockNumber_t luminosityBlock() const
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
const MEbinning phi_binning_
std::vector< double > muEta_variable_binning_2D_
std::vector< Muon > MuonCollection
collection of Muon objects
elePt_variable_binning_2D_(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< std::vector< double > >("elePtBinning2D"))
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
ObjME muonME_variableBinning_
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
edm::EDGetTokenT< edm::View< reco::GsfElectron > > eleToken_
static constexpr int N_dxy
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
nmuons_(iConfig.getParameter< unsigned int >("nmuons"))
static constexpr double MAX_ETA
const std::string folderName_
MonitorElement * denominator
MonitorElement * numerator
muPt_variable_binning_2D_(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< std::vector< double > >("muPtBinning2D"))
metSelection_(iConfig.getParameter< std::string >("metSelection"))
edm::EDGetTokenT< reco::MuonCollection > muonToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
metToken_(consumes< reco::PFMETCollection >(iConfig.getParameter< edm::InputTag >("met")))
std::vector< double > elePt_variable_binning_2D_
std::vector< double > muon_variable_binning_
num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("numGenericTriggerEventPSet"), consumesCollector(),*this))
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
XYZPointD XYZPoint
point in space with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
eleEta_variable_binning_2D_(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< std::vector< double > >("eleEtaBinning2D"))
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)
muEta_variable_binning_2D_(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< std::vector< double > >("muEtaBinning2D"))
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
dqm::reco::MonitorElement MonitorElement
static constexpr int N_PHI
const MEbinning eta_binning_
std::vector< double > eleEta_variable_binning_2D_
nelectrons_(iConfig.getParameter< unsigned int >("nelectrons"))
StringCutObjectSelector< reco::Muon, true > muonSelection_