CMS 3D CMS Logo

HLTObjectMonitorProtonLead.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: QM/HLTObjectMonitorProtonLead
4 // Class: HLTObjectMonitorProtonLead
5 //
13 //
14 // Original Author: Varun Sharma
15 // Created: Fri, 21 Oct 2016 12:29:00 GMT
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 #include <sys/time.h>
22 #include <cstdlib>
23 
24 // user include files
29 
35 
37 
38 //for collections
48 
51 
52 #include "TMath.h"
53 #include "TStyle.h"
54 #include "TLorentzVector.h"
55 
56 #include <unordered_map>
57 //
58 // class declaration
59 //
60 
61 //using namespace edm;
62 using namespace trigger;
63 using std::string;
64 using std::unordered_map;
65 using std::vector;
66 
68  struct hltPlot {
70  string pathName;
71  string pathNameOR;
72  string moduleName;
73  string moduleNameOR;
74  int pathIndex = -99;
75  int pathIndexOR = -99;
76  string plotLabel;
77  string xAxisLabel;
78  int nBins;
79  double xMin;
80  double xMax;
82  };
83 
84 public:
86 
87  // static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
88 
89 private:
90  void analyze(const edm::Event&, const edm::EventSetup&) override;
91  void bookHistograms(DQMStore::IBooker& i, edm::Run const&, edm::EventSetup const&) override;
92  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
93  vector<hltPlot*> plotList;
94  double get_wall_time(void);
95  // ----------member data ---------------------------
96 
97  bool debugPrint;
101  string backupFolder;
102  unordered_map<string, bool> acceptMap;
103  unordered_map<hltPlot*, edm::ParameterSet*> plotMap;
104 
105  //set Token(-s)
108 
109  //declare params
110  //pPb run
151 
152  string processName_;
153 
194 };
195 
196 //
197 // constants, enums and typedefs
198 //
199 
200 //
201 // static data member definitions
202 //
203 
204 //
205 // constructors and destructor
206 //
208 
209 {
210  //now do what ever initialization is needed
211  debugPrint = false;
212 
213  topDirectoryName = "HLT/ObjectMonitor";
214  mainShifterFolder = topDirectoryName + "/MainShifter";
215  backupFolder = topDirectoryName + "/Backup";
216 
217  //parse params
218  processName_ = iConfig.getParameter<string>("processName");
219 
220  caloAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("caloAK4JetPt");
221  plotMap[&caloAK4JetPt_] = &caloAK4JetPt_pset;
222  caloAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("caloAK4JetEta");
223  plotMap[&caloAK4JetEta_] = &caloAK4JetEta_pset;
224  caloAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("caloAK4JetPhi");
225  plotMap[&caloAK4JetPhi_] = &caloAK4JetPhi_pset;
226  pfAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("pfAK4JetPt");
227  plotMap[&pfAK4JetPt_] = &pfAK4JetPt_pset;
228  pfAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("pfAK4JetEta");
229  plotMap[&pfAK4JetEta_] = &pfAK4JetEta_pset;
230  pfAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("pfAK4JetPhi");
231  plotMap[&pfAK4JetPhi_] = &pfAK4JetPhi_pset;
232  caloDiAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("caloDiAK4JetPt");
233  plotMap[&caloDiAK4JetPt_] = &caloDiAK4JetPt_pset;
234  caloDiAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("caloDiAK4JetEta");
235  plotMap[&caloDiAK4JetEta_] = &caloDiAK4JetEta_pset;
236  caloDiAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("caloDiAK4JetPhi");
237  plotMap[&caloDiAK4JetPhi_] = &caloDiAK4JetPhi_pset;
238  pfDiAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("pfDiAK4JetPt");
239  plotMap[&pfDiAK4JetPt_] = &pfDiAK4JetPt_pset;
240  pfDiAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("pfDiAK4JetEta");
241  plotMap[&pfDiAK4JetEta_] = &pfDiAK4JetEta_pset;
242  pfDiAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("pfDiAK4JetPhi");
243  plotMap[&pfDiAK4JetPhi_] = &pfDiAK4JetPhi_pset;
244  photonPt_pset = iConfig.getParameter<edm::ParameterSet>("photonPt");
245  plotMap[&photonPt_] = &photonPt_pset;
246  photonEta_pset = iConfig.getParameter<edm::ParameterSet>("photonEta");
247  plotMap[&photonEta_] = &photonEta_pset;
248  photonPhi_pset = iConfig.getParameter<edm::ParameterSet>("photonPhi");
249  plotMap[&photonPhi_] = &photonPhi_pset;
250  photonPPPt_pset = iConfig.getParameter<edm::ParameterSet>("photonPPPt");
251  plotMap[&photonPPPt_] = &photonPPPt_pset;
252  photonPPEta_pset = iConfig.getParameter<edm::ParameterSet>("photonPPEta");
253  plotMap[&photonPPEta_] = &photonPPEta_pset;
254  photonPPPhi_pset = iConfig.getParameter<edm::ParameterSet>("photonPPPhi");
255  plotMap[&photonPPPhi_] = &photonPPPhi_pset;
256  caloBJetPt_pset = iConfig.getParameter<edm::ParameterSet>("caloBJetPt");
257  plotMap[&caloBJetPt_] = &caloBJetPt_pset;
258  caloBJetEta_pset = iConfig.getParameter<edm::ParameterSet>("caloBJetEta");
259  plotMap[&caloBJetEta_] = &caloBJetEta_pset;
260  caloBJetPhi_pset = iConfig.getParameter<edm::ParameterSet>("caloBJetPhi");
261  plotMap[&caloBJetPhi_] = &caloBJetPhi_pset;
262  pfBJetPt_pset = iConfig.getParameter<edm::ParameterSet>("pfBJetPt");
263  plotMap[&pfBJetPt_] = &pfBJetPt_pset;
264  pfBJetEta_pset = iConfig.getParameter<edm::ParameterSet>("pfBJetEta");
265  plotMap[&pfBJetEta_] = &pfBJetEta_pset;
266  pfBJetPhi_pset = iConfig.getParameter<edm::ParameterSet>("pfBJetPhi");
267  plotMap[&pfBJetPhi_] = &pfBJetPhi_pset;
268  electronPt_pset = iConfig.getParameter<edm::ParameterSet>("electronPt");
269  plotMap[&electronPt_] = &electronPt_pset;
270  electronEta_pset = iConfig.getParameter<edm::ParameterSet>("electronEta");
271  plotMap[&electronEta_] = &electronEta_pset;
272  electronPhi_pset = iConfig.getParameter<edm::ParameterSet>("electronPhi");
273  plotMap[&electronPhi_] = &electronPhi_pset;
274  l3muon3Pt_pset = iConfig.getParameter<edm::ParameterSet>("l3muon3Pt");
275  plotMap[&l3muon3Pt_] = &l3muon3Pt_pset;
276  l3muon3Eta_pset = iConfig.getParameter<edm::ParameterSet>("l3muon3Eta");
277  plotMap[&l3muon3Eta_] = &l3muon3Eta_pset;
278  l3muon3Phi_pset = iConfig.getParameter<edm::ParameterSet>("l3muon3Phi");
279  plotMap[&l3muon3Phi_] = &l3muon3Phi_pset;
280  l2muon12Pt_pset = iConfig.getParameter<edm::ParameterSet>("l2muon12Pt");
281  plotMap[&l2muon12Pt_] = &l2muon12Pt_pset;
282  l2muon12Eta_pset = iConfig.getParameter<edm::ParameterSet>("l2muon12Eta");
283  plotMap[&l2muon12Eta_] = &l2muon12Eta_pset;
284  l2muon12Phi_pset = iConfig.getParameter<edm::ParameterSet>("l2muon12Phi");
285  plotMap[&l2muon12Phi_] = &l2muon12Phi_pset;
286  l3muon12Pt_pset = iConfig.getParameter<edm::ParameterSet>("l3muon12Pt");
287  plotMap[&l3muon12Pt_] = &l3muon12Pt_pset;
288  l3muon12Eta_pset = iConfig.getParameter<edm::ParameterSet>("l3muon12Eta");
289  plotMap[&l3muon12Eta_] = &l3muon12Eta_pset;
290  l3muon12Phi_pset = iConfig.getParameter<edm::ParameterSet>("l3muon12Phi");
291  plotMap[&l3muon12Phi_] = &l3muon12Phi_pset;
292  pAL1DoubleMuZMass_pset = iConfig.getParameter<edm::ParameterSet>("pAL1DoubleMuZMass");
293  plotMap[&pAL1DoubleMuZMass_] = &pAL1DoubleMuZMass_pset;
294  pAL2DoubleMuZMass_pset = iConfig.getParameter<edm::ParameterSet>("pAL2DoubleMuZMass");
295  plotMap[&pAL2DoubleMuZMass_] = &pAL2DoubleMuZMass_pset;
296  pAL3DoubleMuZMass_pset = iConfig.getParameter<edm::ParameterSet>("pAL3DoubleMuZMass");
297  plotMap[&pAL3DoubleMuZMass_] = &pAL3DoubleMuZMass_pset;
298  wallTime_pset = iConfig.getParameter<edm::ParameterSet>("wallTime");
299  plotMap[&wallTime_] = &wallTime_pset;
300 
301  for (auto item = plotMap.begin(); item != plotMap.end(); item++) {
302  (*item->first).pathName = (*item->second).getParameter<string>("pathName");
303  (*item->first).moduleName = (*item->second).getParameter<string>("moduleName");
304  (*item->first).nBins = (*item->second).getParameter<int>("NbinsX");
305  (*item->first).xMin = (*item->second).getParameter<double>("Xmin");
306  (*item->first).xMax = (*item->second).getParameter<double>("Xmax");
307  (*item->first).xAxisLabel = (*item->second).getParameter<string>("axisLabel");
308  (*item->first).plotLabel = (*item->second).getParameter<string>("plotLabel");
309  (*item->first).displayInPrimary = (*item->second).getParameter<bool>("mainWorkspace");
310 
311  if ((*item->second).exists("pathName_OR")) {
312  (*item->first).pathNameOR = (*item->second).getParameter<string>("pathName_OR");
313  }
314  if ((*item->second).exists("moduleName_OR")) {
315  (*item->first).moduleNameOR = (*item->second).getParameter<string>("moduleName_OR");
316  }
317 
318  plotList.push_back(item->first);
319  }
320  plotMap.clear();
321 
322  //set Token(s)
323  triggerResultsToken_ = consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("triggerResults"));
324  aodTriggerToken_ = consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("triggerEvent"));
325 }
326 
327 //
328 // member functions
329 //
330 
331 // ------------ method called for each event ------------
333  double start = get_wall_time();
334 
335  using namespace edm;
336 
337  if (debugPrint)
338  std::cout << "Inside analyze(). " << std::endl;
339 
340  // access trigger results
342  iEvent.getByToken(triggerResultsToken_, triggerResults);
343  if (!triggerResults.isValid())
344  return;
345 
346  edm::Handle<trigger::TriggerEvent> aodTriggerEvent;
347  iEvent.getByToken(aodTriggerToken_, aodTriggerEvent);
348  if (!aodTriggerEvent.isValid())
349  return;
350 
351  //reset everything to not accepted at beginning of each event
352  unordered_map<string, bool> firedMap = acceptMap;
353  for (auto plot : plotList) //loop over paths
354  {
355  if (firedMap[plot->pathName])
356  continue;
357  bool triggerAccept = false;
358  const TriggerObjectCollection objects = aodTriggerEvent->getObjects();
359  edm::InputTag moduleFilter;
361  if (plot->pathIndex > 0 && triggerResults->accept(plot->pathIndex) && hltConfig_.saveTags(plot->moduleName)) {
362  moduleFilter = edm::InputTag(plot->moduleName, "", processName_);
363  pathName = plot->pathName;
364  triggerAccept = true;
365  } else if (plot->pathIndexOR > 0 && triggerResults->accept(plot->pathIndexOR) &&
366  hltConfig_.saveTags(plot->moduleNameOR)) {
367  if (firedMap[plot->pathNameOR])
368  continue;
369  moduleFilter = edm::InputTag(plot->moduleNameOR, "", processName_);
370  pathName = plot->pathNameOR;
371  triggerAccept = true;
372  }
373 
374  if (triggerAccept) {
375  unsigned int moduleFilterIndex = aodTriggerEvent->filterIndex(moduleFilter);
376 
377  if (moduleFilterIndex + 1 > aodTriggerEvent->sizeFilters())
378  return;
379  const Keys& keys = aodTriggerEvent->filterKeys(moduleFilterIndex);
380 
386 
387  //calo AK4 jet pt + eta + phi
388  if (pathName == caloAK4JetPt_.pathName) {
389  for (const auto& key : keys) {
390  caloAK4JetPt_.ME->Fill(objects[key].pt());
391  caloAK4JetEta_.ME->Fill(objects[key].eta());
392  caloAK4JetPhi_.ME->Fill(objects[key].phi());
393  }
394  }
395  //pf AK4 jet pt + eta + phi
396  else if (pathName == pfAK4JetPt_.pathName) {
397  for (const auto& key : keys) {
398  pfAK4JetPt_.ME->Fill(objects[key].pt());
399  pfAK4JetEta_.ME->Fill(objects[key].eta());
400  pfAK4JetPhi_.ME->Fill(objects[key].phi());
401  }
402  }
403  //calo AK4 di jet pt + eta + phi
404  else if (pathName == caloDiAK4JetPt_.pathName) {
405  for (const auto& key : keys) {
406  caloDiAK4JetPt_.ME->Fill(objects[key].pt());
407  caloDiAK4JetEta_.ME->Fill(objects[key].eta());
408  caloDiAK4JetPhi_.ME->Fill(objects[key].phi());
409  }
410  }
411  //pf AK4 di jet pt + eta + phi
412  else if (pathName == pfDiAK4JetPt_.pathName) {
413  for (const auto& key : keys) {
414  pfDiAK4JetPt_.ME->Fill(objects[key].pt());
415  pfDiAK4JetEta_.ME->Fill(objects[key].eta());
416  pfDiAK4JetPhi_.ME->Fill(objects[key].phi());
417  }
418  }
419  //photon pt + eta + phi
420  else if (pathName == photonPt_.pathName) {
421  for (const auto& key : keys) {
422  photonPt_.ME->Fill(objects[key].pt());
423  photonEta_.ME->Fill(objects[key].eta());
424  photonPhi_.ME->Fill(objects[key].phi());
425  }
426  }
427  //photon PPStyle pt + eta + phi
428  else if (pathName == photonPPPt_.pathName) {
429  for (const auto& key : keys) {
430  photonPPPt_.ME->Fill(objects[key].pt());
431  photonPPEta_.ME->Fill(objects[key].eta());
432  photonPPPhi_.ME->Fill(objects[key].phi());
433  }
434  }
435  //calo Bjet pt + eta + phi
436  else if (pathName == caloBJetPt_.pathName) {
437  for (const auto& key : keys) {
438  caloBJetPt_.ME->Fill(objects[key].pt());
439  caloBJetEta_.ME->Fill(objects[key].eta());
440  caloBJetPhi_.ME->Fill(objects[key].phi());
441  }
442  }
443  //PF Bjet pt + eta + phi
444  else if (pathName == pfBJetPt_.pathName) {
445  for (const auto& key : keys) {
446  pfBJetPt_.ME->Fill(objects[key].pt());
447  pfBJetEta_.ME->Fill(objects[key].eta());
448  pfBJetPhi_.ME->Fill(objects[key].phi());
449  }
450  }
451  //electron pt + eta + phi
452  else if (pathName == electronPt_.pathName) {
453  for (const auto& key : keys) {
454  electronPt_.ME->Fill(objects[key].pt());
455  electronEta_.ME->Fill(objects[key].eta());
456  electronPhi_.ME->Fill(objects[key].phi());
457  }
458  } else if (pathName == l3muon3Pt_.pathName) {
459  for (const auto& key : keys) {
460  l3muon3Pt_.ME->Fill(objects[key].pt());
461  l3muon3Eta_.ME->Fill(objects[key].eta());
462  l3muon3Phi_.ME->Fill(objects[key].phi());
463  }
464  } else if (pathName == l2muon12Pt_.pathName) {
465  for (const auto& key : keys) {
466  l2muon12Pt_.ME->Fill(objects[key].pt());
467  l2muon12Eta_.ME->Fill(objects[key].eta());
468  l2muon12Phi_.ME->Fill(objects[key].phi());
469  }
470  } else if (pathName == l3muon12Pt_.pathName) {
471  for (const auto& key : keys) {
472  l3muon12Pt_.ME->Fill(objects[key].pt());
473  l3muon12Eta_.ME->Fill(objects[key].eta());
474  l3muon12Phi_.ME->Fill(objects[key].phi());
475  }
476  }
477 
478  // ////////////////////////////////
479  // ///
480  // /// double-object plots
481  // ///
482  // ////////////////////////////////
483 
484  else if (pathName == pAL1DoubleMuZMass_.pathName) {
485  const double mu_mass(.105658);
486  unsigned int kCnt0 = 0;
487  for (const auto& key0 : keys) {
488  unsigned int kCnt1 = 0;
489  for (const auto& key1 : keys) {
490  if (key0 != key1 &&
491  kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
492  // if (abs(objects[key0].id()) == 13 && (objects[key0].id()+objects[key1].id()==0)) // id is not filled for l1 stage2 muons
493  TLorentzVector mu1, mu2, dimu;
494  mu1.SetPtEtaPhiM(objects[key0].pt(), objects[key0].eta(), objects[key0].phi(), mu_mass);
495  mu2.SetPtEtaPhiM(objects[key1].pt(), objects[key1].eta(), objects[key1].phi(), mu_mass);
496  dimu = mu1 + mu2;
497  if (dimu.M() > pAL1DoubleMuZMass_.xMin && dimu.M() < pAL1DoubleMuZMass_.xMax)
498  pAL1DoubleMuZMass_.ME->Fill(dimu.M());
499  }
500  kCnt1 += 1;
501  }
502  kCnt0 += 1;
503  }
504  } else if (pathName == pAL2DoubleMuZMass_.pathName) {
505  const double mu_mass(.105658);
506  unsigned int kCnt0 = 0;
507  for (const auto& key0 : keys) {
508  unsigned int kCnt1 = 0;
509  for (const auto& key1 : keys) {
510  if (key0 != key1 &&
511  kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
512  if (abs(objects[key0].id()) == 13 &&
513  (objects[key0].id() + objects[key1].id() == 0)) { // check muon id and dimuon charge
514  TLorentzVector mu1, mu2, dimu;
515  mu1.SetPtEtaPhiM(objects[key0].pt(), objects[key0].eta(), objects[key0].phi(), mu_mass);
516  mu2.SetPtEtaPhiM(objects[key1].pt(), objects[key1].eta(), objects[key1].phi(), mu_mass);
517  dimu = mu1 + mu2;
518  if (dimu.M() > pAL2DoubleMuZMass_.xMin && dimu.M() < pAL2DoubleMuZMass_.xMax)
519  pAL2DoubleMuZMass_.ME->Fill(dimu.M());
520  }
521  }
522  kCnt1 += 1;
523  }
524  kCnt0 += 1;
525  }
526  } else if (pathName == pAL3DoubleMuZMass_.pathName) {
527  const double mu_mass(.105658);
528  unsigned int kCnt0 = 0;
529  for (const auto& key0 : keys) {
530  unsigned int kCnt1 = 0;
531  for (const auto& key1 : keys) {
532  if (key0 != key1 &&
533  kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
534  if (abs(objects[key0].id()) == 13 &&
535  (objects[key0].id() + objects[key1].id() == 0)) { // check muon id and dimuon charge
536  TLorentzVector mu1, mu2, dimu;
537  mu1.SetPtEtaPhiM(objects[key0].pt(), objects[key0].eta(), objects[key0].phi(), mu_mass);
538  mu2.SetPtEtaPhiM(objects[key1].pt(), objects[key1].eta(), objects[key1].phi(), mu_mass);
539  dimu = mu1 + mu2;
540  if (dimu.M() > pAL3DoubleMuZMass_.xMin && dimu.M() < pAL3DoubleMuZMass_.xMax)
541  pAL3DoubleMuZMass_.ME->Fill(dimu.M());
542  }
543  }
544  kCnt1 += 1;
545  }
546  kCnt0 += 1;
547  }
548  }
549 
550  firedMap[pathName] = true;
551  } //end if trigger accept
552  } //end loop over plots/paths
553 
554  // sleep(1); //sleep for 1s, used to calibrate timing
555  double end = get_wall_time();
556  double wallTime = end - start;
557  wallTime_.ME->Fill(wallTime);
558 }
559 
560 // ------------ method called when starting to processes a run ------------
562  if (debugPrint)
563  std::cout << "Calling beginRun. " << std::endl;
564  bool changed = true;
565  if (hltConfig_.init(iRun, iSetup, processName_, changed)) {
566  if (debugPrint)
567  std::cout << "Extracting HLTconfig. " << std::endl;
568  }
569 
570  //get path indicies from menu
571  string pathName_noVersion;
572  vector<string> triggerPaths = hltConfig_.triggerNames();
573 
574  for (const auto& pathName : triggerPaths) {
575  pathName_noVersion = hltConfig_.removeVersion(pathName);
576  for (auto plot : plotList) {
577  if (plot->pathName == pathName_noVersion) {
578  (*plot).pathIndex = hltConfig_.triggerIndex(pathName);
579  } else if (plot->pathNameOR == pathName_noVersion) {
580  (*plot).pathIndexOR = hltConfig_.triggerIndex(pathName);
581  }
582  }
583  }
584  vector<hltPlot*> plotList_temp;
585  for (auto plot : plotList) {
586  if (plot->pathIndex > 0 || plot->pathIndexOR > 0) {
587  plotList_temp.push_back(plot);
588  acceptMap[plot->pathName] = false;
589  if (plot->pathIndexOR > 0)
590  acceptMap[plot->pathNameOR] = false;
591  }
592  }
593  //now re-assign plotList to contain only the plots with paths in the menu.
594  plotList = plotList_temp;
595  plotList_temp.clear();
596 }
597 
598 // ------------ method called when ending the processing of a run ------------
599 
601  edm::Run const& iRun,
602  edm::EventSetup const& iSetup) {
608 
609  //book wall time separately
610  ibooker.setCurrentFolder(mainShifterFolder);
611  wallTime_.ME =
612  ibooker.book1D(wallTime_.plotLabel, wallTime_.pathName, wallTime_.nBins, wallTime_.xMin, wallTime_.xMax);
613  wallTime_.ME->setAxisTitle(wallTime_.xAxisLabel);
614 
615  for (auto plot : plotList) {
616  std::string display_pathNames = plot->pathName;
617  if (!plot->pathNameOR.empty())
618  display_pathNames = plot->pathName + " OR " + plot->pathNameOR;
619 
620  if (plot->displayInPrimary) {
621  ibooker.setCurrentFolder(mainShifterFolder);
622  (*plot).ME = ibooker.book1D(plot->plotLabel, display_pathNames.c_str(), plot->nBins, plot->xMin, plot->xMax);
623  (*plot).ME->setAxisTitle(plot->xAxisLabel);
624  //need to add OR statement
625  } else {
626  ibooker.setCurrentFolder(backupFolder);
627  (*plot).ME = ibooker.book1D(plot->plotLabel, display_pathNames.c_str(), plot->nBins, plot->xMin, plot->xMax);
628  (*plot).ME->setAxisTitle(plot->xAxisLabel);
629  }
630  }
631 }
632 
634  struct timeval time;
635  if (gettimeofday(&time, nullptr))
636  return 0;
637  return (double)time.tv_sec + (double)time.tv_usec * .000001;
638 }
639 
640 // ------------ method called when starting to processes a luminosity block ------------
641 /*
642 void
643 HLTObjectMonitorProtonLead::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
644 {
645 }
646 */
647 
648 // ------------ method called when ending the processing of a luminosity block ------------
649 /*
650 void
651 HLTObjectMonitorProtonLead::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
652 {
653 }
654 */
655 
656 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
657 // void
658 // HLTObjectMonitorProtonLead::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
659 // //The following says we do not know what parameters are allowed so do no validation
660 // // Please change this to state exactly what you do use, even if it is no parameters
661 // edm::ParameterSetDescription desc;
662 // desc.setUnknown();
663 // descriptions.addDefault(desc);
664 // }
665 
666 //define this as a plug-in
Definition: start.py:1
edm::EDGetTokenT< trigger::TriggerEvent > aodTriggerToken_
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:119
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:147
unordered_map< string, bool > acceptMap
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
int iEvent
Definition: GenABIO.cc:224
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:102
key
prepare the HTCondor submission files and eventually submit them
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static std::string const triggerResults
Definition: EdmProvDump.cc:47
unordered_map< hltPlot *, edm::ParameterSet * > plotMap
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:133
std::vector< size_type > Keys
HLTObjectMonitorProtonLead(const edm::ParameterSet &)
bool isValid() const
Definition: HandleBase.h:70
HLT enums.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
static std::string const triggerPaths
Definition: EdmProvDump.cc:48
if(threadIdxLocalY==0 &&threadIdxLocalX==0)
Definition: Run.h:45
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void analyze(const edm::Event &, const edm::EventSetup &) override