CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DiJetVarAnalyzer.cc
Go to the documentation of this file.
2 
11 
13 
17 
18 #include <cmath>
19 
20 // A simple constructor which takes as inoput only the name of the PF jet collection
23  jetCollectionTag_ (conf.getUntrackedParameter<edm::InputTag>("jetCollectionTag")),
24  widejetsCollectionTag_ (conf.getUntrackedParameter<edm::InputTag>("widejetsCollectionTag")),
25  metCollectionTag_ (conf.getUntrackedParameter<edm::InputTag>("metCollectionTag")),
26  metCleanCollectionTag_ (conf.getUntrackedParameter<edm::InputTag>("metCleanCollectionTag")),
27  numwidejets_ (conf.getParameter<unsigned int>("numwidejets")),
28  etawidejets_ (conf.getParameter<double>("etawidejets")),
29  ptwidejets_ (conf.getParameter<double>("ptwidejets")),
30  detawidejets_ (conf.getParameter<double>("detawidejets")),
31  dphiwidejets_ (conf.getParameter<double>("dphiwidejets")),
32  maxEMfraction_ (conf.getParameter<double>("maxEMfraction")),
33  maxHADfraction_ (conf.getParameter<double>("maxHADfraction")),
34  HLTpathMain_ (triggerExpression::parse( conf.getParameter<std::string>("HLTpathMain") )),
35  HLTpathMonitor_ (triggerExpression::parse( conf.getParameter<std::string>("HLTpathMonitor") )),
36  triggerConfiguration_ (conf.getParameterSet("triggerConfiguration"),consumesCollector()) {
37  //set Token(-s)
38  jetCollectionTagToken_ = consumes<reco::CaloJetCollection>(conf.getUntrackedParameter<edm::InputTag>("jetCollectionTag"));
39  widejetsCollectionTagToken_ = consumes<std::vector<math::PtEtaPhiMLorentzVector> >(conf.getUntrackedParameter<edm::InputTag>("widejetsCollectionTag"));
40  metCollectionTagToken_ = consumes<reco::CaloMETCollection>(conf.getUntrackedParameter<edm::InputTag>("metCollectionTag"));
41  metCleanCollectionTagToken_ = consumes<reco::CaloMETCollection>(conf.getUntrackedParameter<edm::InputTag>("metCleanCollectionTag"));
42 }
43 
45 
46 // Function to book the Monitoring Elements.
49  // ==> TO BE UPDATED FOR sqrt(s)=8 TeV
50  const int N_mass_bins=83;
51  float massBins[N_mass_bins+1] = {1, 3, 6, 10, 16, 23, 31, 40, 50, 61, 74, 88, 103, 119, 137, 156, 176, 197, 220, 244, 270, 296, 325, 354, 386, 419, 453, 489, 526, 565, 606, 649, 693, 740, 788, 838, 890, 944, 1000, 1058, 1118, 1181, 1246, 1313, 1383, 1455, 1530, 1607, 1687, 1770, 1856, 1945, 2037, 2132, 2231, 2332, 2438, 2546, 2659, 2775, 2895, 3019, 3147, 3279, 3416, 3558, 3704, 3854, 4010, 4171, 4337, 4509, 4686, 4869, 5058, 5253, 5455, 5663, 5877, 6099, 6328, 6564, 6808, 7000};
52 
53  // 1D histograms
55  iBooker,
56  "h1_cutFlow",
57  "Cut Flow",
58  7,0.,7.,
59  "Cut",
60  "Number of events"
61  );
62  m_cutFlow->getTH1()->GetXaxis()->SetBinLabel(1,"No cut");
63  m_cutFlow->getTH1()->GetXaxis()->SetBinLabel(2,"N(WideJets)>=2");
64  m_cutFlow->getTH1()->GetXaxis()->SetBinLabel(3,"|#eta|<2.5 , pT>30");
65  m_cutFlow->getTH1()->GetXaxis()->SetBinLabel(4,"|#Delta#eta|<1.3");
66  m_cutFlow->getTH1()->GetXaxis()->SetBinLabel(5,"JetID");
67  m_cutFlow->getTH1()->GetXaxis()->SetBinLabel(6,"|#Delta#phi|>#pi/3");
68  m_cutFlow->getTH1()->GetXaxis()->SetBinLabel(7,"|met-metClean|>0.1");
69 
71  iBooker,
72  "h1_MjjWide_finalSel",
73  "M_{jj} WideJets (final selection)",
74  8000,0.,8000.,
75  "M_{jj} WideJets [GeV]",
76  "Number of events"
77  );
78 
80  iBooker,
81  "h1_MjjWide_finalSel_varbin",
82  "M_{jj} WideJets (final selection)",
83  N_mass_bins, massBins,
84  "M_{jj} WideJets [GeV]",
85  "Number of events"
86  );
87 
89  iBooker,
90  "h1_MjjWide_finalSel_WithoutNoiseFilter",
91  "M_{jj} WideJets (final selection, without noise filters)",
92  8000,0.,8000.,
93  "M_{jj} WideJets [GeV]",
94  "Number of events"
95  );
96 
98  iBooker,
99  "h1_MjjWide_finalSel_WithoutNoiseFilter_varbin",
100  "M_{jj} WideJets (final selection, without noise filters)",
101  N_mass_bins, massBins,
102  "M_{jj} WideJets [GeV]",
103  "Number of events"
104  );
105 
107  iBooker,
108  "h1_MjjWide_deta_0p0_0p5",
109  "M_{jj} WideJets (0.0<=#Delta#eta<0.5)",
110  8000,0.,8000.,
111  "M_{jj} WideJets [GeV]",
112  "Number of events"
113  );
114 
116  iBooker,
117  "h1_MjjWide_deta_0p5_1p0",
118  "M_{jj} WideJets (0.5<=#Delta#eta<1.0)",
119  8000,0.,8000.,
120  "M_{jj} WideJets [GeV]",
121  "Number of events"
122  );
123 
125  iBooker,
126  "h1_MjjWide_deta_1p0_1p5",
127  "M_{jj} WideJets (1.0<=#Delta#eta<1.5)",
128  8000,0.,8000.,
129  "M_{jj} WideJets [GeV]",
130  "Number of events"
131  );
132 
134  iBooker,
135  "h1_MjjWide_deta_1p5_2p0",
136  "M_{jj} WideJets (1.5<=#Delta#eta<2.0)",
137  8000,0.,8000.,
138  "M_{jj} WideJets [GeV]",
139  "Number of events"
140  );
141 
143  iBooker,
144  "h1_MjjWide_deta_2p0_2p5",
145  "M_{jj} WideJets (2.0<=#Delta#eta<2.5)",
146  8000,0.,8000.,
147  "M_{jj} WideJets [GeV]",
148  "Number of events"
149  );
150 
152  iBooker,
153  "h1_MjjWide_deta_2p5_3p0",
154  "M_{jj} WideJets (2.5<=#Delta#eta<3.0)",
155  8000,0.,8000.,
156  "M_{jj} WideJets [GeV]",
157  "Number of events"
158  );
159 
161  iBooker,
162  "h1_MjjWide_deta_3p0_inf",
163  "M_{jj} WideJets (#Delta#eta>=3.0)",
164  8000,0.,8000.,
165  "M_{jj} WideJets [GeV]",
166  "Number of events"
167  );
168 
170  iBooker,
171  "h1_MjjWide_den_NOdeta",
172  "HLT Efficiency Studies (no deta cut)",
173  400,0.,2000.,
174  "M_{jj} WideJets [GeV]",
175  "Number of events"
176  );
177 
179  iBooker,
180  "h1_MjjWide_num_NOdeta",
181  "HLT Efficiency Studies (no deta cut)",
182  400,0.,2000.,
183  "M_{jj} WideJets [GeV]",
184  "Number of events"
185  );
186 
188  iBooker,
189  "h1_MjjWide_den_detaL4",
190  "HLT Efficiency Studies (deta cut < 4.0)",
191  400,0.,2000.,
192  "M_{jj} WideJets [GeV]",
193  "Number of events"
194  );
195 
197  iBooker,
198  "h1_MjjWide_num_detaL4",
199  "HLT Efficiency Studies (deta cut < 4.0)",
200  400,0.,2000.,
201  "M_{jj} WideJets [GeV]",
202  "Number of events"
203  );
204 
206  iBooker,
207  "h1_MjjWide_den_detaL3",
208  "HLT Efficiency Studies (deta cut < 3.0)",
209  400,0.,2000.,
210  "M_{jj} WideJets [GeV]",
211  "Number of events"
212  );
213 
215  iBooker,
216  "h1_MjjWide_num_detaL3",
217  "HLT Efficiency Studies (deta cut < 3.0)",
218  400,0.,2000.,
219  "M_{jj} WideJets [GeV]",
220  "Number of events"
221  );
222 
224  iBooker,
225  "h1_MjjWide_den_detaL2",
226  "HLT Efficiency Studies (deta cut < 2.0)",
227  400,0.,2000.,
228  "M_{jj} WideJets [GeV]",
229  "Number of events"
230  );
231 
233  iBooker,
234  "h1_MjjWide_num_detaL2",
235  "HLT Efficiency Studies (deta cut < 2.0)",
236  400,0.,2000.,
237  "M_{jj} WideJets [GeV]",
238  "Number of events"
239  );
240 
242  iBooker,
243  "h1_MjjWide_den",
244  "HLT Efficiency Studies (default deta cut)",
245  400,0.,2000.,
246  "M_{jj} WideJets [GeV]",
247  "Number of events"
248  );
249 
251  iBooker,
252  "h1_MjjWide_num",
253  "HLT Efficiency Studies (default deta cut)",
254  400,0.,2000.,
255  "M_{jj} WideJets [GeV]",
256  "Number of events"
257  );
258 
260  iBooker,
261  "h1_DetajjWide_finalSel",
262  "#Delta#eta_{jj} WideJets (final selection)",
263  100,0.,5.,
264  "#Delta#eta_{jj} WideJets",
265  "Number of events"
266  );
267 
269  iBooker,
270  "h1_DetajjWide",
271  "#Delta#eta_{jj} WideJets (final selection except #Delta#eta cut)",
272  100,0.,5.,
273  "#Delta#eta_{jj} WideJets",
274  "Number of events"
275  );
276 
278  iBooker,
279  "h1_DphijjWide_finalSel",
280  "#Delta#phi_{jj} WideJets (final selection)",
281  100,0.,TMath::Pi()+0.0001,
282  "#Delta#phi_{jj} WideJets [rad.]",
283  "Number of events"
284  );
285 
286 
288  iBooker,
289  "h1_selJets_pt",
290  "Selected CaloJets",
291  500,0.,5000.,
292  "Jet Pt [GeV]",
293  "Number of events"
294  );
295 
297  iBooker,
298  "h1_selJets_eta",
299  "Selected CaloJets",
300  100,-5.,5.,
301  "#eta",
302  "Number of events"
303  );
304 
306  iBooker,
307  "h1_selJets_phi",
308  "Selected CaloJets",
309  100,-TMath::Pi(),TMath::Pi(),
310  "#phi (rad.)",
311  "Number of events"
312  );
313 
315  iBooker,
316  "h1_selJets_hadEnergyFraction",
317  "Selected CaloJets",
318  110,0.,1.1,
319  "HAD Energy Fraction",
320  "Number of events"
321  );
322 
324  iBooker,
325  "h1_selJets_emEnergyFraction",
326  "Selected CaloJets",
327  110,0.,1.1,
328  "EM Energy Fraction",
329  "Number of events"
330  );
331 
333  iBooker,
334  "h1_selJets_towersArea",
335  "Selected CaloJets",
336  200,0.,2.,
337  "towers area",
338  "Number of events"
339  );
340 
342  iBooker,
343  "h1_metDiff",
344  "Met - MetCleaned",
345  500,-1000.,1000.,
346  "met - metcleaned [GeV]",
347  "Number of events"
348  );
349 
351  iBooker,
352  "h1_metCases",
353  "Met cases",
354  3,0.,3.,
355  "case",
356  "Number of events"
357  );
358  m_metCases->getTH1()->GetXaxis()->SetBinLabel(1,"met , metclean");
359  m_metCases->getTH1()->GetXaxis()->SetBinLabel(2,"met , !metclean");
360  m_metCases->getTH1()->GetXaxis()->SetBinLabel(3,"!met , metclean");
361 
363  iBooker,
364  "h1_metCaseNoMetClean",
365  "Met - MetCleaned",
366  1000,0.,2000.,
367  "MET [GeV]",
368  "Number of events"
369  );
370 
372  iBooker,
373  "h1_HT_inclusive",
374  "HT (inclusive)",
375  150,0.,15000.,
376  "HT [GeV]",
377  "Number of events"
378  );
379 
381  iBooker,
382  "h1_HT_finalSel",
383  "HT (final selection)",
384  150,0.,15000.,
385  "HT [GeV]",
386  "Number of events"
387  );
388 
389  // 2D histograms
391  iBooker,
392  "h2_DetajjVsMjjWide",
393  "#Delta#eta_{jj} vs M_{jj} WideJets",
394  8000,0.,8000.,
395  100,0.,5.,
396  "M_{jj} WideJets [GeV]",
397  "#Delta#eta_{jj} WideJets");
398 
400  iBooker,
401  "h2_DetajjVsMjjWide_rebin",
402  "#Delta#eta_{jj} vs M_{jj} WideJets",
403  400,0.,8000.,
404  50,0.,5.,
405  "M_{jj} WideJets [GeV]",
406  "#Delta#eta_{jj} WideJets");
407 
409  iBooker,
410  "h2_metVSmetclean",
411  "MET clean vs MET",
412  100,0.,2000.,
413  100,0.,2000.,
414  "MET [GeV]",
415  "MET clean [GeV]");
416 }
417 
418 // Usual analyze method
420  using namespace std;
421  using namespace edm;
422  using namespace reco;
423 
424  // ## Get jet collection
425  edm::Handle<reco::CaloJetCollection> calojets_handle;
426  iEvent.getByToken(jetCollectionTagToken_,calojets_handle);
427 
428  // Loop over all the selected jets ( defined at DQM/DataScouting/python/dijetScouting_cff.py )
429  double thisHT = 0.;
430  for(reco::CaloJetCollection::const_iterator it = calojets_handle->begin(); it != calojets_handle->end(); ++it)
431  {
432  //cout << "== jet: " << it->pt() << " " << it->eta() << " " << it->phi() << endl;
433  m_selJets_pt->Fill( it->pt() );
434  m_selJets_eta->Fill( it->eta() );
435  m_selJets_phi->Fill( it->phi() );
436  m_selJets_hadEnergyFraction->Fill( it->energyFractionHadronic() );
437  m_selJets_emEnergyFraction->Fill( it->emEnergyFraction() );
438  m_selJets_towersArea->Fill( it->towersArea() );
439  thisHT += it->pt();
440  }
441 
442  // HT
443  m_HT_inclusive->Fill(thisHT);
444 
445  // ## Get widejets
447  iEvent.getByToken(widejetsCollectionTagToken_, widejets_handle);
448 
449  TLorentzVector wj1;
450  TLorentzVector wj2;
451  TLorentzVector wdijet;
452 
453  double MJJWide = -1;
454  double DeltaEtaJJWide = -1;
455  double DeltaPhiJJWide = -1;
456 
457  if( widejets_handle->size() >= 2 ) {
458  wj1.SetPtEtaPhiM(widejets_handle->at(0).pt(),
459  widejets_handle->at(0).eta(),
460  widejets_handle->at(0).phi(),
461  widejets_handle->at(0).mass()
462  );
463  wj2.SetPtEtaPhiM(widejets_handle->at(1).pt(),
464  widejets_handle->at(1).eta(),
465  widejets_handle->at(1).phi(),
466  widejets_handle->at(1).mass()
467  );
468  wdijet = wj1 + wj2;
469  MJJWide = wdijet.M();
470  DeltaEtaJJWide = fabs(wj1.Eta()-wj2.Eta());
471  DeltaPhiJJWide = fabs(wj1.DeltaPhi(wj2));
472  }
473 
474  // ## Get met collection
475  // met
477  iEvent.getByToken(metCollectionTagToken_, calomet_handle);
478  // met cleaned
479  edm::Handle<reco::CaloMETCollection> calometClean_handle;
480  iEvent.getByToken(metCleanCollectionTagToken_, calometClean_handle);
481 
482  if( calomet_handle.isValid() && calometClean_handle.isValid() ) {
483  // std::cout << "---" << std::endl;
484  // std::cout << "== calomet: " << (calomet_handle->front()).pt() << " " << (calomet_handle->front()).phi() << std::endl;
485  // std::cout << "== calometClean: " << (calometClean_handle->front()).pt() << " " << (calometClean_handle->front()).phi() << std::endl;
486  // std::cout << "== calomet - calometClean: " << (calomet_handle->front()).pt() - (calometClean_handle->front()).pt() << std::endl;
487  // std::cout << "---" << std::endl;
488  m_metCases->Fill(0);
489  m_metDiff->Fill( (calomet_handle->front()).pt() - (calometClean_handle->front()).pt() );
490  m_metVSmetclean->Fill( (calomet_handle->front()).pt() , (calometClean_handle->front()).pt() );
491  }
492  else if( calomet_handle.isValid() && !calometClean_handle.isValid() )
493  {
494  m_metCases->Fill(1);
495  m_metCaseNoMetClean->Fill((calomet_handle->front()).pt());
496  }
497  else if( !calomet_handle.isValid() && calometClean_handle.isValid() )
498  {
499  m_metCases->Fill(2);
500  }
501 
502  // ## Event Selection
503  bool pass_nocut=false;
504  bool pass_twowidejets=false;
505  bool pass_etaptcuts=false;
506  bool pass_deta=false;
507  bool pass_JetIDtwojets=true;
508  bool pass_dphi=false;
509  bool pass_metFilter=true;
510  //--
511  bool pass_deta_L4=false;
512  bool pass_deta_L3=false;
513  bool pass_deta_L2=false;
514 
515  bool pass_fullsel_NOdeta=false;
516  bool pass_fullsel_detaL4=false;
517  bool pass_fullsel_detaL3=false;
518  bool pass_fullsel_detaL2=false;
519  bool pass_fullsel=false;
520 
521  // No cut
522  pass_nocut=true;
523 
524  // Two wide jets
525  if( widejets_handle->size() >= numwidejets_ ) {
526  // Two wide jets
527  pass_twowidejets=true;
528 
529  // Eta/pt cuts
530  if( fabs(wj1.Eta())<etawidejets_ && wj1.Pt()>ptwidejets_
531  &&
532  fabs(wj2.Eta())<etawidejets_ && wj2.Pt()>ptwidejets_
533  ) {
534  pass_etaptcuts=true;
535  }
536 
537  // Deta cut
538  if( DeltaEtaJJWide < detawidejets_ )
539  pass_deta=true;
540 
541  // Dphi cut
542  if( DeltaPhiJJWide > dphiwidejets_ )
543  pass_dphi=true;
544 
545  // Other Deta cuts
546  if( DeltaEtaJJWide < 4.0 )
547  pass_deta_L4=true;
548 
549  if( DeltaEtaJJWide < 3.0 )
550  pass_deta_L3=true;
551 
552  if( DeltaEtaJJWide < 2.0 )
553  pass_deta_L2=true;
554  }
555  // Jet id two leading jets
556  if( calojets_handle->size() >= numwidejets_ )
557  {
558  // first jet
559  reco::CaloJetCollection::const_iterator thisJet = calojets_handle->begin();
560  //cout << "== thisJet1: " << thisJet->pt() << " " << thisJet->eta() << " " << thisJet->phi() << endl;
561  if( thisJet->energyFractionHadronic()>maxHADfraction_ || thisJet->emEnergyFraction()>maxEMfraction_ )
562  pass_JetIDtwojets=false;
563 
564  // second jet
565  ++thisJet;
566  //cout << "== thisJet2: " << thisJet->pt() << " " << thisJet->eta() << " " << thisJet->phi() << endl;
567  if( thisJet->energyFractionHadronic()>maxHADfraction_ || thisJet->emEnergyFraction()>maxEMfraction_ )
568  pass_JetIDtwojets=false;
569  }
570  // Met filter
571  if( calomet_handle.isValid() && calometClean_handle.isValid() )
572  {
573  if( fabs ( (calomet_handle->front()).pt() - (calometClean_handle->front()).pt() ) > 0.1 )
574  pass_metFilter=false;
575  }
576  // Full selection (no deta cut)
577  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_JetIDtwojets && pass_dphi && pass_metFilter )
578  pass_fullsel_NOdeta=true;
579  // Full selection (various deta cuts)
580  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_JetIDtwojets && pass_dphi && pass_metFilter && pass_deta_L4 )
581  pass_fullsel_detaL4=true;
582  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_JetIDtwojets && pass_dphi && pass_metFilter && pass_deta_L3 )
583  pass_fullsel_detaL3=true;
584  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_JetIDtwojets && pass_dphi && pass_metFilter && pass_deta_L2 )
585  pass_fullsel_detaL2=true;
586  // Full selection (default deta cut)
587  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_deta && pass_JetIDtwojets && pass_dphi && pass_metFilter )
588  pass_fullsel=true;
589 
590  // ## Fill Histograms
591  // Cut-flow plot
592  if( pass_nocut )
593  m_cutFlow->Fill(0);
594  if( pass_nocut && pass_twowidejets )
595  m_cutFlow->Fill(1);
596  if( pass_nocut && pass_twowidejets && pass_etaptcuts )
597  m_cutFlow->Fill(2);
598  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_deta )
599  m_cutFlow->Fill(3);
600  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_deta && pass_JetIDtwojets )
601  m_cutFlow->Fill(4);
602  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_deta && pass_JetIDtwojets && pass_dphi )
603  m_cutFlow->Fill(5);
604  if( pass_fullsel )
605  m_cutFlow->Fill(6);
606 
607  // After full selection
608  if( pass_fullsel )
609  {
610  // 1D histograms
611  m_MjjWide_finalSel->Fill(MJJWide);
613  m_DetajjWide_finalSel->Fill(DeltaEtaJJWide);
614  m_DphijjWide_finalSel->Fill(DeltaPhiJJWide);
615  m_HT_finalSel->Fill(thisHT);
616  }
617  // After full selection (without "noise" filters)
618  if( pass_nocut && pass_twowidejets && pass_etaptcuts && pass_deta )
619  {
622  }
623  // After full selection (except DeltaEta cut)
624  if( pass_fullsel_NOdeta )
625  {
626  // 1D histograms
627  m_DetajjWide->Fill(DeltaEtaJJWide);
628  if( DeltaEtaJJWide >= 0.0 && DeltaEtaJJWide < 0.5 )
629  m_MjjWide_deta_0p0_0p5->Fill(MJJWide);
630  if( DeltaEtaJJWide >= 0.5 && DeltaEtaJJWide < 1.0 )
631  m_MjjWide_deta_0p5_1p0->Fill(MJJWide);
632  if( DeltaEtaJJWide >= 1.0 && DeltaEtaJJWide < 1.5 )
633  m_MjjWide_deta_1p0_1p5->Fill(MJJWide);
634  if( DeltaEtaJJWide >= 1.5 && DeltaEtaJJWide < 2.0 )
635  m_MjjWide_deta_1p5_2p0->Fill(MJJWide);
636  if( DeltaEtaJJWide >= 2.0 && DeltaEtaJJWide < 2.5 )
637  m_MjjWide_deta_2p0_2p5->Fill(MJJWide);
638  if( DeltaEtaJJWide >= 2.5 && DeltaEtaJJWide < 3.0 )
639  m_MjjWide_deta_2p5_3p0->Fill(MJJWide);
640  if( DeltaEtaJJWide >= 3.0 )
641  m_MjjWide_deta_3p0_inf->Fill(MJJWide);
642 
643  // 2D histograms
644  m_DetajjVsMjjWide->Fill(MJJWide,DeltaEtaJJWide);
645  m_DetajjVsMjjWide_rebin->Fill(MJJWide,DeltaEtaJJWide);
646  }
647 
648  // ## Get Trigger Info
649 
650  // HLT paths for DataScouting
651  // DST_HT250_v1
652  // DST_L1HTT_Or_L1MultiJet_v1
653  // DST_Mu5_HT250_v1
654  // DST_Ele8_CaloIdL_CaloIsoVL_TrkIdVL_TrkIsoVL_HT250_v1
655  int HLTpathMain_fired = -1;
656  int HLTpathMonitor_fired = -1;
658  // invalid HLT configuration, skip the processing
659 
660  // if the L1 or HLT configurations have changed, (re)initialize the filters (including during the first event)
664 
665  // log the expanded configuration
666  // std::cout << "HLT selector configurations updated" << std::endl;
667  // std::cout << "HLTpathMain: " << *HLTpathMain_ << std::endl;
668  // std::cout << "HLTpathMonitor: " << *HLTpathMonitor_ << std::endl;
669  }
670 
671  HLTpathMain_fired = (*HLTpathMain_)(triggerConfiguration_);
672  HLTpathMonitor_fired = (*HLTpathMonitor_)(triggerConfiguration_);
673 
674  // The OR of the two should always be "1"
675  // std::cout << *HLTpathMain_ << ": " << HLTpathMain_fired << " -- " << *HLTpathMonitor_ << ": " << HLTpathMonitor_fired << std::endl;
676  }
677 
678  // ## Trigger Efficiency Curves
679 
680  //denominator - full sel NO deta cut
681  if( pass_fullsel_NOdeta && HLTpathMonitor_fired == 1 )
682  {
683  m_MjjWide_den_NOdeta->Fill(MJJWide);
684 
685  //numerator
686  if( HLTpathMain_fired == 1)
687  {
688  m_MjjWide_num_NOdeta->Fill(MJJWide);
689  }
690  }
691 
692  //denominator - full sel deta < 4.0
693  if( pass_fullsel_detaL4 && HLTpathMonitor_fired == 1 )
694  {
695  m_MjjWide_den_detaL4->Fill(MJJWide);
696 
697  //numerator
698  if( HLTpathMain_fired == 1)
699  {
700  m_MjjWide_num_detaL4->Fill(MJJWide);
701  }
702  }
703 
704  //denominator - full sel deta < 3.0
705  if( pass_fullsel_detaL3 && HLTpathMonitor_fired == 1 )
706  {
707  m_MjjWide_den_detaL3->Fill(MJJWide);
708 
709  //numerator
710  if( HLTpathMain_fired == 1)
711  {
712  m_MjjWide_num_detaL3->Fill(MJJWide);
713  }
714  }
715 
716  //denominator - full sel deta < 2.0
717  if( pass_fullsel_detaL2 && HLTpathMonitor_fired == 1 )
718  {
719  m_MjjWide_den_detaL2->Fill(MJJWide);
720 
721  //numerator
722  if( HLTpathMain_fired == 1)
723  {
724  m_MjjWide_num_detaL2->Fill(MJJWide);
725  }
726  }
727 
728  //denominator - full sel default deta cut (typically 1.3)
729  if( pass_fullsel && HLTpathMonitor_fired == 1 )
730  {
731  m_MjjWide_den->Fill(MJJWide);
732 
733  //numerator
734  if( HLTpathMain_fired == 1)
735  {
736  m_MjjWide_num->Fill(MJJWide);
737  }
738  }
739 }
MonitorElement * m_HT_finalSel
const double Pi
MonitorElement * m_MjjWide_num_NOdeta
T getUntrackedParameter(std::string const &, T const &) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * m_MjjWide_num_detaL4
MonitorElement * m_MjjWide_den_detaL3
MonitorElement * m_HT_inclusive
MonitorElement * m_MjjWide_den_NOdeta
MonitorElement * m_MjjWide_num_detaL2
unsigned int numwidejets_
Evaluator * parse(const T &text)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
MonitorElement * m_selJets_towersArea
void prepareBooking(DQMStore::IBooker &)
MonitorElement * m_metCaseNoMetClean
edm::EDGetTokenT< reco::CaloJetCollection > jetCollectionTagToken_
ParameterSet const & getParameterSet(ParameterSetID const &id)
MonitorElement * m_MjjWide_deta_0p0_0p5
triggerExpression::Evaluator * HLTpathMonitor_
triggerExpression::Data triggerConfiguration_
MonitorElement * m_metDiff
MonitorElement * m_MjjWide_num_detaL3
MonitorElement * m_MjjWide_deta_3p0_inf
MonitorElement * m_MjjWide_deta_1p0_1p5
MonitorElement * m_selJets_emEnergyFraction
DiJetVarAnalyzer(const edm::ParameterSet &)
MonitorElement * m_selJets_phi
MonitorElement * m_MjjWide_num
void Fill(long long x)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * m_selJets_pt
int iEvent
Definition: GenABIO.cc:230
MonitorElement * m_MjjWide_finalSel_varbin
MonitorElement * bookH1withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
MonitorElement * m_cutFlow
virtual void init(const Data &data)
MonitorElement * m_MjjWide_finalSel_WithoutNoiseFilter
MonitorElement * m_metVSmetclean
MonitorElement * m_MjjWide_den
edm::EDGetTokenT< reco::CaloMETCollection > metCollectionTagToken_
TH1 * getTH1(void) const
triggerExpression::Evaluator * HLTpathMain_
MonitorElement * m_DphijjWide_finalSel
MonitorElement * m_MjjWide_deta_0p5_1p0
edm::EDGetTokenT< reco::CaloMETCollection > metCleanCollectionTagToken_
tuple conf
Definition: dbtoconf.py:185
MonitorElement * m_MjjWide_deta_2p0_2p5
MonitorElement * m_MjjWide_den_detaL2
MonitorElement * m_DetajjVsMjjWide_rebin
MonitorElement * m_selJets_eta
MonitorElement * m_MjjWide_deta_2p5_3p0
MonitorElement * m_DetajjVsMjjWide
bool setEvent(const edm::Event &event, const edm::EventSetup &setup)
MonitorElement * m_MjjWide_deta_1p5_2p0
MonitorElement * bookH2withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
MonitorElement * m_MjjWide_finalSel_WithoutNoiseFilter_varbin
MonitorElement * m_DetajjWide_finalSel
MonitorElement * m_MjjWide_finalSel
MonitorElement * m_MjjWide_den_detaL4
MonitorElement * bookH1withSumw2BinArray(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, float *xbinsize, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
edm::EDGetTokenT< std::vector< math::PtEtaPhiMLorentzVector > > widejetsCollectionTagToken_
MonitorElement * m_DetajjWide
virtual ~DiJetVarAnalyzer()
MonitorElement * m_selJets_hadEnergyFraction
MonitorElement * m_metCases
Definition: Run.h:43