CMS 3D CMS Logo

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