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