CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTHiggsBits.cc
Go to the documentation of this file.
1 
14 
15 
18 
19 /*#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
20 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
21 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
22 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapRecord.h"
23 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMap.h"
24 //#include "L1Trigger/GlobalTrigger/interface/L1GlobalTriggerSetup.h"
25 //#include "DataFormats/L1Trigger/interface/L1ParticleMap.h" */
26 
28 
30 
33 
36 #include <iomanip>
37 #include <string>
38 #include <vector>
39 
40 //
41 // constructors and destructor
42 //
44  hlTriggerResults_ (iConfig.getParameter<edm::InputTag> ("HLTriggerResults")),
45  mctruth_ (iConfig.getParameter<edm::InputTag> ("MCTruth")),
46  n_channel_ (iConfig.getParameter<int>("Nchannel")),
47  nEvents_(0),
48  hlNames_(0),
49  init_(false),
50  histName(iConfig.getParameter<std::string>("histName")),
51  hlt_bitnames(iConfig.getParameter<std::vector<std::string> >("hltBitNames")),
52  hlt_bitnamesMu(iConfig.getParameter<std::vector<std::string> >("hltBitNamesMu")),
53  hlt_bitnamesEg(iConfig.getParameter<std::vector<std::string> >("hltBitNamesEG")),
54  hlt_bitnamesPh(iConfig.getParameter<std::vector<std::string> >("hltBitNamesPh")),
55  hlt_bitnamesTau(iConfig.getParameter<std::vector<std::string> >("hltBitNamesTau")),
56  triggerTag_(iConfig.getUntrackedParameter<std::string>("DQMFolder","HLT/Higgs")),
57  outputFileName(iConfig.getParameter<std::string>("OutputFileName")),
58  outputMEsInRootFile(iConfig.getParameter<bool>("OutputMEsInRootFile"))
59 
60 
61 {
62 
63 
64  n_hlt_bits=hlt_bitnames.size(); // total paths
65 
66 
67  n_hlt_bits_eg = hlt_bitnamesEg.size(); // muon paths
68  n_hlt_bits_mu = hlt_bitnamesMu.size(); // electron paths
69  n_hlt_bits_ph = hlt_bitnamesPh.size(); // photon paths
70  n_hlt_bits_tau = hlt_bitnamesTau.size(); // tau paths
71 
72 
73  /*
74  std::cout << "Number of bit names : " << n_hlt_bits << std::endl;
75  if (n_hlt_bits>20) {
76  std::cout << "TOO MANY BITS REQUESTED - TREATING ONLY FIRST 20" << std::endl;
77  n_hlt_bits=20;
78  }*/
79 
80 
81 
82 
83 // 1:H->ZZ->4l, 2:H->WW->2l, 3: H->gg, 4:qqh->2tau, 5:H+->taunu, 6:qqh->inv
84 // The proper channel number has to be set in the cff-file
85  // std::cout << "Analyzing Higgs channel number " << n_channel_ << std::endl;
86 
87  // open the histogram file
88  // m_file=0; // set to null
89  // m_file=new TFile((histName+".root").c_str(),"RECREATE");
90  // m_file->cd();
91  // outfile.open((histName+".output").c_str());
92 
93 
94  // Initialize the tree
95  HltTree = 0;
96  HltTree = new TTree("HltTree","");
97 
98  /* for (int i=0;i<n_hlt_bits;i++) {
99  for (int j=0;j<n_hlt_bits+1;j++) {
100  hlt_whichbit[0][i][j]=0;
101  hlt_whichbit[1][i][j]=0;
102  hlt_whichbit[2][i][j]=0;
103  }
104  }*/
105 
106 
107  mct_analysis_.setup(iConfig, HltTree);
108 
109  // const int kMaxEvents = 50000;
110  /* const int kMaxEvents = 5000000;
111  hlt_nbits = new int[kMaxEvents];
112  HltTree->Branch("NEventCount",&neventcount,"NEventCount/I");
113  HltTree->Branch("HLT_nBits",hlt_nbits,"HLT_nBits[NEventCount]/I");*/
114 
115 
116 
117  //--------------------------------------------
120  //--------------------------------------------
121 
122 
125 
126  // dbe->setCurrentFolder("HLT/Higgs");
127 
128 
129  if (n_channel_==2) {
130  h_met_hwwdimu = dbe->book1D("caloMET_dimu","caloMET_dimu",50,0.0,150.0);
131  h_met_hwwdiel = dbe->book1D("caloMET_diel","caloMET_diel",50,0.0,150.0);
132  h_met_hwwemu = dbe->book1D("caloMET_emu","caloMET_emu",50,0.0,150.0);
133 
134  }
135 
136 
137  if (n_channel_==1 || n_channel_==2 || n_channel_==4){ // only for WW,ZZ, 2tau
138 
139  h_ptmu1 = dbe->book1D("Muon1Pt","Muon1Pt",50,0.0,150.0);
140  h_ptmu2 = dbe->book1D("Muon2Pt","Muon2Pt",50,0.0,150.0);
141  h_etamu1 = dbe->book1D("Muon1Eta","Muon1Eta",50,-2.5,2.5);
142  h_etamu2 = dbe->book1D("Muon2Eta","Muon2Eta",50,-2.5,2.5);
143 
144  h_ptel1 = dbe->book1D("Electron1Pt","Electron1Pt",50,0.0,150.0);
145  h_ptel2 = dbe->book1D("Electron2Pt","Electron2Pt",50,0.0,150.0);
146  h_etael1 = dbe->book1D("Electron1Eta","Electron1Eta",50,-2.5,2.5);
147  h_etael2 = dbe->book1D("Electron2Eta","Electron2Eta",50,-2.5,2.5);
148 
149  hlt_bitmu_hist_reco = dbe->book1D("muHLT","muHLT",hlt_bitnamesMu.size(),0.5,hlt_bitnamesMu.size()+0.5);
150  h_mu_reco = dbe->book1D("MuonEvents","MuonEvents",hlt_bitnamesMu.size(),0.5,hlt_bitnamesMu.size()+0.5);
151 
152  hlt_bitel_hist_reco = dbe->book1D("elHLT","elHLT",hlt_bitnamesEg.size(),0.5,hlt_bitnamesEg.size()+0.5);
153  h_el_reco = dbe->book1D("ElectronEvents","ElectronEvents",hlt_bitnamesEg.size(),0.5,hlt_bitnamesEg.size()+0.5);
154 
155 
156  }
157 
158  if (n_channel_==1 || n_channel_==2){
159 
160  h_ptmu1_emu = dbe->book1D("Muon1Pt_EM","Muon1Pt_EM",50,0.0,150.0);
161  h_ptel1_emu = dbe->book1D("Electron1Pt_EM","Electron1Pt_EM",50,0.0,150.0);
162  h_etamu1_emu = dbe->book1D("Muon1Eta_EM","Muon1Eta_EM",50,-2.5,2.5);
163  h_etael1_emu = dbe->book1D("Electron1Eta_EM","Electron1Eta_EM",50,-2.5,2.5);
164 
165  hlt_bitemu_hist_reco = dbe->book1D("emuHLT","emuHLT",hlt_bitnames.size(),0.5,hlt_bitnames.size()+0.5);
166  h_emu_reco = dbe->book1D("EmuEvents","EmuEvents",hlt_bitnames.size(),0.5,hlt_bitnames.size()+0.5);
167 
168 
169  }
170  // dbe->setCurrentFolder("HLT/Higgs/H2tau");
171 
172  if (n_channel_==3){ // only for Hgg
173 
174  h_ptph1 = dbe->book1D("Photon1Pt","Photon1Pt",50,0.0,200.0);
175  h_ptph2 = dbe->book1D("Photon2Pt","Photon2Pt",50,0.0,200.0);
176  h_etaph1 = dbe->book1D("Photon1Eta","Photon1Eta",50,-2.5,2.5);
177  h_etaph2 = dbe->book1D("Photon2Eta","Photon2Eta",50,-2.5,2.5);
178 
179  hlt_bitph_hist_reco = dbe->book1D("phHLT","phHLT",hlt_bitnamesPh.size(),0.5,hlt_bitnamesPh.size()+0.5);
180  h_ph_reco = dbe->book1D("PhotonEvents","PhotonEvents",hlt_bitnamesPh.size(),0.5,hlt_bitnamesPh.size()+0.5);
181 
182 
183  }
184 
185  if (n_channel_==5){
186 
187  // dbe->setCurrentFolder("HLT/Higgs/Htaunu");
188  // h_pttau1 = dbe->book1D("Tau1Pt","Tau1Pt",50,0.0,500.0);
189  // h_etatau1 = dbe->book1D("Tau1Eta","Tau1Eta",50,-5.0,5.0);
190 
191  hlt_bittau_hist_gen = dbe->book1D("tauHLT","tauHLT",hlt_bitnamesTau.size(),0.5,hlt_bitnamesTau.size()+0.5);
192  h_tau_gen = dbe->book1D("tauEvents","tauEvents",hlt_bitnamesTau.size(),0.5,hlt_bitnamesTau.size()+0.5);
193 
194  }
195 
196  //------------------------------------------------
197  //
198  // Histos pt, eta RECO events firing HLT
199  //
200  //---------------------------------------------------
201 
202  if (n_channel_==1 || n_channel_==2){
203 
204  for (int j=0;j<n_hlt_bits;j++) {
205  std::string histnameptmuem = "Muon1Pt_EM_"+hlt_bitnames[j];
206  std::string histnameetamuem = "Muon1Eta_EM_"+hlt_bitnames[j];
207  std::string histnameptelem = "Electron1Pt_EM_"+hlt_bitnames[j];
208  std::string histnameetaelem = "Electron1Eta_EM_"+hlt_bitnames[j];
209  h_ptmu1_emu_trig[j] = dbe->book1D((histnameptmuem).c_str(),(hlt_bitnames[j]+"ptmuon").c_str(),50,0.0,150.0);
210  h_etamu1_emu_trig[j] = dbe->book1D((histnameetamuem).c_str(),(hlt_bitnames[j]+"etamuon").c_str(),50,-2.5,2.5);
211 
212  h_ptel1_emu_trig[j] = dbe->book1D((histnameptelem).c_str(),(hlt_bitnames[j]+"ptelectron").c_str(),50,0.0,150.0);
213  h_etael1_emu_trig[j] = dbe->book1D((histnameetaelem).c_str(),(hlt_bitnames[j]+"etaelectron").c_str(),50,-2.5,2.5);
214 
215  hlt_bitemu_hist_reco -> setBinLabel(j+1,hlt_bitnames[j].c_str());
216  h_emu_reco -> setBinLabel(j+1,hlt_bitnames[j].c_str());
217 
218  }
219  }
220 
221  if (n_channel_==1 || n_channel_==2 || n_channel_==4){
222  for (int j=0;j<n_hlt_bits_mu;j++) {
223  std::string histnameptmu = "Muon1Pt_"+hlt_bitnamesMu[j];
224  std::string histnameetamu = "Muon1Eta_"+hlt_bitnamesMu[j];
225  h_ptmu1_trig[j] = dbe->book1D((histnameptmu).c_str(),(hlt_bitnamesMu[j]+"ptmuon").c_str(),50,0.0,150.0);
226  h_etamu1_trig[j] = dbe->book1D((histnameetamu).c_str(),(hlt_bitnamesMu[j]+"etamuon").c_str(),50,-2.5,2.5);
227  hlt_bitmu_hist_reco -> setBinLabel(j+1,hlt_bitnamesMu[j].c_str());
228  h_mu_reco -> setBinLabel(j+1,hlt_bitnamesMu[j].c_str());
229 
230  }
231  for (int j=0;j<n_hlt_bits_eg;j++) {
232  std::string histnameptel = "Electron1Pt_"+hlt_bitnamesEg[j];
233  std::string histnameetael = "Electron1Eta_"+hlt_bitnamesEg[j];
234  h_ptel1_trig[j] = dbe->book1D((histnameptel).c_str(),(hlt_bitnamesEg[j]+"ptelectron").c_str(),50,0.0,150.0);
235  h_etael1_trig[j] = dbe->book1D((histnameetael).c_str(),(hlt_bitnamesEg[j]+"etaelectron").c_str(),50,-2.5,2.5);
236 
237  hlt_bitel_hist_reco -> setBinLabel(j+1,hlt_bitnamesEg[j].c_str());
238  h_el_reco -> setBinLabel(j+1,hlt_bitnamesEg[j].c_str());
239 
240 
241  }
242 
243  }
244 
245  if (n_channel_==3){
246  for (int j=0;j<n_hlt_bits_ph;j++) {
247  std::string histnameptph = "Photon1Pt_"+hlt_bitnamesPh[j];
248  std::string histnameetaph = "Photon1Eta_"+hlt_bitnamesPh[j];
249  h_ptph1_trig[j] = dbe->book1D((histnameptph).c_str(),(hlt_bitnamesPh[j]+"ptphoton").c_str(),50,0.0,200);
250  h_etaph1_trig[j] = dbe->book1D((histnameetaph).c_str(),(hlt_bitnamesPh[j]+"etaphoton").c_str(),50,-2.5,2.5);
251 
252  hlt_bitph_hist_reco -> setBinLabel(j+1,hlt_bitnamesPh[j].c_str());
253  h_ph_reco -> setBinLabel(j+1,hlt_bitnamesPh[j].c_str());
254 
255  }
256 
257  }
258 
259  if (n_channel_==5){
260  for (int j=0;j<n_hlt_bits_tau;j++) {
261  // std::string histnamepttau = "Tau1Pt_"+hlt_bitnamesTau[j];
262  // std::string histnameetatau = "Tau1Eta_"+hlt_bitnamesTau[j];
263  // h_pttau1_trig[j] = dbe->book1D((histnamepttau).c_str(),(hlt_bitnamesTau[j]+"pttau").c_str(),50,0.0,300);
264  // h_etatau1_trig[j] = dbe->book1D((histnameetatau).c_str(),(hlt_bitnamesTau[j]+"etatau").c_str(),50,-5.0,5.0);
265  hlt_bittau_hist_gen -> setBinLabel(j+1,hlt_bitnamesTau[j].c_str());
266  h_tau_gen -> setBinLabel(j+1,hlt_bitnamesTau[j].c_str());
267  }
268  }
269 
270 
271  // std::cout << "booking OK " << std::endl;
272 
273 }
274 
276 { }
277 
278 //
279 // member functions
280 //
281 
282 
283 // ------------ method called to produce the data ------------
284 void
286 {
287  // accumulation of statistics for HLT bits used by Higgs analysis
288 
289  using namespace std;
290  using namespace edm;
291 
292 
293 
295  iEvent.getByLabel("muons", muonHandle);
296 
297 
299  iEvent.getByLabel("gsfElectrons",electronHandle);
300 
302  iEvent.getByLabel("photons", photonHandle);
303 
305  // iEvent.getByLabel("met", caloMet); // first attempt of adding met variables
306  iEvent.getByLabel("corMetGlobalMuons", caloMet);
307 
309  iEvent.getByLabel("generalTracks", Tracks);
310 
311 // MC truth part
312 
313  std::string errMsg("");
315 
316 
317  try {iEvent.getByLabel(mctruth_,mctruth);} catch (...) { errMsg=errMsg + " -- No Gen Particles";}
318 
319  // do the MC-preselection. This depends on the channel under study. with
320  // wrong n_channel the result would be nonsense
321  if (n_channel_== 1) {
322  mct_analysis_.analyzeHZZ4l(*mctruth, *muonHandle, *electronHandle, HltTree);
323  } else if (n_channel_ == 2) {
324  // mct_analysis_.analyzeHWW2l(*mctruth, *muonHandle,*electronHandle, HltTree);
325  mct_analysis_.analyzeHWW2l(*mctruth, *caloMet, *Tracks, *muonHandle,*electronHandle, HltTree);
326  } else if (n_channel_ == 3) {
327  mct_analysis_.analyzeHgg(*mctruth, *photonHandle, HltTree);
328  } else if (n_channel_ == 4) {
330  } else if (n_channel_ == 5) {
332  } else if (n_channel_ == 6) {
333  mct_analysis_.analyzeHinv(*mctruth, HltTree);
334  }
335 
336 
337 
338 // HLT part
339 
340  // get hold of HL TriggerResults
341  try {iEvent.getByLabel(hlTriggerResults_,HLTR);} catch (...) {;}
342  if (!HLTR.isValid()) {
343  LogDebug("") << "HL TriggerResults with label ["+hlTriggerResults_.encode()+"] not found!";
344  return;
345  }
346 
347  // initialisation
348  if (!init_) {
349  init_=true;
350  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*HLTR);
351  hlNames_=triggerNames.triggerNames();
352  }
353 
354 
355  // define reco objects
356  reco::Muon muon1, muon2;
357  reco::GsfElectron electron1, electron2;
358  reco::Photon photon1, photon2;
359 
360 
361  //------------------------
362  // fill pt, eta reco objects
363  //
364  //---------------------------------
365 
366 
371  // trg_eff_gen_mc_mu -> Fill(4,1);
372 
374 
375  if (n_channel_==4){
378 
379  }
380  else{
381 
382  muon1 = mct_analysis_.muon1_();
383  muon2 = mct_analysis_.muon2_();
384 
385  h_ptmu1->Fill(muon1.pt());
386  h_ptmu2->Fill(muon2.pt());
387  h_etamu1->Fill(muon1.eta());
388  h_etamu2->Fill(muon2.eta());
389  }
390 
391 
392 
393  }
394 
398 
400  // trg_eff_gen_mc_elec -> Fill(4,1);
401 
403 
404  if (n_channel_==4){
407 
408  }
409  else{
410  electron1 = mct_analysis_.electron1_();
411  electron2 = mct_analysis_.electron2_();
412 
413 
414  // std::cout<<"iso="<< electron1.dr03TkSumPt()<<std::endl;
415 
416  h_ptel1->Fill(electron1.pt());
417  h_ptel2->Fill(electron2.pt());
418  h_etael1->Fill(electron1.eta());
419  h_etael2->Fill(electron2.eta());
420  }
421 
422  }
423 
427 
429  // trg_eff_gen_mc_emu -> Fill(4,1);
430 
432 
433  if (n_channel_!=4){
434  muon1 = mct_analysis_.muon1_();
435  electron1 = mct_analysis_.electron1_();
436 
437  h_ptmu1_emu->Fill(muon1.pt());
438  h_ptel1_emu->Fill(electron1.pt());
439  h_etamu1_emu->Fill(muon1.eta());
440  h_etael1_emu->Fill(electron1.eta());
441  }
442 
443  }
444 
448 
450 
451 
452  photon1 = mct_analysis_.photon1_();
453  photon2 = mct_analysis_.photon2_();
454 
455  h_ptph1->Fill(photon1.pt());
456  h_ptph2->Fill(photon2.pt());
457  h_etaph1->Fill(photon1.eta());
458  h_etaph2->Fill(photon2.eta());
459 
460  }
461 
462 
463  /* if (mct_analysis_.TauChannel_acc()) {
464  h_pttau1->Fill(mct_analysis_.ptTau1());
465  h_etatau1->Fill(mct_analysis_.etaTau1());
466 
467  }
468  */
469 
471 
472 
473  // decision for each HL algorithm
474  const unsigned int n(hlNames_.size());
475 
476  // wtrig if set to 1 for paths that have fired
477  int wtrig_m[100]={0};
478  int wtrig_eg[100]={0};
479  int wtrig_ph[100]={0};
480  int wtrig_tau[100]={0};
481  int wtrig_[100]={0};
482 
483  for (unsigned int i=0; i!=n; ++i) {
484  if (HLTR->accept(i)) {
485  for (int j=0;j<n_hlt_bits_mu;j++) {
486  if (hlNames_[i] == hlt_bitnamesMu[j]) {
487  wtrig_m[j]=1;
488  }
489  }
490  for(int jj=0;jj<n_hlt_bits_eg;jj++) {
491  if (hlNames_[i] == hlt_bitnamesEg[jj]) {
492  wtrig_eg[jj]=1;
493  }
494  }
495 
496  for (int j=0;j<n_hlt_bits;j++) {
497  if (hlNames_[i] == hlt_bitnames[j]) {
498  wtrig_[j]=1;
499  }
500  }
501 
502 
503  for(int k=0;k<n_hlt_bits_ph;k++) {
504  if (hlNames_[i] == hlt_bitnamesPh[k]) {
505  wtrig_ph[k]=1;
506  }
507  }
508  for(int k=0;k<n_hlt_bits_tau;k++) {
509  if (hlNames_[i] == hlt_bitnamesTau[k]) {
510  wtrig_tau[k]=1;
511  }
512  }
513 
514 
515  }
516  }
517 
518 
519 
521 
522  //------------------------------------
523  // muons
524  //-------------------------------------
525 
526 
527 
529 
530  for (int j=0;j<n_hlt_bits_mu;j++) {
531  h_mu_reco->Fill(j+1);
532 
533  if (wtrig_m[j]==1) {
535 
536  if (n_channel_==4){
539 
540  }
541  else{
542 
543  h_ptmu1_trig[j]->Fill(muon1.pt());
544  h_etamu1_trig[j]->Fill(muon1.eta());
545 
546  }
547  // hlt_bitmu_hist_reco->Fill(j+1);
548  //h_ptmu2_trig[j]->Fill(mct_analysis_.ptmuon2());
549  }
550  }
551  }
552 
553 
554 
555  //_------------------------------------
556  // electrons
557  //_-----------------------------------
558 
559 
560 
562 
563 
564  for (int j=0;j<n_hlt_bits_eg;j++) {
565  h_el_reco->Fill(j+1);
566  if (wtrig_eg[j]==1) {
568 
569  if (n_channel_==4){
572 
573  }
574  else {
575  h_ptel1_trig[j]->Fill(electron1.pt());
576  h_etael1_trig[j]->Fill(electron1.eta());
577  // hlt_bitel_hist_reco->Fill(j+1);
578  }
579  }
580  }
581  }
582 
583 
584 
585 //-------------------------------------------------
586 // emu channel
587 //
588 //----------------------------------------------------
589 
590 
592 
593  for (int j=0;j<n_hlt_bits;j++) {
594  h_emu_reco->Fill(j+1);
595  if (wtrig_[j]==1) {
597 
598  if (n_channel_!=4){
599  h_ptel1_emu_trig[j]->Fill(electron1.pt());
600  h_etael1_emu_trig[j]->Fill(electron1.eta());
601  h_ptmu1_emu_trig[j]->Fill(muon1.pt());
602  h_etamu1_emu_trig[j]->Fill(muon1.eta());
603  }
604  // hlt_bitemu_hist_reco->Fill(j+1);
605  }
606  }
607  }
608 
609 
610 
611 //--------------------------------
612 //
613 //
614 //------------------------------
615 
616  //photons reco
618  // h_ph_reco->Fill(1);
619  for (int j=0;j<n_hlt_bits_ph;j++) {
620  h_ph_reco->Fill(j+1);
621  if (wtrig_ph[j]==1) {
622  h_ptph1_trig[j]->Fill(photon1.pt());
623  h_etaph1_trig[j]->Fill(photon1.eta());
625  }
626  }
627  }
628 
629  //taus
631  // h_tau->Fill(1);
632 
633  // ev_clasif->Fill(mct_analysis_.evtype());
634  for (int j=0;j<n_hlt_bits_tau;j++) {
635  h_tau_gen->Fill(j+1);
636  if (wtrig_tau[j]==1) {
637  // h_pttau1_trig[j]->Fill(mct_analysis_.ptTau1());
638  // h_etatau1_trig[j]->Fill(mct_analysis_.etaTau1());
640  }
641  }
642  }
643 
644 
646 
647  //----------------
648 
649 
650 
652 
653  return;
654 
655 }
656 
657 
658 /*void
659 HLTHiggsBits::getL1Names(const edm::Event& iEvent, const edm::EventSetup& iSetup)
660 {
661  edm::Handle<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord;
662  iEvent.getByLabel(l1GTObjectMapTag_.label(), gtObjectMapRecord);
663 
664  const std::vector<L1GlobalTriggerObjectMap>& objMapVec =
665  gtObjectMapRecord->gtObjectMap();
666 
667  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
668  itMap != objMapVec.end(); ++itMap) {
669  int algoBit = (*itMap).algoBitNumber();
670  std::string algoNameStr = (*itMap).algoName();
671  algoBitToName[algoBit] = algoNameStr;
672  }
673 }*/
674 
675 
676 
677 
678 void
680 {
681  // final printout of accumulated statistics
682 
683  // std::cout << "Job ending " << std::endl;
684 
685  using namespace std;
686 
687  // std::cout << "Number of events handled: " << nEvents_ << std::endl;
688  // std::cout << "Number of events seen in MC: " << n_inmc_ << ", (" << 100.0*n_inmc_/nEvents_ <<"%)" << std::endl;
689 
690 
691 
692 // return;
693 
694 
695 
696  // HltTree->Fill();
697  // m_file->cd();
698  // HltTree->Write();
699  // delete HltTree;
700 
704  }
705 
706 
707  // HltTree = 0;
708 
709 // if (m_file!=0) { // if there was a tree file...
710  // m_file->Write(); // write out the branches
711  // delete m_file; // close and delete the file
712  // m_file=0; // set to zero to clean up
713  // }
714 
715 
716  return;
717 }
718 
#define LogDebug(id)
MonitorElement * h_met_hwwdiel
Definition: HLTHiggsBits.h:220
MonitorElement * hlt_bitmu_hist_reco
Definition: HLTHiggsBits.h:202
int i
Definition: DBlmapReader.cc:9
void analyzeHWW2l(const reco::CandidateView &mctruth, const reco::CaloMETCollection &caloMet, const reco::TrackCollection &Tracks, const reco::MuonCollection &muonHandle, const reco::GsfElectronCollection &electronHandle, TTree *tree)
reco::Photon photon2_() const
std::vector< std::string > hlt_bitnames
Definition: HLTHiggsBits.h:279
void analyzeHtaunu(const reco::CandidateView &mctruth, TTree *tree)
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
edm::Handle< edm::TriggerResults > HLTR
Definition: HLTHiggsBits.h:248
MonitorElement * h_ptmu1_trig[20]
Definition: HLTHiggsBits.h:141
MonitorElement * h_mu_reco
Definition: HLTHiggsBits.h:203
bool TauChannel_acc() const
Definition: HLTHiggsTruth.h:97
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * h_ptel1_emu
Definition: HLTHiggsBits.h:151
reco::Muon muon2_() const
MonitorElement * h_ptmu2
Definition: HLTHiggsBits.h:140
reco::Muon muon1_() const
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1898
std::vector< std::string > hlt_bitnamesPh
Definition: HLTHiggsBits.h:283
MonitorElement * hlt_bitel_hist_reco
Definition: HLTHiggsBits.h:205
MonitorElement * h_met_hwwdimu
Definition: HLTHiggsBits.h:219
double met_hwwdiel() const
MonitorElement * h_tau_gen
Definition: HLTHiggsBits.h:215
MonitorElement * h_ptmu1_emu
Definition: HLTHiggsBits.h:149
MonitorElement * h_ptel1_trig[20]
Definition: HLTHiggsBits.h:146
MonitorElement * h_ptph2
Definition: HLTHiggsBits.h:160
MonitorElement * h_etamu1_trig[20]
Definition: HLTHiggsBits.h:183
MonitorElement * h_etaph1
Definition: HLTHiggsBits.h:191
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
std::string encode() const
Definition: InputTag.cc:72
MonitorElement * h_ptel2
Definition: HLTHiggsBits.h:145
bool ElecMuChannel_recoacc() const
MonitorElement * h_etael1_emu
Definition: HLTHiggsBits.h:152
void Fill(long long x)
MonitorElement * hlt_bitemu_hist_reco
Definition: HLTHiggsBits.h:208
MonitorElement * h_ptel1
Definition: HLTHiggsBits.h:144
int iEvent
Definition: GenABIO.cc:243
double met_hwwdimu() const
bool MuonChannel_recoacc() const
MonitorElement * h_etaph1_trig[20]
Definition: HLTHiggsBits.h:193
MonitorElement * h_ptmu1
Definition: HLTHiggsBits.h:139
DQMStore * dbe
Definition: HLTHiggsBits.h:77
reco::GsfElectron electron1_() const
MonitorElement * h_etamu1_emu_trig[20]
Definition: HLTHiggsBits.h:154
MonitorElement * h_ptph1_trig[20]
Definition: HLTHiggsBits.h:161
MonitorElement * h_ptel1_emu_trig[20]
Definition: HLTHiggsBits.h:155
bool outputMEsInRootFile
Definition: HLTHiggsBits.h:299
double ptMuon1() const
MonitorElement * h_etamu1_emu
Definition: HLTHiggsBits.h:150
reco::GsfElectron electron2_() const
int j
Definition: DBlmapReader.cc:9
MonitorElement * hlt_bittau_hist_gen
Definition: HLTHiggsBits.h:214
double met_hwwemu() const
edm::InputTag hlTriggerResults_
Definition: HLTHiggsBits.h:235
double etaElectron1() const
MonitorElement * h_etael2
Definition: HLTHiggsBits.h:187
double ptElectron1() const
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * h_etael1_trig[20]
Definition: HLTHiggsBits.h:188
unsigned int nEvents_
Definition: HLTHiggsBits.h:265
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
MonitorElement * h_etamu2
Definition: HLTHiggsBits.h:182
int k[5][pyjets_maxn]
MonitorElement * h_ptph1
Definition: HLTHiggsBits.h:159
MonitorElement * h_emu_reco
Definition: HLTHiggsBits.h:209
reco::Photon photon1_() const
MonitorElement * h_ph_reco
Definition: HLTHiggsBits.h:212
TTree * HltTree
Definition: HLTHiggsBits.h:80
bool PhotonChannel_acc() const
Definition: HLTHiggsTruth.h:96
std::string triggerTag_
Definition: HLTHiggsBits.h:297
MonitorElement * h_etaph2
Definition: HLTHiggsBits.h:192
void analyzeHinv(const reco::CandidateView &mctruth, TTree *tree)
std::vector< std::string > hlNames_
Definition: HLTHiggsBits.h:266
MonitorElement * h_etamu1
Definition: HLTHiggsBits.h:181
MonitorElement * h_ptmu1_emu_trig[20]
Definition: HLTHiggsBits.h:153
edm::InputTag mctruth_
Definition: HLTHiggsBits.h:239
MonitorElement * hlt_bitph_hist_reco
Definition: HLTHiggsBits.h:211
MonitorElement * h_met_hwwemu
Definition: HLTHiggsBits.h:221
MonitorElement * h_etael1_emu_trig[20]
Definition: HLTHiggsBits.h:156
void setup(const edm::ParameterSet &pSet, TTree *tree)
std::vector< std::string > hlt_bitnamesTau
Definition: HLTHiggsBits.h:284
MonitorElement * h_etael1
Definition: HLTHiggsBits.h:186
void analyzeHgg(const reco::CandidateView &mctruth, const reco::PhotonCollection &photonHandle, TTree *tree)
MonitorElement * h_el_reco
Definition: HLTHiggsBits.h:206
HLTHiggsTruth mct_analysis_
Definition: HLTHiggsBits.h:246
virtual void endJob()
void analyzeHZZ4l(const reco::CandidateView &mctruth, const reco::MuonCollection &muonHandle, const reco::GsfElectronCollection &electronHandle, TTree *tree)
void showDirStructure(void) const
Definition: DQMStore.cc:2554
void analyzeH2tau(const reco::CandidateView &mctruth, TTree *tree)
double etaMuon1() const
std::vector< std::string > hlt_bitnamesEg
Definition: HLTHiggsBits.h:281
bool ElecChannel_recoacc() const
std::string outputFileName
Definition: HLTHiggsBits.h:298
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
HLTHiggsBits(const edm::ParameterSet &)
Definition: HLTHiggsBits.cc:43
std::vector< std::string > hlt_bitnamesMu
Definition: HLTHiggsBits.h:280