82 static constexpr
int N_PHI = 64;
89 : folderName_(iConfig.getParameter<std::
string>(
"FolderName")),
90 requireValidHLTPaths_(iConfig.getParameter<bool>(
"requireValidHLTPaths")),
91 hltPathsAreValid_(
false),
92 metInputTag_(iConfig.getParameter<edm::
InputTag>(
"met")),
93 jetInputTag_(iConfig.getParameter<edm::
InputTag>(
"jets")),
94 eleInputTag_(iConfig.getParameter<edm::
InputTag>(
"electrons")),
95 muoInputTag_(iConfig.getParameter<edm::
InputTag>(
"muons")),
96 vtxInputTag_(iConfig.getParameter<edm::
InputTag>(
"vertices")),
103 iConfig.getParameter<edm::
ParameterSet>(
"histoPSet").getParameter<std::
vector<double> >(
"metBinning")),
109 iConfig.getParameter<edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
111 iConfig.getParameter<edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
116 njets_(iConfig.getParameter<unsigned>(
"njets")),
117 nelectrons_(iConfig.getParameter<unsigned>(
"nelectrons")),
118 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")) {
161 histname =
"deltaphi_metjet1";
162 histtitle =
"DPHI_METJ1";
166 histname =
"deltaphi_jet1jet2";
167 histtitle =
"DPHI_J1J2";
176 histname =
"met_variable";
181 histname =
"metVsLS";
182 histtitle =
"PFMET vs LS";
195 histtitle =
"PFMET phi";
216 <<
" is not available";
225 float met = pfmet.
pt();
228 std::vector<reco::PFJet>
jets;
232 if (jetHandle->size() <
njets_)
234 for (
auto const&
j : *jetHandle) {
245 <<
" is not available";
252 float deltaPhi_met_j1 = 10.0;
253 float deltaPhi_j1_j2 = 10.0;
256 deltaPhi_met_j1 = fabs(
deltaPhi(pfmet.
phi(), jets[0].phi()));
257 if (jets.size() >= 2)
260 std::vector<reco::GsfElectron>
electrons;
266 for (
auto const&
e : *eleHandle) {
268 electrons.push_back(
e);
279 <<
" is not available";
289 for (
auto const&
v : *vtxHandle) {
290 bool isFake =
v.isFake();
304 <<
" is not available";
310 std::vector<reco::Muon>
muons;
314 if (muoHandle->size() <
nmuons_)
316 for (
auto const&
m : *muoHandle) {
317 bool pass =
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
318 m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 &&
319 fabs(
m.muonBestTrack()->dxy(vtx.
position())) < 0.2 &&
320 fabs(
m.muonBestTrack()->dz(vtx.
position())) < 0.5 &&
321 m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
322 m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5;
335 <<
" is not available";
366 desc.
add<
bool>(
"requireValidHLTPaths",
true);
377 desc.
add<
unsigned>(
"njets", 0);
378 desc.
add<
unsigned>(
"nelectrons", 0);
379 desc.
add<
unsigned>(
"nmuons", 0);
382 genericTriggerEventPSet.
add<
bool>(
"andOr");
384 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions", {});
385 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
386 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
387 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
388 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
390 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths", {});
391 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
392 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
393 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel", 1);
402 std::vector<double> bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
403 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
404 histoPSet.
add<std::vector<double> >(
"metBinning", bins);
412 descriptions.
add(
"metMonitoring", desc);
StringCutObjectSelector< reco::PFJet, true > jetSelection_
muoSelection_(iConfig.getParameter< std::string >("muoSelection"))
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
edm::InputTag vtxInputTag_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
double pt() const final
transverse momentum
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
virtual void setCurrentFolder(std::string const &fullpath)
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"))
edm::InputTag muoInputTag_
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)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
ls_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("lsPSet")))
edm::InputTag eleInputTag_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
std::vector< Vertex > VertexCollection
LuminosityBlockNumber_t luminosityBlock() const
const Point & position() const
position
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Muon > MuonCollection
collection of Muon objects
static constexpr double MAX_PHI
ObjME metME_variableBinning_
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
dqm::reco::MonitorElement MonitorElement
nmuons_(iConfig.getParameter< unsigned int >("nmuons"))
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
MonitorElement * denominator
MonitorElement * numerator
edm::EDGetTokenT< reco::PFMETCollection > metToken_
StringCutObjectSelector< reco::Muon, true > muoSelection_
njets_(iConfig.getParameter< unsigned int >("njets"))
edm::EDGetTokenT< reco::MuonCollection > muoToken_
metSelection_(iConfig.getParameter< std::string >("metSelection"))
ParameterDescriptionBase * add(U const &iLabel, T const &value)
metToken_(consumes< reco::PFMETCollection >(iConfig.getParameter< edm::InputTag >("met")))
met_variable_binning_(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< std::vector< double > >("metBinning"))
num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("numGenericTriggerEventPSet"), consumesCollector(),*this))
met_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("metPSet")))
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
const bool requireValidHLTPaths_
static constexpr MEbinning phi_binning_
std::vector< double > met_variable_binning_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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)
edm::InputTag metInputTag_
StringCutObjectSelector< reco::MET, true > metSelection_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::InputTag jetInputTag_
METMonitor(const edm::ParameterSet &)
const std::string folderName_
Log< level::Warning, false > LogWarning
std::vector< bool > warningPrinted4token_
jetSelection_(iConfig.getParameter< std::string >("jetSelection"))
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
double phi() const final
momentum azimuthal angle
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
dqm::reco::DQMStore DQMStore
nelectrons_(iConfig.getParameter< unsigned int >("nelectrons"))
static constexpr int N_PHI