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 
33 
41 
44 
45 class HLTConfigProvider;
46 
47 namespace egHLT {
48  class EleHLTFilterMon;
49  class PhoHLTFilterMon;
50 } // namespace egHLT
51 
52 // namespace trigger{
53 // class TriggerObject;
54 
55 // }
56 
58 private:
59  MonitorElement* dqmErrsMonElem_; //monitors DQM errors (ie failing to get trigger info, etc)
60  MonitorElement* nrEventsProcessedMonElem_; //number of events processed mon elem
61  int nrEventsProcessed_; //number of events processed
62 
63  std::vector<egHLT::EleHLTFilterMon*>
64  eleFilterMonHists_; //monitoring histograms for different trigger paths, we own them
65  std::vector<egHLT::PhoHLTFilterMon*>
66  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_;
75  offEvtHelper_; // this is where up wrap up nasty code which will be replaced by offical tools at some point
76  std::unique_ptr<egHLT::TrigCodes> trigCodes; // the only place instantiate them
77 
78  //note ele,pho does not refer to whether the trigger is electron or photon, it refers to what type
79  //of object passing the trigger will be monitored, eg ele = offline gsf electrons
80  std::vector<std::string> eleHLTFilterNames_; //names of the filter names to use for offline ele
81  std::vector<std::string> phoHLTFilterNames_; //names of the filter names to use for offline pho
82  std::vector<std::string>
83  eleHLTFilterNames2Leg_; //names of the first leg of 2Leg filter names to use for offline ele in form filter1::filter2
84  std::vector<std::string> eleTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for ele
85  std::vector<std::string> phoTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for pho
86  std::vector<std::string> diEleTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for di-ele triggers
87  std::vector<std::string> diPhoTightLooseTrigNames_; // list of 'tightTrig:looseTrig' pairs for di-pho triggers
88 
91 
94 
95 public:
96  explicit EgHLTOfflineSource(const edm::ParameterSet&);
97 
98  //disabling copying/assignment (copying this class would be bad, mkay)
99  EgHLTOfflineSource(const EgHLTOfflineSource& rhs) = delete;
100  EgHLTOfflineSource& operator=(const EgHLTOfflineSource& rhs) = delete;
101 
102  ~EgHLTOfflineSource() override;
103 
104  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
105  void analyze(const edm::Event&, const edm::EventSetup&) override;
106 
107  void addEleTrigPath(egHLT::MonElemFuncs& monElemFuncs, const std::string& name);
108  void addPhoTrigPath(egHLT::MonElemFuncs& monElemFuncs, const std::string& name);
109  void getHLTFilterNamesUsed(std::vector<std::string>& filterNames) const;
111 };
112 
113 #endif
std::vector< std::string > diPhoTightLooseTrigNames_
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_
void addEleTrigPath(egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
std::vector< egHLT::PhoHLTFilterMon * > phoFilterMonHists_
EgHLTOfflineSource(const edm::ParameterSet &)
void addPhoTrigPath(egHLT::MonElemFuncs &monElemFuncs, const std::string &name)
void analyze(const edm::Event &, const edm::EventSetup &) override
~EgHLTOfflineSource() override
std::vector< std::string > eleTightLooseTrigNames_
std::vector< egHLT::MonElemContainer< egHLT::OffPho > * > phoMonElems_
EgHLTOfflineSource & operator=(const EgHLTOfflineSource &rhs)=delete
std::vector< std::string > phoHLTFilterNames_
MonitorElement * nrEventsProcessedMonElem_
std::vector< std::string > diEleTightLooseTrigNames_
std::vector< std::string > eleHLTFilterNames_
void filterTriggers(const HLTConfigProvider &hltConfig)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::unique_ptr< egHLT::TrigCodes > trigCodes
egHLT::BinData binData_
egHLT::CutMasks cutMasks_
void getHLTFilterNamesUsed(std::vector< std::string > &filterNames) const
Definition: Run.h:45