CMS 3D CMS Logo

EgHLTOfflineSource.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTOFFLINESOURCE
2 #define DQMOFFLINE_TRIGGER_EGHLTOFFLINESOURCE
3 
4 // -*- C++ -*-
5 //
6 // Package: EgammaHLTOffline
7 // Class: EgammaHLTOffline
8 //
9 /*
10  Description: This is a DQM source meant to plot high-level HLT trigger
11  quantities as stored in the HLT results object TriggerResults for the Egamma triggers
12 
13  Notes:
14  Currently I would like to plot simple histograms of three seperate types of variables
15  1) global event quantities: eg nr of electrons
16  2) di-object quanities: transverse mass, di-electron mass
17  3) single object kinematic and id variables: eg et,eta,isolation
18 
19 */
20 //
21 // Original Author: Sam Harper
22 // Created: June 2008
23 //
24 //
25 //
26 
27 //#include "DataFormats/HLTReco/interface/TriggerEvent.h"
28 //#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
29 
34 
42 
45 
46 class HLTConfigProvider;
47 
48 namespace egHLT {
49  class EleHLTFilterMon;
50  class PhoHLTFilterMon;
51 }
52 
53 // namespace trigger{
54 // class TriggerObject;
55 
56 // }
57 
59 
60  private:
61  MonitorElement* dqmErrsMonElem_; //monitors DQM errors (ie failing to get trigger info, etc)
62  MonitorElement* nrEventsProcessedMonElem_; //number of events processed mon elem
63  int nrEventsProcessed_; //number of events processed
64 
65  std::vector<egHLT::EleHLTFilterMon*> eleFilterMonHists_; //monitoring histograms for different trigger paths, we own them
66  std::vector<egHLT::PhoHLTFilterMon*> phoFilterMonHists_; //monitoring histograms for different trigger paths, we own them
67  std::vector<egHLT::MonElemContainer<egHLT::OffEle>*> eleMonElems_; //mon elements for monitoring electrons, we own them
68  std::vector<egHLT::MonElemContainer<egHLT::OffPho>*> phoMonElems_; //mon elements for monitoring photons, we own them
69 
71 
73  egHLT::OffHelper offEvtHelper_;// this is where up wrap up nasty code which will be replaced by offical tools at some point
74  std::unique_ptr<egHLT::TrigCodes> trigCodes; // the only place instantiate them
75 
76  //note ele,pho does not refer to whether the trigger is electron or photon, it refers to what type
77  //of object passing the trigger will be monitored, eg ele = offline gsf electrons
78  std::vector<std::string> eleHLTFilterNames_;//names of the filter names to use for offline ele
79  std::vector<std::string> phoHLTFilterNames_;//names of the filter names to use for offline pho
80  std::vector<std::string> eleHLTFilterNames2Leg_;//names of the first leg of 2Leg filter names to use for offline ele in form filter1::filter2
81  std::vector<std::string> eleTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for ele
82  std::vector<std::string> phoTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for pho
83  std::vector<std::string> diEleTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for di-ele triggers
84  std::vector<std::string> diPhoTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for di-pho triggers
85 
88 
91 
92  //disabling copying/assignment (copying this class would be bad, mkay)
93  EgHLTOfflineSource(const EgHLTOfflineSource& rhs) = delete;
94  EgHLTOfflineSource& operator=(const EgHLTOfflineSource& rhs) = delete;
95 
96  public:
97  explicit EgHLTOfflineSource(const edm::ParameterSet& );
98  virtual ~EgHLTOfflineSource();
99 
100  virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
101  virtual void analyze(const edm::Event &, const edm::EventSetup &) override;
102 
103  void addEleTrigPath(egHLT::MonElemFuncs& monElemFuncs,const std::string& name);
104  void addPhoTrigPath(egHLT::MonElemFuncs& monElemFuncs,const std::string& name);
105  void getHLTFilterNamesUsed(std::vector<std::string>& filterNames)const;
106  void filterTriggers(const HLTConfigProvider& hltConfig);
107 };
108 
109 
110 
111 #endif
std::vector< std::string > diPhoTightLooseTrigNames_
egHLT::OffHelper offEvtHelper_
MonitorElement * dqmErrsMonElem_
def analyze(function, filename, filter=None)
Definition: Profiling.py:11
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
void bookHistograms(fwlite::EventContainer &eventCont)
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
std::vector< std::string > eleTightLooseTrigNames_
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
std::vector< std::string > phoHLTFilterNames_
MonitorElement * nrEventsProcessedMonElem_
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
std::unique_ptr< egHLT::TrigCodes > trigCodes
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
Definition: Run.h:42