CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalClusterLazyTools.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaCoreTools_EcalClusterLazyTools_h
2 #define RecoEcal_EgammaCoreTools_EcalClusterLazyTools_h
3 
18 
20 
28 
29 
30 class CaloTopology;
31 class CaloGeometry;
33 
35  public:
36  EcalClusterLazyToolsBase( const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag& redEBRecHits, const edm::InputTag& redEERecHits,const edm::ParameterSet& config );
37  EcalClusterLazyToolsBase( const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag& redEBRecHits, const edm::InputTag& redEERecHits);
38  EcalClusterLazyToolsBase( const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag& redEBRecHits, const edm::InputTag& redEERecHits, const edm::InputTag& redESRecHits);
39 
41  // get time of basic cluster seed crystal
42  float BasicClusterSeedTime(const reco::BasicCluster &cluster);
43  // error-weighted average of time from constituents of basic cluster
44  float BasicClusterTime(const reco::BasicCluster &cluster, const edm::Event &ev);
45  // get BasicClusterSeedTime of the seed basic cluser of the supercluster
46  float SuperClusterSeedTime(const reco::SuperCluster &cluster);
47  // get BasicClusterTime of the seed basic cluser of the supercluster
48  float SuperClusterTime(const reco::SuperCluster &cluster, const edm::Event &ev);
49 
50  // mapping for preshower rechits
51  std::map<DetId, EcalRecHit> rechits_map_;
52  // get Preshower hit array
53  std::vector<float> getESHits(double X, double Y, double Z, const std::map<DetId, EcalRecHit>& rechits_map, const CaloGeometry* geometry, CaloSubdetectorTopology *topology_p, int row=0, int plane=1);
54  // get Preshower hit shape
55  float getESShape(const std::vector<float>& ESHits0);
56  // get Preshower effective sigmaRR
57  float eseffsirir( const reco::SuperCluster &cluster );
58  float eseffsixix( const reco::SuperCluster &cluster );
59  float eseffsiyiy( const reco::SuperCluster &cluster );
60 
61  // std::vector<int> flagsexcl_;
62  //std::vector<int> severitiesexcl_;
63  // const EcalSeverityLevelAlgo *sevLv;
64 
65  protected:
66  void getGeometry( const edm::EventSetup &es );
67  void getTopology( const edm::EventSetup &es );
68  void getEBRecHits( const edm::Event &ev, const edm::InputTag& redEBRecHits );
69  void getEERecHits( const edm::Event &ev, const edm::InputTag& redEERecHits );
70  void getESRecHits( const edm::Event &ev, const edm::InputTag& redESRecHits );
72 
78 
79  //const EcalIntercalibConstantMap& icalMap;
84  void getIntercalibConstants( const edm::EventSetup &es );
85  void getADCToGeV ( const edm::EventSetup &es );
86  void getLaserDbService ( const edm::EventSetup &es );
87 
88 // std::vector<int> flagsexcl_;
89 // std::vector<int> severitiesexcl_;
90 
91 }; // class EcalClusterLazyToolsBase
92 
93 template<class EcalClusterToolsImpl> class EcalClusterLazyToolsT : public EcalClusterLazyToolsBase {
94  public:
95  EcalClusterLazyToolsT( const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag& redEBRecHits, const edm::InputTag& redEERecHits,const edm::ParameterSet& config ) :
96  EcalClusterLazyToolsBase( ev, es, redEBRecHits, redEERecHits, config ) {}
97  EcalClusterLazyToolsT( const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag& redEBRecHits, const edm::InputTag& redEERecHits) :
98  EcalClusterLazyToolsBase( ev, es, redEBRecHits, redEERecHits) {}
99  EcalClusterLazyToolsT( const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag& redEBRecHits, const edm::InputTag& redEERecHits, const edm::InputTag& redESRecHits) :
100  EcalClusterLazyToolsBase( ev, es, redEBRecHits, redEERecHits, redESRecHits) {}
101 
103 
104  // various energies in the matrix nxn surrounding the maximum energy crystal of the input cluster
105  //NOTE (29/10/08): we now use an eta/phi coordinate system rather than phi/eta
106  //to minmise possible screwups, for now e5x1 isnt defined all the majority of people who call it actually want e1x5 and
107  //it is thought it is better that their code doesnt compile rather than pick up the wrong function
108  //therefore in this version and later e1x5 = e5x1 in the old version
109  //so 1x5 is 1 crystal in eta and 5 crystals in phi
110  //note e3x2 does not have a definate eta/phi geometry, it takes the maximum 3x2 block containing the
111  //seed regardless of whether that 3 in eta or phi
112  float e1x3( const reco::BasicCluster &cluster );
113  float e1x3( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
114 
115  float e3x1( const reco::BasicCluster &cluster );
116  float e3x1( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
117 
118  float e1x5( const reco::BasicCluster &cluster );
119  float e1x5( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
120 
121  float e5x1( const reco::BasicCluster &cluster );
122  float e5x1( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
123 
124  float e2x2( const reco::BasicCluster &cluster );
125  float e2x2( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
126 
127  float e3x2( const reco::BasicCluster &cluster );
128  float e3x2( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
129 
130  float e3x3( const reco::BasicCluster &cluster );
131  float e3x3( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
132 
133  float e4x4( const reco::BasicCluster &cluster );
134  float e4x4( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
135 
136  float e5x5( const reco::BasicCluster &cluster );
137  float e5x5( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
138  // energy in the 2x5 strip right of the max crystal (does not contain max crystal)
139  // 2 crystals wide in eta, 5 wide in phi.
140  float e2x5Right( const reco::BasicCluster &cluster );
141  float e2x5Right( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
142  // energy in the 2x5 strip left of the max crystal (does not contain max crystal)
143  float e2x5Left( const reco::BasicCluster &cluster );
144  float e2x5Left( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
145  // energy in the 5x2 strip above the max crystal (does not contain max crystal)
146  // 5 crystals wide in eta, 2 wide in phi.
147  float e2x5Top( const reco::BasicCluster &cluster );
148  float e2x5Top( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
149 
150  // energy in the 5x2 strip below the max crystal (does not contain max crystal)
151  float e2x5Bottom( const reco::BasicCluster &cluster );
152  float e2x5Bottom( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
153  // energy in a 2x5 strip containing the seed (max) crystal.
154  // 2 crystals wide in eta, 5 wide in phi.
155  // it is the maximum of either (1x5left + 1x5center) or (1x5right + 1x5center)
156  float e2x5Max( const reco::BasicCluster &cluster );
157  float e2x5Max( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
158  // energies in the crystal left, right, top, bottom w.r.t. to the most energetic crystal
159  float eLeft( const reco::BasicCluster &cluster );
160  float eLeft( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
161 
162  float eRight( const reco::BasicCluster &cluster );
163  float eRight( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
164 
165  float eTop( const reco::BasicCluster &cluster );
166  float eTop( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
167 
168  float eBottom( const reco::BasicCluster &cluster );
169  float eBottom( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
170  // the energy of the most energetic crystal in the cluster
171  float eMax( const reco::BasicCluster &cluster );
172  float eMax( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
173  // the energy of the second most energetic crystal in the cluster
174  float e2nd( const reco::BasicCluster &cluster );
175  float e2nd( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
176 
177  // get the DetId and the energy of the maximum energy crystal of the input cluster
178  std::pair<DetId, float> getMaximum( const reco::BasicCluster &cluster );
179  std::pair<DetId, float> getMaximum( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
180 
181  std::vector<float> energyBasketFractionEta( const reco::BasicCluster &cluster );
182  std::vector<float> energyBasketFractionEta( const reco::BasicCluster &cluster,const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
183 
184  std::vector<float> energyBasketFractionPhi( const reco::BasicCluster &cluster );
185  std::vector<float> energyBasketFractionPhi( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
186 
187  // return a vector v with v[0] = etaLat, v[1] = phiLat, v[2] = lat
188  std::vector<float> lat( const reco::BasicCluster &cluster, bool logW = true, float w0 = 4.7 );
189  std::vector<float> lat( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, bool logW = true, float w0 = 4.7 );
190 
191  // return a vector v with v[0] = covEtaEta, v[1] = covEtaPhi, v[2] = covPhiPhi
192  std::vector<float> covariances(const reco::BasicCluster &cluster, float w0 = 4.7 );
193  std::vector<float> covariances(const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, float w0 = 4.7 );
194 
195  // return a vector v with v[0] = covIEtaIEta, v[1] = covIEtaIPhi, v[2] = covIPhiIPhi
196  //this function calculates differences in eta/phi in units of crystals not global eta/phi
197  //this is gives better performance in the crack regions of the calorimeter but gives otherwise identical results to covariances function
198  //this is only defined for the barrel, it returns covariances when the cluster is in the endcap
199  //Warning: covIEtaIEta has been studied by egamma, but so far covIPhiIPhi hasnt been studied extensively so there could be a bug in
200  // the covIPhiIEta or covIPhiIPhi calculations. I dont think there is but as it hasnt been heavily used, there might be one
201  std::vector<float> localCovariances(const reco::BasicCluster &cluster, float w0 = 4.7);
202  std::vector<float> localCovariances(const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, float w0 = 4.7);
203 
204  std::vector<float> scLocalCovariances(const reco::SuperCluster &cluster, float w0 = 4.7);
205  std::vector<float> scLocalCovariances(const reco::SuperCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, float w0 = 4.7);
206 
207  double zernike20( const reco::BasicCluster &cluster, double R0 = 6.6, bool logW = true, float w0 = 4.7 );
208  double zernike42( const reco::BasicCluster &cluster, double R0 = 6.6, bool logW = true, float w0 = 4.7 );
209 
210  // get the detId's of a matrix centered in the maximum energy crystal = (0,0)
211  // the size is specified by ixMin, ixMax, iyMin, iyMax in unit of crystals
212  std::vector<DetId> matrixDetId( DetId id, int ixMin, int ixMax, int iyMin, int iyMax );
213  // get the energy deposited in a matrix centered in the maximum energy crystal = (0,0)
214  // the size is specified by ixMin, ixMax, iyMin, iyMax in unit of crystals
215  float matrixEnergy( const reco::BasicCluster &cluster, DetId id, int ixMin, int ixMax, int iyMin, int iyMax );
216  float matrixEnergy( const reco::BasicCluster &cluster, DetId id, int ixMin, int ixMax, int iyMin, int iyMax, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv );
217 }; // class EcalClusterLazyToolsT
218 
219 
220 
221 
222 template<class EcalClusterToolsImpl>
224 {
225  return EcalClusterToolsImpl::e1x3( cluster, getEcalRecHitCollection(cluster), topology_ );
226 }
227 
228 
229 template<class EcalClusterToolsImpl>
230 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e1x3( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
231 {
232  return EcalClusterToolsImpl::e1x3( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
233 }
234 
235 
236 
237 template<class EcalClusterToolsImpl>
239 {
240  return EcalClusterToolsImpl::e3x1( cluster, getEcalRecHitCollection(cluster), topology_ );
241 }
242 
243 template<class EcalClusterToolsImpl>
244 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e3x1( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
245 {
246  return EcalClusterToolsImpl::e3x1( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
247 }
248 
249 
250 template<class EcalClusterToolsImpl>
252 {
253  return EcalClusterToolsImpl::e1x5( cluster, getEcalRecHitCollection(cluster), topology_ );
254 }
255 
256 template<class EcalClusterToolsImpl>
257 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e1x5( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
258 {
259  return EcalClusterToolsImpl::e1x5( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
260 }
261 
262 
263 
264 template<class EcalClusterToolsImpl>
266 {
267  return EcalClusterToolsImpl::e5x1( cluster, getEcalRecHitCollection(cluster), topology_ );
268  }
269 
270 template<class EcalClusterToolsImpl>
271 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e5x1( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
272 {
273  return EcalClusterToolsImpl::e5x1( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
274  }
275 
276 
277 template<class EcalClusterToolsImpl>
279 {
280  return EcalClusterToolsImpl::e2x2( cluster, getEcalRecHitCollection(cluster), topology_ );
281 }
282 
283 template<class EcalClusterToolsImpl>
284 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e2x2( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
285 {
286  return EcalClusterToolsImpl::e2x2( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
287 }
288 
289 
290 template<class EcalClusterToolsImpl>
292 {
293  return EcalClusterToolsImpl::e3x2( cluster, getEcalRecHitCollection(cluster), topology_ );
294 }
295 
296 template<class EcalClusterToolsImpl>
297 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e3x2( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
298 {
299  return EcalClusterToolsImpl::e3x2( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
300 }
301 
302 
303 template<class EcalClusterToolsImpl>
305 {
306  return EcalClusterToolsImpl::e3x3( cluster, getEcalRecHitCollection(cluster), topology_ );
307 }
308 
309 template<class EcalClusterToolsImpl>
310 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e3x3( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
311 {
312  return EcalClusterToolsImpl::e3x3( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
313 }
314 
315 
316 template<class EcalClusterToolsImpl>
318 {
319  return EcalClusterToolsImpl::e4x4( cluster, getEcalRecHitCollection(cluster), topology_ );
320 }
321 
322 template<class EcalClusterToolsImpl>
323 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e4x4( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
324 {
325  return EcalClusterToolsImpl::e4x4( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
326 }
327 
328 
329 template<class EcalClusterToolsImpl>
331 {
332  return EcalClusterToolsImpl::e5x5( cluster, getEcalRecHitCollection(cluster), topology_ );
333 }
334 
335 template<class EcalClusterToolsImpl>
336 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e5x5( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
337 {
338  return EcalClusterToolsImpl::e5x5( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
339 }
340 
341 
342 template<class EcalClusterToolsImpl>
344 {
345  return EcalClusterToolsImpl::e2x5Right( cluster, getEcalRecHitCollection(cluster), topology_ );
346 }
347 
348 template<class EcalClusterToolsImpl>
349 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e2x5Right( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
350 {
351  return EcalClusterToolsImpl::e2x5Right( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
352 }
353 
354 
355 template<class EcalClusterToolsImpl>
357 {
358  return EcalClusterToolsImpl::e2x5Left( cluster, getEcalRecHitCollection(cluster), topology_ );
359 }
360 
361 template<class EcalClusterToolsImpl>
362 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e2x5Left( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
363 {
364  return EcalClusterToolsImpl::e2x5Left( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
365 }
366 
367 
368 template<class EcalClusterToolsImpl>
370 {
371  return EcalClusterToolsImpl::e2x5Top( cluster, getEcalRecHitCollection(cluster), topology_ );
372 }
373 
374 template<class EcalClusterToolsImpl>
375 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e2x5Top( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
376 {
377  return EcalClusterToolsImpl::e2x5Top( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
378 }
379 
380 
381 template<class EcalClusterToolsImpl>
383 {
384  return EcalClusterToolsImpl::e2x5Bottom( cluster, getEcalRecHitCollection(cluster), topology_ );
385 }
386 
387 template<class EcalClusterToolsImpl>
388 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e2x5Bottom( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
389 {
390  return EcalClusterToolsImpl::e2x5Bottom( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
391 }
392 
393 // Energy in 2x5 strip containing the max crystal.
394 template<class EcalClusterToolsImpl>
396 {
397  return EcalClusterToolsImpl::e2x5Max( cluster, getEcalRecHitCollection(cluster), topology_ );
398 }
399 
400 template<class EcalClusterToolsImpl>
401 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e2x5Max( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
402 {
403  return EcalClusterToolsImpl::e2x5Max( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
404 }
405 
406 
407 template<class EcalClusterToolsImpl>
409 {
410  return EcalClusterToolsImpl::eLeft( cluster, getEcalRecHitCollection(cluster), topology_ );
411 }
412 
413 template<class EcalClusterToolsImpl>
414 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::eLeft( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
415 {
416  return EcalClusterToolsImpl::eLeft( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
417 }
418 
419 
420 template<class EcalClusterToolsImpl>
422 {
423  return EcalClusterToolsImpl::eRight( cluster, getEcalRecHitCollection(cluster), topology_ );
424 }
425 
426 template<class EcalClusterToolsImpl>
427 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::eRight( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
428 {
429  return EcalClusterToolsImpl::eRight( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
430 }
431 
432 
433 template<class EcalClusterToolsImpl>
435 {
436  return EcalClusterToolsImpl::eTop( cluster, getEcalRecHitCollection(cluster), topology_ );
437 }
438 
439 template<class EcalClusterToolsImpl>
440 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::eTop( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
441 {
442  return EcalClusterToolsImpl::eTop( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
443 }
444 
445 
446 template<class EcalClusterToolsImpl>
448 {
449  return EcalClusterToolsImpl::eBottom( cluster, getEcalRecHitCollection(cluster), topology_ );
450 }
451 
452 template<class EcalClusterToolsImpl>
453 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::eBottom( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
454 {
455  return EcalClusterToolsImpl::eBottom( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv );
456 }
457 
458 
459 template<class EcalClusterToolsImpl>
461 {
462  return EcalClusterToolsImpl::eMax( cluster, getEcalRecHitCollection(cluster) );
463 }
464 
465 template<class EcalClusterToolsImpl>
466 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::eMax( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
467 {
468  return EcalClusterToolsImpl::eMax( cluster, getEcalRecHitCollection(cluster), flagsexcl, severitiesexcl, sevLv );
469 }
470 
471 
472 template<class EcalClusterToolsImpl>
474 {
475  return EcalClusterToolsImpl::e2nd( cluster, getEcalRecHitCollection(cluster) );
476 }
477 
478 template<class EcalClusterToolsImpl>
479 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::e2nd( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
480 {
481  return EcalClusterToolsImpl::e2nd( cluster, getEcalRecHitCollection(cluster), flagsexcl, severitiesexcl, sevLv );
482 }
483 
484 template<class EcalClusterToolsImpl>
486 {
487  return EcalClusterToolsImpl::getMaximum( cluster, getEcalRecHitCollection(cluster) );
488 }
489 
490 template<class EcalClusterToolsImpl>
491 std::pair<DetId, float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::getMaximum( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
492 {
493  return EcalClusterToolsImpl::getMaximum( cluster, getEcalRecHitCollection(cluster), flagsexcl, severitiesexcl, sevLv );
494 }
495 
496 
497 template<class EcalClusterToolsImpl>
499 {
500  return EcalClusterToolsImpl::energyBasketFractionEta( cluster, getEcalRecHitCollection(cluster) );
501 }
502 
503 template<class EcalClusterToolsImpl>
504 std::vector<float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::energyBasketFractionEta( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
505 {
506  return EcalClusterToolsImpl::energyBasketFractionEta( cluster, getEcalRecHitCollection(cluster), flagsexcl, severitiesexcl, sevLv );
507 }
508 
509 
510 template<class EcalClusterToolsImpl>
512 {
513  return EcalClusterToolsImpl::energyBasketFractionPhi( cluster, getEcalRecHitCollection(cluster) );
514 }
515 
516 template<class EcalClusterToolsImpl>
517 std::vector<float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::energyBasketFractionPhi( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
518 {
519  return EcalClusterToolsImpl::energyBasketFractionPhi( cluster, getEcalRecHitCollection(cluster), flagsexcl, severitiesexcl, sevLv );
520 }
521 
522 
523 template<class EcalClusterToolsImpl>
524 std::vector<float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::lat( const reco::BasicCluster &cluster, bool logW, float w0 )
525 {
526  return EcalClusterToolsImpl::lat( cluster, getEcalRecHitCollection(cluster), geometry_, logW, w0 );
527 }
528 
529 //template<class EcalClusterToolsImpl>
530 //std::vector<float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::lat( const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, bool logW, float w0 )
531 //{
532 // return EcalClusterToolsImpl::lat( cluster, getEcalRecHitCollection(cluster), geometry_,flagsexcl, severitiesexcl, sevLv, logW, w0 );
533 //}
534 
535 
536 template<class EcalClusterToolsImpl>
538 {
539  return EcalClusterToolsImpl::covariances( cluster, getEcalRecHitCollection(cluster), topology_, geometry_, w0 );
540 }
541 
542 template<class EcalClusterToolsImpl>
543 std::vector<float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::covariances(const reco::BasicCluster &cluster,const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, float w0 )
544 {
545  return EcalClusterToolsImpl::covariances( cluster, getEcalRecHitCollection(cluster), topology_, geometry_, flagsexcl, severitiesexcl, sevLv, w0 );
546 }
547 
548 template<class EcalClusterToolsImpl>
550 {
551  return EcalClusterToolsImpl::localCovariances( cluster, getEcalRecHitCollection(cluster), topology_, w0 );
552 }
553 
554 template<class EcalClusterToolsImpl>
555 std::vector<float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::localCovariances(const reco::BasicCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, float w0 )
556 {
557  return EcalClusterToolsImpl::localCovariances( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv, w0 );
558 }
559 
560 template<class EcalClusterToolsImpl>
562 {
563  return EcalClusterToolsImpl::scLocalCovariances( cluster, getEcalRecHitCollection(cluster), topology_, w0 );
564 }
565 
566 template<class EcalClusterToolsImpl>
567 std::vector<float> EcalClusterLazyToolsT<EcalClusterToolsImpl>::scLocalCovariances(const reco::SuperCluster &cluster, const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv, float w0 )
568 {
569  return EcalClusterToolsImpl::scLocalCovariances( cluster, getEcalRecHitCollection(cluster), topology_, flagsexcl, severitiesexcl, sevLv, w0 );
570 }
571 
572 template<class EcalClusterToolsImpl>
573 double EcalClusterLazyToolsT<EcalClusterToolsImpl>::zernike20( const reco::BasicCluster &cluster, double R0, bool logW, float w0 )
574 {
575  return EcalClusterToolsImpl::zernike20( cluster, getEcalRecHitCollection(cluster), geometry_, R0, logW, w0 );
576 }
577 
578 
579 template<class EcalClusterToolsImpl>
580 double EcalClusterLazyToolsT<EcalClusterToolsImpl>::zernike42( const reco::BasicCluster &cluster, double R0, bool logW, float w0 )
581 {
582  return EcalClusterToolsImpl::zernike42( cluster, getEcalRecHitCollection(cluster), geometry_, R0, logW, w0 );
583 }
584 
585 template<class EcalClusterToolsImpl>
586 std::vector<DetId> EcalClusterLazyToolsT<EcalClusterToolsImpl>::matrixDetId( DetId id, int ixMin, int ixMax, int iyMin, int iyMax )
587 {
588  return EcalClusterToolsImpl::matrixDetId( topology_, id, ixMin, ixMax, iyMin, iyMax );
589 }
590 
591 template<class EcalClusterToolsImpl>
592 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::matrixEnergy( const reco::BasicCluster &cluster, DetId id, int ixMin, int ixMax, int iyMin, int iyMax )
593 {
594  return EcalClusterToolsImpl::matrixEnergy( cluster, getEcalRecHitCollection(cluster), topology_, id, ixMin, ixMax, iyMin, iyMax );
595 }
596 
597 template<class EcalClusterToolsImpl>
598 float EcalClusterLazyToolsT<EcalClusterToolsImpl>::matrixEnergy( const reco::BasicCluster &cluster, DetId id, int ixMin, int ixMax, int iyMin, int iyMax,const std::vector<int>& flagsexcl, const std::vector<int>& severitiesexcl, const EcalSeverityLevelAlgo *sevLv )
599 {
600  return EcalClusterToolsImpl::matrixEnergy( cluster, getEcalRecHitCollection(cluster), topology_, id, ixMin, ixMax, iyMin, iyMax, flagsexcl, severitiesexcl, sevLv );
601 }
602 
604 namespace noZS {
606 }
607 
608 #endif
const double Z[kNumberCalorimeter]
edm::ESHandle< EcalIntercalibConstants > ical
EcalClusterLazyToolsT(const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag &redEBRecHits, const edm::InputTag &redEERecHits, const edm::ParameterSet &config)
const CaloGeometry * geometry_
const EcalRecHitCollection * esRecHits_
float e5x5(const reco::BasicCluster &cluster)
float SuperClusterSeedTime(const reco::SuperCluster &cluster)
std::vector< float > energyBasketFractionEta(const reco::BasicCluster &cluster)
float e2x5Bottom(const reco::BasicCluster &cluster)
float BasicClusterTime(const reco::BasicCluster &cluster, const edm::Event &ev)
float e3x2(const reco::BasicCluster &cluster)
float e2x5Left(const reco::BasicCluster &cluster)
float SuperClusterTime(const reco::SuperCluster &cluster, const edm::Event &ev)
float e2nd(const reco::BasicCluster &cluster)
float e2x2(const reco::BasicCluster &cluster)
const EcalRecHitCollection * getEcalRecHitCollection(const reco::BasicCluster &cluster)
float getESShape(const std::vector< float > &ESHits0)
#define X(str)
Definition: MuonsGrabber.cc:48
void getADCToGeV(const edm::EventSetup &es)
EcalClusterLazyToolsT(const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag &redEBRecHits, const edm::InputTag &redEERecHits)
const EcalRecHitCollection * ebRecHits_
float eseffsixix(const reco::SuperCluster &cluster)
std::vector< float > energyBasketFractionPhi(const reco::BasicCluster &cluster)
EcalClusterLazyToolsT(const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag &redEBRecHits, const edm::InputTag &redEERecHits, const edm::InputTag &redESRecHits)
float e3x3(const reco::BasicCluster &cluster)
EcalClusterLazyToolsT< noZS::EcalClusterTools > EcalClusterLazyTools
void getIntercalibConstants(const edm::EventSetup &es)
EcalClusterLazyToolsT< EcalClusterTools > EcalClusterLazyTools
edm::ESHandle< EcalADCToGeVConstant > agc
float e2x5Right(const reco::BasicCluster &cluster)
std::vector< float > getESHits(double X, double Y, double Z, const std::map< DetId, EcalRecHit > &rechits_map, const CaloGeometry *geometry, CaloSubdetectorTopology *topology_p, int row=0, int plane=1)
float eLeft(const reco::BasicCluster &cluster)
float matrixEnergy(const reco::BasicCluster &cluster, DetId id, int ixMin, int ixMax, int iyMin, int iyMax)
float e2x5Max(const reco::BasicCluster &cluster)
float e3x1(const reco::BasicCluster &cluster)
float e4x4(const reco::BasicCluster &cluster)
void getESRecHits(const edm::Event &ev, const edm::InputTag &redESRecHits)
float e5x1(const reco::BasicCluster &cluster)
float e1x3(const reco::BasicCluster &cluster)
double zernike42(const reco::BasicCluster &cluster, double R0=6.6, bool logW=true, float w0=4.7)
Definition: DetId.h:18
float eseffsiyiy(const reco::SuperCluster &cluster)
std::vector< float > covariances(const reco::BasicCluster &cluster, float w0=4.7)
float eBottom(const reco::BasicCluster &cluster)
void getTopology(const edm::EventSetup &es)
EcalIntercalibConstantMap icalMap
std::vector< float > localCovariances(const reco::BasicCluster &cluster, float w0=4.7)
std::vector< float > lat(const reco::BasicCluster &cluster, bool logW=true, float w0=4.7)
float eMax(const reco::BasicCluster &cluster)
void getEERecHits(const edm::Event &ev, const edm::InputTag &redEERecHits)
double zernike20(const reco::BasicCluster &cluster, double R0=6.6, bool logW=true, float w0=4.7)
std::vector< float > scLocalCovariances(const reco::SuperCluster &cluster, float w0=4.7)
ESHandle< TrackerGeometry > geometry
float e1x5(const reco::BasicCluster &cluster)
void getLaserDbService(const edm::EventSetup &es)
float e2x5Top(const reco::BasicCluster &cluster)
const EcalRecHitCollection * eeRecHits_
void getGeometry(const edm::EventSetup &es)
std::pair< DetId, float > getMaximum(const reco::BasicCluster &cluster)
EcalClusterLazyToolsBase(const edm::Event &ev, const edm::EventSetup &es, const edm::InputTag &redEBRecHits, const edm::InputTag &redEERecHits, const edm::ParameterSet &config)
std::map< DetId, EcalRecHit > rechits_map_
edm::ESHandle< EcalLaserDbService > laser
float BasicClusterSeedTime(const reco::BasicCluster &cluster)
std::vector< DetId > matrixDetId(DetId id, int ixMin, int ixMax, int iyMin, int iyMax)
void getEBRecHits(const edm::Event &ev, const edm::InputTag &redEBRecHits)
const CaloTopology * topology_
float eRight(const reco::BasicCluster &cluster)
float eTop(const reco::BasicCluster &cluster)
float eseffsirir(const reco::SuperCluster &cluster)