CMS 3D CMS Logo

eECALMatrix.h
Go to the documentation of this file.
1 // -*- C++ -*
2 /*
3 The function eECALmatrix returns total energy contained in
4 NxN crystal matrix for EcalRecHits or PCaloSimHits.
5 
6 Inputs :
7 1. CaloNavigator at the DetId around which NxN has to be formed
8 2. The EcalRecHitCollection and
9 3. Number of crystals to be navigated along eta and phi along
10  one direction (navigation is done alone +-deta and +-dphi).
11 
12 Authors: Seema Sharma, Sunanda Banerjee
13 Created: August 2009
14 */
15 
16 
17 #ifndef CalibrationIsolatedParticleseECALMatrix_h
18 #define CalibrationIsolatedParticleseECALMatrix_h
19 
20 // system include files
21 #include <memory>
22 #include <map>
23 #include <vector>
24 
25 // user include files
33 
34 
41 
43 
44 namespace spr{
45 
46  // Energy in NxN crystal matrix
47  template< typename T>
48  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);
49 
50  template< typename T>
51  double eECALmatrix(const DetId& detId, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, const CaloGeometry* geo, const CaloTopology* caloTopology, const EcalTrigTowerConstituentsMap& ttMap, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false);
52 
53  template< typename T>
54  double eECALmatrix(const DetId& detId, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, const CaloGeometry* geo, const CaloTopology* caloTopology, int ietaE, int ietaW, int iphiN, int iphiS, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500,bool debug=false);
55 
56  std::pair <double,bool> eECALmatrix(const DetId& detId, edm::Handle<EcalRecHitCollection>& hitsEB, edm::Handle<EcalRecHitCollection>& hitsEE, const EcalChannelStatus& chStatus, const CaloGeometry* geo, const CaloTopology* caloTopology, const EcalSeverityLevelAlgo* sevlv,int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false);
57 
58  std::pair <double,bool> eECALmatrix(const DetId& detId, edm::Handle<EcalRecHitCollection>& hitsEB, edm::Handle<EcalRecHitCollection>& hitsEE, const EcalChannelStatus& chStatus, const CaloGeometry* geo, const CaloTopology* caloTopology, const EcalSeverityLevelAlgo* sevlv,const EcalTrigTowerConstituentsMap& ttMap, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false);
59 
60  std::pair<double,bool> eECALmatrix(const HcalDetId& detId, edm::Handle<EcalRecHitCollection>& hitsEB, edm::Handle<EcalRecHitCollection>& hitsEE, const CaloGeometry* geo, const CaloTowerConstituentsMap* ctmap, const EcalSeverityLevelAlgo* sevlv, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false);
61 
62  // returns vector of hits in NxN matrix
63  template <typename T>
64  void hitECALmatrix(CaloNavigator<DetId>& navigator, edm::Handle<T>& hits, int ieta, int iphi, std::vector<typename T::const_iterator>& hitlist, bool debug=false);
65 
66  // returns energy deposited from the vector of hits
67  template <typename T>
68  double energyECAL(std::vector<DetId>& vdets, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false);
69 
70  template <typename T>
71  double energyECAL(std::vector<DetId>& vdets, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, const EcalTrigTowerConstituentsMap& ttMap, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false);
72 
73  // returns energy in the EB/EE tower
74  template <typename T>
75  double energyECALTower(const DetId& detId, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, const EcalTrigTowerConstituentsMap& ttMap, bool debug=false);
76 
77  // Hot Crystal
78  template< typename T>
79  DetId hotCrystal(const DetId& detId, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, const CaloGeometry* geo, const CaloTopology* caloTopology, int ieta, int iphi, double tMin=-500, double tMax=500, bool debug=false);
80 
81  template< typename T>
82  DetId hotCrystal(std::vector<DetId>& detId, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, double tMin=-500, double tMax=500, bool debug=false);
83 }
84 
85 #include "Calibration/IsolatedParticles/interface/eECALMatrix.icc"
86 
87 #endif
double energyECAL(std::vector< DetId > &vdets, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
Definition: DetId.h:18
#define debug
Definition: HDRShower.cc:19
DetId hotCrystal(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double tMin=-500, double tMax=500, bool debug=false)
double energyECALTower(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const EcalTrigTowerConstituentsMap &ttMap, bool debug=false)
void hitECALmatrix(CaloNavigator< DetId > &navigator, edm::Handle< T > &hits, int ieta, int iphi, std::vector< typename T::const_iterator > &hitlist, 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)