123 : folderName_(iConfig.getParameter<
std::
string>(
"FolderName")),
124 requireValidHLTPaths_(iConfig.getParameter<
bool>(
"requireValidHLTPaths")),
125 hltPathsAreValid_(
false),
126 enableFullMonitoring_(iConfig.getParameter<
bool>(
"enableFullMonitoring")),
127 metInputTag_(iConfig.getParameter<
edm::
InputTag>(
"met")),
128 jetInputTag_(iConfig.getParameter<
edm::
InputTag>(
"jets")),
129 eleInputTag_(iConfig.getParameter<
edm::
InputTag>(
"electrons")),
130 muoInputTag_(iConfig.getParameter<
edm::
InputTag>(
"muons")),
131 vtxInputTag_(iConfig.getParameter<
edm::
InputTag>(
"vertices")),
133 jetToken_(mayConsume<
reco::
JetView>(jetInputTag_)),
137 ht_variable_binning_(
146 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
148 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
149 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
150 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
151 eleSelection_(iConfig.getParameter<
std::
string>(
"eleSelection")),
152 muoSelection_(iConfig.getParameter<
std::
string>(
"muoSelection")),
153 jetSelection_HT_(iConfig.getParameter<
std::
string>(
"jetSelection_HT")),
154 njets_(iConfig.getParameter<unsigned>(
"njets")),
155 nelectrons_(iConfig.getParameter<unsigned>(
"nelectrons")),
156 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")),
157 dEtaCut_(iConfig.getParameter<double>(
"dEtaCut")),
158 quantity_(iConfig.getParameter<
std::
string>(
"quantity")),
159 warningWasPrinted_(
false) {}
195 histname =
"ht_variable";
201 histtitle =
"HT vs LS";
218 histtitle =
"METPhi";
223 histtitle =
"leading Jet Pt";
228 histtitle =
"second leading Jet Pt";
232 histname =
"jetEta1";
233 histtitle =
"leading Jet eta";
237 histname =
"jetEta2";
238 histtitle =
"subleading Jet eta";
242 histname =
"jetPhi1";
243 histtitle =
"leading Jet phi";
247 histname =
"jetPhi2";
248 histtitle =
"subleading Jet phi";
253 histtitle =
"number of Jets";
257 histname =
"nJetsHT";
258 histtitle =
"number of Jets HT";
264 histname =
"mjj_variable";
270 histname =
"softdrop_variable";
271 histtitle =
"softdropmass";
293 <<
" is not available";
307 <<
" is not available";
312 std::vector<reco::Jet>
jets;
315 for (
auto const&
j : *jetHandle) {
325 const int nJetsSel =
jets.size();
326 const float Pt_J1 = !
jets.empty() ?
jets[0].pt() : -10.0;
327 const float Pt_J2 =
jets.size() >= 2 ?
jets[1].pt() : -10.0;
328 const float Phi_J1 = !
jets.empty() ?
jets[0].phi() : -10.0;
329 const float Phi_J2 =
jets.size() >= 2 ?
jets[1].phi() : -10.0;
330 const float Eta_J1 = !
jets.empty() ?
jets[0].p4().eta() : -10.0;
331 const float Eta_J2 =
jets.size() >= 2 ?
jets[1].p4().eta() : -10.0;
333 std::vector<reco::GsfElectron>
electrons;
339 for (
auto const&
e : *eleHandle) {
351 <<
" is not available";
363 for (
auto const&
v : *vtxHandle) {
364 bool isFake =
v.isFake();
377 <<
" is not available";
385 std::vector<reco::Muon>
muons;
389 if (muoHandle->size() <
nmuons_)
391 for (
auto const&
m : *muoHandle) {
392 if (
muoSelection_(
m) &&
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
393 m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 &&
394 fabs(
m.muonBestTrack()->dxy(
vtx.position())) < 0.2 && fabs(
m.muonBestTrack()->dz(
vtx.position())) < 0.5 &&
395 m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
396 m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5)
407 <<
" is not available";
419 for (
auto const&
j : *jetHandle) {
422 nJets_HT = nJets_HT + 1;
429 int ls =
iEvent.id().luminosityBlock();
473 float mjj = (
jets[0].p4() +
jets[1].p4()).M();
491 float softdrop =
jets[0].p4().M();
506 desc.add<
bool>(
"requireValidHLTPaths",
true);
507 desc.add<
bool>(
"enableFullMonitoring",
false);
518 desc.add<
unsigned>(
"njets", 0);
519 desc.add<
unsigned>(
"nelectrons", 0);
520 desc.add<
unsigned>(
"nmuons", 0);
521 desc.add<
double>(
"dEtaCut", 1.3);
533 std::vector<double>
bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140.,
534 150., 160., 170., 180., 190., 200., 220., 240., 260., 280., 300.,
535 350., 400., 450., 500., 550., 600., 650., 700., 750., 800., 850.,
536 900., 950., 1000., 1050., 1100., 1200., 1300., 1400., 1500., 2000., 2500.};
538 std::vector<double> bins_2 = {
539 0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
540 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
541 histoPSet.add<std::vector<double> >(
"jetptBinning", bins_2);
550 descriptions.
add(
"htMonitoring",
desc);
edm::EDGetTokenT< reco::MuonCollection > muoToken_
static constexpr int Nbin_PHI
static constexpr int MIN_NJETS
std::vector< double > jetptBinning_
StringCutObjectSelector< reco::Jet, true > jetSelection_
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
static constexpr double MAXedge_PHI
virtual void setCurrentFolder(std::string const &fullpath)
const bool requireValidHLTPaths_
dqm::reco::DQMStore DQMStore
edm::InputTag muoInputTag_
static constexpr int MAX_NJETS
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)
edm::View< Jet > JetView
edm references
edm::InputTag jetInputTag_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
std::vector< Vertex > VertexCollection
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
static constexpr MEbinning nJets_binning
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static constexpr int MAX_NJETS_HT
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< Muon > MuonCollection
collection of Muon objects
edm::InputTag eleInputTag_
StringCutObjectSelector< reco::Muon, true > muoSelection_
static constexpr int N_ETA
MonitorElement * denominator
MonitorElement * numerator
HTMonitor(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
static constexpr MEbinning phi_binning_
static constexpr MEbinning eta_binning
static constexpr double MAX_ETA
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
const bool enableFullMonitoring_
StringCutObjectSelector< reco::MET, true > metSelection_
edm::InputTag vtxInputTag_
static constexpr int MIN_NJETS_HT
edm::InputTag metInputTag_
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
edm::EDGetTokenT< reco::JetView > jetToken_
const std::string folderName_
static constexpr int N_BIN_NJETS_HT
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
static constexpr MEbinning nJets_HT_binning
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 constexpr int N_BIN_NJETS
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::PFMETCollection > metToken_
dqm::reco::MonitorElement MonitorElement
Log< level::Warning, false > LogWarning
ObjME qME_variableBinning_
double phi() const final
momentum azimuthal angle
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static void fillPSetDescription(edm::ParameterSetDescription &desc)
StringCutObjectSelector< reco::Jet, true > jetSelection_HT_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_