CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeneralHLTOffline.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: GeneralHLTOffline
4 // Class: GeneralHLTOffline
5 //
12 //
13 // Original Author: Jason Michael Slaunwhite,512 1-008,`+41227670494,
14 // Created: Fri Aug 5 10:34:47 CEST 2011
15 //
16 //
17 
18 // system include files
19 #include <memory>
20 
21 // user include files
24 
29 
37 
39 
40 #include "TMath.h"
41 #include "TStyle.h"
42 
43 //
44 // class declaration
45 //
46 
48  public:
49  explicit GeneralHLTOffline(const edm::ParameterSet&);
51 
52  private:
53  virtual void beginJob() override;
54  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
55  virtual void endJob() override;
56  virtual void beginRun(edm::Run const&, edm::EventSetup const&) override;
57  virtual void endRun(edm::Run const&, edm::EventSetup const&) override;
58  virtual void beginLuminosityBlock(edm::LuminosityBlock const&,
59  edm::EventSetup const&) override;
60  virtual void endLuminosityBlock(edm::LuminosityBlock const&,
61  edm::EventSetup const&) override;
62  virtual void setupHltMatrix(const std::string &, int);
63  virtual void fillHltMatrix(const std::string &,
64  const std::string &,
65  double, double, bool);
66 
67  // ----------member data ---------------------------
68 
69 
70  bool debugPrint;
74 
78  std::vector< std::vector<std::string> > PDsVectorPathsVector;
79  std::vector<std::string> AddedDatasets;
80 
83 };
84 
85 //
86 // constructors and destructor
87 //
89  hlt_menu_(""),
90  dbe_(0),
91  cppath_(0) {
92  debugPrint = false;
93  outputPrint = false;
94 
96  "HLT/General");
97 
98  hltTag = ps.getParameter<std::string> ("HltProcessName");
99 
100  if (debugPrint) {
101  std::cout << "Inside Constructor" << std::endl;
102  std::cout << "Got plot dirname = " << plotDirectoryName << std::endl;
103  }
104 }
105 
106 
108 }
109 
110 // ------------ method called for each event ------------
111 void
113  const edm::EventSetup& iSetup) {
114  if (debugPrint)
115  std::cout << "Inside analyze - run, block, event "
116  << iEvent.id().run() << " , " << iEvent.id().luminosityBlock()
117  << " , " << iEvent.id() << " , " << std::endl;
118 
119 
120  // Access Trigger Results
122  iEvent.getByLabel(edm::InputTag("TriggerResults", "", hltTag), triggerResults);
123 
124  if (!triggerResults.isValid()) {
125  if (debugPrint)
126  std::cout << "Trigger results not valid" << std::endl;
127  return;
128  }
129 
130  if (debugPrint)
131  std::cout << "Found triggerResults" << std::endl;
132 
133  edm::Handle<trigger::TriggerEvent> aodTriggerEvent;
134  iEvent.getByLabel(edm::InputTag("hltTriggerSummaryAOD", "", hltTag),
135  aodTriggerEvent);
136 
137  if (!aodTriggerEvent.isValid()) {
138  if (debugPrint)
139  std::cout << "No AOD trigger summary found! Returning...";
140  return;
141  }
142 
143  const trigger::TriggerObjectCollection objects = aodTriggerEvent->getObjects();
144 
145  if (streamA_found_) {
146  const std::vector<std::string> &datasetNames = hlt_config_.streamContent("A");
147  // Loop over PDs
148  for (unsigned int iPD = 0; iPD < datasetNames.size(); iPD++) {
149  // Loop over Paths in each PD
150  bool first_count = true;
151  for (unsigned int iPath = 0;
152  iPath < PDsVectorPathsVector[iPD].size(); iPath++) {
154  unsigned int index = hlt_config_.triggerIndex(pathName);
155  if (debugPrint) {
156  std::cout << "Looking at path " << pathName << std::endl;
157  std::cout << "Index = " << index
158  << " triggerResults->size() = " << triggerResults->size()
159  << std::endl;
160  }
161 
162  // fill the histos with empty weights......
163  const std::string &label = datasetNames[iPD];
164  std::string fullPathToCPP = "HLT/GeneralHLTOffline/"
165  + label + "/cppath_" + label + hlt_menu_;
166  MonitorElement * ME_mini_cppath = dbe_->get(fullPathToCPP);
167  TH1F * hist_mini_cppath = NULL;
168  if (ME_mini_cppath)
169  hist_mini_cppath = ME_mini_cppath->getTH1F();
170 
171  if (hist_mini_cppath) {
172  TAxis * axis = hist_mini_cppath->GetXaxis();
173  if (axis) {
174  int bin_num = axis->FindBin(pathName.c_str());
175  int bn = bin_num - 1;
176  hist_mini_cppath->Fill(bn, 0);
177  hist_mini_cppath->SetEntries(hist_mini_cppath->Integral());
178  }
179  }
180 
181  if (index < triggerResults->size()) {
182  if (triggerResults->accept(index)) {
183  cppath_->Fill(index, 1);
184  if (debugPrint)
185  std::cout << "Check Event " << iEvent.id()
186  << " Run " << iEvent.id().run()
187  << " fired path " << pathName << std::endl;
188 
189  // look up module labels for this path
190  const std::vector<std::string> &modulesThisPath =
191  hlt_config_.moduleLabels(pathName);
192 
193  if (debugPrint)
194  std::cout << "Looping over module labels " << std::endl;
195 
196  // Loop backward through module names
197  for (int iModule = (modulesThisPath.size() - 1);
198  iModule >= 0; iModule--) {
199  if (debugPrint)
200  std::cout << "Module name is "
201  << modulesThisPath[iModule] << std::endl;
202  // check to see if you have savetags information
203  if (hlt_config_.saveTags(modulesThisPath[iModule])) {
204  if (debugPrint)
205  std::cout << "For path " << pathName
206  << " this module " << modulesThisPath[iModule]
207  <<" is a saveTags module of type "
208  << hlt_config_.moduleType(modulesThisPath[iModule])
209  << std::endl;
210  if (hlt_config_.moduleType(modulesThisPath[iModule])
211  == "HLTLevel1GTSeed")
212  break;
213  edm::InputTag moduleWhoseResultsWeWant(modulesThisPath[iModule],
214  "",
215  hltTag);
216  unsigned int idx_module_aod_trg =
217  aodTriggerEvent->filterIndex(moduleWhoseResultsWeWant);
218  if (idx_module_aod_trg < aodTriggerEvent->sizeFilters()) {
219  const trigger::Keys &keys =
220  aodTriggerEvent->filterKeys(idx_module_aod_trg);
221  if (debugPrint)
222  std::cout << "Got Keys for index "
223  << idx_module_aod_trg
224  <<", size of keys is " << keys.size()
225  << std::endl;
226  if (keys.size() >= 1000)
227  edm::LogWarning("GeneralHLTOffline")
228  << "WARNING!! size of keys is " << keys.size()
229  << " for path " << pathName << " and module "
230  << modulesThisPath[iModule]<< std::endl;
231 
232  // There can be > 100 keys (3-vectors) for some
233  // modules with no ID filled the first one has the
234  // highest value for single-object triggers for
235  // multi-object triggers, seems reasonable to use
236  // the first one as well So loop here has been
237  // commented out for ( size_t iKey = 0; iKey <
238  // keys.size(); iKey++ ) {
239 
240  if (keys.size() > 0) {
241  trigger::TriggerObject foundObject = objects[keys[0]];
242  if (debugPrint || outputPrint)
243  std::cout << "This object has id (pt, eta, phi) = "
244  << " " << foundObject.id() << " "
245  << std::setw(10) << foundObject.pt()
246  << ", " << std::setw(10) << foundObject.eta()
247  << ", " << std::setw(10) << foundObject.phi()
248  << " for path = " << std::setw(20) << pathName
249  << " module " << std::setw(40)
250  << modulesThisPath[iModule] << std::endl;
251  if (debugPrint)
252  std::cout << "CHECK RUN " << iEvent.id().run() << " "
253  << iEvent.id() << " " << pathName << " "
254  << modulesThisPath[iModule] << " "
255  << datasetNames[iPD] << " "
256  << hlt_config_.moduleType(modulesThisPath[iModule])
257  << " " << keys.size() << " "
258  << std::setprecision(4) << foundObject.pt() << " "
259  << foundObject.eta() << " "
260  << foundObject.phi() << std::endl;
261 
262  // first_count is to make sure that the top-level
263  // histograms of each dataset don't get filled
264  // more than once
265  fillHltMatrix(datasetNames[iPD], pathName,
266  foundObject.eta(), foundObject.phi(),
267  first_count);
268  first_count = false;
269  } // at least one key
270  } // end if filter in aodTriggerEvent
271  // OK, we found the last module. No need to look at
272  // the others. get out of the loop
273  break;
274  } // end if saveTags
275  } // end Loop backward through module names
276  } // end if(triggerResults->accept(index))
277  } // end if (index < triggerResults->size())
278  } // end Loop over Paths in each PD
279  } // end Loop over PDs
280  }
281 }
282 
283 
284 // ------------ method called once each job just before starting event loop ------------
285 void
287  if (debugPrint)
288  std::cout << "Inside begin job" << std::endl;
289 
291  if (dbe_)
293 }
294 
295 // ------------ method called once each job just after ending the event loop ------------
296 void
298 }
299 
300 // ------------ method called when starting to processes a run ------------
301 void
303  edm::EventSetup const& iSetup) {
304  if (debugPrint)
305  std::cout << "Inside beginRun" << std::endl;
306 
307  // Reset "condition" variables that could have memory of previous
308  // runs.
309 
310  PDsVectorPathsVector.clear();
311  AddedDatasets.clear();
312 
313  bool changed = true;
314  if (!hlt_config_.init(iRun, iSetup, hltTag, changed)) {
315  if (debugPrint) {
316  std::cout << "Warning, didn't find process HLT" << std::endl;
317  return;
318  }
319  } else {
320  if (debugPrint)
321  std::cout << " HLTConfig processName " << hlt_config_.processName()
322  << " tableName " << hlt_config_.tableName()
323  << " size " << hlt_config_.size() << std::endl;
324  }
326  for (unsigned int n = 0, e = hlt_menu_.length(); n != e; ++n)
327  if (hlt_menu_[n] == '/' || hlt_menu_[n] == '.')
328  hlt_menu_[n] = '_';
329 
330 
332 
333  dbe_->setCurrentFolder("HLT/GeneralHLTOffline/");
334  cppath_ = dbe_->book1D("cppath" + hlt_menu_,
335  "Counts/Path",
336  hlt_config_.size(), 0, hlt_config_.size());
337 
338  const std::vector<std::string> &nameStreams = hlt_config_.streamNames();
339  std::vector<std::string>::const_iterator si = nameStreams.begin();
340  std::vector<std::string>::const_iterator se = nameStreams.end();
341  for ( ; si != se; ++si) {
342  if ((*si) == "A") {
343  streamA_found_ = true;
344  break;
345  }
346  }
347 
348  if (streamA_found_) {
349  const std::vector<std::string> &datasetNames = hlt_config_.streamContent("A");
350  if (debugPrint)
351  std::cout << "Number of Stream A datasets "
352  << datasetNames.size() << std::endl;
353 
354  for (unsigned int i = 0; i < datasetNames.size(); i++) {
355  const std::vector<std::string> &datasetPaths = hlt_config_.datasetContent(datasetNames[i]);
356  if (debugPrint) {
357  std::cout << "This is dataset " << datasetNames[i]
358  << "datasetPaths.size() = " << datasetPaths.size() << std::endl;
359  for (unsigned int iPath = 0;
360  iPath < datasetPaths.size(); iPath++) {
361  std::cout << "Before setupHltMatrix - MET dataset "
362  << datasetPaths[iPath] << std::endl;
363  }
364  }
365  // Check if dataset has been added - if not add it
366  // need to loop through AddedDatasets and compare
367  bool foundDataset = false;
368  int datasetNum = -1;
369  for (unsigned int d = 0; d < AddedDatasets.size(); d++) {
370  if (AddedDatasets[d].compare(datasetNames[i]) == 0) {
371  foundDataset = true;
372  datasetNum = d;
373  if (debugPrint)
374  std::cout << "Dataset " << datasetNames[i]
375  << " found in AddedDatasets at position " << d << std::endl;
376  break;
377  }
378  }
379 
380  if (!foundDataset) {
381  if (debugPrint)
382  std::cout << " Fill trigger paths for dataset "
383  << datasetNames[i] << std::endl;
384  PDsVectorPathsVector.push_back(datasetPaths);
385  // store dataset pathname
386  AddedDatasets.push_back(datasetNames[i]);
387  } else {
388  // This trigger path has already been added - this implies that
389  // this is a new run What we want to do is check if there is a
390  // new trigger that was not in the original dataset For a given
391  // dataset, loop over the stored list of triggers, and compare
392  // to the current list of triggers If any of the triggers are
393  // missing, add them to the end of the appropriate dataset
394  if (debugPrint)
395  std::cout << " Additional runs : Check for additional"
396  << "trigger paths per dataset " << std::endl;
397  // Loop over correct path of PDsVectorPathsVector
398  bool found = false;
399 
400  // Loop over triggers in the path
401  for (unsigned int iTrig = 0; iTrig < datasetPaths.size(); iTrig++) {
402  if (debugPrint)
403  std::cout << "Looping over trigger list in dataset "
404  << iTrig << " "
405  << datasetPaths[iTrig] << std::endl;
406  found = false;
407  // Loop over triggers already on the list
408  for (unsigned int od = 0; od < PDsVectorPathsVector[datasetNum].size(); od++) {
409  if (debugPrint)
410  std::cout << "Looping over existing trigger list " << od
411  << " " << PDsVectorPathsVector[datasetNum][od] << std::endl;
412  // Compare, see if match is found
413  if (hlt_config_.removeVersion(datasetPaths[iTrig]).compare(
414  hlt_config_.removeVersion(PDsVectorPathsVector[datasetNum][od])) == 0) {
415  found = true;
416  if (debugPrint)
417  std::cout << " FOUND " << datasetPaths[iTrig] << std::endl;
418  break;
419  }
420  }
421  // If match is not found, add trigger to correct path of PDsVectorPathsVector
422  if (!found)
423  PDsVectorPathsVector[datasetNum].push_back(datasetPaths[iTrig]);
424  if (debugPrint)
425  std::cout << datasetPaths[iTrig]
426  << " NOT FOUND - so we added it to the correct dataset "
427  << datasetNames[i] << std::endl;
428  }
429  }
430  // Let's check this whole big structure
431  if (debugPrint) {
432  for (unsigned int is = 0; is < PDsVectorPathsVector.size(); is++) {
433  std::cout << " PDsVectorPathsVector[" << is << "] is "
434  << PDsVectorPathsVector[is].size() << std::endl;
435  for (unsigned int ip = 0; ip < PDsVectorPathsVector[is].size(); ip++) {
436  std::cout << " trigger " << ip << " path "
437  << PDsVectorPathsVector[is][ip] << std::endl;
438  }
439  }
440  }
441 
442  if (debugPrint)
443  std::cout <<"Found PD: " << datasetNames[i] << std::endl;
444 
445  setupHltMatrix(datasetNames[i], i);
446  } // end of loop over dataset names
447  } // if stream A found
448 } // end of beginRun
449 
450 // ------------ method called when ending the processing of a run ------------
452  if (debugPrint)
453  std::cout << " endRun called " << std::endl;
454 }
455 
456 
458  std::string h_name;
459  std::string h_title;
460  std::string h_name_1dEta;
461  std::string h_name_1dPhi;
462  std::string h_title_1dEta;
463  std::string h_title_1dPhi;
464  std::string h_name_1dEtaPath;
465  std::string h_name_1dPhiPath;
466  std::string h_title_1dEtaPath;
467  std::string h_title_1dPhiPath;
469  std::string PD_Folder;
470  std::string Path_Folder;
471 
472  PD_Folder = TString("HLT/GeneralHLTOffline");
473  if (label != "SingleMu" && label != "SingleElectron" && label != "Jet")
474  PD_Folder = TString("HLT/GeneralHLTOffline/"+label);
475 
476  dbe_->setCurrentFolder(PD_Folder.c_str());
477  dbe_->bookString("hltMenuName", hlt_menu_.c_str());
478 
479  h_name = "HLT_" +label + "_EtaVsPhi";
480  h_title = "HLT_" + label + "_EtaVsPhi";
481  h_name_1dEta = "HLT_" + label + "_1dEta";
482  h_name_1dPhi = "HLT_" + label + "_1dPhi";
483  h_title_1dEta = label + " Occupancy Vs Eta";
484  h_title_1dPhi = label + " Occupancy Vs Phi";
485 
486  Int_t numBinsEta = 30;
487  Int_t numBinsPhi = 34;
488  Int_t numBinsEtaFine = 60;
489  Int_t numBinsPhiFine = 66;
490  Double_t EtaMax = 2.610;
491  Double_t PhiMax = 17.0*TMath::Pi()/16.0;
492  Double_t PhiMaxFine = 33.0*TMath::Pi()/32.0;
493  MonitorElement * service_me = NULL;
494 
495  service_me = dbe_->book2D(h_name.c_str(),
496  h_title.c_str(),
497  numBinsEta, -EtaMax, EtaMax,
498  numBinsPhi, -PhiMax, PhiMax);
499  if (TH1 * service_histo = service_me->getTH2F())
500  service_histo->SetMinimum(0);
501 
502  if (label != "MET" && label != "HT") {
503  service_me = dbe_->book1D(h_name_1dEta.c_str(),
504  h_title_1dEta.c_str(),
505  numBinsEtaFine, -EtaMax, EtaMax);
506  if (TH1 * service_histo = service_me->getTH1F())
507  service_histo->SetMinimum(0);
508  }
509  if (label != "HT") {
510  service_me = dbe_->book1D(h_name_1dPhi.c_str(),
511  h_title_1dPhi.c_str(),
512  numBinsPhiFine, -PhiMaxFine, PhiMaxFine);
513  if (TH1 * service_histo = service_me->getTH1F())
514  service_histo->SetMinimum(0);
515  }
516 
517  // make it the top level directory, that is on the same dir level as
518  // paths
519  std::string folderz;
520  folderz = TString("HLT/GeneralHLTOffline/"+label);
521  dbe_->setCurrentFolder(folderz.c_str());
522 
523  std::string dnamez = "cppath_" + label + "_" + hlt_menu_;
524  int sizez = PDsVectorPathsVector[iPD].size();
525  TH1F * hist_mini_cppath = NULL;
526  MonitorElement * hist_mini_cppath_me = dbe_->book1D(dnamez.c_str(),
527  dnamez.c_str(),
528  sizez,
529  0,
530  sizez);
531  if (hist_mini_cppath_me)
532  hist_mini_cppath = hist_mini_cppath_me->getTH1F();
533 
534  unsigned int jPath;
535  for (unsigned int iPath = 0; iPath < PDsVectorPathsVector[iPD].size(); iPath++) {
536  pathName = hlt_config_.removeVersion(PDsVectorPathsVector[iPD][iPath]);
537  h_name_1dEtaPath = "HLT_" + pathName + "_1dEta";
538  h_name_1dPhiPath = "HLT_" + pathName + "_1dPhi";
539  h_title_1dEtaPath = pathName + " Occupancy Vs Eta";
540  h_title_1dPhiPath = pathName + "Occupancy Vs Phi";
541  jPath = iPath + 1;
542 
543  if (hist_mini_cppath) {
544  TAxis * axis = hist_mini_cppath->GetXaxis();
545  if (axis)
546  axis->SetBinLabel(jPath, pathName.c_str());
547  }
548 
549  Path_Folder = TString("HLT/GeneralHLTOffline/" + label + "/Paths");
550  dbe_->setCurrentFolder(Path_Folder.c_str());
551 
552  dbe_->book1D(h_name_1dEtaPath.c_str(),
553  h_title_1dEtaPath.c_str(),
554  numBinsEtaFine, -EtaMax, EtaMax);
555  dbe_->book1D(h_name_1dPhiPath.c_str(),
556  h_title_1dPhiPath.c_str(),
557  numBinsPhiFine, -PhiMaxFine, PhiMaxFine);
558 
559  if (debugPrint)
560  std::cout << "book1D for " << pathName << std::endl;
561  }
562 
563  if (debugPrint)
564  std::cout << "Success setupHltMatrix( " << label << " , "
565  << iPD << " )" << std::cout;
566 } // End setupHltMatrix
567 
568 
570  const std::string & path,
571  double Eta,
572  double Phi,
573  bool first_count) {
574  if (debugPrint)
575  std::cout << "Inside fillHltMatrix( " << label << " , "
576  << path << " ) " << std::endl;
577 
578  std::string fullPathToME;
579  std::string fullPathToME1dEta;
580  std::string fullPathToME1dPhi;
581  std::string fullPathToME1dEtaPath;
582  std::string fullPathToME1dPhiPath;
583  std::string fullPathToCPP;
584 
585 
586  fullPathToME = "HLT/GeneralHLTOffline/HLT_" + label + "_EtaVsPhi";
587  fullPathToME1dEta = "HLT/GeneralHLTOffline/HLT_" + label + "_1dEta";
588  fullPathToME1dPhi = "HLT/GeneralHLTOffline/HLT_" + label + "_1dPhi";
589  fullPathToCPP = "HLT/GeneralHLTOffline/" + label
590  + "/cppath_" + label + "_" + hlt_menu_;
591 
592  if (label != "SingleMu" && label != "SingleElectron" && label != "Jet") {
593  fullPathToME = "HLT/GeneralHLTOffline/"
594  + label + "/HLT_" + label + "_EtaVsPhi";
595  fullPathToME1dEta = "HLT/GeneralHLTOffline/"
596  + label + "/HLT_" + label + "_1dEta";
597  fullPathToME1dPhi = "HLT/GeneralHLTOffline/"
598  + label + "/HLT_" + label + "_1dPhi";
599  }
600 
601  fullPathToME1dEtaPath = "HLT/GeneralHLTOffline/"
602  + label + "/Paths/HLT_"
603  + hlt_config_.removeVersion(path) + "_1dEta";
604  fullPathToME1dPhiPath = "HLT/GeneralHLTOffline/"
605  + label + "/Paths/HLT_"
606  + hlt_config_.removeVersion(path) + "_1dPhi";
607 
608  TH1F * hist_mini_cppath = NULL;
609  MonitorElement * ME_mini_cppath = dbe_->get(fullPathToCPP);
610  if (ME_mini_cppath)
611  hist_mini_cppath = ME_mini_cppath->getTH1F();
612 
613  // fill top-level histograms
614  if (first_count) {
615  if (debugPrint)
616  std::cout << " label " << label << " fullPathToME1dPhi "
617  << fullPathToME1dPhi << " path " << path
618  << " Phi " << Phi << " Eta " << Eta << std::endl;
619 
620  if (label != "MET" && label != "HT") {
621  MonitorElement * ME_1dEta = dbe_->get(fullPathToME1dEta);
622  if (ME_1dEta) {
623  TH1F * hist_1dEta = ME_1dEta->getTH1F();
624  if (hist_1dEta)
625  hist_1dEta->Fill(Eta);
626  }
627  }
628  if (label != "HT") {
629  MonitorElement * ME_1dPhi = dbe_->get(fullPathToME1dPhi);
630  if (ME_1dPhi) {
631  TH1F * hist_1dPhi = ME_1dPhi->getTH1F();
632  if (hist_1dPhi)
633  hist_1dPhi->Fill(Phi);
634  if (debugPrint)
635  std::cout << " **FILLED** label " << label << " fullPathToME1dPhi "
636  << fullPathToME1dPhi << " path " << path
637  << " Phi " << Phi << " Eta " << Eta << std::endl;
638  }
639  }
640  if (label != "MET" && label != "HT") {
641  MonitorElement * ME_2d = dbe_->get(fullPathToME);
642  if (ME_2d) {
643  TH2F * hist_2d = ME_2d->getTH2F();
644  if (hist_2d)
645  hist_2d->Fill(Eta, Phi);
646  }
647  }
648  } // end fill top-level histograms
649 
650  if (label != "MET" && label != "HT") {
651  MonitorElement * ME_1dEtaPath = dbe_->get(fullPathToME1dEtaPath);
652  if (ME_1dEtaPath) {
653  TH1F * hist_1dEtaPath = ME_1dEtaPath->getTH1F();
654  if (hist_1dEtaPath)
655  hist_1dEtaPath->Fill(Eta);
656  }
657  }
658  if (label != "HT") {
659  MonitorElement * ME_1dPhiPath = dbe_->get(fullPathToME1dPhiPath);
660  if (ME_1dPhiPath) {
661  TH1F * hist_1dPhiPath = ME_1dPhiPath->getTH1F();
662  if (hist_1dPhiPath)
663  hist_1dPhiPath->Fill(Phi);
664  }
665  }
666 
667  if (debugPrint)
668  if (label == "MET")
669  std::cout << " MET Eta is " << Eta << std::endl;
670 
671  if (hist_mini_cppath) {
672  TAxis * axis = hist_mini_cppath->GetXaxis();
673  int bin_num = axis->FindBin(path.c_str());
674  int bn = bin_num - 1;
675  hist_mini_cppath->Fill(bn, 1);
676  }
677 
678  if (debugPrint)
679  std::cout << "hist->Fill" << std::endl;
680 } // End fillHltMatrix
681 
683  edm::EventSetup const&) {
684 }
685 
686 void
688  edm::EventSetup const&) {
689 }
690 
RunNumber_t run() const
Definition: EventID.h:42
unsigned int size() const
number of trigger paths in trigger table
const double Pi
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
const std::string moduleType(const std::string &module) const
C++ class name of module.
int id() const
getters
Definition: TriggerObject.h:55
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
MonitorElement * cppath_
float phi() const
Definition: TriggerObject.h:58
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
#define NULL
Definition: scimark2.h:8
const std::string & tableName() const
HLT ConfDB table name.
virtual void beginJob() override
const double EtaMax[kNumberCalorimeter]
float eta() const
Definition: TriggerObject.h:57
std::string plotDirectoryName
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:43
static const std::string removeVersion(const std::string &trigger)
void Fill(long long x)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
int iEvent
Definition: GenABIO.cc:243
const std::vector< std::string > & streamNames() const
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:838
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
virtual void endJob() override
virtual void setupHltMatrix(const std::string &, int)
static std::string const triggerResults
Definition: EdmProvDump.cc:41
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
DQMStore * dbe_
const std::string & processName() const
process name
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< std::vector< std::string > > PDsVectorPathsVector
std::vector< std::string > AddedDatasets
std::vector< size_type > Keys
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
virtual void fillHltMatrix(const std::string &, const std::string &, double, double, bool)
TH1F * getTH1F(void) const
HLTConfigProvider hlt_config_
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
edm::EventID id() const
Definition: EventBase.h:56
GeneralHLTOffline(const edm::ParameterSet &)
tuple cout
Definition: gather_cfg.py:121
volatile std::atomic< bool > shutdown_flag false
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
tuple size
Write out results.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
Definition: Run.h:41