CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrigResRateMon.cc
Go to the documentation of this file.
1 // $Id: TrigResRateMon.cc,v 1.11 2010/07/26 12:32:21 rekovic Exp $
2 // See header file for information.
3 #include "TMath.h"
6 
7 #include <map>
8 #include <utility>
9 
10 
11 using namespace edm;
12 using namespace trigger;
13 using namespace std;
14 
15 TrigResRateMon::TrigResRateMon(const edm::ParameterSet& iConfig): currentRun_(-99)
16 {
17 
18  LogDebug("TrigResRateMon") << "constructor...." ;
19 
20  fIsSetup = false;
21 
23  if ( ! dbe_ ) {
24  LogInfo("TrigResRateMon") << "unabel to get DQMStore service?";
25  }
26  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
27  dbe_->setVerbose(0);
28  }
29 
30  dirname_ = iConfig.getUntrackedParameter("dirname", std::string("HLT/TrigResults/"));
31  //dirname_ += iConfig.getParameter<std::string>("@module_label");
32 
33  if (dbe_ != 0 ) {
35  }
36 
37  doCombineRuns_ = iConfig.getUntrackedParameter<bool>("doCombineRuns", false);
38  doVBTFMuon_ = iConfig.getUntrackedParameter<bool>("doVBTFMuon", true);
39 
40  processname_ = iConfig.getParameter<std::string>("processname");
41  fCustomBXPath = iConfig.getUntrackedParameter<std::string>("customBXPath", std::string("HLT_MinBiasBSC"));
42 
43  referenceBX_ = iConfig.getUntrackedParameter<unsigned int>("referenceBX",51);
44  Nbx_ = iConfig.getUntrackedParameter<unsigned int>("Nbx",3564);
45 
46  // plotting paramters
47  ptMin_ = iConfig.getUntrackedParameter<double>("ptMin",0.);
48  ptMax_ = iConfig.getUntrackedParameter<double>("ptMax",1000.);
49  nBins_ = iConfig.getUntrackedParameter<unsigned int>("Nbins",20);
50  nBins2D_ = iConfig.getUntrackedParameter<unsigned int>("Nbins2D",40);
51  dRMax_ = iConfig.getUntrackedParameter<double>("dRMax",1.0);
52  dRMaxElectronMuon_ = iConfig.getUntrackedParameter<double>("dRMaxElectronMuon",0.3);
53  nBinsDR_ = iConfig.getUntrackedParameter<unsigned int>("NbinsDR",10);
54  nBinsOneOverEt_ = iConfig.getUntrackedParameter<unsigned int>("NbinsOneOverEt",10000);
55  nLS_ = iConfig.getUntrackedParameter<unsigned int>("NLuminositySegments",10);
56  LSsize_ = iConfig.getUntrackedParameter<double>("LuminositySegmentSize",23);
57  thresholdFactor_ = iConfig.getUntrackedParameter<double>("thresholdFactor",1.0);
58 
59 
60  plotAll_ = iConfig.getUntrackedParameter<bool>("plotAll", false);
61  // this is the list of paths to look at.
62  std::vector<edm::ParameterSet> paths =
63  iConfig.getParameter<std::vector<edm::ParameterSet> >("paths");
64 
65  for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
66 
67  custompathnamepairs_.push_back(
68  make_pair(
69  pathconf->getParameter<std::string>("pathname"),
70  pathconf->getParameter<std::string>("denompathname")
71  )
72  );
73 
74  }
75 
76  if (hltPaths_.size() > 0)
77  {
78  // book a histogram of scalers
79  scalersSelect = dbe_->book1D("selectedScalers","Selected Scalers", hltPaths_.size(), 0.0, (double)hltPaths_.size());
80 
81  }
82 
83  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
84  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
85 
86 
87  /*
88  muonRecoCollectionName_ = iConfig.getUntrackedParameter("muonRecoCollectionName", std::string("muons"));
89 
90  electronEtaMax_ = iConfig.getUntrackedParameter<double>("electronEtaMax",2.5);
91  electronEtMin_ = iConfig.getUntrackedParameter<double>("electronEtMin",3.0);
92  electronDRMatch_ =iConfig.getUntrackedParameter<double>("electronDRMatch",0.3);
93  electronL1DRMatch_ =iConfig.getUntrackedParameter<double>("electronL1DRMatch",0.3);
94 
95  muonEtaMax_ = iConfig.getUntrackedParameter<double>("muonEtaMax",2.1);
96  muonEtMin_ = iConfig.getUntrackedParameter<double>("muonEtMin",0.0);
97  muonDRMatch_ =iConfig.getUntrackedParameter<double>("muonDRMatch",0.3);
98  muonL1DRMatch_ =iConfig.getUntrackedParameter<double>("muonL1DRMatch",0.3);
99 
100  tauEtaMax_ = iConfig.getUntrackedParameter<double>("tauEtaMax",2.5);
101  tauEtMin_ = iConfig.getUntrackedParameter<double>("tauEtMin",3.0);
102  tauDRMatch_ =iConfig.getUntrackedParameter<double>("tauDRMatch",0.3);
103  tauL1DRMatch_ =iConfig.getUntrackedParameter<double>("tauL1DRMatch",0.5);
104 
105  jetEtaMax_ = iConfig.getUntrackedParameter<double>("jetEtaMax",5.0);
106  jetEtMin_ = iConfig.getUntrackedParameter<double>("jetEtMin",10.0);
107  jetDRMatch_ =iConfig.getUntrackedParameter<double>("jetDRMatch",0.3);
108  jetL1DRMatch_ =iConfig.getUntrackedParameter<double>("jetL1DRMatch",0.5);
109 
110  bjetEtaMax_ = iConfig.getUntrackedParameter<double>("bjetEtaMax",2.5);
111  bjetEtMin_ = iConfig.getUntrackedParameter<double>("bjetEtMin",10.0);
112  bjetDRMatch_ =iConfig.getUntrackedParameter<double>("bjetDRMatch",0.3);
113  bjetL1DRMatch_ =iConfig.getUntrackedParameter<double>("bjetL1DRMatch",0.3);
114 
115  photonEtaMax_ = iConfig.getUntrackedParameter<double>("photonEtaMax",2.5);
116  photonEtMin_ = iConfig.getUntrackedParameter<double>("photonEtMin",3.0);
117  photonDRMatch_ =iConfig.getUntrackedParameter<double>("photonDRMatch",0.3);
118  photonL1DRMatch_ =iConfig.getUntrackedParameter<double>("photonL1DRMatch",0.3);
119 
120  trackEtaMax_ = iConfig.getUntrackedParameter<double>("trackEtaMax",2.5);
121  trackEtMin_ = iConfig.getUntrackedParameter<double>("trackEtMin",3.0);
122  trackDRMatch_ =iConfig.getUntrackedParameter<double>("trackDRMatch",0.3);
123  trackL1DRMatch_ =iConfig.getUntrackedParameter<double>("trackL1DRMatch",0.3);
124 
125  metEtaMax_ = iConfig.getUntrackedParameter<double>("metEtaMax",5);
126  metMin_ = iConfig.getUntrackedParameter<double>("metMin",10.0);
127  metDRMatch_ =iConfig.getUntrackedParameter<double>("metDRMatch",0.5);
128  metL1DRMatch_ =iConfig.getUntrackedParameter<double>("metL1DRMatch",0.5);
129 
130  htEtaMax_ = iConfig.getUntrackedParameter<double>("htEtaMax",5);
131  htMin_ = iConfig.getUntrackedParameter<double>("htMin",10.0);
132  htDRMatch_ =iConfig.getUntrackedParameter<double>("htDRMatch",0.5);
133  htL1DRMatch_ =iConfig.getUntrackedParameter<double>("htL1DRMatch",0.5);
134  */
135 
136  sumEtMin_ = iConfig.getUntrackedParameter<double>("sumEtMin",10.0);
137 
138  // Muon quality cuts
139  dxyCut_ = iConfig.getUntrackedParameter<double>("DxyCut", 0.2); // dxy < 0.2 cm
140  normalizedChi2Cut_ = iConfig.getUntrackedParameter<double>("NormalizedChi2Cut", 10.); // chi2/ndof (of global fit) <10.0
141  trackerHitsCut_ = iConfig.getUntrackedParameter<int>("TrackerHitsCut", 11); // Tracker Hits >10
142  pixelHitsCut_ = iConfig.getUntrackedParameter<int>("PixelHitsCut", 1); // Pixel Hits >0
143  muonHitsCut_ = iConfig.getUntrackedParameter<int>("MuonHitsCut", 1); // Valid Muon Hits >0
144  isAlsoTrackerMuon_ = iConfig.getUntrackedParameter<bool>("IsAlsoTrackerMuon", true);
145  nMatchesCut_ = iConfig.getUntrackedParameter<int>("NMatchesCut", 2); // At least 2 Chambers with matches
146 
147  specialPaths_ = iConfig.getParameter<std::vector<std::string > >("SpecialPaths");
148 
149  pathsSummaryFolder_ = iConfig.getUntrackedParameter ("pathsSummaryFolder",std::string("HLT/TrigResults/PathsSummary/HLT Counts/"));
150  pathsSummaryStreamsFolder_ = iConfig.getUntrackedParameter ("pathsSummaryFolder",std::string("HLT/TrigResults/PathsSummary/"));
151  //pathsSummaryStreamsFolder_ = iConfig.getUntrackedParameter ("pathsSummaryFolder",std::string("HLT/TrigResults/PathsSummary/Streams/"));
152  pathsSummaryHLTCorrelationsFolder_ = iConfig.getUntrackedParameter ("hltCorrelationsFolder",std::string("HLT/TrigResults/PathsSummary/HLT Correlations/"));
153  pathsSummaryFilterCountsFolder_ = iConfig.getUntrackedParameter ("filterCountsFolder",std::string("HLT/TrigResults/PathsSummary/Filters Counts/"));
154 
155  pathsSummaryHLTPathsPerLSFolder_ = iConfig.getUntrackedParameter ("individualPathsPerLSFolder",std::string("HLT/TrigResults/PathsSummary/HLT LS/"));
156  pathsIndividualHLTPathsPerLSFolder_ = iConfig.getUntrackedParameter ("individualPathsPerLSFolder",std::string("HLT/TrigResults/PathsSummary/HLT LS/Paths/"));
157  pathsSummaryHLTPathsPerBXFolder_ = iConfig.getUntrackedParameter ("individualPathsPerBXFolder",std::string("HLT/TrigResults/PathsSummary/HLT BX/"));
158 
159  fLumiFlag = true;
160  ME_HLTAll_LS = NULL;
161  ME_HLT_BX = NULL;
163 
164  //jetID = new reco::helper::JetIDHelper(iConfig.getParameter<ParameterSet>("JetIDParams"));
165 
166  recHitsEBTag_ = iConfig.getUntrackedParameter<edm::InputTag>("RecHitsEBTag",edm::InputTag("reducedEcalRecHitsEB"));
167  recHitsEETag_ = iConfig.getUntrackedParameter<edm::InputTag>("RecHitsEETag",edm::InputTag("reducedEcalRecHitsEE"));
168 
169 
170 }
171 
172 
174 {
175 
176  // do anything here that needs to be done at desctruction time
177  // (e.g. close files, deallocate resources etc.)
178 
179 }
180 
181 
182 //
183 // member functions
184 //
185 
186 // ------------ method called to for each event ------------
187 void
189 {
190 
191  //if(! fLumiFlag ) return;
192 
193  using namespace edm;
194  using namespace trigger;
195  ++nev_;
196  LogDebug("TrigResRateMon")<< " analyze...." ;
197 
198 
199 
200 
201  edm::Handle<TriggerResults> triggerResults;
202  iEvent.getByLabel(triggerResultsLabel_,triggerResults);
203  if(!triggerResults.isValid()) {
204  edm::InputTag triggerResultsLabelFU(triggerResultsLabel_.label(),triggerResultsLabel_.instance(), "FU");
205  iEvent.getByLabel(triggerResultsLabelFU,triggerResults);
206  if(!triggerResults.isValid()) {
207  edm::LogInfo("TrigResRateMon") << "TriggerResults not found, "
208  "skipping event";
209  return;
210  }
211  }
212  triggerResults_ = triggerResults;
213  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
214 
215  //int npath = triggerResults->size();
216 
217 
218  // int bx = iEvent.bunchCrossing();
219  /*
220  // Fill HLTPassed_Correlation Matrix bin (i,j) = (Any,Any)
221  // --------------------------------------------------------
222  int anyBinNumber = ME_HLTPassPass->getTH2F()->GetXaxis()->FindBin("HLT_Any");
223  // any triger accepted
224  if(triggerResults->accept()){
225 
226  ME_HLTPassPass->Fill(anyBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
227 
228  }
229  */
230 
231  fillHltMatrix(triggerNames);
232 
233  return;
234 
235 
236  // Loop over paths
237  // --------------------
238  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
239 
240  /*
241  LogTrace("TrigResRateMon") << " unique path " << v->getPath() << endl;
242 
243  unsigned int pathByIndex = triggerNames.triggerIndex(v->getPath());
244 
245  // path must be in the menu
246  if(pathByIndex >= triggerResults_->size() ) continue;
247 
248 
249  // Fill HLTPassed Matrix and HLTPassFail Matrix
250  // --------------------------------------------------------
251 
252  if(triggerResults->accept(pathByIndex)){
253 
254  int pathBinNumber = ME_HLT_BX->getTH2F()->GetYaxis()->FindBin(v->getPath().c_str());
255  ME_HLT_BX->Fill(bx,pathBinNumber-1);
256 
257  //if(hasHLTPassed(fCustomBXPath,triggerNames)) {
258 
259  ME_HLT_CUSTOM_BX->Fill(bx,pathBinNumber-1);
260 
261  //}
262 
263  } // end if accept
264 
265  */
266 
267  /*
268  // Fill histogram of filter ocupancy for each HLT path
269  // ---------------------------------
270  unsigned int lastModule = triggerResults->index(pathByIndex);
271 
272  //check if hlt passed
273  bool hltPathPassed = triggerResults->accept(pathByIndex);
274 
275  //go through the list of filters
276  for(unsigned int filt = 0; filt < v->filtersAndIndices.size(); filt++){
277 
278  int binNumber = v->getFiltersHisto()->getTH1()->GetXaxis()->FindBin(v->filtersAndIndices[filt].first.c_str());
279 
280  // if hlt path passed, then all the modules passed
281  // otherwise the module that issued the decision is the first fail
282  // this means that all modules before it passed
283  if(hltPathPassed) {
284 
285  v->getFiltersHisto()->Fill(binNumber-1);//binNumber1 = 0 = first filter
286  }
287  else if(v->filtersAndIndices[filt].second < lastModule){
288  v->getFiltersHisto()->Fill(binNumber-1);//binNumber1 = 0 = first filter
289  }
290 
291  } // end for filt
292  */
293 
294  } // end for diag paths
295 
296 }
297 
298 
299 
300 // -- method called once each job just before starting event loop --------
301 void
303 {
304  nev_ = 0;
305  DQMStore *dbe = 0;
306  dbe = Service<DQMStore>().operator->();
307 
308  if (dbe) {
310  }
311 
312 
313  MonitorElement* reportSummaryME = dbe->book1D("reportSummaryMap","report Summary Map",2,0,2);
314  if(reportSummaryME) reportSummaryME->Fill(1);
315 
316 
317 }
318 
319 // - method called once each job just after ending the event loop ------------
320 void
322 {
323  LogInfo("TrigResRateMon") << "analyzed " << nev_ << " events";
324  return;
325 }
326 
327 
328 // BeginRun
330 {
331 
332  LogDebug("TrigResRateMon") << "beginRun, run " << run.id();
333 
334  if(fIsSetup) return;
335 
336  // HLT config does not change within runs!
337  bool changed=false;
338 
339  if (!hltConfig_.init(run, c, processname_, changed)) {
340 
341  processname_ = "FU";
342 
343  if (!hltConfig_.init(run, c, processname_, changed)){
344 
345  LogDebug("TrigResRateMon") << "HLTConfigProvider failed to initialize.";
346 
347  }
348 
349  // check if trigger name in (new) config
350  // cout << "Available TriggerNames are: " << endl;
351  // hltConfig_.dump("Triggers");
352  }
353 
354  if (1) {
355 
356  DQMStore *dbe = 0;
357  dbe = Service<DQMStore>().operator->();
358 
359  if (dbe) {
361  }
362 
363 
364  const unsigned int n(hltConfig_.size());
365 
366 
367  if (plotAll_){
368 
369  for (unsigned int j=0; j!=n; ++j) {
370 
371  std::string pathname = hltConfig_.triggerName(j);
372 
373  string l1pathname = getL1ConditionModuleName(pathname);
374 
375  int l1ModuleIndex = hltConfig_.moduleIndex(pathname, l1pathname);
376 
377  int objectType = getTriggerTypeParsePathName(pathname);
378 
379  for (unsigned int i=0; i!=n; ++i) {
380 
381  std::string denompathname = hltConfig_.triggerName(i);
382  int denomobjectType = getTriggerTypeParsePathName(denompathname);
383 
384 
385 
386  std::string filtername("dummy");
387  float ptMin = 0.0;
388  float ptMax = 100.0;
389  if (plotAll_ && denomobjectType == objectType && objectType != 0) {
390 
391  int hltThreshold = getThresholdFromName(pathname);
392  int l1Threshold = getThresholdFromName(l1pathname);
393  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
394 
395  }
396 
397  }
398  }
399 
400  } // end if plotAll
401  else {
402 
403  // plot all diagonal combinations plus any other specified pairs
404  for (unsigned int i=0; i!=n; ++i) {
405 
406  std::string denompathname = "";
407  std::string pathname = hltConfig_.triggerName(i);
408  //parse pathname to guess object type
409  int objectType = getTriggerTypeParsePathName(pathname);
410 
411  string l1pathname = getL1ConditionModuleName(pathname);
412  int l1ModuleIndex = hltConfig_.moduleIndex(pathname, l1pathname);
413 
414  std::string filtername("dummy");
415  float ptMin = 0.0;
416  float ptMax = 100.0;
417 
418  if (objectType == trigger::TriggerPhoton) ptMax = 100.0;
419  if (objectType == trigger::TriggerElectron) ptMax = 100.0;
420  if (objectType == trigger::TriggerMuon) ptMax = 150.0;
421  if (objectType == trigger::TriggerTau) ptMax = 100.0;
422  if (objectType == trigger::TriggerJet) ptMax = 300.0;
423  if (objectType == trigger::TriggerBJet) ptMax = 300.0;
424  if (objectType == trigger::TriggerMET) ptMax = 300.0;
425  if (objectType == trigger::TriggerTET) ptMax = 300.0;
426  if (objectType == trigger::TriggerTrack) ptMax = 100.0;
427 
428  // keep track of all paths, except for FinalPath
429  if (objectType != -1 && pathname.find("FinalPath") == std::string::npos){
430 
431  int hltThreshold = getThresholdFromName(pathname);
432  int l1Threshold = getThresholdFromName(l1pathname);
433 
434  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
435 
436  hltPathsDiagonal_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
437 
438  }
439 
440  } // end for i
441 
442 
443  // now loop over denom/num path pairs specified in cfg,
444  // recording the off-diagonal ones
445  for (std::vector<std::pair<std::string, std::string> >::iterator custompathnamepair = custompathnamepairs_.begin(); custompathnamepair != custompathnamepairs_.end(); ++custompathnamepair) {
446 
447  std::string numpathname = custompathnamepair->first;
448  std::string denompathname = custompathnamepair->second;
449 
450  if (numpathname != denompathname) {
451 
452  // check that denominator exists
453  bool founddenominator = false;
454  for (unsigned int k=0; k!=n; ++k) {
455 
456  string n_pathname = hltConfig_.triggerName(k);
457 
458  if (n_pathname.find(denompathname) != std::string::npos) {
459 
460  LogDebug("TrigResRateMon") << "denompathname is selected to be = " << n_pathname << endl;;
461  founddenominator = true;
462 
463  break;
464 
465  }
466  }
467 
468  if (!founddenominator) {
469 
470  edm::LogInfo("TrigResRateMon") << "denompathname not found, go to the next pair numearator-denominator" << endl;
471 
472  // go to the next pair
473  continue;
474 
475  }
476 
477  // check that numerator exists
478  bool foundnumerator = false;
479  for (unsigned int j=0; j!=n; ++j) {
480 
481  string pathname = hltConfig_.triggerName(j);
482 
483  LogDebug("TrigResRateMon") << "check if path " << pathname << " is numpathname = " << numpathname << endl;
484  if (hltConfig_.triggerName(j).find(numpathname)!= std::string::npos) {
485 
486  LogDebug("TrigResRateMon") << "pathname is selected to be = " << denompathname << endl;;
487  foundnumerator = true;
488 
489  }
490 
491 
492  if (!foundnumerator) {
493 
494  edm::LogInfo("TrigResRateMon") << "pathname not found, ignoring " << pathname;
495  continue;
496 
497  }
498 
499 
500  string l1pathname = getL1ConditionModuleName(pathname);
501  int l1ModuleIndex = hltConfig_.moduleIndex(pathname, l1pathname);
502  int objectType = getTriggerTypeParsePathName(pathname);
503 
504  std::string filtername("dummy");
505  float ptMin = 0.0;
506  float ptMax = 100.0;
507  if (objectType == trigger::TriggerPhoton) ptMax = 100.0;
508  if (objectType == trigger::TriggerElectron) ptMax = 100.0;
509  if (objectType == trigger::TriggerMuon) ptMax = 150.0;
510  if (objectType == trigger::TriggerTau) ptMax = 100.0;
511  if (objectType == trigger::TriggerJet) ptMax = 300.0;
512  if (objectType == trigger::TriggerBJet) ptMax = 300.0;
513  if (objectType == trigger::TriggerMET) ptMax = 300.0;
514  if (objectType == trigger::TriggerTET) ptMax = 300.0;
515  if (objectType == trigger::TriggerTrack) ptMax = 100.0;
516 
517  // monitor regardless of the objectType of the path
518  if (objectType != 0) {
519  int hltThreshold = getThresholdFromName(pathname);
520  int l1Threshold = getThresholdFromName(l1pathname);
521  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
522 
523  }
524 
525  } // end for j, loop over paths
526 
527  } // end if not same num and denominator
528 
529  } // end for pair
530 
531  } // end else
532 
533 
534  /*
535  vector<string> muonPaths;
536  vector<string> egammaPaths;
537  vector<string> tauPaths;
538  vector<string> jetmetPaths;
539  vector<string> restPaths;
540  */
541  vector<string> allPaths;
542 
543  // fill vectors of Muon, Egamma, JetMET, Rest, and Special paths
544  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
545 
546  std::string pathName = v->getPath();
547  //int objectType = v->getObjectType();
548 
549  vector<int> tempCount(5,0);
550 
551  fPathTempCountPair.push_back(make_pair(pathName,0));
552  fPathBxTempCountPair.push_back(make_pair(pathName,tempCount));
553 
554  allPaths.push_back(pathName);
555 
556  /*
557  switch (objectType) {
558  case trigger::TriggerMuon :
559  muonPaths.push_back(pathName);
560  break;
561 
562  case trigger::TriggerElectron :
563  case trigger::TriggerPhoton :
564  egammaPaths.push_back(pathName);
565  break;
566 
567  case trigger::TriggerTau :
568  tauPaths.push_back(pathName);
569  break;
570 
571  case trigger::TriggerJet :
572  case trigger::TriggerMET :
573  jetmetPaths.push_back(pathName);
574  break;
575 
576  default:
577  restPaths.push_back(pathName);
578  }
579  */
580 
581  }
582 
583  fPathTempCountPair.push_back(make_pair("HLT_Any",0));
584 
585  fGroupName.push_back("AllSelectedPaths");
586  /*
587  fGroupName.push_back("Muon");
588  fGroupName.push_back("Egamma");
589  fGroupName.push_back("Tau");
590  fGroupName.push_back("JetMET");
591  fGroupName.push_back("Rest");
592  fGroupName.push_back("Special");
593  */
594 
595  for(unsigned int g=0; g<fGroupName.size(); g++) {
596 
597  //fGroupTempCountPair.push_back(make_pair(fGroupName[g],0));
598  //fGroupL1TempCountPair.push_back(make_pair(fGroupName[g],0));
599 
600  }
601 
603 
604 
605 
606  fGroupNamePathsPair.push_back(make_pair("AllSelectedPaths",allPaths));
607 
608  /*
609  fGroupNamePathsPair.push_back(make_pair("Muon",muonPaths));
610 
611  fGroupNamePathsPair.push_back(make_pair("Egamma",egammaPaths));
612 
613  fGroupNamePathsPair.push_back(make_pair("Tau",tauPaths));
614 
615  fGroupNamePathsPair.push_back(make_pair("JetMET",jetmetPaths));
616 
617  fGroupNamePathsPair.push_back(make_pair("Rest",restPaths));
618 
619  fGroupNamePathsPair.push_back(make_pair("Special",specialPaths_));
620  */
621 
623  //vector<string> datasetNames = hltConfig_.datasetNames() ;
624  vector<string> datasetNames = hltConfig_.streamContent("A") ;
625  for (unsigned int i=0;i<datasetNames.size();i++) {
626 
627  vector<string> datasetPaths = hltConfig_.datasetContent(datasetNames[i]);
628  fGroupNamePathsPair.push_back(make_pair(datasetNames[i],datasetPaths));
629 
630  }
631 
632  // push stream A and its PDs
633  fGroupNamePathsPair.push_back(make_pair("A",datasetNames));
634 
635 
636  for (unsigned int g=0;g<fGroupNamePathsPair.size();g++) {
637 
638  fGroupTempCountPair.push_back(make_pair(fGroupNamePathsPair[g].first,0));
639  fGroupL1TempCountPair.push_back(make_pair(fGroupNamePathsPair[g].first,0));
641 
642  }
643 
644 /*
645  // HLT matrices from Streams
646  const std::vector<std::string> streamNames = hltConfig_.streamNames();
647 
648  for (unsigned int s=0;s<streamNames.size();s++) {
649 
651  vector<string> streamDatasetNames = hltConfig_.streamContent(streamNames[s]) ;
652  if(streamNames[s] == "A") setupStreamMatrix(streamNames[s],streamDatasetNames);
653 
654  }
655 */
656 
657  setupHltLsPlots();
658 
659  setupHltBxPlots();
660 
661 
662  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
663 
664  // -------------------------
665  //
666  // Filters for each path
667  //
668  // -------------------------
669 
670  // get all modules in this HLT path
671  vector<string> moduleNames = hltConfig_.moduleLabels( v->getPath() );
672 
673  int numModule = 0;
674  string moduleName, moduleType;
675  unsigned int moduleIndex;
676 
677  //print module name
678  vector<string>::const_iterator iDumpModName;
679  for (iDumpModName = moduleNames.begin();iDumpModName != moduleNames.end();iDumpModName++) {
680 
681  moduleName = *iDumpModName;
682  moduleType = hltConfig_.moduleType(moduleName);
683  moduleIndex = hltConfig_.moduleIndex(v->getPath(), moduleName);
684 
685  LogTrace ("TrigResRateMon") << "Module " << numModule
686  << " is called " << moduleName
687  << " , type = " << moduleType
688  << " , index = " << moduleIndex
689  << endl;
690 
691  numModule++;
692 
693  if((moduleType.find("Filter") != string::npos && moduleType.find("HLTTriggerTypeFilter") == string::npos ) ||
694  (moduleType.find("Associator") != string::npos) ||
695  (moduleType.find("HLTLevel1GTSeed") != string::npos) ||
696  (moduleType.find("HLTGlobalSumsCaloMET") != string::npos) ||
697  (moduleType.find("HLTPrescaler") != string::npos) ) {
698 
699  //std::pair<std::string, int> filterIndexPair;
700  //filterIndexPair.first = moduleName;
701  //filterIndexPair.second = moduleIndex;
702  //v->filtersAndIndices.push_back(filterIndexPair);
703  v->filtersAndIndices.push_back(make_pair(moduleName,moduleIndex));
704 
705  }
706 
707 
708  }//end for modulesName
709 
711 
712  //int nbin_sub = 5;
713  int nbin_sub = v->filtersAndIndices.size()+2;
714 
715  // count plots for subfilter
716  MonitorElement* filters = dbe_->book1D("Filters_" + v->getPath(),
717  "Filters_" + v->getPath(),
718  nbin_sub+1, -0.5, 0.5+(double)nbin_sub);
719 
720  for(unsigned int filt = 0; filt < v->filtersAndIndices.size(); filt++){
721 
722  filters->setBinLabel(filt+1, (v->filtersAndIndices[filt]).first);
723 
724  }
725 
726  // book Count vs LS
728  MonitorElement* tempME = dbe_->book1D(v->getPath() + "_count_per_LS",
729  v->getPath() + " rate [Hz]",
730  nLS_, 0,nLS_);
731  tempME->setAxisTitle("Luminosity Section");
732 
733  v->setFilterHistos(filters);
734 
735  } // end for paths
736 
737  // now set up all of the histos for each path-denom
738  for(PathInfoCollection::iterator v = hltPaths_.begin(); v!= hltPaths_.end(); ++v ) {
739 
740  /*
741  MonitorElement *NOn, *onEtOn, *onOneOverEtOn, *onEtavsonPhiOn=0;
742  MonitorElement *NOff, *offEtOff, *offEtavsoffPhiOff=0;
743  MonitorElement *NL1, *l1EtL1, *l1Etavsl1PhiL1=0;
744  MonitorElement *NL1On, *l1EtL1On, *l1Etavsl1PhiL1On=0;
745  MonitorElement *NL1Off, *offEtL1Off, *offEtavsoffPhiL1Off=0;
746  MonitorElement *NOnOff, *offEtOnOff, *offEtavsoffPhiOnOff=0;
747  MonitorElement *NL1OnUM, *l1EtL1OnUM, *l1Etavsl1PhiL1OnUM=0;
748  MonitorElement *NL1OffUM, *offEtL1OffUM, *offEtavsoffPhiL1OffUM=0;
749  MonitorElement *NOnOffUM, *offEtOnOffUM, *offEtavsoffPhiOnOffUM=0;
750  MonitorElement *offDRL1Off, *offDROnOff, *l1DRL1On=0;
751  */
752 
753 
754  std::string labelname("dummy");
755  labelname = v->getPath() + "_wrt_" + v->getDenomPath();
756  std::string histoname(labelname+"_NOn");
757  std::string title(labelname+" N online");
758  double histEtaMax = 2.5;
759 
760  if (v->getObjectType() == trigger::TriggerMuon || v->getObjectType() == trigger::TriggerL1Mu) {
761 
762  histEtaMax = muonEtaMax_;
763 
764  }
765  else if (v->getObjectType() == trigger::TriggerElectron || v->getObjectType() == trigger::TriggerL1NoIsoEG || v->getObjectType() == trigger::TriggerL1IsoEG )
766  {
767  histEtaMax = electronEtaMax_;
768  }
769  else if (v->getObjectType() == trigger::TriggerTau || v->getObjectType() == trigger::TriggerL1TauJet )
770  {
771  histEtaMax = tauEtaMax_;
772  }
773  else if (v->getObjectType() == trigger::TriggerJet || v->getObjectType() == trigger::TriggerL1CenJet || v->getObjectType() == trigger::TriggerL1ForJet )
774  {
775  histEtaMax = jetEtaMax_;
776  }
777  else if (v->getObjectType() == trigger::TriggerBJet)
778  {
779  histEtaMax = bjetEtaMax_;
780  }
781  else if (v->getObjectType() == trigger::TriggerMET || v->getObjectType() == trigger::TriggerL1ETM )
782  {
783  histEtaMax = metEtaMax_;
784  }
785  else if (v->getObjectType() == trigger::TriggerPhoton)
786  {
787  histEtaMax = photonEtaMax_;
788  }
789  else if (v->getObjectType() == trigger::TriggerTrack)
790  {
791  histEtaMax = trackEtaMax_;
792  }
793 
794  TString pathfolder = dirname_ + TString("/FourVector/") + v->getPath();
795  /*
796  dbe_->setCurrentFolder(pathfolder.Data());
797 
798  NOn = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
799 
800 
801  histoname = labelname+"_NOff";
802  title = labelname+" N Off";
803  NOff = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
804 
805  histoname = labelname+"_NL1";
806  title = labelname+" N L1";
807  NL1 = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
808 
809  histoname = labelname+"_NL1On";
810  title = labelname+" N L1On";
811  NL1On = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
812 
813  histoname = labelname+"_NL1Off";
814  title = labelname+" N L1Off";
815  NL1Off = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
816 
817  histoname = labelname+"_NOnOff";
818  title = labelname+" N OnOff";
819  NOnOff = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
820 
821 
822  histoname = labelname+"_NL1OnUM";
823  title = labelname+" N L1OnUM";
824  NL1OnUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
825 
826  histoname = labelname+"_NL1OffUM";
827  title = labelname+" N L1OffUM";
828  NL1OffUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
829 
830  histoname = labelname+"_NOnOffUM";
831  title = labelname+" N OnOffUM";
832  NOnOffUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
833 
834 
835  histoname = labelname+"_onEtOn";
836  title = labelname+" onE_t online";
837  onEtOn = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
838 
839  histoname = labelname+"_onOneOverEtOn";
840  title = labelname+" 1 / onE_t online";
841  onOneOverEtOn = dbe->book1D(histoname.c_str(), title.c_str(),nBinsOneOverEt_, 0, 1);
842  onOneOverEtOn->setAxisTitle("HLT 1/Et [1/GeV]");
843 
844  histoname = labelname+"_offEtOff";
845  title = labelname+" offE_t offline";
846  offEtOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
847 
848  histoname = labelname+"_l1EtL1";
849  title = labelname+" l1E_t L1";
850  l1EtL1 = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
851 
852 
853  histoname = labelname+"_onEtaonPhiOn";
854  title = labelname+" on#eta vs on#phi online";
855  onEtavsonPhiOn = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
856 
857  histoname = labelname+"_offEtaoffPhiOff";
858  title = labelname+" off#eta vs off#phi offline";
859  offEtavsoffPhiOff = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
860 
861  histoname = labelname+"_l1Etal1PhiL1";
862  title = labelname+" l1#eta vs l1#phi L1";
863  l1Etavsl1PhiL1 = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
864 
865  histoname = labelname+"_l1EtL1On";
866  title = labelname+" l1E_t L1+online";
867  l1EtL1On = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
868 
869  histoname = labelname+"_offEtL1Off";
870  title = labelname+" offE_t L1+offline";
871  offEtL1Off = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
872 
873  histoname = labelname+"_offEtOnOff";
874  title = labelname+" offE_t online+offline";
875  offEtOnOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
876 
877  histoname = labelname+"_l1Etal1PhiL1On";
878  title = labelname+" l1#eta vs l1#phi L1+online";
879  l1Etavsl1PhiL1On = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
880 
881  histoname = labelname+"_offEtaoffPhiL1Off";
882  title = labelname+" off#eta vs off#phi L1+offline";
883  offEtavsoffPhiL1Off = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
884 
885  histoname = labelname+"_offEtaoffPhiOnOff";
886  title = labelname+" off#eta vs off#phi online+offline";
887  offEtavsoffPhiOnOff = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
888 
889  histoname = labelname+"_l1EtL1OnUM";
890  title = labelname+" l1E_t L1+onlineUM";
891  l1EtL1OnUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
892 
893  histoname = labelname+"_offEtL1OffUM";
894  title = labelname+" offE_t L1+offlineUM";
895  offEtL1OffUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
896 
897  histoname = labelname+"_offEtOnOffUM";
898  title = labelname+" offE_t online+offlineUM";
899  offEtOnOffUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
900 
901  histoname = labelname+"_l1Etal1PhiL1OnUM";
902  title = labelname+" l1#eta vs l1#phi L1+onlineUM";
903  l1Etavsl1PhiL1OnUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
904 
905  histoname = labelname+"_offEtaoffPhiL1OffUM";
906  title = labelname+" off#eta vs off#phi L1+offlineUM";
907  offEtavsoffPhiL1OffUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
908 
909  histoname = labelname+"_offEtaoffPhiOnOffUM";
910  title = labelname+" off#eta vs off#phi online+offlineUM";
911  offEtavsoffPhiOnOffUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
912 
913 
914 
915 
916  histoname = labelname+"_l1DRL1On";
917  title = labelname+" l1DR L1+online";
918  l1DRL1On = dbe->book1D(histoname.c_str(), title.c_str(),nBinsDR_, 0, dRMax_);
919 
920  histoname = labelname+"_offDRL1Off";
921  title = labelname+" offDR L1+offline";
922  offDRL1Off = dbe->book1D(histoname.c_str(), title.c_str(),nBinsDR_, 0, dRMax_);
923 
924  histoname = labelname+"_offDROnOff";
925  title = labelname+" offDR online+offline";
926  offDROnOff = dbe->book1D(histoname.c_str(), title.c_str(),nBinsDR_, 0, dRMax_);
927  */
928 
929 
930  //v->setHistos( NOn, onEtOn, onOneOverEtOn, onEtavsonPhiOn, NOff, offEtOff, offEtavsoffPhiOff, NL1, l1EtL1, l1Etavsl1PhiL1, NL1On, l1EtL1On, l1Etavsl1PhiL1On, NL1Off, offEtL1Off, offEtavsoffPhiL1Off, NOnOff, offEtOnOff, offEtavsoffPhiOnOff, NL1OnUM, l1EtL1OnUM, l1Etavsl1PhiL1OnUM, NL1OffUM, offEtL1OffUM, offEtavsoffPhiL1OffUM, NOnOffUM, offEtOnOffUM, offEtavsoffPhiOnOffUM, offDRL1Off, offDROnOff, l1DRL1On );
931 
932 
933  } // end for hltPath
934 
935  // HLT_Any
936  // book Count vs LS
938  MonitorElement* tempME = dbe_->book1D("HLT_Any_count_per_LS",
939  "HLT_Any rate [Hz]",
940  nLS_, 0,nLS_);
941  tempME->setAxisTitle("Luminosity Section");
942 
943  } // end if(1) dummy
944 
945  if(doCombineRuns_) fIsSetup = true;
946 
947  return;
948 
949 }
950 
953 {
954 
955  LogDebug("TrigResRateMon") << "endRun, run " << run.id();
956 
957 }
958 
959 
960 void TrigResRateMon::setupHltMatrix(const std::string& label, vector<std::string>& paths) {
961 
962  //string groupLabelAny = "HLT_"+label+"_Any";
963  //paths.push_back(groupLabelAny.c_str());
964  //paths.push_back("HLT_"+label+"_L1_Any");
965  paths.push_back("");
966  paths.push_back("Total "+label);
967  //paths.push_back("HLT_Any");
968 
969  string h_name;
970  string h_title;
971 
973 
974  h_name= "HLT_"+label+"_PassPass";
975  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass)";
976  MonitorElement* ME = dbe_->book2D(h_name.c_str(), h_title.c_str(),
977  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
978 
979  h_name= "HLT_"+label+"_Pass_Any";
980  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
981  MonitorElement* ME_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
982  paths.size(), -0.5, paths.size()-0.5);
983 
985  h_name= "HLT_"+label+"_PassPass_Normalized";
986  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
987  MonitorElement* ME_Normalized = dbe_->book2D(h_name.c_str(), h_title.c_str(),
988  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
989  h_name= "HLT_"+label+"_Pass_Normalized_Any";
990  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
991  MonitorElement* ME_Normalized_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
992  paths.size(), -0.5, paths.size()-0.5);
993 
995  h_name= "HLT_"+label+"_Total_LS";
996  h_title = label+" HLT paths total combined rate [Hz]";
997  MonitorElement* ME_Total_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
998  ME_Total_LS->setAxisTitle("LS");
999 
1000  h_name= "HLT_"+label+"_LS";
1001  h_title = label+" HLT paths rate [Hz]";
1002  MonitorElement* ME_Group_LS = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, paths.size(), -0.5, paths.size()-0.5);
1003  ME_Group_LS->setAxisTitle("LS");
1005  v_ME_HLTAll_LS.push_back(ME_Group_LS);
1006 
1007  /*
1008  h_name= "HLT_"+label+"_L1_Total_LS";
1009  h_title = label+" HLT paths total combined rate [Hz]";
1010  MonitorElement* ME_Total_L1_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
1011  ME_Total_L1_LS->setAxisTitle("LS");
1012 
1013  h_name= "HLT_"+label+"_L1_LS";
1014  h_title = label+" HLT L1s rate [Hz]";
1015  MonitorElement* ME_Group_L1_LS = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, paths.size(), -0.5, paths.size()-0.5);
1016  ME_Group_L1_LS->setAxisTitle("LS");
1017 
1018  dbe_->setCurrentFolder(pathsSummaryHLTPathsPerBXFolder_.c_str());
1019  h_name= "HLT_"+label+"_BX_LS";
1020  h_title = label+" HLT paths total count combined per BX ";
1021  MonitorElement* ME_Total_BX = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, 5, -2.5, 2.5);
1022  ME_Total_BX->setAxisTitle("LS",1);
1023  v_ME_Total_BX.push_back(ME_Total_BX);
1024 
1025  h_name= "HLT_"+label+"_BX_LS_Norm";
1026  h_title = label+" HLT paths total count combined per BX Normalized to LS";
1027  MonitorElement* ME_Total_BX_Norm = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, 5, -2.5, 2.5);
1028  ME_Total_BX_Norm->setAxisTitle("LS",1);
1029  v_ME_Total_BX_Norm.push_back(ME_Total_BX_Norm);
1030  */
1031 
1032  for(unsigned int i = 0; i < paths.size(); i++){
1033 
1034  ME->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1035  ME->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1036  ME_Group_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1037 
1038  ME_Normalized->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1039  ME_Normalized->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1040  ME_Normalized_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1041  ME_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1042 
1043  }
1044 
1045 }
1046 
1047 
1048 void TrigResRateMon::setupStreamMatrix(const std::string& label, vector<std::string>& paths) {
1049 
1050 
1051  paths.push_back("");
1052  paths.push_back("HLT_"+label+"_Any");
1053 
1054  string h_name;
1055  string h_title;
1056 
1058 
1059  h_name= "HLT_"+label+"_PassPass";
1060  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass)";
1061  MonitorElement* ME = dbe_->book2D(h_name.c_str(), h_title.c_str(),
1062  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1063 
1064  h_name= "HLT_"+label+"_Pass_Any";
1065  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1066  MonitorElement* ME_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
1067  paths.size(), -0.5, paths.size()-0.5);
1068 
1070  h_name= "HLT_"+label+"_PassPass_Normalized";
1071  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
1072  MonitorElement* ME_Normalized = dbe_->book2D(h_name.c_str(), h_title.c_str(),
1073  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1074  h_name= "HLT_"+label+"_Pass_Normalized_Any";
1075  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1076  MonitorElement* ME_Normalized_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
1077  paths.size(), -0.5, paths.size()-0.5);
1078 
1079  for(unsigned int i = 0; i < paths.size(); i++){
1080 
1081  ME->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1082  ME->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1083 
1084  ME_Normalized->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1085  ME_Normalized->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1086 
1087  ME_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1088  ME_Normalized_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1089 
1090  }
1091 
1092 }
1093 
1095 
1096  string fullPathToME;
1097  std::vector <std::pair<std::string, bool> > groupAcceptPair;
1098 
1099  for (unsigned int mi=0;mi<fGroupNamePathsPair.size();mi++) {
1100 
1101 
1102  fullPathToME = pathsSummaryFolder_ + "HLT_"+fGroupNamePathsPair[mi].first+"_PassPass";
1103  MonitorElement* ME_2d = dbe_->get(fullPathToME);
1104  fullPathToME = pathsSummaryFolder_ + "HLT_"+fGroupNamePathsPair[mi].first+"_Pass_Any";
1105  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1106  if(!ME_2d || !ME_1d) {
1107 
1108  LogTrace("TrigResRateMon") << " ME not valid although I gave full path" << endl;
1109  continue;
1110 
1111  }
1112 
1113  TH2F * hist_2d = ME_2d->getTH2F();
1114  TH1F * hist_1d = ME_1d->getTH1F();
1115 
1116  // Fill HLTPassed Matrix bin (i,j) = (Any,Any)
1117  // --------------------------------------------------------
1118  int anyBinNumber = hist_2d->GetXaxis()->FindBin("HLT_Any");
1119 
1120  //string groupBinLabel = "HLT_"+fGroupNamePathsPair[mi].first+"_Any";
1121  string groupBinLabel = "Total "+fGroupNamePathsPair[mi].first;
1122  int groupBinNumber = hist_2d->GetXaxis()->FindBin(groupBinLabel.c_str());
1123 
1124  // any triger accepted
1125  if(triggerResults_->accept()){
1126 
1127  hist_2d->Fill(anyBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
1128  hist_1d->Fill(anyBinNumber-1);//binNumber1 = 0 = first filter
1129 
1130  }
1131 
1132  bool groupPassed = false;
1133  bool groupL1Passed = false;
1134 
1135  // Main loop over paths
1136  // --------------------
1137 
1138  //for (int i=1; i< hist_2d->GetNbinsX();i++)
1139  for (unsigned int i=0; i< fGroupNamePathsPair[mi].second.size(); i++)
1140  {
1141 
1142  //string hltPathName = hist_2d->GetXaxis()->GetBinLabel(i);
1143  string hltPathName = fGroupNamePathsPair[mi].second[i];
1144 
1145  // check if this is hlt path name
1146  //unsigned int pathByIndex = triggerNames.triggerIndex(hltPathName);
1147  unsigned int pathByIndex = triggerNames.triggerIndex(fGroupNamePathsPair[mi].second[i]);
1148  if(pathByIndex >= triggerResults_->size() ) continue;
1149 
1150  // check if its L1 passed
1151  // comment out below but set groupL1Passed to true always
1152  //if(hasL1Passed(hltPathName,triggerNames)) groupL1Passed = true;
1153  //groupL1Passed = true;
1154 
1155  // Fill HLTPassed Matrix and HLTPassFail Matrix
1156  // --------------------------------------------------------
1157 
1158  if(triggerResults_->accept(pathByIndex)){
1159 
1160  groupPassed = true;
1161  groupL1Passed = true;
1162 
1163  hist_2d->Fill(i,anyBinNumber-1);//binNumber1 = 0 = first filter
1164  hist_2d->Fill(anyBinNumber-1,i);//binNumber1 = 0 = first filter
1165 
1166  hist_2d->Fill(i,groupBinNumber-1);//binNumber1 = 0 = first filter
1167  hist_2d->Fill(groupBinNumber-1,i);//binNumber1 = 0 = first filter
1168 
1169  hist_1d->Fill(i);//binNumber1 = 0 = first filter
1170 
1171 
1172  //for (int j=1; j< hist_2d->GetNbinsY();j++)
1173  for (unsigned int j=0; j< fGroupNamePathsPair[mi].second.size(); j++)
1174  {
1175 
1176  string crossHltPathName = fGroupNamePathsPair[mi].second[j];
1177 
1178  //unsigned int crosspathByIndex = triggerNames.triggerIndex(hist_2d->GetXaxis()->GetBinLabel(j));
1179  //unsigned int crosspathByIndex = triggerNames.triggerIndex(crossHltPathName);
1180  unsigned int crosspathByIndex = triggerNames.triggerIndex(fGroupNamePathsPair[mi].second[j]);
1181 
1182  if(crosspathByIndex >= triggerResults_->size() ) continue;
1183 
1184  if(triggerResults_->accept(crosspathByIndex)){
1185 
1186  hist_2d->Fill(i,j);//binNumber1 = 0 = first filter
1187 
1188  } // end if j path passed
1189 
1190  } // end for j
1191 
1192  } // end if i passed
1193 
1194 
1195  } // end for i
1196 
1197  if(groupPassed) {
1198 
1199  hist_1d->Fill(groupBinNumber-1);//binNumber1 = 0 = first filter
1200  hist_2d->Fill(groupBinNumber-1,groupBinNumber-1);//binNumber1 = 0 = first filter
1201  hist_2d->Fill(anyBinNumber-1,groupBinNumber-1);//binNumber1 = 0 = first filter
1202  hist_2d->Fill(groupBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
1203 
1204  }
1205 
1206  // if the group belongs to stream A
1207  // store groupName and Bool if it has passed
1208  bool isGroupFromStreamA = false;
1209 
1210  vector<string> streamDatasetNames = hltConfig_.streamContent("A") ;
1211  for (unsigned int g=0;g<streamDatasetNames.size();g++) {
1212 
1213  if(streamDatasetNames[g] == fGroupNamePathsPair[mi].first)
1214  {
1215 
1216  isGroupFromStreamA = true;
1217  break;
1218 
1219  }
1220  }
1221 
1222  if(isGroupFromStreamA) groupAcceptPair.push_back(make_pair(fGroupNamePathsPair[mi].first,groupPassed));
1223 
1224 
1225  // L1 groups - not used anymore
1226  string groupL1BinLabel = "HLT_"+fGroupNamePathsPair[mi].first+"_L1_Any";
1227  int groupL1BinNumber = hist_2d->GetXaxis()->FindBin(groupL1BinLabel.c_str());
1228 
1229  if(groupL1Passed) hist_1d->Fill(groupL1BinNumber-1);//binNumber1 = 0 = first filter
1230 
1231  } // end for mi
1232 
1233  fullPathToME = pathsSummaryFolder_ + "HLT_A_PassPass";
1234  MonitorElement* ME_2d_Stream = dbe_->get(fullPathToME);
1235  fullPathToME = pathsSummaryFolder_ + "HLT_A_Pass_Any";
1236  MonitorElement* ME_1d_Stream = dbe_->get(fullPathToME);
1237  if(!ME_2d_Stream || !ME_1d_Stream) {
1238 
1239  LogTrace("TrigResRateMon") << " ME not valid although I gave full path" << endl;
1240  return;
1241 
1242  }
1243  else {
1244 
1245  TH2F * hist_2d_Stream = ME_2d_Stream->getTH2F();
1246  TH1F * hist_1d_Stream = ME_1d_Stream->getTH1F();
1247 
1248  int streamBinNumber = hist_1d_Stream->GetXaxis()->GetLast();
1249 
1250  bool acceptedStreamA = false;
1251 
1252  // loop over groups
1253  for (unsigned int i=0;i<groupAcceptPair.size();i++) {
1254 
1255  if(groupAcceptPair[i].second) {
1256 
1257  acceptedStreamA = true;
1258 
1259  int groupBinNumber_i = hist_2d_Stream->GetXaxis()->FindBin(groupAcceptPair[i].first.c_str());
1260  //LogTrace("TrigResRateMon") << "Accepted group X " << groupAcceptPair[i].first.c_str() << " bin number " << groupBinNumber_i << endl;
1261  hist_1d_Stream->Fill(groupBinNumber_i-1);//binNumber1 = 0 = first filter
1262  hist_2d_Stream->Fill(groupBinNumber_i-1,streamBinNumber-1);//binNumber1 = 0 = first filter
1263  hist_2d_Stream->Fill(streamBinNumber-1,groupBinNumber_i-1);//binNumber1 = 0 = first filter
1264 
1265  for (unsigned int j=0;j<groupAcceptPair.size();j++) {
1266 
1267 
1268  if(groupAcceptPair[j].second) {
1269 
1270  int groupBinNumber_j = hist_2d_Stream->GetXaxis()->FindBin(groupAcceptPair[j].first.c_str());
1271  //LogTrace("TrigResRateMon") << "Accepted group Y " << groupAcceptPair[j].first.c_str() << " bin number " << groupBinNumber_j << endl;
1272 
1273  // fill StreamMatrix(i,j)
1274  hist_2d_Stream->Fill(groupBinNumber_i-1,groupBinNumber_j-1);//binNumber1 = 0 = first filter
1275 
1276  } // end if j-th group accepted
1277 
1278  } // end for j
1279 
1280  } // end if i-th group accepted
1281 
1282  } // end for i
1283 
1284  if(acceptedStreamA) {
1285 
1286  hist_2d_Stream->Fill(streamBinNumber-1,streamBinNumber-1);//binNumber1 = 0 = first filter
1287  hist_1d_Stream->Fill(streamBinNumber-1);//binNumber1 = 0 = first filter
1288 
1289  }
1290 
1291  } // end else
1292 
1293 }
1294 
1296 {
1297 
1298  //pathsSummaryFolder_ = TString("HLT/TrigResults/PathsSummary/");
1299  //dbe_->setCurrentFolder(pathsSummaryFolder_.c_str());
1301 
1302  // setup HLT bx plot
1303  unsigned int npaths = hltPathsDiagonal_.size();
1304 
1305  ME_HLT_BX = dbe_->book2D("HLT_bx",
1306  "HLT counts vs Event bx",
1307  Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1308  ME_HLT_CUSTOM_BX = dbe_->book2D("HLT_Custom_bx",
1309  "HLT counts vs Event bx",
1310  Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1311  ME_HLT_BX->setAxisTitle("Bunch Crossing");
1312  ME_HLT_CUSTOM_BX->setAxisTitle("Bunch Crossing");
1313 
1314 
1315  // Set up bin labels on Y axis continuing to cover all npaths
1316  for(unsigned int i = 0; i < npaths; i++){
1317 
1318  ME_HLT_BX->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1319  ME_HLT_CUSTOM_BX->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1320 
1321  }
1322 
1323 
1324 }
1325 
1327 {
1328 
1329  unsigned int npaths = hltPathsDiagonal_.size();
1330 
1331  //pathsSummaryHLTPathsPerLSFolder_ = TString("HLT/TrigResults/PathsSummary/HLT LS/");
1332  //dbe_->setCurrentFolder(pathsSummaryHLTPathsPerLSFolder_.c_str());
1334 
1335  ME_HLTAll_LS = dbe_->book2D("AllSelectedPaths_count_LS",
1336  "AllSelectedPaths paths rate [Hz]",
1337  nLS_, 0, nLS_, npaths+1, -0.5, npaths+1-0.5);
1338  ME_HLTAll_LS->setAxisTitle("Luminosity Section");
1339 
1340  // Set up bin labels on Y axis continuing to cover all npaths
1341  for(unsigned int i = 0; i < npaths; i++){
1342 
1343  ME_HLTAll_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1344 
1345  }
1346 
1347  unsigned int i = npaths;
1348  ME_HLTAll_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, "HLT_Any");
1349 
1350  int nBinsPerLSHisto = 20;
1351  int nLSHistos = npaths/nBinsPerLSHisto;
1352  for (int nh=0;nh<nLSHistos+1;nh++) {
1353 
1354  char name[200];
1355  char title[200];
1356 
1357  sprintf(name, "Group_%d_paths_count_LS",nLSHistos-nh);
1358  sprintf(title, "Group %d, paths rate [Hz]",nLSHistos-nh);
1359 
1360  MonitorElement* tempME = dbe_->book2D(name,title,
1361  nLS_, 0, nLS_, nBinsPerLSHisto+3, -0.5, nBinsPerLSHisto+3-0.5);
1362 
1363  tempME->setAxisTitle("LS");
1364 
1365  // Set up bin labels on Y axis continuing to cover all npaths
1366  for(int i = nh*nBinsPerLSHisto; i < (nh+1)*nBinsPerLSHisto; i++){
1367 
1368  if (i == int(npaths)) break;
1369 
1370  int bin;
1371  if(nh == 0){
1372 
1373  bin = i;
1374 
1375  }
1376  else {
1377 
1378  bin = i % nBinsPerLSHisto;
1379 
1380  }
1381 
1382  tempME->setBinLabel(bin+1, hltPathsDiagonal_[i].getPath().c_str(), 2);
1383 
1384  }
1385 
1386  tempME->setBinLabel(nBinsPerLSHisto+3, "HLT_Any", 2);
1387  tempME->setBinLabel(nBinsPerLSHisto+2, "HLT_PhysicsDeclared", 2);
1388 
1389  v_ME_HLTAll_LS.push_back(tempME);
1390 
1391  }
1392 
1393 
1394 }
1395 
1396 
1398 
1399  //int lumi = int(lumiSeg.id().luminosityBlock());
1400  //if(lumi < 74 || lumi > 77) fLumiFlag = false;
1401  //else fLumiFlag = true;
1402 
1403 }
1404 
1406 {
1407 
1408  int lumi = int(lumiSeg.id().luminosityBlock());
1409  LogTrace("TrigResRateMon") << " end lumiSection number " << lumi << endl;
1410 
1413  //countHLTGroupL1HitsEndLumiBlock(lumi);
1414  //countHLTGroupBXHitsEndLumiBlock(lumi);
1415 
1417 
1418 }
1419 
1421 {
1422 
1423  LogTrace("TrigResRateMon") << " countHLTGroupBXHitsEndLumiBlock() lumiSection number " << lumi << endl;
1424 
1425  if(! ME_HLT_BX) return;
1426 
1427  TH2F * hist_2d_bx = ME_HLT_BX->getTH2F();
1428 
1429  for (std::vector<std::pair<std::string, vector<int> > >::iterator ip = fPathBxTempCountPair.begin(); ip != fPathBxTempCountPair.end(); ++ip) {
1430 
1431  // get the path and its previous count
1432  std::string pathname = ip->first;
1433  vector<int> prevCount = ip->second;
1434 
1435  // vector of 5 zeros
1436  vector<int> currCount (5,0);
1437  vector<int> diffCount (5,0);
1438 
1439  // get the current count of path up to now
1440  int pathBin = hist_2d_bx->GetYaxis()->FindBin(pathname.c_str());
1441 
1442  if(pathBin > hist_2d_bx->GetNbinsY()) {
1443 
1444  LogTrace("TrigResRateMon") << " Cannot find the bin for path " << pathname << endl;
1445  continue;
1446 
1447  }
1448 
1449  for (unsigned int b =0;b<currCount.size();b++) {
1450 
1451  int bxOffset = b-2;
1452  int bunch = referenceBX_+bxOffset;
1453  if(bunch < 1) bunch += Nbx_ ;
1454  int bxBin = bunch +1; // add one to get the right bin
1455 
1456 
1457  currCount[b] = int(hist_2d_bx->GetBinContent(bxBin, pathBin)); // add one to get the right bin
1458 
1459  LogTrace("TrigResRateMon") << "currCount = " << currCount[b] << endl;
1460 
1461  // count due to prev lumi sec is a difference bw current and previous
1462  diffCount[b] = currCount[b] - prevCount[b];
1463 
1464  LogTrace("TrigResRateMon") << " lumi = " << lumi << " path " << pathname << "bxOffset = " << bxOffset << " count = " << diffCount[b] << endl;
1465 
1466  } // end for bx b
1467 
1468  // set the counter in the pair to current count
1469  ip->second = currCount;
1470 
1472  // fill the 2D Group paths' BX count per LS, using currCount
1474  LogTrace("TrigResRateMon") << "Find " << pathname << endl;
1475 
1476  //check if the path is in this group
1477  //for (unsigned int j=0;j<fGroupNamePathsPair.size();j++)
1478  for (unsigned int j=0;j<v_ME_Total_BX.size();j++)
1479  {
1480 
1481  bool isMember = false;
1482 
1483  LogTrace("TrigResRateMon") << " ---- Group " << fGroupNamePathsPair[j].first << endl;
1484 
1485  // decide if pathname is member of this group
1486  for (unsigned int k = 0; k<(fGroupNamePathsPair[j].second).size();k++) {
1487 
1488  LogTrace("TrigResRateMon") << " comparing to " << fGroupNamePathsPair[j].second[k] << endl;
1489 
1490  if(fGroupNamePathsPair[j].second[k] == pathname) {
1491 
1492  isMember = true;
1493  break;
1494 
1495  }
1496 
1497  } // end for k
1498 
1499  if(!isMember) {
1500 
1501  LogTrace("TrigResRateMon") << "Could not find a group to which the path belongs, path = " << pathname << " group = " << fGroupNamePathsPair[j].first << endl;
1502  continue;
1503 
1504  }
1505 
1506  MonitorElement* ME_2d = v_ME_Total_BX[j];
1507 
1508  if (! ME_2d) {
1509 
1510  LogDebug("TrigResRateMon") << " cannot find ME_2d for group " << fGroupNamePathsPair[j].first << endl;
1511  continue;
1512 
1513  }
1514 
1515  vector<int> updatedLumiCount(5,0);
1516 
1517  float entireBXWindowUpdatedLumiCount = 0;
1518 
1519  TH2F* hist_All = ME_2d->getTH2F();
1520 
1521  for (unsigned int b = 0; b<diffCount.size();b++) {
1522 
1523  // find the bin
1524  int binNumber = b+1; // add one to get right bin
1525 
1526  // update the bin content (must do that since events don't ncessarily come in the order
1527  int currentLumiCount = int(hist_All->GetBinContent(lumi+1,binNumber));
1528  updatedLumiCount[b] = currentLumiCount + diffCount[b];
1529  hist_All->SetBinContent(lumi+1,binNumber,updatedLumiCount[b]);
1530 
1531  entireBXWindowUpdatedLumiCount += updatedLumiCount[b];
1532 
1533  } // end for bx b
1534 
1535  MonitorElement* ME_2d_Norm = v_ME_Total_BX_Norm[j];
1536 
1537  if (! ME_2d_Norm) {
1538 
1539  LogDebug("TrigResRateMon") << " cannot find ME_2d_Norm for group " << fGroupNamePathsPair[j].first << endl;
1540  continue;
1541 
1542  }
1543 
1544  TH2F* hist_All_Norm = ME_2d_Norm->getTH2F();
1545 
1546  for (unsigned int b = 0; b<diffCount.size();b++) {
1547 
1548  // find the bin
1549  int binNumber = b+1; // add one to get right bin
1550 
1551  // update the bin content but normalized to the whole columb (BX windw +/- 2)
1552  hist_All_Norm->SetBinContent(lumi+1,binNumber,float(updatedLumiCount[b])/entireBXWindowUpdatedLumiCount);
1553 
1554  } // end for bx b
1555 
1556  } // end for group j
1557 
1558  } // end for ip
1559 
1560 }
1561 
1563 {
1564 
1565  LogTrace("TrigResRateMon") << " countHLTGroupL1HitsEndLumiBlock() lumiSection number " << lumi << endl;
1566 
1567  for(unsigned int i=0; i<fGroupNamePathsPair.size(); i++){
1568 
1569  // get the count of path up to now
1570  string fullPathToME = pathsSummaryFolder_ + "HLT_" + fGroupNamePathsPair[i].first+ "_Pass_Any";
1571  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1572 
1573  if(! ME_1d) {
1574 
1575  LogTrace("TrigResRateMon") << " could not find 1d matrix " << fullPathToME << endl;
1576 
1577  continue;
1578 
1579  }
1580 
1581  LogTrace("TrigResRateMon") << " Looking in histogram " << fullPathToME << endl;
1582 
1583  TH1F * hist_1d = ME_1d->getTH1F();
1584 
1585  for (std::vector<std::pair<std::string, float> >::iterator ip = fGroupL1TempCountPair.begin(); ip != fGroupL1TempCountPair.end(); ++ip) {
1586 
1587  // get the path and its previous count
1588  string pathname = ip->first;
1589  float prevCount = ip->second;
1590 
1591  string binLabel = "HLT_"+pathname+"_L1_Any";
1592 
1593  LogTrace("TrigResRateMon") << " Looking for binLabel = " << binLabel << endl;
1594  // get the current count of path up to now
1595  int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1596 
1597  LogTrace("TrigResRateMon") << " pathBin = " << pathBin << " out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
1598  if(pathBin == -1) {
1599 
1600  LogTrace("TrigResRateMon") << " Cannot find the bin for path " << pathname << endl;
1601  continue;
1602 
1603  }
1604 
1605  float currCount = hist_1d->GetBinContent(pathBin)/LSsize_;
1606 
1607  // count due to prev lumi sec is a difference bw current and previous
1608  float diffCount = currCount - prevCount;
1609 
1610  LogTrace("TrigResRateMon") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << endl;
1611 
1612  // set the counter in the pair to current count
1613  ip->second = currCount;
1614 
1615 
1617  // fill the 1D individual path count per LS
1619  string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_" + pathname + "_L1_Total_LS";
1620  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
1621  if ( ME_1d) {
1622 
1623  // update the bin content (must do that since events don't ncessarily come in the order
1624  float currentLumiCount = ME_1d->getTH1()->GetBinContent(lumi+1);
1625  float updatedLumiCount = currentLumiCount + diffCount;
1626  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1627 
1628  }
1629  else {
1630 
1631  LogDebug("TrigResRateMon") << " cannot find ME " << fullPathToME_count << endl;
1632 
1633  }
1634 
1635  } // end for ip
1636 
1637  } // end for i
1638 
1639 }
1640 
1641 
1643 {
1644 
1645  LogTrace("TrigResRateMon") << " countHLTGroupHitsEndLumiBlock() lumiSection number " << lumi << endl;
1646  for(unsigned int i=0; i<fGroupNamePathsPair.size(); i++){
1647 
1648  // get the count of path up to now
1649  string fullPathToME = pathsSummaryFolder_ + "HLT_" + fGroupNamePathsPair[i].first + "_Pass_Any";
1650  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1651 
1652  if(! ME_1d) {
1653 
1654  LogTrace("TrigResRateMon") << " could not find 1d matrix " << fullPathToME << endl;
1655 
1656  continue;
1657 
1658  }
1659 
1660  LogTrace("TrigResRateMon") << " Looking in histogram " << fullPathToME << endl;
1661 
1662  TH1F * hist_1d = ME_1d->getTH1F();
1663 
1664  for (std::vector<std::pair<std::string, float> >::iterator ip = fGroupTempCountPair.begin(); ip != fGroupTempCountPair.end(); ++ip) {
1665 
1666  // get the path and its previous count
1667  string pathname = ip->first;
1668  float prevCount = ip->second;
1669 
1670  string binLabel = "Total "+pathname;
1671 
1672  LogTrace("TrigResRateMon") << " Looking for binLabel = " << binLabel << endl;
1673 
1674  // get the current count of path up to now
1675  int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1676 
1677  LogTrace("TrigResRateMon") << " pathBin = " << pathBin << " out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
1678  if(pathBin == -1) {
1679 
1680  binLabel = pathname;
1681  int alternativePathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1682 
1683  if(alternativePathBin == -1) {
1684 
1685  LogTrace("TrigResRateMon") << " Cannot find the bin for path " << pathname << endl;
1686 
1687  continue;
1688 
1689  }
1690  else {
1691 
1692  pathBin = alternativePathBin;
1693 
1694  }
1695 
1696  }
1697 
1698  float currCount = hist_1d->GetBinContent(pathBin)/LSsize_;
1699 
1700  // count due to prev lumi sec is a difference bw current and previous
1701  float diffCount = currCount - prevCount;
1702 
1703  LogTrace("TrigResRateMon") << " lumi = " << lumi << " path " << pathname << " diffCount " << diffCount << endl;
1704 
1705  // set the counter in the pair to current count
1706  ip->second = currCount;
1707 
1709  // fill the 1D and 2D gruop and 2d_Stream_A count per LS
1711  string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_" + pathname + "_Total_LS";
1712  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
1713 
1714  string fullPathToME_2D_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_" + pathname + "_LS";
1715  MonitorElement* ME_2d = dbe_->get(fullPathToME_2D_count);
1716 
1717  string fullPathToME_Stream_A_2D_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_A_LS";
1718  MonitorElement* ME_Stream_A_2d = dbe_->get(fullPathToME_Stream_A_2D_count);
1719 
1720  if ( ME_1d && ME_2d && ME_Stream_A_2d) {
1721 
1722  // update the bin content (must do that since events don't ncessarily come in the order
1723 
1724  float currentLumiCount = ME_1d->getTH1()->GetBinContent(lumi+1);
1725  float updatedLumiCount = currentLumiCount + diffCount;
1726  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1727 
1728  string groupBinLabel = "Total " + fGroupNamePathsPair[i].first;
1729  int groupBin = ME_2d->getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
1730  if(groupBin != -1) ME_2d->getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
1731 
1732  // this is to deal with Stream A and bins with names of PDs
1733  groupBinLabel = fGroupNamePathsPair[i].first;
1734  groupBin = ME_Stream_A_2d->getTH2F()->GetYaxis()->FindBin(groupBinLabel.c_str());
1735  if(groupBin != -1) ME_Stream_A_2d->getTH2F()->SetBinContent(lumi+1,groupBin,updatedLumiCount);
1736 
1737  }
1738  else {
1739 
1740  LogDebug("TrigResRateMon") << " cannot find ME " << fullPathToME_count << endl;
1741 
1742  }
1743 
1744  } // end for ip
1745 
1746  } // end for i
1747 
1748 }
1749 
1750 
1752 {
1753 
1754  LogTrace("TrigResRateMon") << " countHLTPathHitsEndLumiBlock() lumiSection number " << lumi << endl;
1755  // get the count of path up to now
1756  string fullPathToME = pathsSummaryFolder_ + "HLT_AllSelectedPaths_PassPass";
1757  MonitorElement* ME_2d = dbe_->get(fullPathToME);
1758 
1759  if(! ME_2d) {
1760 
1761  LogTrace("TrigResRateMon") << " could not fine 2d matrix " << fullPathToME << endl;
1762 
1763  return;
1764 
1765  }
1766 
1767  TH2F * hist_2d = ME_2d->getTH2F();
1768 
1769  for (std::vector<std::pair<std::string, float> >::iterator ip = fPathTempCountPair.begin(); ip != fPathTempCountPair.end(); ++ip) {
1770 
1771  // get the path and its previous count
1772  std::string pathname = ip->first;
1773  float prevCount = ip->second;
1774 
1775  // get the current count of path up to now
1776  float pathBin = hist_2d->GetXaxis()->FindBin(pathname.c_str());
1777 
1778  if(pathBin > hist_2d->GetNbinsX()) {
1779 
1780  LogTrace("TrigResRateMon") << " Cannot find the bin for path " << pathname << endl;
1781  continue;
1782 
1783  }
1784 
1785  float currCount = hist_2d->GetBinContent(pathBin, pathBin)/LSsize_;
1786 
1787  // count due to prev lumi sec is a difference bw current and previous
1788  float diffCount = currCount - prevCount;
1789 
1790  LogTrace("TrigResRateMon") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << endl;
1791 
1792  // set the counter in the pair to current count
1793  ip->second = currCount;
1794 
1796  // fill the 2D All paths' count per LS
1798  if ( ME_HLTAll_LS) {
1799 
1800  TH2F* hist_All = ME_HLTAll_LS->getTH2F();
1801 
1802  // find the bin
1803  int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
1804 
1805  // update the bin content (must do that since events don't ncessarily come in the order
1806  float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
1807  float updatedLumiCount = currentLumiCount + diffCount;
1808  hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
1809 
1810  }
1811  else {
1812 
1813  LogDebug("TrigResRateMon") << " cannot find ME_HLTAll_LS" << endl;
1814 
1815  }
1816 
1817  for (unsigned int i=0 ; i< v_ME_HLTAll_LS.size(); i++) {
1818 
1819  MonitorElement* tempME = v_ME_HLTAll_LS[i];
1820 
1821  if ( tempME ) {
1822 
1823  TH2F* hist_All = tempME->getTH2F();
1824 
1825  // find the bin
1826  int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
1827  // update the bin content (must do that since events don't ncessarily come in the order
1828  float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
1829  float updatedLumiCount = currentLumiCount + diffCount;
1830  hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
1831 
1832  }
1833  else {
1834 
1835  LogDebug("TrigResRateMon") << " cannot find tempME " << endl;
1836 
1837  }
1838 
1839  }
1840 
1841 
1843  // fill the 1D individual path count per LS
1845  string fullPathToME_count = pathsIndividualHLTPathsPerLSFolder_ + pathname + "_count_per_LS";
1846  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
1847  if ( ME_1d) {
1848 
1849  // update the bin content (must do that since events don't ncessarily come in the order
1850  float currentLumiCount = ME_1d->getTH1()->GetBinContent(lumi+1);
1851  float updatedLumiCount = currentLumiCount + diffCount;
1852  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
1853 
1854  }
1855  else {
1856 
1857  LogDebug("TrigResRateMon") << " cannot find ME " << fullPathToME_count << endl;
1858 
1859  }
1860 
1861  } // end for ip
1862 
1863 }
1864 
1866 {
1867 
1868  int objectType = 0;
1869 
1870  if (pathname.find("MET") != std::string::npos)
1871  objectType = trigger::TriggerMET;
1872  if (pathname.find("SumET") != std::string::npos)
1873  objectType = trigger::TriggerTET;
1874  if (pathname.find("HT") != std::string::npos)
1875  objectType = trigger::TriggerTET;
1876  if (pathname.find("Jet") != std::string::npos)
1877  objectType = trigger::TriggerJet;
1878  if (pathname.find("Mu") != std::string::npos)
1879  objectType = trigger::TriggerMuon;
1880  if (pathname.find("Ele") != std::string::npos)
1881  objectType = trigger::TriggerElectron;
1882  if (pathname.find("Photon") != std::string::npos)
1883  objectType = trigger::TriggerPhoton;
1884  if (pathname.find("EG") != std::string::npos)
1885  objectType = trigger::TriggerPhoton;
1886  if (pathname.find("Tau") != std::string::npos)
1887  objectType = trigger::TriggerTau;
1888  if (pathname.find("IsoTrack") != std::string::npos)
1889  objectType = trigger::TriggerTrack;
1890  if (pathname.find("BTag") != std::string::npos)
1891  objectType = trigger::TriggerBJet;
1892 
1893  return objectType;
1894 }
1895 
1896 const string TrigResRateMon::getL1ConditionModuleName(const string& pathname)
1897 {
1898 
1899  // find L1 condition for numpath with numpath objecttype
1900  // find PSet for L1 global seed for numpath,
1901  // list module labels for numpath
1902  string l1pathname = "dummy";
1903 
1904  vector<string> numpathmodules = hltConfig_.moduleLabels(pathname);
1905 
1906  for(vector<string>::iterator numpathmodule = numpathmodules.begin();
1907  numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1908 
1909  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed") {
1910 
1911  l1pathname = *numpathmodule;
1912  break;
1913 
1914  }
1915 
1916  } // end for
1917 
1918  return l1pathname;
1919 
1920 }
1921 
1922 
1923 bool TrigResRateMon::hasL1Passed(const string& pathname, const edm::TriggerNames & triggerNames)
1924 {
1925 
1926  bool rc = false;
1927  int l1ModuleIndex = 999;
1928  // --------------------
1929  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
1930 
1931  if(v->getPath() == pathname ) l1ModuleIndex = v->getL1ModuleIndex();
1932 
1933  }
1934 
1935  unsigned int pathByIndex = triggerNames.triggerIndex(pathname);
1936  if(pathByIndex >= triggerResults_->size() ) return rc; // path is not in the menu
1937 
1938  // get index of the last module that issued the decision
1939  int lastModule = triggerResults_->index(pathByIndex);
1940 
1941  // if L1 passed, then it must not be the module that
1942  // issued the last decision
1943  rc = (l1ModuleIndex < lastModule);
1944 
1945  return rc;
1946 
1947 }
1948 
1949 bool TrigResRateMon::hasHLTPassed(const string& pathname, const edm::TriggerNames & triggerNames)
1950 {
1951 
1952  bool rc = false;
1953 
1954  unsigned int pathByIndex = triggerNames.triggerIndex(pathname);
1955  if(pathByIndex >= triggerResults_->size() ) return rc; // path is not in the menu
1956 
1957  rc = triggerResults_->accept(pathByIndex);
1958 
1959  return rc;
1960 
1961 }
1962 
1963 
1965 {
1966 
1967  std::string pathname = name;
1968  //cout << "----------------------------------------------" << endl;
1969  //cout << pathname << endl;
1970 
1971  //remove "L1" substr
1972  if(pathname.find("L1") != std::string::npos) pathname.replace(pathname.find("L1"),2,"");
1973  //remove "L2" substr
1974  if(pathname.find("L2") != std::string::npos) pathname.replace(pathname.find("L2"),2,"");
1975  //remove "8E29" substr
1976  if(pathname.find("8E29") != std::string::npos) pathname.replace(pathname.find("8E29"),4,"");
1977 
1978  int digitLocation=0;
1979  for (unsigned int i=0; i < pathname.length(); i++)
1980  {
1981  if (isdigit(pathname.at(i))) {
1982 
1983  digitLocation = i;
1984  break;
1985 
1986  }
1987  }
1988 
1989  // get the string from the location of the first digit to the end
1990  string hltThresholdString = pathname.substr(digitLocation);
1991 
1992  int hltThreshold = 0;
1993 
1994  // get intiger at the begining of the string
1995  sscanf (hltThresholdString.c_str(),"%d%*s",&hltThreshold);
1996  //printf ("%s -> %s -> %d\n",pathname.c_str(), hltThresholdString.c_str(), hltThreshold);
1997 
1998  return hltThreshold;
1999 
2000 }
2001 
2003 
2004  string fullPathToME;
2005 
2006  // again, get hold of dataset names
2007  //vector<string> datasetNames = hltConfig_.datasetNames() ;
2008  vector<string> datasetNames = hltConfig_.streamContent("A") ;
2009 
2010  // fill vectors of MEs needed in normalization
2011  for (unsigned int i=0;i<datasetNames.size();i++) {
2012 
2013  fullPathToME = pathsSummaryFolder_ +"HLT_"+datasetNames[i]+"_PassPass";
2014  v_ME_HLTPassPass.push_back( dbe_->get(fullPathToME));
2015 
2016  fullPathToME = pathsSummaryHLTCorrelationsFolder_+"HLT_"+datasetNames[i]+"_PassPass_Normalized";
2017  v_ME_HLTPassPass_Normalized.push_back( dbe_->get(fullPathToME));
2018 
2019  fullPathToME = pathsSummaryHLTCorrelationsFolder_+"HLT_"+datasetNames[i]+"_Pass_Normalized_Any";
2020  v_ME_HLTPass_Normalized_Any.push_back( dbe_->get(fullPathToME));
2021 
2022  }
2023 
2024  // add stream MEs
2025  fullPathToME = pathsSummaryFolder_ +"HLT_A_PassPass";
2026  v_ME_HLTPassPass.push_back( dbe_->get(fullPathToME));
2027 
2028  fullPathToME = pathsSummaryHLTCorrelationsFolder_+"HLT_A_PassPass_Normalized";
2029  v_ME_HLTPassPass_Normalized.push_back( dbe_->get(fullPathToME));
2030 
2031  fullPathToME = pathsSummaryHLTCorrelationsFolder_+"HLT_A_Pass_Normalized_Any";
2032  v_ME_HLTPass_Normalized_Any.push_back( dbe_->get(fullPathToME));
2033 
2034  for (unsigned int i =0;i<v_ME_HLTPassPass.size();i++) {
2035 
2036  MonitorElement* ME_HLTPassPass = v_ME_HLTPassPass[i];
2037  MonitorElement* ME_HLTPassPass_Normalized = v_ME_HLTPassPass_Normalized[i];
2038  MonitorElement* ME_HLTPass_Normalized_Any = v_ME_HLTPass_Normalized_Any[i];
2039 
2040  if(!ME_HLTPassPass || !ME_HLTPassPass_Normalized || !ME_HLTPass_Normalized_Any) return;
2041 
2042  float passCount = 0;
2043  unsigned int nBinsX = ME_HLTPassPass->getTH2F()->GetNbinsX();
2044  unsigned int nBinsY = ME_HLTPassPass->getTH2F()->GetNbinsY();
2045 
2046  for(unsigned int binX = 0; binX < nBinsX+1; binX++) {
2047 
2048  passCount = ME_HLTPassPass->getTH2F()->GetBinContent(binX,binX);
2049 
2050 
2051  for(unsigned int binY = 0; binY < nBinsY+1; binY++) {
2052 
2053  if(passCount != 0) {
2054 
2055  // normalize each bin to number of passCount
2056  float normalizedBinContentPassPass = (ME_HLTPassPass->getTH2F()->GetBinContent(binX,binY))/passCount;
2057  //float normalizedBinContentPassFail = (ME_HLTPassFail_->getTH2F()->GetBinContent(binX,binY))/passCount;
2058 
2059  ME_HLTPassPass_Normalized->getTH2F()->SetBinContent(binX,binY,normalizedBinContentPassPass);
2060  //ME_HLTPassFail_Normalized_->getTH2F()->SetBinContent(binX,binY,normalizedBinContentPassFail);
2061 
2062  if(binX == nBinsX) {
2063 
2064  ME_HLTPass_Normalized_Any->getTH1F()->SetBinContent(binY,normalizedBinContentPassPass);
2065 
2066  }
2067 
2068  }
2069  else {
2070 
2071  ME_HLTPassPass_Normalized->getTH2F()->SetBinContent(binX,binY,0);
2072  //ME_HLTPassFail_Normalized_->getTH2F()->SetBinContent(binX,binY,0);
2073 
2074  } // end if else
2075 
2076  } // end for binY
2077 
2078  } // end for binX
2079 
2080  } // end for i
2081 
2082 }
#define LogDebug(id)
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
unsigned int size() const
number of trigger paths in trigger table
std::vector< std::pair< std::string, float > > fGroupL1TempCountPair
edm::InputTag triggerResultsLabel_
LuminosityBlockID id() const
double normalizedChi2Cut_
int getThresholdFromName(const std::string &pathname)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
unsigned int nBinsOneOverEt_
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
std::string pathsSummaryFilterCountsFolder_
TrigResRateMon(const edm::ParameterSet &)
RunID const & id() const
Definition: RunBase.h:43
const std::string moduleType(const std::string &module) const
C++ class name of module.
HLTConfigProvider hltConfig_
std::vector< std::string > fGroupName
void countHLTGroupBXHitsEndLumiBlock(const int &lumi)
const std::string & label
Definition: MVAComputer.cc:186
std::vector< std::pair< std::string, float > > fPathTempCountPair
const std::string & triggerName(unsigned int triggerIndex) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
MonitorElement * ME_HLTAll_LS
enum start value shifted to 81 so as to avoid clashes with PDG codes
std::string fCustomBXPath
tuple lumi
Definition: fjr2json.py:41
edm::InputTag recHitsEBTag_
MonitorElement * scalersSelect
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
void countHLTGroupHitsEndLumiBlock(const int &lumi)
PathInfoCollection hltPaths_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< MonitorElement * > v_ME_HLTAll_LS
#define NULL
Definition: scimark2.h:8
std::string pathsSummaryHLTPathsPerLSFolder_
double thresholdFactor_
double dRMaxElectronMuon_
void setupHltMatrix(const std::string &label, std::vector< std::string > &paths)
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
std::string dirname_
std::vector< TPRegexp > filters
Definition: eve_filter.cc:25
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
PathInfoCollection hltPathsDiagonal_
void Fill(long long x)
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
U second(std::pair< T, U > const &p)
const std::string * pathName() const
Definition: HLTadd.h:31
std::vector< std::string > specialPaths_
Definition: ME.h:11
int iEvent
Definition: GenABIO.cc:243
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
void fillHltMatrix(const edm::TriggerNames &triggerNames)
std::string pathsSummaryStreamsFolder_
const std::vector< std::string > & streamContent(unsigned int stream) const
names of datasets in stream with index i
void setupStreamMatrix(const std::string &label, std::vector< std::string > &paths)
std::vector< std::pair< std::string, float > > fGroupTempCountPair
unsigned int nBinsDR_
std::vector< MonitorElement * > v_ME_HLTPassPass_Normalized
edm::InputTag recHitsEETag_
int j
Definition: DBlmapReader.cc:9
TH1 * getTH1(void) const
virtual void endJob()
void setVerbose(unsigned level)
Definition: DQMStore.cc:196
void countHLTPathHitsEndLumiBlock(const int &lumi)
std::vector< MonitorElement * > v_ME_HLTPassPass
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
std::vector< MonitorElement * > v_ME_Total_BX
bool first
Definition: L1TdeRCT.cc:79
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
MonitorElement * ME_HLT_BX
#define LogTrace(id)
edm::InputTag triggerSummaryLabel_
unsigned int referenceBX_
int k[5][pyjets_maxn]
std::vector< MonitorElement * > v_ME_Total_BX_Norm
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
unsigned int Nbx_
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
std::string pathsSummaryFolder_
unsigned int nLS_
std::string pathsIndividualHLTPathsPerLSFolder_
edm::Handle< edm::TriggerResults > triggerResults_
void beginRun(const edm::Run &run, const edm::EventSetup &c)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
TH1F * getTH1F(void) const
double b
Definition: hdecay.h:120
LuminosityBlockNumber_t luminosityBlock() const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::string const & label() const
Definition: InputTag.h:25
std::string pathsSummaryHLTCorrelationsFolder_
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
std::vector< MonitorElement * > v_ME_HLTPass_Normalized_Any
unsigned int nBins2D_
double electronEtaMax_
DQMStore * dbe_
virtual void beginJob()
std::string pathsSummaryHLTPathsPerBXFolder_
TH2F * getTH2F(void) const
int getTriggerTypeParsePathName(const std::string &pathname)
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:642
std::string processname_
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
unsigned int nBins_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
std::string const & instance() const
Definition: InputTag.h:26
tuple size
Write out results.
mathSSE::Vec4< T > v
MonitorElement * ME_HLT_CUSTOM_BX
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
const std::string getL1ConditionModuleName(const std::string &pathname)
Definition: Run.h:32