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 
25 
27 
29 
31 {
32  public:
35 
36  virtual void beginJob();
37  virtual void endJob();
38  virtual void beginRun(const edm::Run& run, const edm::EventSetup& c);
39  virtual void endRun(const edm::Run& run, const edm::EventSetup& c);
40  //virtual void analyze();
41  virtual void analyze(const edm::Event&, const edm::EventSetup&);
42 
43 
44  class EleMEs
45  {
46  public:
47  struct EleMESet
48  {
49  // kinematics
53 
54  // isolation
58 
59  // event structure
62 
63  // track related
68  };
69  public:
71  {
72  }
73 
74  EleMEs(DQMStore* dbe, const std::vector<std::string>& eleIdNames, bool addExtraId, const std::string& name)
75  {
76  setup(dbe, eleIdNames, addExtraId, name);
77  }
78 
79  void setup(DQMStore* dbe, const std::vector<std::string>&, bool addExtraId, const std::string& name);
80  void setupMESet(EleMESet& eleSet, DQMStore* dbe, const std::string& name);
81  void fill(EleMESet& eleMESet, const reco::GsfElectron& ele, float minDeltaR, float sumEt, int n30jets, float dzPV);
82 
83 
84  void addMESets(const std::string& name);
85 
86  EleMESet& getMESet(size_t namePos, size_t idPos)
87  {
88  return eleMESets_[namePos+idPos*eleMENames_.size()];
89  }
90 
91  const std::vector<EleMESet>& eleMESets()
92  {
93  return eleMESets_;
94  }
95 
96  const std::vector<std::string>& eleMENames()
97  {
98  return eleMENames_;
99  }
100 
101  const std::vector<std::string>& eleIdNames()
102  {
103  return eleIdNames_;
104  }
105 
106  const std::string& name(size_t i)
107  {
108  return eleMENames_[i % eleMENames_.size()];
109  }
110 
111  const std::string& idName(size_t i)
112  {
113  return eleIdNames_[i / eleMENames_.size()];
114  }
115 
116  const std::string fullName(size_t i)
117  {
118  return name(i)+"_"+idName(i);
119  }
120 
121 
122  private:
123 
124  std::vector<EleMESet> eleMESets_;
125 
126  std::vector<std::string> eleMENames_;
127 
129 
130  // add vector of references to electron id's
131  std::vector<std::string> eleIdNames_;
132 
133  };
134 
135  virtual void setupHistos(const std::vector<EleMEs>);
136  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);
137 
138 
139  private:
140 
141  DQMStore* dbe_; //dbe seems to be the standard name for this, I dont know why. We of course dont own it
142 
144 
145  std::vector<EleMEs> eleMEs_;
146 
147  std::vector<std::string> electronIdNames_;
149 
150  std::vector<std::string> superTriggerNames_;
151  std::vector<std::string> electronTriggerNames_;
152 
160  std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > eleIdTokenCollection_;
161 
163 
165 
166  // exclude jets with deltaR < 0.1 from deltaR calculation
168 
170 
173 
174  // add extra ID
176 
177  // the extra electron ID cuts
181 
185 };
186 
187 
188 #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_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > eleIdTokenCollection_
const std::vector< std::string > & eleIdNames()
edm::EDGetTokenT< edm::TriggerResults > triggerResultsLabel_
edm::EDGetTokenT< reco::BeamSpot > beamSpot_
int iEvent
Definition: GenABIO.cc:230
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:39
virtual void setupHistos(const std::vector< EleMEs >)
edm::EDGetTokenT< reco::VertexCollection > primaryVertexLabel_
void fill(EleMESet &eleMESet, const reco::GsfElectron &ele, float minDeltaR, float sumEt, int n30jets, float dzPV)
tuple conf
Definition: dbtoconf.py:185
edm::EDGetTokenT< reco::GsfElectronCollection > electronLabel_
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)
double dzPV(const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
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)
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryLabel_
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:41