|
|
Go to the documentation of this file.
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")),
102 met_variable_binning_(
104 met_binning_(getHistoPSet(
109 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
111 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
112 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
113 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
114 eleSelection_(iConfig.getParameter<
std::
string>(
"eleSelection")),
115 muoSelection_(iConfig.getParameter<
std::
string>(
"muoSelection")),
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;
257 if (
jets.size() >= 2)
260 std::vector<reco::GsfElectron>
electrons;
266 for (
auto const&
e : *eleHandle) {
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";
348 const int ls =
iEvent.id().luminosityBlock();
366 desc.add<
bool>(
"requireValidHLTPaths",
true);
377 desc.add<
unsigned>(
"njets", 0);
378 desc.add<
unsigned>(
"nelectrons", 0);
379 desc.add<
unsigned>(
"nmuons", 0);
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.};
412 descriptions.
add(
"metMonitoring",
desc);
static constexpr MEbinning phi_binning_
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
dqm::reco::MonitorElement MonitorElement
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
edm::InputTag metInputTag_
edm::EDGetTokenT< reco::PFMETCollection > metToken_
std::vector< Vertex > VertexCollection
collection of Vertex objects
StringCutObjectSelector< reco::Muon, true > muoSelection_
virtual void setCurrentFolder(std::string const &fullpath)
edm::InputTag jetInputTag_
const std::string folderName_
std::vector< double > met_variable_binning_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
double pt() const final
transverse momentum
Log< level::Warning, false > LogWarning
MonitorElement * numerator
const bool requireValidHLTPaths_
std::vector< bool > warningPrinted4token_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
std::vector< Muon > MuonCollection
collection of Muon objects
METMonitor(const edm::ParameterSet &)
static constexpr int N_PHI
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
StringCutObjectSelector< reco::MET, true > metSelection_
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 bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
dqm::reco::DQMStore DQMStore
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
StringCutObjectSelector< reco::PFJet, true > jetSelection_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::InputTag muoInputTag_
edm::InputTag vtxInputTag_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
double phi() const final
momentum azimuthal angle
std::vector< PFJet > PFJetCollection
collection of PFJet objects
MonitorElement * denominator
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
edm::InputTag eleInputTag_
static constexpr double MAX_PHI
ObjME metME_variableBinning_
edm::EDGetTokenT< reco::MuonCollection > muoToken_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_