13 : folderName_(iConfig.getParameter<
std::
string>(
"FolderName")),
14 metInputTag_(iConfig.getParameter<
edm::
InputTag>(
"met")),
15 jetInputTag_(iConfig.getParameter<
edm::
InputTag>(
"jets")),
16 eleInputTag_(iConfig.getParameter<
edm::
InputTag>(
"electrons")),
17 muoInputTag_(iConfig.getParameter<
edm::
InputTag>(
"muons")),
18 vtxInputTag_(iConfig.getParameter<
edm::
InputTag>(
"vertices")),
25 iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"htBinning")),
31 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
33 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
34 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
35 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
36 eleSelection_(iConfig.getParameter<
std::
string>(
"eleSelection")),
37 muoSelection_(iConfig.getParameter<
std::
string>(
"muoSelection")),
38 jetSelection_HT_(iConfig.getParameter<
std::
string>(
"jetSelection_HT")),
39 njets_(iConfig.getParameter<unsigned>(
"njets")),
40 nelectrons_(iConfig.getParameter<unsigned>(
"nelectrons")),
41 nmuons_(iConfig.getParameter<unsigned>(
"nmuons")),
42 dEtaCut_(iConfig.getParameter<double>(
"dEtaCut")) {
45 if (quantity ==
"HT") {
47 }
else if (quantity ==
"Mjj") {
49 }
else if (quantity ==
"softdrop") {
53 <<
"the quantity '" << quantity <<
"' is undefined. Please check your config!" << std::endl;
92 me.
numerator = ibooker.
book1D(histname +
"_numerator", histtitle +
" (numerator)", nbins, min, max);
93 me.
denominator = ibooker.
book1D(histname +
"_denominator", histtitle +
" (denominator)", nbins, min, max);
99 const std::vector<double>&
binning) {
100 int nbins = binning.size() - 1;
101 std::vector<float> fbinning(binning.begin(), binning.end());
102 float* arr = &fbinning[0];
103 me.
numerator = ibooker.
book1D(histname +
"_numerator", histtitle +
" (numerator)", nbins, arr);
104 me.
denominator = ibooker.
book1D(histname +
"_denominator", histtitle +
" (denominator)", nbins, arr);
116 ibooker.
bookProfile(histname +
"_numerator", histtitle +
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
118 ibooker.
bookProfile(histname +
"_denominator", histtitle +
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
131 ibooker.
book2D(histname +
"_numerator", histtitle +
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
133 ibooker.
book2D(histname +
"_denominator", histtitle +
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
139 const std::vector<double>& binningX,
140 const std::vector<double>& binningY) {
141 int nbinsX = binningX.size() - 1;
142 std::vector<float> fbinningX(binningX.begin(), binningX.end());
143 float* arrX = &fbinningX[0];
144 int nbinsY = binningY.size() - 1;
145 std::vector<float> fbinningY(binningY.begin(), binningY.end());
146 float* arrY = &fbinningY[0];
148 me.
numerator = ibooker.
book2D(histname +
"_numerator", histtitle +
" (numerator)", nbinsX, arrX, nbinsY, arrY);
149 me.
denominator = ibooker.
book2D(histname +
"_denominator", histtitle +
" (denominator)", nbinsX, arrX, nbinsY, arrY);
160 histname =
"ht_variable";
166 histtitle =
"HT vs LS";
178 histname =
"deltaphi_metjet1";
179 histtitle =
"DPHI_METJ1";
183 histname =
"deltaphi_jet1jet2";
184 histtitle =
"DPHI_J1J2";
191 histname =
"mjj_variable";
199 histname =
"softdrop_variable";
200 histtitle =
"softdropmass";
228 <<
" is not available";
242 <<
" is not available";
247 std::vector<reco::Jet>
jets;
250 for (
auto const&
j : *jetHandle) {
259 float deltaPhi_met_j1 = 10.0;
260 float deltaPhi_j1_j2 = 10.0;
263 deltaPhi_met_j1 = fabs(
deltaPhi(pfmet.
phi(), jets[0].phi()));
264 if (jets.size() >= 2)
267 std::vector<reco::GsfElectron>
electrons;
273 for (
auto const&
e : *eleHandle) {
275 electrons.push_back(
e);
286 <<
" is not available";
296 for (
auto const&
v : *vtxHandle) {
297 bool isFake =
v.isFake();
311 <<
" is not available";
317 std::vector<reco::Muon>
muons;
321 if (muoHandle->size() <
nmuons_)
323 for (
auto const&
m : *muoHandle) {
324 if (
muoSelection_(
m) &&
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
325 m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 &&
326 fabs(
m.muonBestTrack()->dxy(vtx.
position())) < 0.2 && fabs(
m.muonBestTrack()->dz(vtx.
position())) < 0.5 &&
327 m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
328 m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5)
340 <<
" is not available";
350 for (
auto const&
j : *jetHandle) {
382 if (fabs(jets[0].
p4().Eta() - jets[1].
p4().Eta()) >=
dEtaCut_)
384 float mjj = (jets[0].p4() + jets[1].p4()).M();
401 if (fabs(jets[0].
p4().Eta() - jets[1].
p4().Eta()) >=
dEtaCut_)
404 float softdrop = jets[0].p4().M();
419 pset.
add<
unsigned int>(
"nbins");
420 pset.
add<
double>(
"xmin");
421 pset.
add<
double>(
"xmax");
425 pset.
add<
unsigned int>(
"nbins", 2500);
426 pset.
add<
double>(
"xmin", 0.);
427 pset.
add<
double>(
"xmax", 2500.);
445 desc.
add<
unsigned>(
"njets", 0);
446 desc.
add<
unsigned>(
"nelectrons", 0);
447 desc.
add<
unsigned>(
"nmuons", 0);
448 desc.
add<
double>(
"dEtaCut", 1.3);
451 genericTriggerEventPSet.
add<
bool>(
"andOr");
453 genericTriggerEventPSet.
add<std::vector<int> >(
"dcsPartitions", {});
454 genericTriggerEventPSet.
add<
bool>(
"andOrDcs",
false);
455 genericTriggerEventPSet.
add<
bool>(
"errorReplyDcs",
true);
457 genericTriggerEventPSet.
add<
bool>(
"andOrHlt",
true);
459 genericTriggerEventPSet.
add<std::vector<std::string> >(
"hltPaths", {});
461 genericTriggerEventPSet.
add<
bool>(
"errorReplyHlt",
false);
462 genericTriggerEventPSet.
add<
unsigned int>(
"verbosityLevel", 1);
471 std::vector<double>
bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140.,
472 150., 160., 170., 180., 190., 200., 220., 240., 260., 280., 300.,
473 350., 400., 450., 500., 550., 600., 650., 700., 750., 800., 850.,
474 900., 950., 1000., 1050., 1100., 1200., 1300., 1400., 1500., 2000., 2500.};
475 histoPSet.add<std::vector<double> >(
"htBinning",
bins);
483 descriptions.
add(
"htMonitoring", desc);
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::MuonCollection > muoToken_
StringCutObjectSelector< reco::Jet, true > jetSelection_
MonitorElement * denominator
void setHTitle(HTME &me, const std::string &titleX, const std::string &titleY)
void bookME(DQMStore::IBooker &, HTME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HTME qME_variableBinning_
void setCurrentFolder(std::string const &fullpath)
edm::InputTag muoInputTag_
std::vector< double > ht_variable_binning_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
static MEHTbinning getHistoPSet(const edm::ParameterSet &pset)
edm::View< Jet > JetView
edm references
edm::InputTag jetInputTag_
LuminosityBlockNumber_t luminosityBlock() const
const Point & position() const
position
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< Muon > MuonCollection
collection of Muon objects
std::vector< bool > warningPrinted4token_
#define DEFINE_FWK_MODULE(type)
edm::InputTag eleInputTag_
StringCutObjectSelector< reco::Muon, true > muoSelection_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
MonitorElement * numerator
HTMonitor(const edm::ParameterSet &)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
StringCutObjectSelector< reco::MET, true > metSelection_
edm::InputTag vtxInputTag_
edm::InputTag metInputTag_
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
edm::EDGetTokenT< reco::JetView > jetToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
static MEHTbinning getHistoLSPSet(const edm::ParameterSet &pset)
edm::EDGetTokenT< reco::PFMETCollection > metToken_
double phi() const final
momentum azimuthal angle
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static MEHTbinning phi_binning_
StringCutObjectSelector< reco::Jet, true > jetSelection_HT_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_