CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TopElectronHLTOfflineSource.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_TOPELECTRONHLTOFFLINESOURCE
2 #define DQMOFFLINE_TRIGGER_TOPELECTRONHLTOFFLINESOURCE
3 
4 
5 // Original Author: Sarah Boutle
6 // Created: Jan 2010
7 
8 //#include "DataFormats/HLTReco/interface/TriggerEvent.h"
10 
16 
19 
22 
24 
26 
28 {
29  public:
32 
33  virtual void beginJob();
34  virtual void endJob();
35  virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
36  virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
37  //virtual void analyze();
38  virtual void analyze(const edm::Event&, const edm::EventSetup&);
39 
40 
41  class EleMEs
42  {
43  public:
44  struct EleMESet
45  {
46  // kinematics
50 
51  // isolation
55 
56  // event structure
59 
60  // track related
65  };
66  public:
68  {
69  }
70 
71  EleMEs(DQMStore* dbe, const std::vector<std::string>& eleIdNames, bool addExtraId, const std::string& name)
72  {
73  setup(dbe, eleIdNames, addExtraId, name);
74  }
75 
76  void setup(DQMStore* dbe, const std::vector<std::string>&, bool addExtraId, const std::string& name);
77  void setupMESet(EleMESet& eleSet, DQMStore* dbe, const std::string& name);
78  void fill(EleMESet& eleMESet, const reco::GsfElectron& ele, float minDeltaR, float sumEt, int n30jets, float dzPV);
79 
80 
81  void addMESets(const std::string& name);
82 
83  EleMESet& getMESet(size_t namePos, size_t idPos)
84  {
85  return eleMESets_[namePos+idPos*eleMENames_.size()];
86  }
87 
88  const std::vector<EleMESet>& eleMESets()
89  {
90  return eleMESets_;
91  }
92 
93  const std::vector<std::string>& eleMENames()
94  {
95  return eleMENames_;
96  }
97 
98  const std::vector<std::string>& eleIdNames()
99  {
100  return eleIdNames_;
101  }
102 
103  const std::string& name(size_t i)
104  {
105  return eleMENames_[i % eleMENames_.size()];
106  }
107 
108  const std::string& idName(size_t i)
109  {
110  return eleIdNames_[i / eleMENames_.size()];
111  }
112 
113  const std::string fullName(size_t i)
114  {
115  return name(i)+"_"+idName(i);
116  }
117 
118 
119  private:
120 
121  std::vector<EleMESet> eleMESets_;
122 
123  std::vector<std::string> eleMENames_;
124 
126 
127  // add vector of references to electron id's
128  std::vector<std::string> eleIdNames_;
129 
130  };
131 
132  virtual void setupHistos(const std::vector<EleMEs>);
133  void fill(EleMEs& eleMEs, const edm::Event& iEvent, size_t eleIndex, const std::vector<const trigger::TriggerObject*>& triggerJets, const std::vector<const trigger::TriggerObject*>& triggerElectrons, const reco::Vertex::Point& vertexPoint);
134 
135 
136  private:
137 
138  DQMStore* dbe_; //dbe seems to be the standard name for this, I dont know why. We of course dont own it
139 
141 
142  std::vector<EleMEs> eleMEs_;
143 
144  std::vector<std::string> electronIdNames_;
146 
147  std::vector<std::string> superTriggerNames_;
148  std::vector<std::string> electronTriggerNames_;
149 
158 
160 
162 
163  // exclude jets with deltaR < 0.1 from deltaR calculation
165 
167 
170 
171  // add extra ID
173 
174  // the extra electron ID cuts
178 
182 };
183 
184 
185 #endif
int i
Definition: DBlmapReader.cc:9
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
std::vector< std::string > electronIdNames_
const std::vector< std::string > & eleIdNames()
int iEvent
Definition: GenABIO.cc:243
const std::vector< EleMESet > & eleMESets()
edm::Handle< reco::GsfElectronCollection > eleHandle_
std::vector< std::string > electronTriggerNames_
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
virtual void setupHistos(const std::vector< EleMEs >)
void fill(EleMESet &eleMESet, const reco::GsfElectron &ele, float minDeltaR, float sumEt, int n30jets, float dzPV)
tuple conf
Definition: dbtoconf.py:185
std::vector< std::string > superTriggerNames_
EleMESet & getMESet(size_t namePos, size_t idPos)
EleMEs(DQMStore *dbe, const std::vector< std::string > &eleIdNames, bool addExtraId, const std::string &name)
void setup(DQMStore *dbe, const std::vector< std::string > &, bool addExtraId, const std::string &name)
void fill(EleMEs &eleMEs, const edm::Event &iEvent, size_t eleIndex, const std::vector< const trigger::TriggerObject * > &triggerJets, const std::vector< const trigger::TriggerObject * > &triggerElectrons, const reco::Vertex::Point &vertexPoint)
virtual void endRun(const edm::Run &run, const edm::EventSetup &c)
const std::vector< std::string > & eleMENames()
void setupMESet(EleMESet &eleSet, DQMStore *dbe, const std::string &name)
edm::Handle< trigger::TriggerEvent > triggerEvent_
TopElectronHLTOfflineSource(const edm::ParameterSet &conf)
Definition: Run.h:36