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 
72  bool dohep_;
74  egHLT::OffHelper offEvtHelper_;// this is where up wrap up nasty code which will be replaced by offical tools at some point
75  std::unique_ptr<egHLT::TrigCodes> trigCodes; // the only place instantiate them
76 
77  //note ele,pho does not refer to whether the trigger is electron or photon, it refers to what type
78  //of object passing the trigger will be monitored, eg ele = offline gsf electrons
79  std::vector<std::string> eleHLTFilterNames_;//names of the filter names to use for offline ele
80  std::vector<std::string> phoHLTFilterNames_;//names of the filter names to use for offline pho
81  std::vector<std::string> eleHLTFilterNames2Leg_;//names of the first leg of 2Leg filter names to use for offline ele in form filter1::filter2
82  std::vector<std::string> eleTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for ele
83  std::vector<std::string> phoTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for pho
84  std::vector<std::string> diEleTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for di-ele triggers
85  std::vector<std::string> diPhoTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for di-pho triggers
86 
89 
92 
93  //disabling copying/assignment (copying this class would be bad, mkay)
94  EgHLTOfflineSource(const EgHLTOfflineSource& rhs) = delete;
95  EgHLTOfflineSource& operator=(const EgHLTOfflineSource& rhs) = delete;
96 
97  public:
98  explicit EgHLTOfflineSource(const edm::ParameterSet& );
99  ~EgHLTOfflineSource() override;
100 
101  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
102  void analyze(const edm::Event &, const edm::EventSetup &) override;
103 
104  void addEleTrigPath(egHLT::MonElemFuncs& monElemFuncs,const std::string& name);
105  void addPhoTrigPath(egHLT::MonElemFuncs& monElemFuncs,const std::string& name);
106  void getHLTFilterNamesUsed(std::vector<std::string>& filterNames)const;
107  void filterTriggers(const HLTConfigProvider& hltConfig);
108 };
109 
110 
111 
112 #endif
std::vector< std::string > diPhoTightLooseTrigNames_
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
egHLT::OffHelper offEvtHelper_
MonitorElement * dqmErrsMonElem_
std::vector< egHLT::EleHLTFilterMon * > eleFilterMonHists_
std::vector< std::string > phoTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames2Leg_
std::vector< egHLT::MonElemContainer< egHLT::OffEle > * > eleMonElems_
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
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:43