65 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, min, max);
66 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, min, max);
70 int nbins = binning.size()-1;
71 std::vector<float> fbinning(binning.begin(),binning.end());
72 float* arr = &fbinning[0];
73 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, arr);
74 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, arr);
78 me.
numerator = ibooker.
bookProfile(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
79 me.
denominator = ibooker.
bookProfile(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
83 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
84 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
88 int nbinsX = binningX.size()-1;
89 std::vector<float> fbinningX(binningX.begin(),binningX.end());
90 float* arrX = &fbinningX[0];
91 int nbinsY = binningY.size()-1;
92 std::vector<float> fbinningY(binningY.begin(),binningY.end());
93 float* arrY = &fbinningY[0];
95 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, arrX, nbinsY, arrY);
96 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, arrX, nbinsY, arrY);
110 if (
isPFJetTrig) {hist_obtag =
"pfjet"; histtitle_obtag =
"PFJet";}
111 else if (
isCaloJetTrig) {hist_obtag =
"calojet"; histtitle_obtag =
"CaloJet"; }
112 else {hist_obtag =
"pfjet"; histtitle_obtag =
"PFJet"; }
115 bookMESub(ibooker,
a_ME_HB,
sizeof(
a_ME_HB)/
sizeof(
a_ME_HB[0]),hist_obtag,histtitle_obtag,
"HB",
"(HB)",
true,
true,
true,
false);
116 bookMESub(ibooker,
a_ME_HE,
sizeof(
a_ME_HE)/
sizeof(
a_ME_HE[0]),hist_obtag,histtitle_obtag,
"HE",
"(HE)",
true,
true,
true,
false);
117 bookMESub(ibooker,
a_ME_HF,
sizeof(
a_ME_HF)/
sizeof(
a_ME_HF[0]),hist_obtag,histtitle_obtag,
"HF",
"(HF)",
true,
true,
true,
false);
118 bookMESub(ibooker,
a_ME_HE_p,
sizeof(
a_ME_HE_p)/
sizeof(
a_ME_HE_p[0]),hist_obtag,histtitle_obtag,
"HE_p",
"(HE+)",
true,
true,
true,
false);
119 bookMESub(ibooker,
a_ME_HE_m,
sizeof(
a_ME_HE_m)/
sizeof(
a_ME_HE_m[0]),hist_obtag,histtitle_obtag,
"HE_m",
"(HE-)",
true,
true,
true,
false);
120 bookMESub(ibooker,
a_ME_HEP17,
sizeof(
a_ME_HEP17)/
sizeof(
a_ME_HEP17[0]),hist_obtag,histtitle_obtag,
"HEP17",
"(HEP17)",
true,
false,
false,
false);
121 bookMESub(ibooker,
a_ME_HEM17,
sizeof(
a_ME_HEM17)/
sizeof(
a_ME_HEM17[0]),hist_obtag,histtitle_obtag,
"HEM17",
"(HEM17)",
true,
false,
false,
false);
122 bookMESub(ibooker,
a_ME_HEP18,
sizeof(
a_ME_HEP18)/
sizeof(
a_ME_HEP18[0]),hist_obtag,histtitle_obtag,
"HEP18",
"(HEP18)",
false,
false,
false,
false);
136 histname = hist_obtag +
"abseta_HEP17"; histtitle = histtitle_obtag +
" |#eta| (HEP17) ";
140 histname = hist_obtag +
"abseta_HEM17"; histtitle = histtitle_obtag +
" |eta| (HEM17) ";
177 if (ijet->pt()<
ptcut_) {
continue;}
189 FillME(
a_ME,jetpt_,jetphi_,jeteta_,ls,
"denominator");
192 FillME(
a_ME_HB,jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
true,
true,
false);
196 FillME(
a_ME_HE, jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
true,
true,
false);
197 FillME(
a_ME_HE_p,jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
true,
true,
false);
201 FillME(
a_ME_HE, jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
true,
true,
false);
202 FillME(
a_ME_HE_m,jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
true,
true,
false);
206 FillME(
a_ME_HF,jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
true,
true,
false);
209 if (
isHEP17( jeteta_, jetphi_ ) )
211 FillME(
a_ME_HEP17,jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
false,
false,
false);
214 else if (
isHEM17( jeteta_, jetphi_ ) )
216 FillME(
a_ME_HEM17,jetpt_,jetphi_,jeteta_,ls,
"denominator",
true,
false,
false,
false);
219 else if (
isHEP18( jeteta_, jetphi_ ) )
221 FillME(
a_ME_HEP18,jetpt_,jetphi_,jeteta_,ls,
"denominator",
false,
false,
false,
false);
227 FillME(
a_ME,jetpt_,jetphi_,jeteta_,ls,
"numerator");
230 FillME(
a_ME_HB,jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
true,
true,
false);
234 FillME(
a_ME_HE, jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
true,
true,
false);
235 FillME(
a_ME_HE_p,jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
true,
true,
false);
239 FillME(
a_ME_HE, jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
true,
true,
false);
240 FillME(
a_ME_HE_m,jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
true,
true,
false);
244 FillME(
a_ME_HF,jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
true,
true,
false);
247 if (
isHEP17( jeteta_, jetphi_ ) )
249 FillME(
a_ME_HEP17,jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
false,
false,
false);
252 else if (
isHEM17( jeteta_, jetphi_ ) )
254 FillME(
a_ME_HEM17,jetpt_,jetphi_,jeteta_,ls,
"numerator",
true,
false,
false,
false);
257 else if (
isHEP18( jeteta_, jetphi_ ) )
259 FillME(
a_ME_HEP18,jetpt_,jetphi_,jeteta_,ls,
"numerator",
false,
false,
false,
false);
266 pset.
add<
unsigned int> (
"nbins");
267 pset.
add<
double>(
"xmin" );
268 pset.
add<
double>(
"xmax" );
273 pset.
add<
unsigned int> (
"nbins", 2500);
274 pset.
add<
double> (
"xmin", 0.);
275 pset.
add<
double> (
"xmax", 2500.);
289 desc.
add<
int>(
"njets", 0);
290 desc.
add<
int>(
"nelectrons", 0);
291 desc.
add<
double>(
"ptcut", 20);
292 desc.
add<
bool>(
"ispfjettrg",
true);
293 desc.
add<
bool>(
"iscalojettrg",
false);
296 genericTriggerEventPSet.
add<
bool>(
"andOr");
298 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
299 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
300 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
301 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
302 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
304 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
306 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
307 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
319 std::vector<double>
bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,1000.};
320 histoPSet.add<std::vector<double> >(
"jetptBinning",
bins);
328 descriptions.
add(
"jetMonitoring", desc);
333 if (fabs(eta)<=1.3) output=
true;
340 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) ) output=
true;
347 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) ) output=
true;
353 if (fabs(eta)>3.0) output=
true;
360 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) &&
361 phi > -0.87 && phi <= -0.52 ) {output=
true;}
367 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) &&
368 phi > -0.87 && phi <= -0.52 ) {output=
true;}
375 if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) &&
376 phi > -0.52 && phi <= -0.17 ) {output=
true;}
393 if (DenoOrNume ==
"denominator")
405 else if (DenoOrNume ==
"numerator")
416 edm::LogWarning(
"JetMonitor") <<
"CHECK OUT denu option in FillME !!! DenoOrNume ? : " << DenoOrNume << std::endl;
419 void JetMonitor::bookMESub(
DQMStore::IBooker & 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_suOptTitle,
bool doPhi,
bool doEta,
bool doEtaPhi,
bool doVsLS){
435 if (h_subOptName !=
""){
436 hSubN =
"_"+h_subOptName;
439 if (h_subOptName ==
"HEP17") {
449 if (h_subOptName ==
"HEM17") {
459 if (h_subOptName ==
"HEP18") {
469 hName = h_Name+
"pT"+hSubN;
470 hTitle = h_Title+
" pT " + hSubT;
472 setMETitle(a_me[0], h_Title +
" pT [GeV]",
"events / [GeV]");
474 hName = h_Name+
"pT_pTThresh" + hSubN;
475 hTitle = h_Title+
" pT " + hSubT;
477 setMETitle(a_me[1],h_Title +
"pT [GeV]",
"events / [GeV]");
480 hName = h_Name +
"pTVsLS" + hSubN;
481 hTitle = h_Title+
" vs LS " + hSubT;
483 setMETitle(a_me[2],
"LS",h_Title +
"pT [GeV]");
487 hName = h_Name +
"phi" + hSubN;
488 hTitle = h_Title+
" phi " + hSubT;
489 bookME(Ibooker,a_me[3],hName,hTitle, nbin_phi, minbin_phi,maxbin_phi );
490 setMETitle(a_me[3],h_Title +
" #phi",
"events / 0.1 rad");
494 hName = h_Name +
"eta"+ hSubN;
495 hTitle = h_Title+
" eta " + hSubT;
496 bookME(Ibooker,a_me[4],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta);
497 setMETitle(a_me[4],h_Title +
" #eta",
"events / #eta");
501 hName = h_Name +
"EtaVsPhi"+hSubN;
502 hTitle = h_Title+
" eta Vs phi " + hSubT;
503 bookME(Ibooker,a_me[5],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta, nbin_phi, minbin_phi, maxbin_phi);
508 hName = h_Name +
"EtaVspT"+hSubN;
509 hTitle = h_Title+
" eta Vs pT " + hSubT;
511 setMETitle(a_me[6],h_Title +
" #eta",
"Leading Jet pT [GeV]");
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 &)
MonitorElement * bookProfile(Args &&...args)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
#define DEFINE_FWK_MODULE(type)
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_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setCurrentFolder(std::string const &fullpath)
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 * book1D(Args &&...args)
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_
MonitorElement * book2D(Args &&...args)
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
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::vector< double > v_jeteta
MonitorElement * denominator
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
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.