CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrigResRateMon.h
Go to the documentation of this file.
1 #ifndef TRIGRESRATEMON_H
2 #define TRIGRESRATEMON_H
3 // -*- C++ -*-
4 //
5 // Package: TrigResRateMon
6 // Class: TrigResRateMon
7 //
15 // Original Author:
16 // Vladimir Rekovic, July 2010
17 //
18 //
19 // $Id: TrigResRateMon.h,v 1.11 2011/09/21 16:51:09 lwming Exp $
20 //
21 //
22 
23 // system include files
24 #include <memory>
25 #include <unistd.h>
26 
27 
28 // user include files
31 
37 
43 
44 // added VR
50 
52 
59 
60 /*
61  needs cleaining of include statments (VR)
62 */
63 
66 
69 
71 
72 
73 
74 #include <iostream>
75 #include <fstream>
76 #include <vector>
77 #include <set>
78 
79 namespace edm {
80  class TriggerNames;
81 }
82 
83 //typedef std::multimap<float,int> fimmap ;
84 //typedef std::set<fimmap , less<fimmap> > mmset;
85 
87 
88  public:
89  explicit TrigResRateMon(const edm::ParameterSet&);
91 
92  //void cleanDRMatchSet(mmset& tempSet);
93 
95  //edm::Handle<reco::BeamSpot> fBeamSpotHandle;
96 
97  private:
98  virtual void beginJob() ;
99  virtual void analyze(const edm::Event&, const edm::EventSetup&);
100  virtual void endJob() ;
101 
102  // BeginRun
103  void beginRun(const edm::Run& run, const edm::EventSetup& c);
104 
105  // EndRun
106  void endRun(const edm::Run& run, const edm::EventSetup& c);
107  void setupHltMatrix(const std::string& label, std::vector<std::string> & paths);
108  void setupStreamMatrix(const std::string& label, std::vector<std::string> & paths);
109  void setupHltLsPlots();
110  void setupHltBxPlots();
111  void countHLTPathHitsEndLumiBlock(const int & lumi);
112  void countHLTGroupHitsEndLumiBlock(const int & lumi);
113  void countHLTGroupL1HitsEndLumiBlock(const int & lumi);
114  void countHLTGroupBXHitsEndLumiBlock(const int & lumi);
115 
116  void fillHltMatrix(const edm::TriggerNames & triggerNames, const edm::Event& iEvent, const edm::EventSetup& iSetup);
117 
118 
119  // JMS counts
120  // need to fill counts per path with the prescales
121  void fillCountsPerPath(const edm::Event& iEvent, const edm::EventSetup& iSetup);
122  void bookCountsPerPath();
124  void clearCountsPerPath();
125  void fillXsecPerDataset(const int& lumi);
126 
127  void filltestHisto(const int& lumi); //Robin
128  void bookTestHisto(); //Robin
129  // JMS lumi average
130  void addLumiToAverage (double lumi);
131  void clearLumiAverage ();
132 
133 
134  void normalizeHLTMatrix();
135 
136  int getTriggerTypeParsePathName(const std::string & pathname);
137  const std::string getL1ConditionModuleName(const std::string & pathname);
138  bool hasL1Passed(const std::string & pathname, const edm::TriggerNames & triggerNames);
139  bool hasHLTPassed(const std::string & pathname, const edm::TriggerNames& triggerNames);
140  int getThresholdFromName(const std::string & pathname);
141 
142 
143  void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c);
144  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c);
145 
146  // ----------member data ---------------------------
147  int nev_;
148  int nStream_; //Robin
149  int nPass_; //Robin
150  bool passAny; //Robin
152  bool fLumiFlag;
153  bool fIsSetup;
154 
155  // JetID helper
156  //reco::helper::JetIDHelper *jetID;
157 
158  bool jmsDebug;
160  unsigned int zbIndex;
162 
166  std::vector<MonitorElement*> v_ME_HLTAll_LS;
167  std::vector<MonitorElement*> v_ME_Total_BX;
168  std::vector<MonitorElement*> v_ME_Total_BX_Norm;
169 
170  std::vector<MonitorElement*> v_ME_HLTPassPass;
171  std::vector<MonitorElement*> v_ME_HLTPassPass_Normalized;
172  std::vector<MonitorElement*> v_ME_HLTPass_Normalized_Any;
173 
174  std::string testPathsFolder_; //Robin
175  std::string pathsSummaryFolder_;
183  std::string fCustomBXPath;
184 
185  std::vector<std::string> fGroupName;
186 
187 
188  // JMS Keep track of rates and average lumi
189  std::vector<unsigned> rawCountsPerPD; //Robin
190  std::vector<unsigned> rawCountsPerPath; //Robin
191  std::vector<unsigned> finalCountsPerPath; //Robin
195 
196  //Robin---
203  // MonitorElement * meXsecPerLS;
204  // MonitorElement * meXsec;
205  // MonitorElement * meXsecPerIL;
206 
208  std::vector<MonitorElement*> v_ME_XsecPerLS;
209  std::vector<MonitorElement*> v_ME_CountsPerLS;
210  std::vector<MonitorElement*> v_ME_Xsec;
211 
212  // JMS Mask off some paths so that they don't mess with your plots
213 
214  std::vector< std::string > maskedPaths_;
215  std::vector< std::string > testPaths_; //Robin
216 
217  // JMS calcuate a reference cross section
218  // then scale
219  std::string referenceTrigInput_;
220  std::string referenceTrigName_;
224  // unsigned testTrigCountsPS_; //Robin
226  //unsigned referenceTrigCounts_;
227 
228 
229  unsigned int nLS_;
230  double LSsize_ ;
232  unsigned int referenceBX_;
233  unsigned int Nbx_;
234 
235  bool plotAll_;
239 
240  unsigned int nBins_;
241  unsigned int nBins2D_;
242  unsigned int nBinsDR_;
243  unsigned int nBinsOneOverEt_;
244  double ptMin_ ;
245  double ptMax_ ;
246  double dRMax_ ;
248 
253  double muonEtaMax_;
254  double muonEtMin_;
255  double muonDRMatch_;
257  double tauEtaMax_;
258  double tauEtMin_;
259  double tauDRMatch_;
261  double jetEtaMax_;
262  double jetEtMin_;
263  double jetDRMatch_;
265  double bjetEtaMax_;
266  double bjetEtMin_;
267  double bjetDRMatch_;
270  double photonEtMin_;
273  double trackEtaMax_;
274  double trackEtMin_;
277  double metEtaMax_;
278  double metMin_;
279  double metDRMatch_;
281  double htEtaMax_;
282  double htMin_;
283  double htDRMatch_;
284  double htL1DRMatch_;
285  double sumEtMin_;
286 
287  // Muon quality cuts
288  double dxyCut_;
295 
296  std::vector<std::pair<std::string, std::string> > custompathnamepairs_;
297 
298  std::vector <std::vector <std::string> > triggerFilters_;
299  std::vector <std::vector <uint> > triggerFilterIndices_;
300  std::vector <std::pair<std::string, float> > fPathTempCountPair;
301  std::vector <std::pair<std::string, std::vector<int> > > fPathBxTempCountPair;
302  std::vector <std::pair<std::string, float> > fGroupTempCountPair;
303  std::vector <std::pair<std::string, float> > fGroupL1TempCountPair;
304 
305 
306  // This variable contains the list of PD, then the list of paths per PD
307 
308  std::vector <std::pair<std::string, std::vector<std::string> > > fGroupNamePathsPair;
309 
310  std::vector<std::string> specialPaths_;
311 
312  std::string dirname_;
313  std::string processname_;
321  // data across paths
323  // helper class to store the data path
324 
326 
327 
328  // create a class that can store all the strings
329  // associated with a primary dataset
330  // the
331  class DatasetInfo {
332 
333  public:
334  std::string datasetName;
335  std::vector<std::string> pathNames;
336  std::set<std::string> maskedPaths;
337  std::set<std::string> testPaths; //Robin
338  // this tells you the name of the monitor element
339  // that has the counts per path saved
340  std::string countsPerPathME_Name;
341 
342  // name of monitor element that has xsec per path saved
343  std::string xsecPerPathME_Name;
344 
345  // name of monitor element that has xsec per path saved
347 
348  std::string ratePerLSME_Name;
349  // this tells you the name of the ME that has
350  // raw counts (no prescale accounting)
351  // for each path
352 
354 
355  // counts per path
356 
357  std::map<std::string, unsigned int> countsPerPath;
358 
359  //empty default constructor
360  DatasetInfo () {};
361 
362  // do we need a copy constructor?
363 
364  // function to set the paths and
365  // create zeroed counts per path
366 
367  void setPaths (std::vector<std::string> inputPaths){
368  pathNames = inputPaths;
369  for (std::vector<std::string>::const_iterator iPath = pathNames.begin();
370  iPath != pathNames.end();
371  iPath++) {
372  countsPerPath[*iPath] = 0;
373  }
374  }//end setPaths
375 
377  std::map<std::string, unsigned int>::iterator iCounts;
378  for (iCounts = countsPerPath.begin();
379  iCounts != countsPerPath.end();
380  iCounts++){
381  iCounts->second = 0;
382  }
383 
384  }// end clearCountsPerPath
385 
386  // put this here so that external people
387  // don't care how you store counts
388  void incrementCountsForPath (std::string targetPath){
389  countsPerPath[targetPath]++;
390  }
391 
392  void incrementCountsForPath (std::string targetPath, unsigned preScale){
393  countsPerPath[targetPath] += preScale;
394  }
395 
396  void printCountsPerPath () const {
397  std::map<std::string, unsigned int>::const_iterator iCounts;
398  for (iCounts = countsPerPath.begin();
399  iCounts != countsPerPath.end();
400  iCounts++){
402  << " " << iCounts->first
403  << " " << iCounts->second
404  << std::endl;
405  }
406 
407  }// end clearCountsPerPath
408 
409 
410  void fillXsecPlot (MonitorElement * myXsecPlot, double currentInstLumi, double secondsPerLS, double referenceXSec) {
411  // this will put the reference cross section in the denominator
412  fillXsecPlot( myXsecPlot, currentInstLumi*referenceXSec, secondsPerLS);
413  }
414 
415  void fillXsecPlot (MonitorElement * myXsecPlot, double currentInstLumi, double secondsPerLS) {
416 
417 
418  for (unsigned iPath = 0;
419  iPath < pathNames.size();
420  iPath++) {
421  std::string thisPathName = pathNames[iPath];
422  unsigned thisPathCounts = countsPerPath[thisPathName];
423 
424  // if this is a masked path, then skip it
425  if (maskedPaths.find(thisPathName) != maskedPaths.end()) {
426  //std::cout << "Path " << thisPathName << " is masked, not filling it " << std::endl;
427  continue;
428  }
430  TString thisName = thisPathName.c_str();
431  if ( thisName.Contains("L1") || thisName.Contains("L2") ){
432  continue;
433  }
434 
435  double xsec = 1.0;
436  // what should we fill when averageLumi == 0 ???
437  if (currentInstLumi > 0) {
438  xsec = thisPathCounts / (currentInstLumi*secondsPerLS);
439  } else if ( secondsPerLS > 0) {
440  xsec = (9e-10) ;
441  // xsec = thisPathCounts / secondsPerLS;
442  } else {
443  xsec = (9e-20) ;
444  // xsec = thisPathCounts;
445  }
446 
447  myXsecPlot->Fill(iPath, xsec);
448  //Robin ???
449  // if (currentInstLumi > 0) myXsecPlot->Fill(iPath, xsec);
450  //std::cout << datasetName << " " << thisPathName << " filled with xsec " << xsec << std::endl;
451 
452  }
453  } // end fill Xsec plot
454 
455  void fillRawCountsForPath (MonitorElement * myRawCountsPlot, std::string pathName) {
456  TH1F* tempRawCounts = myRawCountsPlot->getTH1F();
457  int binNumber = tempRawCounts->GetXaxis()->FindBin(pathName.c_str());
458  if (binNumber > 0) {
459  tempRawCounts->Fill(binNumber);
460  } else {
461  //std::cout << "Problem finding bin " << pathName << " in plot " << tempRawCounts->GetTitle() << std::endl;
462  }
463  }// end fill RawCountsForPath
464 
465  void setMaskedPaths (std::vector<std::string> inputPaths) {
466  for (unsigned i=0; i < inputPaths.size(); i++) {
467  std::string maskSubString = inputPaths[i];
468  for (unsigned j=0; j < pathNames.size(); j++) {
469  // If a path in the DS contains a masked substring
470  // Then mask that path
471  //
472  std::string candidateForRemoval = pathNames[j];
473  TString pNameTS (candidateForRemoval);
474  if ( pNameTS.Contains(maskSubString)){
475 
476  maskedPaths.insert(candidateForRemoval);
477  } // end if path contains substring
478  }// end for each path in ds
479  }
480  }// end setMaskedPaths
481 
483  std::cout << "======== Printing masked paths for " << datasetName <<" ======== " << std::endl;
484  for ( std::set<std::string>::const_iterator iMask = maskedPaths.begin();
485  iMask != maskedPaths.end();
486  iMask++) {
487  std::cout << (*iMask) << std::endl;
488  }
489  std::cout << "======DONE PRINTING=====" << std::endl;
490  }
491 
492  };
493 
494  // create a vector of the information
495  std::vector<DatasetInfo> primaryDataSetInformation;
496 
497  class PathInfo {
498 
500  pathIndex_(-1), denomPathName_("unset"), pathName_("unset"), l1pathName_("unset"), filterName_("unset"), processName_("unset"), objectType_(-1) {};
501 
502  public:
503 
505  {
506  filters_ = filters;
507  }
508 
509  void setHistos(
510 
511  MonitorElement* const NOn,
512  MonitorElement* const onEtOn,
513  MonitorElement* const onOneOverEtOn,
514  MonitorElement* const onEtavsonPhiOn,
515  MonitorElement* const NOff,
516  MonitorElement* const offEtOff,
517  MonitorElement* const offEtavsoffPhiOff,
518  MonitorElement* const NL1,
519  MonitorElement* const l1EtL1,
520  MonitorElement* const l1Etavsl1PhiL1,
521  MonitorElement* const NL1On,
522  MonitorElement* const l1EtL1On,
523  MonitorElement* const l1Etavsl1PhiL1On,
524  MonitorElement* const NL1Off,
525  MonitorElement* const offEtL1Off,
526  MonitorElement* const offEtavsoffPhiL1Off,
527  MonitorElement* const NOnOff,
528  MonitorElement* const offEtOnOff,
529  MonitorElement* const offEtavsoffPhiOnOff,
530  MonitorElement* const NL1OnUM,
531  MonitorElement* const l1EtL1OnUM,
532  MonitorElement* const l1Etavsl1PhiL1OnUM,
533  MonitorElement* const NL1OffUM,
534  MonitorElement* const offEtL1OffUM,
535  MonitorElement* const offEtavsoffPhiL1OffUM,
536  MonitorElement* const NOnOffUM,
537  MonitorElement* const offEtOnOffUM,
538  MonitorElement* const offEtavsoffPhiOnOffUM,
539  MonitorElement* const offDRL1Off,
540  MonitorElement* const offDROnOff,
541  MonitorElement* const l1DRL1On)
542  {
543 
544  NOn_ = NOn;
545  onEtOn_ = onEtOn;
546  onOneOverEtOn_ = onOneOverEtOn;
547  onEtavsonPhiOn_ = onEtavsonPhiOn;
548  NOff_ = NOff;
549  offEtOff_ = offEtOff;
550  offEtavsoffPhiOff_ = offEtavsoffPhiOff;
551  NL1_ = NL1;
552  l1EtL1_ = l1EtL1;
553  l1Etavsl1PhiL1_ = l1Etavsl1PhiL1;
554  NL1On_ = NL1On;
555  l1EtL1On_ = l1EtL1On;
556  l1Etavsl1PhiL1On_ = l1Etavsl1PhiL1On;
557  NL1Off_ = NL1Off;
558  offEtL1Off_ = offEtL1Off;
559  offEtavsoffPhiL1Off_ = offEtavsoffPhiL1Off;
560  NOnOff_ = NOnOff;
561  offEtOnOff_ = offEtOnOff;
562  offEtavsoffPhiOnOff_ = offEtavsoffPhiOnOff;
563  NL1OnUM_ = NL1OnUM;
564  l1EtL1OnUM_ = l1EtL1OnUM;
565  l1Etavsl1PhiL1OnUM_ = l1Etavsl1PhiL1OnUM;
566  NL1OffUM_ = NL1OffUM;
567  offEtL1OffUM_ = offEtL1OffUM;
568  offEtavsoffPhiL1OffUM_ = offEtavsoffPhiL1OffUM;
569  NOnOffUM_ = NOnOffUM;
570  offEtOnOffUM_ = offEtOnOffUM;
571  offEtavsoffPhiOnOffUM_ = offEtavsoffPhiOnOffUM;
572  offDRL1Off_ = offDRL1Off;
573  offDROnOff_ = offDROnOff;
574  l1DRL1On_ = l1DRL1On;
575 
576  }
577 
579  return NOn_;
580  }
582  return onEtOn_;
583  }
585  return onOneOverEtOn_;
586  }
588  return onEtavsonPhiOn_;
589  }
591  return NOff_;
592  }
594  return offEtOff_;
595  }
597  return offEtavsoffPhiOff_;
598  }
600  return NL1_;
601  }
603  return l1EtL1_;
604  }
606  return l1Etavsl1PhiL1_;
607  }
609  return NL1On_;
610  }
612  return l1EtL1On_;
613  }
615  return l1Etavsl1PhiL1On_;
616  }
618  return NL1Off_;
619  }
621  return offEtL1Off_;
622  }
624  return offEtavsoffPhiL1Off_;
625  }
627  return NOnOff_;
628  }
630  return offEtOnOff_;
631  }
633  return offEtavsoffPhiOnOff_;
634  }
636  return NL1OnUM_;
637  }
639  return l1EtL1OnUM_;
640  }
642  return l1Etavsl1PhiL1OnUM_;
643  }
645  return NL1OffUM_;
646  }
648  return offEtL1OffUM_;
649  }
651  return offEtavsoffPhiL1OffUM_;
652  }
654  return NOnOffUM_;
655  }
657  return offEtOnOffUM_;
658  }
660  return offEtavsoffPhiOnOffUM_;
661  }
663  return offDRL1Off_;
664  }
666  return offDROnOff_;
667  }
669  return l1DRL1On_;
670  }
672  return filters_;
673  }
674  const std::string getLabel(void ) const {
675  return filterName_;
676  }
677  void setLabel(std::string labelName){
678  filterName_ = labelName;
679  return;
680  }
681  const std::string & getPath(void ) const {
682  return pathName_;
683  }
684  const std::string & getl1Path(void ) const {
685  return l1pathName_;
686  }
687  const int getL1ModuleIndex(void ) const {
688  return l1ModuleIndex_;
689  }
690  const std::string & getDenomPath(void ) const {
691  return denomPathName_;
692  }
693  const std::string & getProcess(void ) const {
694  return processName_;
695  }
696  const int getObjectType(void ) const {
697  return objectType_;
698  }
699 
700  const edm::InputTag getTag(void) const{
702  return tagName;
703  }
704 
705  ~PathInfo() {};
706 
707  PathInfo(std::string denomPathName, std::string pathName, std::string l1pathName, int l1ModuleIndex, std::string filterName, std::string processName, size_t type, float ptmin, float ptmax, float hltThreshold, float l1Threshold):
708 
709  denomPathName_(denomPathName),
710  pathName_(pathName),
711  l1pathName_(l1pathName),
712  l1ModuleIndex_(l1ModuleIndex),
713  filterName_(filterName),
714  processName_(processName),
715  objectType_(type),
716  NOn_(0), onEtOn_(0), onOneOverEtOn_(0), onEtavsonPhiOn_(0),
718  NL1_(0), l1EtL1_(0), l1Etavsl1PhiL1_(0),
725  offDRL1Off_(0), offDROnOff_(0), l1DRL1On_(0), filters_(0),
726  ptmin_(ptmin), ptmax_(ptmax),
727  hltThreshold_(hltThreshold), l1Threshold_(l1Threshold)
728 
729  {
730  };
731 
732  PathInfo(std::string denomPathName, std::string pathName, std::string l1pathName, std::string filterName, std::string processName, size_t type,
733  MonitorElement *NOn,
734  MonitorElement *onEtOn,
735  MonitorElement *onOneOverEtOn,
736  MonitorElement *onEtavsonPhiOn,
737  MonitorElement *NOff,
738  MonitorElement *offEtOff,
739  MonitorElement *offEtavsoffPhiOff,
740  MonitorElement *NL1,
741  MonitorElement *l1EtL1,
742  MonitorElement *l1Etavsl1PhiL1,
743  MonitorElement *NL1On,
744  MonitorElement *l1EtL1On,
745  MonitorElement *l1Etavsl1PhiL1On,
746  MonitorElement *NL1Off,
747  MonitorElement *offEtL1Off,
748  MonitorElement *offEtavsoffPhiL1Off,
749  MonitorElement *NOnOff,
750  MonitorElement *offEtOnOff,
751  MonitorElement *offEtavsoffPhiOnOff,
752  MonitorElement *NL1OnUM,
753  MonitorElement *l1EtL1OnUM,
754  MonitorElement *l1Etavsl1PhiL1OnUM,
755  MonitorElement *NL1OffUM,
756  MonitorElement *offEtL1OffUM,
757  MonitorElement *offEtavsoffPhiL1OffUM,
758  MonitorElement *NOnOffUM,
759  MonitorElement *offEtOnOffUM,
760  MonitorElement *offEtavsoffPhiOnOffUM,
761  MonitorElement *offDRL1Off,
762  MonitorElement *offDROnOff,
763  MonitorElement *l1DRL1On,
765  float ptmin, float ptmax
766  ):
767 
768  denomPathName_(denomPathName),
769  pathName_(pathName), l1pathName_(l1pathName),
770  filterName_(filterName), processName_(processName), objectType_(type),
771  NOn_(NOn), onEtOn_(onEtOn), onOneOverEtOn_(onOneOverEtOn), onEtavsonPhiOn_(onEtavsonPhiOn),
772  NOff_(NOff), offEtOff_(offEtOff), offEtavsoffPhiOff_(offEtavsoffPhiOff),
773  NL1_(NL1), l1EtL1_(l1EtL1), l1Etavsl1PhiL1_(l1Etavsl1PhiL1),
774  NL1On_(NL1On), l1EtL1On_(l1EtL1On), l1Etavsl1PhiL1On_(l1Etavsl1PhiL1On),
775  NL1Off_(NL1Off), offEtL1Off_(offEtL1Off), offEtavsoffPhiL1Off_(offEtavsoffPhiL1Off),
776  NOnOff_(NOnOff), offEtOnOff_(offEtOnOff), offEtavsoffPhiOnOff_(offEtavsoffPhiOnOff),
777  NL1OnUM_(NL1OnUM), l1EtL1OnUM_(l1EtL1OnUM), l1Etavsl1PhiL1OnUM_(l1Etavsl1PhiL1OnUM),
778  NL1OffUM_(NL1OffUM), offEtL1OffUM_(offEtL1OffUM), offEtavsoffPhiL1OffUM_(offEtavsoffPhiL1OffUM),
779  NOnOffUM_(NOnOffUM), offEtOnOffUM_(offEtOnOffUM), offEtavsoffPhiOnOffUM_(offEtavsoffPhiOnOffUM),
780  offDRL1Off_(offDRL1Off),
781  offDROnOff_(offDROnOff),
782  l1DRL1On_(l1DRL1On),
783  filters_(filters),
784  ptmin_(ptmin), ptmax_(ptmax)
785  {
786  };
787 
788  bool operator==(const std::string& v)
789  {
790  return v==filterName_;
791  }
792 
793  bool operator!=(const std::string& v)
794  {
795  return v!=filterName_;
796  }
797 
798  float getPtMin() const { return ptmin_; }
799  float getPtMax() const { return ptmax_; }
800  float getHltThreshold() const { return hltThreshold_; }
801  float getL1Threshold() const { return l1Threshold_; }
802 
803  std::vector< std::pair<std::string,unsigned int> > filtersAndIndices;
804 
805 
806  private:
807 
809  std::string denomPathName_;
810  std::string pathName_;
811  std::string l1pathName_;
813  std::string filterName_;
814  std::string processName_;
816 
817  // we don't own this data
829 
830  float ptmin_, ptmax_;
832 
833  const int index() {
834  return pathIndex_;
835  }
836  const int type() {
837  return objectType_;
838  }
839 
840 
841  };
842 
843 
844  public:
845 
846  // simple collection - just
847  class PathInfoCollection: public std::vector<PathInfo> {
848  public:
849 
850  PathInfoCollection(): std::vector<PathInfo>()
851  {};
852  std::vector<PathInfo>::iterator find(std::string pathName) {
853  return std::find(begin(), end(), pathName);
854  }
855  };
856 
858 
860 
861 };
862 
863 
864 
865 
866 
867 #endif
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
std::vector< unsigned > rawCountsPerPD
std::vector< std::pair< std::string, float > > fGroupL1TempCountPair
edm::InputTag triggerResultsLabel_
double normalizedChi2Cut_
type
Definition: HCALResponse.h:22
int getThresholdFromName(const std::string &pathname)
double electronL1DRMatch_
unsigned int nBinsOneOverEt_
int i
Definition: DBlmapReader.cc:9
const std::string & getDenomPath(void) const
std::vector< std::string > pathNames
MonitorElement * getNOnOffUMHisto()
std::string pathsSummaryFilterCountsFolder_
TrigResRateMon(const edm::ParameterSet &)
HLTConfigProvider hltConfig_
edm::Handle< trigger::TriggerEvent > fTriggerObj
std::vector< std::string > fGroupName
MonitorElement * getFiltersHisto()
float getL1Threshold() const
void countHLTGroupBXHitsEndLumiBlock(const int &lumi)
void fillHltMatrix(const edm::TriggerNames &triggerNames, const edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< std::string > testPaths_
std::vector< std::pair< std::string, float > > fPathTempCountPair
const std::string getLabel(void) const
MonitorElement * getNL1OffUMHisto()
std::vector< std::pair< std::string, unsigned int > > filtersAndIndices
void incrementCountsForPath(std::string targetPath, unsigned preScale)
std::vector< unsigned > finalCountsPerPath
bool operator!=(const std::string &v)
bool operator==(const std::string &v)
MonitorElement * getOffEtOnOffHisto()
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
MonitorElement * offDROnOff_
MonitorElement * ME_HLTAll_LS
void setFilterHistos(MonitorElement *const filters)
MonitorElement * NOnOffUM_
MonitorElement * filters_
std::string fCustomBXPath
MonitorElement * meAverageLumiPerLS
MonitorElement * l1Etavsl1PhiL1OnUM_
MonitorElement * onOneOverEtOn_
MonitorElement * getOffDRL1OffHisto()
tuple lumi
Definition: fjr2json.py:35
edm::InputTag recHitsEBTag_
MonitorElement * NL1Off_
double averageInstLumi3LS
MonitorElement * scalersSelect
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
MonitorElement * offEtavsoffPhiOff_
MonitorElement * getOffEtaVsOffPhiL1OffHisto()
MonitorElement * getL1EtL1OnHisto()
void countHLTGroupHitsEndLumiBlock(const int &lumi)
PathInfoCollection hltPaths_
void fillXsecPlot(MonitorElement *myXsecPlot, double currentInstLumi, double secondsPerLS, double referenceXSec)
std::vector< MonitorElement * > v_ME_HLTAll_LS
std::vector< MonitorElement * > v_ME_Xsec
MonitorElement * l1Etavsl1PhiL1On_
std::string pathsSummaryHLTPathsPerLSFolder_
double thresholdFactor_
MonitorElement * NL1OffUM_
double dRMaxElectronMuon_
void setupHltMatrix(const std::string &label, std::vector< std::string > &paths)
MonitorElement * onEtOn_
const edm::InputTag getTag(void) const
MonitorElement * getL1EtL1Histo()
std::vector< unsigned > rawCountsPerPath
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * getOffEtOffHisto()
MonitorElement * l1EtL1On_
MonitorElement * getOnOneOverEtOnHisto()
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
std::string dirname_
MonitorElement * l1EtL1_
std::vector< TPRegexp > filters
Definition: eve_filter.cc:25
std::vector< DatasetInfo > primaryDataSetInformation
PathInfoCollection hltPathsDiagonal_
double averageInstLumi
MonitorElement * offEtavsoffPhiOnOffUM_
MonitorElement * l1Etavsl1PhiL1_
void Fill(long long x)
void addLumiToAverage(double lumi)
const std::string & getProcess(void) const
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
MonitorElement * getOffEtaVsOffPhiOnOffUMHisto()
MonitorElement * NL1On_
MonitorElement * getNL1OnHisto()
std::vector< std::string > specialPaths_
double electronDRMatch_
PathInfo(std::string denomPathName, std::string pathName, std::string l1pathName, std::string filterName, std::string processName, size_t type, MonitorElement *NOn, MonitorElement *onEtOn, MonitorElement *onOneOverEtOn, MonitorElement *onEtavsonPhiOn, MonitorElement *NOff, MonitorElement *offEtOff, MonitorElement *offEtavsoffPhiOff, MonitorElement *NL1, MonitorElement *l1EtL1, MonitorElement *l1Etavsl1PhiL1, MonitorElement *NL1On, MonitorElement *l1EtL1On, MonitorElement *l1Etavsl1PhiL1On, MonitorElement *NL1Off, MonitorElement *offEtL1Off, MonitorElement *offEtavsoffPhiL1Off, MonitorElement *NOnOff, MonitorElement *offEtOnOff, MonitorElement *offEtavsoffPhiOnOff, MonitorElement *NL1OnUM, MonitorElement *l1EtL1OnUM, MonitorElement *l1Etavsl1PhiL1OnUM, MonitorElement *NL1OffUM, MonitorElement *offEtL1OffUM, MonitorElement *offEtavsoffPhiL1OffUM, MonitorElement *NOnOffUM, MonitorElement *offEtOnOffUM, MonitorElement *offEtavsoffPhiOnOffUM, MonitorElement *offDRL1Off, MonitorElement *offDROnOff, MonitorElement *l1DRL1On, MonitorElement *filters, float ptmin, float ptmax)
int iEvent
Definition: GenABIO.cc:243
MonitorElement * getOffEtL1OffHisto()
MonitorElement * getNOffHisto()
MonitorElement * NOnOff_
const std::string & getPath(void) const
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * getOffEtL1OffUMHisto()
std::string pathsSummaryFilterEfficiencyFolder_
bool foundReferenceTrigger_
std::string pathsSummaryStreamsFolder_
MonitorElement * getOffEtaVsOffPhiL1OffUMHisto()
void setupStreamMatrix(const std::string &label, std::vector< std::string > &paths)
double photonL1DRMatch_
std::vector< std::pair< std::string, float > > fGroupTempCountPair
unsigned int nBinsDR_
MonitorElement * offEtOff_
std::vector< MonitorElement * > v_ME_HLTPassPass_Normalized
edm::InputTag recHitsEETag_
void fillRawCountsForPath(MonitorElement *myRawCountsPlot, std::string pathName)
MonitorElement * getL1EtaVsL1PhiL1OnHisto()
int j
Definition: DBlmapReader.cc:9
void setLabel(std::string labelName)
virtual void endJob()
const int getL1ModuleIndex(void) const
const std::string & getl1Path(void) const
std::map< std::string, unsigned int > countsPerPath
std::set< std::string > testPaths
#define end
Definition: vmac.h:38
void countHLTPathHitsEndLumiBlock(const int &lumi)
MonitorElement * getL1EtaVsL1PhiL1OnUMHisto()
std::vector< MonitorElement * > v_ME_HLTPassPass
std::vector< MonitorElement * > v_ME_Total_BX
void filltestHisto(const int &lumi)
std::vector< MonitorElement * > v_ME_CountsPerLS
MonitorElement * ME_HLT_BX
edm::InputTag triggerSummaryLabel_
MonitorElement * getOffDROnOffHisto()
unsigned int referenceBX_
std::string referenceTrigName_
MonitorElement * meXsecPerTestPath
double trackL1DRMatch_
unsigned referenceTrigIndex_
std::vector< MonitorElement * > v_ME_Total_BX_Norm
std::vector< std::vector< uint > > triggerFilterIndices_
unsigned int Nbx_
MonitorElement * getOffEtOnOffUMHisto()
std::string pathsSummaryFolder_
unsigned int nLS_
MonitorElement * getOffEtaVsOffPhiOnOffHisto()
std::string testPathsFolder_
MonitorElement * meCountsDroppedPerLS
MonitorElement * getOnEtOnHisto()
void fillXsecPerDataset(const int &lumi)
MonitorElement * getNL1OnUMHisto()
void findReferenceTriggerIndex()
MonitorElement * getL1EtaVsL1PhiL1Histo()
std::string pathsIndividualHLTPathsPerLSFolder_
MonitorElement * getL1DROnL1Histo()
edm::Handle< edm::TriggerResults > triggerResults_
MonitorElement * offEtOnOffUM_
MonitorElement * meXsecStreamPerLS
void setHistos(MonitorElement *const NOn, MonitorElement *const onEtOn, MonitorElement *const onOneOverEtOn, MonitorElement *const onEtavsonPhiOn, MonitorElement *const NOff, MonitorElement *const offEtOff, MonitorElement *const offEtavsoffPhiOff, MonitorElement *const NL1, MonitorElement *const l1EtL1, MonitorElement *const l1Etavsl1PhiL1, MonitorElement *const NL1On, MonitorElement *const l1EtL1On, MonitorElement *const l1Etavsl1PhiL1On, MonitorElement *const NL1Off, MonitorElement *const offEtL1Off, MonitorElement *const offEtavsoffPhiL1Off, MonitorElement *const NOnOff, MonitorElement *const offEtOnOff, MonitorElement *const offEtavsoffPhiOnOff, MonitorElement *const NL1OnUM, MonitorElement *const l1EtL1OnUM, MonitorElement *const l1Etavsl1PhiL1OnUM, MonitorElement *const NL1OffUM, MonitorElement *const offEtL1OffUM, MonitorElement *const offEtavsoffPhiL1OffUM, MonitorElement *const NOnOffUM, MonitorElement *const offEtOnOffUM, MonitorElement *const offEtavsoffPhiOnOffUM, MonitorElement *const offDRL1Off, MonitorElement *const offDROnOff, MonitorElement *const l1DRL1On)
void beginRun(const edm::Run &run, const edm::EventSetup &c)
std::string referenceTrigInput_
MonitorElement * meDiagnostic
TH1F * getTH1F(void) const
MonitorElement * l1DRL1On_
MonitorElement * getNL1OffHisto()
MonitorElement * offEtOnOff_
MonitorElement * getNL1Histo()
std::vector< MonitorElement * > v_ME_XsecPerLS
MonitorElement * getL1EtL1OnUMHisto()
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< PathInfo >::iterator find(std::string pathName)
void setPaths(std::vector< std::string > inputPaths)
MonitorElement * offEtL1Off_
MonitorElement * getOnEtaVsOnPhiOnHisto()
MonitorElement * offDRL1Off_
std::string pathsSummaryHLTCorrelationsFolder_
double ptmin
Definition: HydjetWrapper.h:86
MonitorElement * onEtavsonPhiOn_
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
void printCountsPerPathThisLumi()
#define begin
Definition: vmac.h:31
MonitorElement * l1EtL1OnUM_
std::vector< std::string > maskedPaths_
MonitorElement * getOffEtaVsOffPhiOffHisto()
MonitorElement * meCountsStreamPerLS
MonitorElement * offEtavsoffPhiOnOff_
std::vector< MonitorElement * > v_ME_HLTPass_Normalized_Any
float getHltThreshold() const
MonitorElement * getNOnOffHisto()
unsigned int zbIndex
int64_t TotalDroppedCounts
std::string muonRecoCollectionName_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * offEtavsoffPhiL1OffUM_
unsigned int nBins2D_
double electronEtaMax_
MonitorElement * offEtavsoffPhiL1Off_
void incrementCountsForPath(std::string targetPath)
DQMStore * dbe_
virtual void beginJob()
std::set< std::string > maskedPaths
std::string pathsSummaryHLTPathsPerBXFolder_
void fillXsecPlot(MonitorElement *myXsecPlot, double currentInstLumi, double secondsPerLS)
int getTriggerTypeParsePathName(const std::string &pathname)
std::vector< std::vector< std::string > > triggerFilters_
const int getObjectType(void) const
std::string processname_
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
unsigned int nBins_
MonitorElement * NOff_
MonitorElement * NL1OnUM_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
mathSSE::Vec4< T > v
MonitorElement * ME_HLT_CUSTOM_BX
MonitorElement * meCountsPassPerLS
const std::string getL1ConditionModuleName(const std::string &pathname)
Definition: Run.h:33
void setMaskedPaths(std::vector< std::string > inputPaths)
unsigned referenceTrigCountsPS_
MonitorElement * getNOnHisto()
void fillCountsPerPath(const edm::Event &iEvent, const edm::EventSetup &iSetup)
MonitorElement * offEtL1OffUM_
PathInfo(std::string denomPathName, std::string pathName, std::string l1pathName, int l1ModuleIndex, std::string filterName, std::string processName, size_t type, float ptmin, float ptmax, float hltThreshold, float l1Threshold)