17 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
19 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)) {
64 me.
numerator = ibooker.
book1D(histname +
"_numerator", histtitle +
" (numerator)", nbins, min, max);
65 me.
denominator = ibooker.
book1D(histname +
"_denominator", histtitle +
" (denominator)", nbins, min, max);
69 int nbins = binning.size() - 1;
70 std::vector<float> fbinning(binning.begin(), binning.end());
71 float* arr = &fbinning[0];
72 me.
numerator = ibooker.
book1D(histname +
"_numerator", histtitle +
" (numerator)", nbins, arr);
73 me.
denominator = ibooker.
book1D(histname +
"_denominator", histtitle +
" (denominator)", nbins, arr);
85 ibooker.
bookProfile(histname +
"_numerator", histtitle +
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
87 ibooker.
bookProfile(histname +
"_denominator", histtitle +
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
100 ibooker.
book2D(histname +
"_numerator", histtitle +
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
102 ibooker.
book2D(histname +
"_denominator", histtitle +
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
108 std::vector<double> binningX,
109 std::vector<double> binningY) {
110 int nbinsX = binningX.size() - 1;
111 std::vector<float> fbinningX(binningX.begin(), binningX.end());
112 float* arrX = &fbinningX[0];
113 int nbinsY = binningY.size() - 1;
114 std::vector<float> fbinningY(binningY.begin(), binningY.end());
115 float* arrY = &fbinningY[0];
117 me.
numerator = ibooker.
book2D(histname +
"_numerator", histtitle +
" (numerator)", nbinsX, arrX, nbinsY, arrY);
118 me.
denominator = ibooker.
book2D(histname +
"_denominator", histtitle +
" (denominator)", nbinsX, arrX, nbinsY, arrY);
129 hist_obtag =
"pfjet";
130 histtitle_obtag =
"PFJet";
132 hist_obtag =
"calojet";
133 histtitle_obtag =
"CaloJet";
135 hist_obtag =
"pfjet";
136 histtitle_obtag =
"PFJet";
241 histname = hist_obtag +
"abseta_HEP17";
242 histtitle = histtitle_obtag +
" |#eta| (HEP17) ";
252 histname = hist_obtag +
"abseta_HEM17";
253 histtitle = histtitle_obtag +
" |eta| (HEM17) ";
300 if (ijet->pt() <
ptcut_) {
315 FillME(
a_ME, jetpt_, jetphi_, jeteta_, ls,
"denominator");
317 FillME(
a_ME_HB, jetpt_, jetphi_, jeteta_, ls,
"denominator",
true,
true,
true,
false);
319 FillME(
a_ME_HE, jetpt_, jetphi_, jeteta_, ls,
"denominator",
true,
true,
true,
false);
320 FillME(
a_ME_HE_p, jetpt_, jetphi_, jeteta_, ls,
"denominator",
true,
true,
true,
false);
322 FillME(
a_ME_HE, jetpt_, jetphi_, jeteta_, ls,
"denominator",
true,
true,
true,
false);
323 FillME(
a_ME_HE_m, jetpt_, jetphi_, jeteta_, ls,
"denominator",
true,
true,
true,
false);
325 FillME(
a_ME_HF, jetpt_, jetphi_, jeteta_, ls,
"denominator",
true,
true,
true,
false);
328 if (
isHEP17(jeteta_, jetphi_)) {
340 }
else if (
isHEM17(jeteta_, jetphi_)) {
342 a_ME_HEM17, jetpt_, jetphi_, jeteta_, ls,
"denominator",
true,
false,
false,
false);
344 }
else if (
isHEP18(jeteta_, jetphi_)) {
346 a_ME_HEP18, jetpt_, jetphi_, jeteta_, ls,
"denominator",
false,
false,
false,
false);
352 FillME(
a_ME, jetpt_, jetphi_, jeteta_, ls,
"numerator");
354 FillME(
a_ME_HB, jetpt_, jetphi_, jeteta_, ls,
"numerator",
true,
true,
true,
false);
356 FillME(
a_ME_HE, jetpt_, jetphi_, jeteta_, ls,
"numerator",
true,
true,
true,
false);
357 FillME(
a_ME_HE_p, jetpt_, jetphi_, jeteta_, ls,
"numerator",
true,
true,
true,
false);
359 FillME(
a_ME_HE, jetpt_, jetphi_, jeteta_, ls,
"numerator",
true,
true,
true,
false);
360 FillME(
a_ME_HE_m, jetpt_, jetphi_, jeteta_, ls,
"numerator",
true,
true,
true,
false);
362 FillME(
a_ME_HF, jetpt_, jetphi_, jeteta_, ls,
"numerator",
true,
true,
true,
false);
365 if (
isHEP17(jeteta_, jetphi_)) {
377 }
else if (
isHEM17(jeteta_, jetphi_)) {
389 }
else if (
isHEP18(jeteta_, jetphi_)) {
404 pset.
add<
unsigned int>(
"nbins");
405 pset.
add<
double>(
"xmin");
406 pset.
add<
double>(
"xmax");
410 pset.
add<
unsigned int>(
"nbins", 2500);
411 pset.
add<
double>(
"xmin", 0.);
412 pset.
add<
double>(
"xmax", 2500.);
425 desc.
add<
int>(
"njets", 0);
426 desc.
add<
int>(
"nelectrons", 0);
427 desc.
add<
double>(
"ptcut", 20);
428 desc.
add<
bool>(
"ispfjettrg",
true);
429 desc.
add<
bool>(
"iscalojettrg",
false);
432 genericTriggerEventPSet.add<
bool>(
"andOr");
434 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions", {});
435 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
436 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
437 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
438 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
440 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths", {});
442 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
443 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel", 1);
455 std::vector<double>
bins = {
456 0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
457 170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
458 histoPSet.add<std::vector<double> >(
"jetptBinning",
bins);
466 descriptions.
add(
"jetMonitoring", desc);
471 if (fabs(eta) <= 1.3)
479 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0))
487 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0))
502 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) && phi > -0.87 && phi <= -0.52) {
510 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) && phi > -0.87 && phi <= -0.52) {
519 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) && phi > -0.52 && phi <= -0.17) {
546 if (DenoOrNume ==
"denominator") {
561 }
else if (DenoOrNume ==
"numerator") {
575 edm::LogWarning(
"JetMonitor") <<
"CHECK OUT denu option in FillME !!! DenoOrNume ? : " << DenoOrNume << std::endl;
603 if (!h_subOptName.empty()) {
604 hSubN =
"_" + h_subOptName;
607 if (h_subOptName ==
"HEP17") {
616 if (h_subOptName ==
"HEM17") {
625 if (h_subOptName ==
"HEP18") {
634 hName = h_Name +
"pT" + hSubN;
635 hTitle = h_Title +
" pT " + hSubT;
637 setMETitle(a_me[0], h_Title +
" pT [GeV]",
"events / [GeV]");
639 hName = h_Name +
"pT_pTThresh" + hSubN;
640 hTitle = h_Title +
" pT " + hSubT;
642 setMETitle(a_me[1], h_Title +
"pT [GeV]",
"events / [GeV]");
645 hName = h_Name +
"pTVsLS" + hSubN;
646 hTitle = h_Title +
" vs LS " + hSubT;
656 setMETitle(a_me[2],
"LS", h_Title +
"pT [GeV]");
660 hName = h_Name +
"phi" + hSubN;
661 hTitle = h_Title +
" phi " + hSubT;
662 bookME(Ibooker, a_me[3], hName, hTitle, nbin_phi, minbin_phi, maxbin_phi);
663 setMETitle(a_me[3], h_Title +
" #phi",
"events / 0.1 rad");
667 hName = h_Name +
"eta" + hSubN;
668 hTitle = h_Title +
" eta " + hSubT;
669 bookME(Ibooker, a_me[4], hName, hTitle, nbin_eta, minbin_eta, maxbin_eta);
670 setMETitle(a_me[4], h_Title +
" #eta",
"events / #eta");
674 hName = h_Name +
"EtaVsPhi" + hSubN;
675 hTitle = h_Title +
" eta Vs phi " + hSubT;
676 bookME(Ibooker, a_me[5], hName, hTitle, nbin_eta, minbin_eta, maxbin_eta, nbin_phi, minbin_phi, maxbin_phi);
677 setMETitle(a_me[5], h_Title +
" #eta",
"#phi");
681 hName = h_Name +
"EtaVspT" + hSubN;
682 hTitle = h_Title +
" eta Vs pT " + hSubT;
693 setMETitle(a_me[6], h_Title +
" #eta",
"Leading Jet pT [GeV]");
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
bool isBarrel(double eta)
bool isHEP17(double eta, double phi)
For Hcal HEP17 Area.
MEbinning eta_binning_hem17_
MEbinning phi_binning_hep17_
JetMonitor(const edm::ParameterSet &)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
void setCurrentFolder(std::string const &fullpath)
void FillME(JetME *a_me, double pt_, double phi_, double eta_, int ls_, const std::string &denu, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
void bookME(DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
LuminosityBlockNumber_t luminosityBlock() const
void bookMESub(DQMStore::IBooker &, JetME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, std::string h_subOptTitle, bool doPhi=true, bool doEta=true, bool doEtaPhi=true, bool doVsLS=true)
MEbinning eta_binning_hep17_
MEbinning phi_binning_hep18_
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MEbinning jet_phi_binning_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
bool isEndCapM(double eta)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
std::vector< double > jetpT_variable_binning_
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isHEM17(double eta, double phi)
For Hcal HEM17 Area.
MEbinning jetptThr_binning_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
std::vector< double > v_jetpt
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::vector< double > v_jeteta
MonitorElement * denominator
bool isForward(double eta)
For Hcal Forward Plus Area.
std::vector< double > v_jetphi
MEbinning jet_eta_binning_
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
void setMETitle(JetME &me, const std::string &titleX, const std::string &titleY)
MonitorElement * numerator
bool isHEP18(double eta, double phi)
For Hcal HEP18 Area.
bool isEndCapP(double eta)
For Hcal Endcap Plus Area.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)