94 static constexpr
int N_PHI = 64;
98 static constexpr
int N_ETA = 50;
110 : folderName_(iConfig.getParameter<
std::
string>(
"FolderName")),
111 requireValidHLTPaths_(iConfig.getParameter<
bool>(
"requireValidHLTPaths")),
112 hltPathsAreValid_(
false),
113 enableFullMonitoring_(iConfig.getParameter<
bool>(
"enableFullMonitoring")),
114 metInputTag_(iConfig.getParameter<
edm::
InputTag>(
"met")),
115 jetInputTag_(iConfig.getParameter<
edm::
InputTag>(
"jets")),
116 eleInputTag_(iConfig.getParameter<
edm::
InputTag>(
"electrons")),
117 muoInputTag_(iConfig.getParameter<
edm::
InputTag>(
"muons")),
118 vtxInputTag_(iConfig.getParameter<
edm::
InputTag>(
"vertices")),
124 met_variable_binning_(
128 met_binning_(getHistoPSet(
133 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
135 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
136 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
137 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
138 eleSelection_(iConfig.getParameter<
std::
string>(
"eleSelection")),
139 muoSelection_(iConfig.getParameter<
std::
string>(
"muoSelection")),
140 njets_(iConfig.getParameter<unsigned>(
"njets")),
141 nelectrons_(iConfig.getParameter<unsigned>(
"nelectrons")),
142 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")) {
185 histname =
"deltaphi_metjet1";
186 histtitle =
"DPHI_METJ1";
190 histname =
"deltaphi_jet1jet2";
191 histtitle =
"DPHI_J1J2";
200 histname =
"met_variable";
205 histname =
"metVsLS";
206 histtitle =
"PFMET vs LS";
219 histtitle =
"PFMET phi";
224 histtitle =
"Jet eta";
229 histtitle =
"Jet phi";
234 histtitle =
"Jet Pt";
239 histtitle =
"number of Jets";
248 histname =
"jetEta_1";
249 histtitle =
"leading Jet eta";
253 histname =
"jetEta_2";
254 histtitle =
"subleading Jet eta";
258 histname =
"jetPhi_1";
259 histtitle =
"leading Jet phi";
263 histname =
"jetPhi_2";
264 histtitle =
"subleading Jet phi";
268 histname =
"jetPt_1";
269 histtitle =
"leading Jet Pt";
273 histname =
"jetPt_2";
274 histtitle =
"second leading Jet Pt";
295 <<
" is not available";
304 const float met = pfmet.
pt();
305 const float phi = pfmet.
phi();
307 std::vector<reco::PFJet>
jets;
311 if (jetHandle->size() <
njets_)
313 for (
auto const&
j : *jetHandle) {
324 <<
" is not available";
331 const float deltaPhi_met_j1 = !
jets.empty() ? fabs(
deltaPhi(pfmet.
phi(),
jets[0].phi())) : -10.0;
333 const int nJetsSel =
jets.size();
334 const float Pt_J1 = !
jets.empty() ?
jets[0].pt() : -10.;
335 const float Pt_J2 =
jets.size() >= 2 ?
jets[1].pt() : -10.0;
336 const float Phi_J1 = !
jets.empty() ?
jets[0].phi() : -10.0;
337 const float Phi_J2 =
jets.size() >= 2 ?
jets[1].phi() : -10.0;
338 const float Eta_J1 = !
jets.empty() ?
jets[0].p4().eta() : -10.0;
339 const float Eta_J2 =
jets.size() >= 2 ?
jets[1].p4().eta() : -10.0;
341 std::vector<reco::GsfElectron>
electrons;
347 for (
auto const&
e : *eleHandle) {
360 <<
" is not available";
370 for (
auto const&
v : *vtxHandle) {
371 bool isFake =
v.isFake();
385 <<
" is not available";
391 std::vector<reco::Muon>
muons;
395 if (muoHandle->size() <
nmuons_)
397 for (
auto const&
m : *muoHandle) {
398 bool pass =
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
399 m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 &&
400 fabs(
m.muonBestTrack()->dxy(
vtx.position())) < 0.2 &&
401 fabs(
m.muonBestTrack()->dz(
vtx.position())) < 0.5 &&
402 m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
403 m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5;
416 <<
" is not available";
429 const int ls =
iEvent.id().luminosityBlock();
478 desc.add<
bool>(
"requireValidHLTPaths",
true);
480 desc.add<
bool>(
"enableFullMonitoring",
false);
491 desc.add<
unsigned>(
"njets", 0);
492 desc.add<
unsigned>(
"nelectrons", 0);
493 desc.add<
unsigned>(
"nmuons", 0);
505 std::vector<double>
bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
506 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
508 std::vector<double> bins_ = {
509 0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
510 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
511 histoPSet.add<std::vector<double> >(
"jetptBinning", bins_);
519 descriptions.
add(
"metMonitoring",
desc);
StringCutObjectSelector< reco::PFJet, true > jetSelection_
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)
#define DEFINE_FWK_MODULE(type)
static constexpr int N_ETA
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_
edm::InputTag eleInputTag_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
std::vector< Vertex > VertexCollection
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
std::vector< double > jetptBinning_
static constexpr double MAX_PHI
ObjME metME_variableBinning_
const bool enableFullMonitoring_
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
dqm::reco::MonitorElement MonitorElement
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
MonitorElement * denominator
static constexpr int MIN_NJETS
MonitorElement * numerator
edm::EDGetTokenT< reco::PFMETCollection > metToken_
static constexpr double MAX_ETA
StringCutObjectSelector< reco::Muon, true > muoSelection_
edm::EDGetTokenT< reco::MuonCollection > muoToken_
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
const bool requireValidHLTPaths_
static constexpr MEbinning phi_binning_
static constexpr MEbinning eta_binning
std::vector< double > met_variable_binning_
static constexpr MEbinning nJets_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_
static constexpr int MAX_NJETS
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
double phi() const final
momentum azimuthal angle
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
static constexpr int N_BIN_NJETS
dqm::reco::DQMStore DQMStore
static constexpr int N_PHI