102 : folderName_(iConfig.getParameter<std::
string>(
"FolderName")),
103 requireValidHLTPaths_(iConfig.getParameter<bool>(
"requireValidHLTPaths")),
104 hltPathsAreValid_(
false),
105 metInputTag_(iConfig.getParameter<edm::
InputTag>(
"met")),
106 jetInputTag_(iConfig.getParameter<edm::
InputTag>(
"jets")),
107 eleInputTag_(iConfig.getParameter<edm::
InputTag>(
"electrons")),
108 muoInputTag_(iConfig.getParameter<edm::
InputTag>(
"muons")),
109 vtxInputTag_(iConfig.getParameter<edm::
InputTag>(
"vertices")),
111 jetToken_(mayConsume<
reco::
JetView>(jetInputTag_)),
115 ht_variable_binning_(
116 iConfig.getParameter<edm::
ParameterSet>(
"histoPSet").getParameter<std::
vector<double> >(
"htBinning")),
122 iConfig.getParameter<edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
124 iConfig.getParameter<edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
129 jetSelection_HT_(iConfig.getParameter<std::
string>(
"jetSelection_HT")),
130 njets_(iConfig.getParameter<unsigned>(
"njets")),
131 nelectrons_(iConfig.getParameter<unsigned>(
"nelectrons")),
132 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")),
133 dEtaCut_(iConfig.getParameter<double>(
"dEtaCut")),
134 warningWasPrinted_(
false) {
137 if (quantity ==
"HT") {
139 }
else if (quantity ==
"Mjj") {
141 }
else if (quantity ==
"softdrop") {
145 <<
"the quantity '" << quantity <<
"' is undefined. Please check your config!" << std::endl;
185 histname =
"ht_variable";
191 histtitle =
"HT vs LS";
203 histname =
"deltaphi_metjet1";
204 histtitle =
"DPHI_METJ1";
208 histname =
"deltaphi_jet1jet2";
209 histtitle =
"DPHI_J1J2";
216 histname =
"mjj_variable";
224 histname =
"softdrop_variable";
225 histtitle =
"softdropmass";
249 <<
" is not available";
250 warningWasPrinted_ =
true;
263 <<
" is not available";
264 warningWasPrinted_ =
true;
268 std::vector<reco::Jet>
jets;
269 if (jetHandle->size() <
njets_)
271 for (
auto const&
j : *jetHandle) {
280 float deltaPhi_met_j1 = 10.0;
281 float deltaPhi_j1_j2 = 10.0;
284 deltaPhi_met_j1 = fabs(
deltaPhi(pfmet.
phi(), jets[0].phi()));
285 if (jets.size() >= 2)
288 std::vector<reco::GsfElectron>
electrons;
294 for (
auto const&
e : *eleHandle) {
296 electrons.push_back(
e);
306 <<
" is not available";
308 warningWasPrinted_ =
true;
318 for (
auto const&
v : *vtxHandle) {
319 bool isFake =
v.isFake();
332 <<
" is not available";
334 warningWasPrinted_ =
true;
340 std::vector<reco::Muon>
muons;
344 if (muoHandle->size() <
nmuons_)
346 for (
auto const&
m : *muoHandle) {
347 if (
muoSelection_(
m) &&
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
348 m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 &&
349 fabs(
m.muonBestTrack()->dxy(vtx.
position())) < 0.2 && fabs(
m.muonBestTrack()->dz(vtx.
position())) < 0.5 &&
350 m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
351 m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5)
362 <<
" is not available";
364 warningWasPrinted_ =
true;
374 for (
auto const&
j : *jetHandle) {
406 if (fabs(jets[0].p4().Eta() - jets[1].p4().Eta()) >=
dEtaCut_)
408 float mjj = (jets[0].p4() + jets[1].p4()).M();
425 if (fabs(jets[0].p4().Eta() - jets[1].p4().Eta()) >=
dEtaCut_)
428 float softdrop = jets[0].p4().M();
445 desc.
add<
bool>(
"requireValidHLTPaths",
true);
457 desc.
add<
unsigned>(
"njets", 0);
458 desc.
add<
unsigned>(
"nelectrons", 0);
459 desc.
add<
unsigned>(
"nmuons", 0);
460 desc.
add<
double>(
"dEtaCut", 1.3);
463 genericTriggerEventPSet.
add<
bool>(
"andOr");
465 genericTriggerEventPSet.
add<std::vector<int> >(
"dcsPartitions", {});
466 genericTriggerEventPSet.
add<
bool>(
"andOrDcs",
false);
467 genericTriggerEventPSet.
add<
bool>(
"errorReplyDcs",
true);
469 genericTriggerEventPSet.
add<
bool>(
"andOrHlt",
true);
471 genericTriggerEventPSet.
add<std::vector<std::string> >(
"hltPaths", {});
473 genericTriggerEventPSet.
add<
bool>(
"errorReplyHlt",
false);
474 genericTriggerEventPSet.
add<
unsigned int>(
"verbosityLevel", 1);
483 std::vector<double> bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140.,
484 150., 160., 170., 180., 190., 200., 220., 240., 260., 280., 300.,
485 350., 400., 450., 500., 550., 600., 650., 700., 750., 800., 850.,
486 900., 950., 1000., 1050., 1100., 1200., 1300., 1400., 1500., 2000., 2500.};
487 histoPSet.
add<std::vector<double> >(
"htBinning", bins);
497 descriptions.
add(
"htMonitoring", desc);
edm::EDGetTokenT< reco::MuonCollection > muoToken_
static constexpr int Nbin_PHI
muoSelection_(iConfig.getParameter< std::string >("muoSelection"))
StringCutObjectSelector< reco::Jet, true > jetSelection_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static constexpr double MAXedge_PHI
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const bool requireValidHLTPaths_
#define DEFINE_FWK_MODULE(type)
dqm::reco::DQMStore DQMStore
den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("denGenericTriggerEventPSet"), consumesCollector(),*this))
eleSelection_(iConfig.getParameter< std::string >("eleSelection"))
edm::InputTag muoInputTag_
std::vector< double > ht_variable_binning_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ls_binning_(getHistoPSet(iConfig.getParameter< edm::ParameterSet >("histoPSet").getParameter< edm::ParameterSet >("lsPSet")))
edm::View< Jet > JetView
edm references
edm::InputTag jetInputTag_
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::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< Muon > MuonCollection
collection of Muon objects
edm::InputTag eleInputTag_
StringCutObjectSelector< reco::Muon, true > muoSelection_
nmuons_(iConfig.getParameter< unsigned int >("nmuons"))
MonitorElement * denominator
MonitorElement * numerator
HTMonitor(const edm::ParameterSet &)
njets_(iConfig.getParameter< unsigned int >("njets"))
metSelection_(iConfig.getParameter< std::string >("metSelection"))
static constexpr MEbinning phi_binning_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
metToken_(consumes< reco::PFMETCollection >(iConfig.getParameter< edm::InputTag >("met")))
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter< edm::ParameterSet >("numGenericTriggerEventPSet"), consumesCollector(),*this))
StringCutObjectSelector< reco::MET, true > metSelection_
edm::InputTag vtxInputTag_
edm::InputTag metInputTag_
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
edm::EDGetTokenT< reco::JetView > jetToken_
const std::string folderName_
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
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)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::PFMETCollection > metToken_
dqm::reco::MonitorElement MonitorElement
Log< level::Warning, false > LogWarning
jetSelection_(iConfig.getParameter< std::string >("jetSelection"))
ObjME qME_variableBinning_
double phi() const final
momentum azimuthal angle
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
StringCutObjectSelector< reco::Jet, true > jetSelection_HT_
nelectrons_(iConfig.getParameter< unsigned int >("nelectrons"))
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_