CMS 3D CMS Logo

eECALMatrixExtra.h
Go to the documentation of this file.
1 /*
2 The function eECALmatrix returns total energy contained in
3 NxN crystal matrix for EcalRecHits or PCaloSimHits.
4 
5 Inputs :
6 1. CaloNavigator at the DetId around which NxN has to be formed
7 2. The EcalRecHitCollection and
8 3. Number of crystals to be navigated along eta and phi along
9  one direction (navigation is done alone +-deta and +-dphi).
10 
11 Authors: Seema Sharma, Sunanda Banerjee
12 Created: August 2009
13 */
14 
15 
16 #ifndef CalibrationIsolatedParticleseECALMatrixExtra_h
17 #define CalibrationIsolatedParticleseECALMatrixExtra_h
18 
19 // system include files
20 #include <memory>
21 #include <map>
22 #include <vector>
23 
24 // user include files
29 
35 
36 namespace spr{
37 
38  // Energy in NxN crystal matrix
39  template< typename T>
40  double eECALmatrix(CaloNavigator<DetId>& navigator,edm::Handle<T>& hits, int ieta, int iphi, bool debug=false);
41 
42  template< typename T>
43  std::vector<std::pair<DetId,double> > eECALmatrixCell(const DetId& detId, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, const CaloGeometry* geo, const CaloTopology* caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, bool debug=false);
44 
45  // Energy in ietaXiphi crystal matrix
46  template< typename T>
47  std::pair<double,int> eECALmatrixTotal(const DetId& detId, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, const CaloGeometry* geo, const CaloTopology* caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, bool debug=false);
48 
49  // returns vector of hits in NxN matrix
50  template <typename T>
51  std::vector<std::pair<DetId,double> > energyECALCell(std::vector<DetId>& vdets, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, double ebThr=-100, double eeThr=-100, bool debug=false);
52 
53 }
54 
55 #include "Calibration/IsolatedParticles/interface/eECALMatrixExtra.icc"
56 
57 #endif
std::pair< double, int > eECALmatrixTotal(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, bool debug=false)
Definition: DetId.h:18
#define debug
Definition: HDRShower.cc:19
std::vector< std::pair< DetId, double > > eECALmatrixCell(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, bool debug=false)
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
std::vector< std::pair< DetId, double > > energyECALCell(std::vector< DetId > &vdets, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, double ebThr=-100, double eeThr=-100, bool debug=false)