CMS 3D CMS Logo

JetMonitor.cc
Go to the documentation of this file.
2 
3 #include <utility>
4 
6 
8 
10 
11 
12 
13 // -----------------------------
14 // constructors and destructor
15 // -----------------------------
16 
18 num_genTriggerEventFlag_ ( new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"),consumesCollector(), *this))
19 ,den_genTriggerEventFlag_ ( new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"),consumesCollector(), *this))
20 {
21  folderName_ = iConfig.getParameter<std::string>("FolderName");
22  jetSrc_ = mayConsume<edm::View<reco::Jet> >(iConfig.getParameter<edm::InputTag>("jetSrc"));//jet
23  jetpT_variable_binning_ = iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetptBinning");
27 
28 
29  ptcut_ = iConfig.getParameter<double>("ptcut" ); // for HLT Jet
30  isPFJetTrig = iConfig.getParameter<bool>("ispfjettrg" );
31  isCaloJetTrig = iConfig.getParameter<bool>("iscalojettrg" );
32 
33 
34 }
35 
36 JetMonitor::~JetMonitor() = default;
37 
39 {
40  return JetMonitor::MEbinning{
41  pset.getParameter<unsigned int>("nbins"),
42  pset.getParameter<double>("xmin"),
43  pset.getParameter<double>("xmax"),
44  };
45 }
46 
48 {
49  return JetMonitor::MEbinning{
50  pset.getParameter<unsigned int>("nbins"),
51  0.,
52  double(pset.getParameter<unsigned int>("nbins"))
53  };
54 }
55 
56 void JetMonitor::setMETitle(JetME& me, const std::string& titleX, const std::string& titleY)
57 {
58  me.numerator->setAxisTitle(titleX,1);
59  me.numerator->setAxisTitle(titleY,2);
60  me.denominator->setAxisTitle(titleX,1);
61  me.denominator->setAxisTitle(titleY,2);
62 }
63 void JetMonitor::bookME(DQMStore::IBooker &ibooker, JetME& me, std::string& histname, std::string& histtitle, unsigned int nbins, double min, double max)
64 {
65  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
66  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
67 }
68 void JetMonitor::bookME(DQMStore::IBooker &ibooker, JetME& me, std::string& histname, std::string& histtitle, std::vector<double> binning)
69 {
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);
75 }
76 void JetMonitor::bookME(DQMStore::IBooker &ibooker, JetME& me, std::string& histname, std::string& histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax)
77 {
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);
80 }
81 void JetMonitor::bookME(DQMStore::IBooker &ibooker, JetME& me, std::string& histname, std::string& histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
82 {
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);
85 }
86 void JetMonitor::bookME(DQMStore::IBooker &ibooker, JetME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX, std::vector<double> binningY)
87 {
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];
94 
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);
97 }
98 
100  edm::Run const & iRun,
101  edm::EventSetup const & iSetup)
102 {
103 
104  std::string histname, histtitle;
105  std::string hist_obtag = "";
106  std::string histtitle_obtag = "";
107  std::string currentFolder = folderName_ ;
108  ibooker.setCurrentFolder(currentFolder.c_str());
109 
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"; } //default is pfjet
113 
114  bookMESub(ibooker,a_ME,sizeof(a_ME)/sizeof(a_ME[0]),hist_obtag,histtitle_obtag,"","");
115  bookMESub(ibooker,a_ME_HB,sizeof(a_ME_HB)/sizeof(a_ME_HB[0]),hist_obtag,histtitle_obtag,"HB","(HB)");
116  bookMESub(ibooker,a_ME_HE,sizeof(a_ME_HE)/sizeof(a_ME_HE[0]),hist_obtag,histtitle_obtag,"HE","(HE)");
117  bookMESub(ibooker,a_ME_HF,sizeof(a_ME_HF)/sizeof(a_ME_HF[0]),hist_obtag,histtitle_obtag,"HF","(HF)");
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+)");
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-)");
120  bookMESub(ibooker,a_ME_HEP17,sizeof(a_ME_HEP17)/sizeof(a_ME_HEP17[0]),hist_obtag,histtitle_obtag,"HEP17","(HEP17)");
121  bookMESub(ibooker,a_ME_HEM17,sizeof(a_ME_HEM17)/sizeof(a_ME_HEM17[0]),hist_obtag,histtitle_obtag,"HEM17","(HEM17)");
122  bookMESub(ibooker,a_ME_HEP18,sizeof(a_ME_HEP18)/sizeof(a_ME_HEP18[0]),hist_obtag,histtitle_obtag,"HEP18","(HEP18)");
123 
124  histname = hist_obtag +"AbsEtaVsPhi_HEP17"; histtitle = histtitle_obtag + " |eta| Vs phi (HEP17) ";
126  setMETitle(jetHEP17_AbsEtaVsPhi_,histtitle_obtag + " |#eta|","#phi");
127 
128  histname = hist_obtag +"AbsEtaVsPhi_HEM17"; histtitle = histtitle_obtag + " |eta| Vs phi (HEM17) ";
130  setMETitle(jetHEM17_AbsEtaVsPhi_,histtitle_obtag + " |#eta|","#phi");
131 
132  histname = hist_obtag +"abseta_HEP17"; histtitle = histtitle_obtag + " |#eta| (HEP17) ";
134  setMETitle(jetHEP17_AbsEta_,histtitle_obtag + " |#eta|","events / |#eta|");
135 
136  histname = hist_obtag +"abseta_HEM17"; histtitle = histtitle_obtag + " |eta| (HEM17) ";
138  setMETitle(jetHEM17_AbsEta_,histtitle_obtag + " |#eta|","events / |#eta|");
139 
140  // Initialize the GenericTriggerEventFlag
141  if ( num_genTriggerEventFlag_ && num_genTriggerEventFlag_->on() ) num_genTriggerEventFlag_->initRun( iRun, iSetup );
142  if ( den_genTriggerEventFlag_ && den_genTriggerEventFlag_->on() ) den_genTriggerEventFlag_->initRun( iRun, iSetup );
143 
144 }
145 
150 #include "DataFormats/Math/interface/deltaR.h" // For Delta R
152  // Filter out events if Trigger Filtering is requested
153  if (den_genTriggerEventFlag_->on() && ! den_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
154 // edm::Handle<reco::PFJetCollection> pfjetHandle;
155 // iEvent.getByToken( pfjetToken_, pfjetHandle );
156 
157 // edm::Handle<reco::CaloJetCollection> calojetHandle;
158 // iEvent.getByToken( calojetToken_, calojetHandle );
159 
160  int ls = iEvent.id().luminosityBlock();
161  v_jetpt.clear();
162  v_jeteta.clear();
163  v_jetphi.clear();
164 
166  iEvent.getByToken( jetSrc_, offjets );
167  if (!offjets.isValid()){
168  edm::LogWarning("JetMonitor") << "Jet handle not valid \n";
169  return;
170  }
171  for ( edm::View<reco::Jet>::const_iterator ibegin = offjets->begin(), iend = offjets->end(), ijet = ibegin; ijet != iend; ++ijet ) {
172  //if (ijet->pt()< 20) {continue;}
173  if (ijet->pt()< ptcut_) {continue;}
174  v_jetpt.push_back(ijet->pt());
175  v_jeteta.push_back(ijet->eta());
176  v_jetphi.push_back(ijet->phi());
177 // cout << "jetpt (view ) : " << ijet->pt() << endl;
178  }
179 
180  if (v_jetpt.size() < 1) {return;}
181  double jetpt_ = v_jetpt[0];
182  double jeteta_ = v_jeteta[0];
183  double jetphi_ = v_jetphi[0];
184 
185  FillME(a_ME,jetpt_,jetphi_,jeteta_,ls,"denominator");
186  if (isBarrel( jeteta_ ) )
187  {
188  FillME(a_ME_HB,jetpt_,jetphi_,jeteta_,ls,"denominator");
189  }
190  if (isEndCapP( jeteta_ ) )
191  {
192  FillME(a_ME_HE,jetpt_,jetphi_,jeteta_,ls,"denominator");
193  FillME(a_ME_HE_p,jetpt_,jetphi_,jeteta_,ls,"denominator");
194  }
195  if (isEndCapM( jeteta_ ) )
196  {
197  FillME(a_ME_HE,jetpt_,jetphi_,jeteta_,ls,"denominator");
198  FillME(a_ME_HE_m,jetpt_,jetphi_,jeteta_,ls,"denominator");
199  }
200  if (isForward( jeteta_ ) )
201  {
202  FillME(a_ME_HF,jetpt_,jetphi_,jeteta_,ls,"denominator");
203  }
204  if (isHEP17( jeteta_, jetphi_ ) )
205  {
206  FillME(a_ME_HEP17,jetpt_,jetphi_,jeteta_,ls,"denominator");
207  jetHEP17_AbsEtaVsPhi_.denominator->Fill(abs(jeteta_),jetphi_);
209  }
210  if (isHEM17( jeteta_, jetphi_ ) )
211  {
212  FillME(a_ME_HEM17,jetpt_,jetphi_,jeteta_,ls,"denominator");
213  jetHEM17_AbsEtaVsPhi_.denominator->Fill(abs(jeteta_),jetphi_);
215  }
216  if (isHEP18( jeteta_, jetphi_ ) )
217  {
218  FillME(a_ME_HEP18,jetpt_,jetphi_,jeteta_,ls,"denominator");
219  }
220  if (num_genTriggerEventFlag_->on() && ! num_genTriggerEventFlag_->accept( iEvent, iSetup) ) return; // Require Numerator //
221 
222  FillME(a_ME,jetpt_,jetphi_,jeteta_,ls,"numerator");
223 
224  if (isBarrel( jeteta_ ) )
225  {
226  FillME(a_ME_HB,jetpt_,jetphi_,jeteta_,ls,"numerator");
227  }
228  if (isEndCapP( jeteta_ ) )
229  {
230  FillME(a_ME_HE,jetpt_,jetphi_,jeteta_,ls,"numerator");
231  FillME(a_ME_HE_p,jetpt_,jetphi_,jeteta_,ls,"numerator");
232  }
233  if (isEndCapM( jeteta_ ) )
234  {
235  FillME(a_ME_HE,jetpt_,jetphi_,jeteta_,ls,"numerator");
236  FillME(a_ME_HE_m,jetpt_,jetphi_,jeteta_,ls,"numerator");
237  }
238  if (isForward( jeteta_ ) )
239  {
240  FillME(a_ME_HF,jetpt_,jetphi_,jeteta_,ls,"numerator");
241  }
242  if (isHEP17( jeteta_, jetphi_ ) )
243  {
244  FillME(a_ME_HEP17,jetpt_,jetphi_,jeteta_,ls,"numerator");
245  jetHEP17_AbsEtaVsPhi_.numerator->Fill(abs(jeteta_),jetphi_);
246  jetHEP17_AbsEta_.numerator->Fill(abs(jeteta_));
247  }
248  if (isHEM17( jeteta_, jetphi_ ) )
249  {
250  FillME(a_ME_HEM17,jetpt_,jetphi_,jeteta_,ls,"numerator");
251  jetHEM17_AbsEtaVsPhi_.numerator->Fill(abs(jeteta_),jetphi_);
252  jetHEM17_AbsEta_.numerator->Fill(abs(jeteta_));
253  }
254  if (isHEP18( jeteta_, jetphi_ ) )
255  {
256  FillME(a_ME_HEP18,jetpt_,jetphi_,jeteta_,ls,"numerator");
257  }
258 
259 }
260 
262 {
263  pset.add<unsigned int> ( "nbins");
264  pset.add<double>( "xmin" );
265  pset.add<double>( "xmax" );
266 }
267 
269 {
270  pset.add<unsigned int> ( "nbins", 2500);
271 }
272 
274 {
276  desc.add<std::string> ( "FolderName", "HLT/Jet" );
277 
278  desc.add<edm::InputTag>( "met", edm::InputTag("pfMet") );
279 // desc.add<edm::InputTag>( "pfjets", edm::InputTag("ak4PFJetsCHS") );
280 // desc.add<edm::InputTag>( "calojets", edm::InputTag("ak4CaloJets") );
281  desc.add<edm::InputTag>( "jetSrc", edm::InputTag("ak4PFJetsCHS") );
282  desc.add<edm::InputTag>( "electrons",edm::InputTag("gedGsfElectrons") );
283  desc.add<edm::InputTag>( "muons", edm::InputTag("muons") );
284  desc.add<int>("njets", 0);
285  desc.add<int>("nelectrons", 0);
286  desc.add<double>("ptcut", 20);
287  desc.add<bool>("ispfjettrg", true);
288  desc.add<bool>("iscalojettrg", false);
289 
290  edm::ParameterSetDescription genericTriggerEventPSet;
291  genericTriggerEventPSet.add<bool>("andOr");
292  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
293  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions",{});
294  genericTriggerEventPSet.add<bool>("andOrDcs", false);
295  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
296  genericTriggerEventPSet.add<std::string>("dbLabel","");
297  genericTriggerEventPSet.add<bool>("andOrHlt", true);
298  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
299  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths",{});
300 // genericTriggerEventPSet.add<std::string>("hltDBKey","");
301  genericTriggerEventPSet.add<bool>("errorReplyHlt",false);
302  genericTriggerEventPSet.add<unsigned int>("verbosityLevel",1);
303 
304  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
305  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
306 
309  edm::ParameterSetDescription jetPtThrPSet;
310  fillHistoPSetDescription(jetPSet);
311  fillHistoPSetDescription(jetPtThrPSet);
312  histoPSet.add<edm::ParameterSetDescription>("jetPSet", jetPSet);
313  histoPSet.add<edm::ParameterSetDescription>("jetPtThrPSet", jetPtThrPSet);
314  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.}; // Jet pT Binning
315  histoPSet.add<std::vector<double> >("jetptBinning", bins);
316 
319  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
320 
321  desc.add<edm::ParameterSetDescription>("histoPSet",histoPSet);
322 
323  descriptions.add("jetMonitoring", desc);
324 }
325 
327  bool output = false;
328  if (fabs(eta)<=1.3) output=true;
329  return output;
330 }
331 
332 //------------------------------------------------------------------------//
334  bool output = false;
335  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) ) output=true;
336  return output;
337 }
340  bool output = false;
341  //if ( eta<=3.0 && eta >1.3) output=true;
342  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) ) output=true;
343  return output;
344 }
347  bool output = false;
348  if (fabs(eta)>3.0) output=true;
349  return output;
350 }
352 bool JetMonitor::isHEP17(double eta, double phi){
353  bool output = false;
354  // phi -0.87 to -0.52
355  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) &&
356  phi > -0.87 && phi <= -0.52 ) {output=true;}
357  return output;
358 }
360 bool JetMonitor::isHEM17(double eta, double phi){
361  bool output = false;
362  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta < 0) &&
363  phi > -0.87 && phi <= -0.52 ) {output=true;}
364  return output;
365 }
367 bool JetMonitor::isHEP18(double eta, double phi){
368  bool output = false;
369  // phi -0.87 to -0.52
370  if (fabs(eta) <= 3.0 && fabs(eta) > 1.3 && (eta > 0) &&
371  phi > -0.52 && phi <= -0.17 ) {output=true;}
372  return output;
373 
374 }
375 /*void JetMonitor::AutoNullPtr(JetME* a_me,const int len_){
376  for (int i =0; i < len_; ++i)
377  {
378  a_me[i].denominator = nullptr;
379  a_me[i].numerator = nullptr;
380  }
381 }*/
382 void JetMonitor::FillME(JetME* a_me,double pt_, double phi_, double eta_, int ls_,const std::string& denu){
383  std::string isDeno = "";
384  isDeno = denu;
385  std::string DenoOrNume = "";
386  DenoOrNume = denu;
387 
388  if (DenoOrNume == "denominator")
389  {
390  // index 0 = pt, 1 = ptThreshold , 2 = pt vs ls , 3 = phi, 4 = eta,
391  // 5 = eta vs phi, 6 = eta vs pt , 7 = abs(eta) , 8 = abs(eta) vs phi
392  a_me[0].denominator->Fill(pt_);// pt
393  a_me[1].denominator->Fill(pt_);// jetpT Threshold binning for pt
394  a_me[2].denominator->Fill(ls_,pt_);// pt vs ls
395  a_me[3].denominator->Fill(phi_);// phi
396  a_me[4].denominator->Fill(eta_);// eta
397  a_me[5].denominator->Fill(eta_,phi_);// eta vs phi
398  a_me[6].denominator->Fill(eta_,pt_);// eta vs pT
399  }
400  else if (DenoOrNume == "numerator")
401  {
402  a_me[0].numerator->Fill(pt_);// pt
403  a_me[1].numerator->Fill(pt_);// jetpT Threshold binning for pt
404  a_me[2].numerator->Fill(ls_,pt_);// pt vs ls
405  a_me[3].numerator->Fill(phi_);// phi
406  a_me[4].numerator->Fill(eta_);// eat
407  a_me[5].numerator->Fill(eta_,phi_);// eta vs phi
408  a_me[6].numerator->Fill(eta_,pt_);// eta vs pT
409  }
410  else {
411  edm::LogWarning("JetMonitor") << "CHECK OUT denu option in FillME !!! DenoOrNume ? : " << DenoOrNume << std::endl;
412  }
413 }
414 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 ){
415  std::string hName = h_Name;
416  std::string hTitle = h_Title;
417  std::string hSubN ="";
418  std::string hSubT ="";
419  hSubT = std::move(h_suOptTitle);
420 
421  int nbin_phi = jet_phi_binning_.nbins;
422  double maxbin_phi = jet_phi_binning_.xmax;
423  double minbin_phi = jet_phi_binning_.xmin;
424 
425  int nbin_eta = jet_eta_binning_.nbins;
426  double maxbin_eta = jet_eta_binning_.xmax;
427  double minbin_eta = jet_eta_binning_.xmin;
428 
429  if (h_subOptName != ""){
430  hSubN = "_"+h_subOptName;
431  }
432 
433  if (h_subOptName == "HEP17") {
434  nbin_phi = phi_binning_hep17_.nbins;
435  maxbin_phi = phi_binning_hep17_.xmax;
436  minbin_phi = phi_binning_hep17_.xmin;
437 
438  nbin_eta = eta_binning_hep17_.nbins;
439  maxbin_eta = eta_binning_hep17_.xmax;
440  minbin_eta = eta_binning_hep17_.xmin;
441 
442  }
443  if (h_subOptName == "HEM17") {
444  nbin_phi = phi_binning_hep17_.nbins;
445  maxbin_phi = phi_binning_hep17_.xmax;
446  minbin_phi = phi_binning_hep17_.xmin;
447 
448  nbin_eta = eta_binning_hem17_.nbins;
449  maxbin_eta = eta_binning_hem17_.xmax;
450  minbin_eta = eta_binning_hem17_.xmin;
451 
452  }
453  if (h_subOptName == "HEP18") {
454  nbin_phi = phi_binning_hep18_.nbins;
455  maxbin_phi = phi_binning_hep18_.xmax;
456  minbin_phi = phi_binning_hep18_.xmin;
457 
458  nbin_eta = eta_binning_hep17_.nbins;
459  maxbin_eta = eta_binning_hep17_.xmax;
460  minbin_eta = eta_binning_hep17_.xmin;
461 
462  }
463  hName = h_Name+"pT"+hSubN;
464  hTitle = h_Title+" pT " + hSubT;
465  bookME(Ibooker,a_me[0],hName,hTitle,jetpT_binning.nbins,jetpT_binning.xmin, jetpT_binning.xmax);
466  setMETitle(a_me[0], h_Title +" pT [GeV]","events / [GeV]");
467 
468  hName = h_Name+ "pT_pTThresh" + hSubN;
469  hTitle = h_Title+" pT " + hSubT;
471  setMETitle(a_me[1],h_Title + "pT [GeV]","events / [GeV]");
472 
473  hName = h_Name + "pTVsLS" + hSubN;
474  hTitle = h_Title+" vs LS " + hSubT;
476  setMETitle(a_me[2],"LS",h_Title + "pT [GeV]");
477 
478  hName = h_Name + "phi" + hSubN;
479  hTitle = h_Title+" phi " + hSubT;
480  bookME(Ibooker,a_me[3],hName,hTitle, nbin_phi, minbin_phi,maxbin_phi );
481  setMETitle(a_me[3],h_Title +" #phi","events / 0.1 rad");
482 
483  hName = h_Name + "eta"+ hSubN;
484  hTitle = h_Title+" eta " + hSubT;
485  bookME(Ibooker,a_me[4],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta);
486  setMETitle(a_me[4],h_Title + " #eta","events / #eta");
487 
488  hName = h_Name + "EtaVsPhi"+hSubN;
489  hTitle = h_Title+" eta Vs phi " + hSubT;
490  bookME(Ibooker,a_me[5],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta, nbin_phi, minbin_phi, maxbin_phi);
491  setMETitle(a_me[5],h_Title + " #eta","#phi");
492 
493  hName = h_Name + "EtaVspT"+hSubN;
494  hTitle = h_Title+" eta Vs pT " + hSubT;
495  bookME(Ibooker,a_me[6],hName,hTitle, nbin_eta, minbin_eta, maxbin_eta, jetpT_binning.nbins,jetpT_binning.xmin, jetpT_binning.xmax);
496  setMETitle(a_me[6],h_Title + " #eta","Leading Jet pT [GeV]");
497 
498 }
499 // Define this as a plug-in
T getParameter(std::string const &) const
JetME jetHEM17_AbsEtaVsPhi_
Definition: JetMonitor.h:126
bool isBarrel(double eta)
Definition: JetMonitor.cc:326
JetME a_ME_HB[7]
Definition: JetMonitor.h:116
bool isHEP17(double eta, double phi)
For Hcal HEP17 Area.
Definition: JetMonitor.cc:352
JetME a_ME_HE_m[7]
Definition: JetMonitor.h:120
JetME jetHEP17_AbsEta_
Definition: JetMonitor.h:128
MEbinning eta_binning_hem17_
Definition: JetMonitor.h:180
JetME a_ME_HEM17[7]
Definition: JetMonitor.h:121
MEbinning phi_binning_hep17_
Definition: JetMonitor.h:161
MEbinning ls_binning_
Definition: JetMonitor.h:112
JetMonitor(const edm::ParameterSet &)
Definition: JetMonitor.cc:17
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: JetMonitor.cc:38
JetME jetHEP17_AbsEtaVsPhi_
Definition: JetMonitor.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:268
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::string folderName_
Definition: JetMonitor.h:98
JetME a_ME_HE_p[7]
Definition: JetMonitor.h:119
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)
Definition: JetMonitor.cc:63
JetME a_ME_HEP18[7]
Definition: JetMonitor.h:123
bool isCaloJetTrig
Definition: JetMonitor.h:138
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
void Fill(long long x)
MEbinning jetpT_binning
Definition: JetMonitor.h:110
MEbinning eta_binning_hep17_
Definition: JetMonitor.h:176
MEbinning phi_binning_hep18_
Definition: JetMonitor.h:169
int iEvent
Definition: GenABIO.cc:230
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: JetMonitor.cc:273
MEbinning jet_phi_binning_
Definition: JetMonitor.h:147
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:133
bool isEndCapM(double eta)
Definition: JetMonitor.cc:333
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
Definition: JetMonitor.cc:151
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::vector< double > jetpT_variable_binning_
Definition: JetMonitor.h:109
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
JetME a_ME_HF[7]
Definition: JetMonitor.h:118
JetME a_ME_HEP17[7]
Definition: JetMonitor.h:122
T min(T a, T b)
Definition: MathUtil.h:58
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isValid() const
Definition: HandleBase.h:74
bool isHEM17(double eta, double phi)
For Hcal HEM17 Area.
Definition: JetMonitor.cc:360
MEbinning jetptThr_binning_
Definition: JetMonitor.h:111
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: JetMonitor.cc:99
JetME jetHEM17_AbsEta_
Definition: JetMonitor.h:129
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.h:107
def ls(path, rec=False)
Definition: eostools.py:348
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void FillME(JetME *a_me, double pt_, double phi_, double eta_, int ls_, const std::string &denu)
Definition: JetMonitor.cc:382
JetME a_ME_HE[7]
Definition: JetMonitor.h:117
std::vector< double > v_jetpt
Definition: JetMonitor.h:140
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:132
edm::EventID id() const
Definition: EventBase.h:60
HLT enums.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
bool isPFJetTrig
Definition: JetMonitor.h:137
JetME a_ME[7]
Definition: JetMonitor.h:115
~JetMonitor() override
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:261
std::vector< double > v_jeteta
Definition: JetMonitor.h:141
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)
Definition: JetMonitor.cc:414
MonitorElement * denominator
Definition: JetMonitor.h:60
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.
Definition: JetMonitor.cc:346
std::vector< double > v_jetphi
Definition: JetMonitor.h:142
def move(src, dest)
Definition: eostools.py:510
MEbinning jet_eta_binning_
Definition: JetMonitor.h:153
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
Definition: JetMonitor.cc:47
Definition: Run.h:42
void setMETitle(JetME &me, const std::string &titleX, const std::string &titleY)
Definition: JetMonitor.cc:56
MonitorElement * numerator
Definition: JetMonitor.h:59
bool isHEP18(double eta, double phi)
For Hcal HEP18 Area.
Definition: JetMonitor.cc:367
bool isEndCapP(double eta)
For Hcal Endcap Plus Area.
Definition: JetMonitor.cc:339
unsigned int nbins
Definition: JetMonitor.h:53
double ptcut_
Definition: JetMonitor.h:136