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 #ifndef CalibrationIsolatedParticleseECALMatrix_h
17 #define CalibrationIsolatedParticleseECALMatrix_h
18 
19 // system include files
20 #include <memory>
21 #include <map>
22 #include <vector>
23 
24 // user include files
32 
39 
41 
42 namespace spr {
43 
44  // Energy in NxN crystal matrix
45  template <typename T>
46  double eECALmatrix(const DetId& detId,
47  edm::Handle<T>& hitsEB,
48  edm::Handle<T>& hitsEE,
49  const CaloGeometry* geo,
50  const CaloTopology* caloTopology,
51  int ieta,
52  int iphi,
53  double ebThr = -100,
54  double eeThr = -100,
55  double tMin = -500,
56  double tMax = 500,
57  bool debug = false);
58 
59  template <typename T>
60  double eECALmatrix(const DetId& detId,
61  edm::Handle<T>& hitsEB,
62  edm::Handle<T>& hitsEE,
63  const CaloGeometry* geo,
64  const CaloTopology* caloTopology,
65  const EcalTrigTowerConstituentsMap& ttMap,
66  int ieta,
67  int iphi,
68  double ebThr = -100,
69  double eeThr = -100,
70  double tMin = -500,
71  double tMax = 500,
72  bool debug = false);
73 
74  template <typename T>
75  double eECALmatrix(const DetId& detId,
76  edm::Handle<T>& hitsEB,
77  edm::Handle<T>& hitsEE,
78  const CaloGeometry* geo,
79  const CaloTopology* caloTopology,
80  int ietaE,
81  int ietaW,
82  int iphiN,
83  int iphiS,
84  double ebThr = -100,
85  double eeThr = -100,
86  double tMin = -500,
87  double tMax = 500,
88  bool debug = false);
89 
90  std::pair<double, bool> eECALmatrix(const DetId& detId,
93  const EcalChannelStatus& chStatus,
94  const CaloGeometry* geo,
95  const CaloTopology* caloTopology,
96  const EcalSeverityLevelAlgo* sevlv,
97  int ieta,
98  int iphi,
99  double ebThr = -100,
100  double eeThr = -100,
101  double tMin = -500,
102  double tMax = 500,
103  bool debug = false);
104 
105  std::pair<double, bool> eECALmatrix(const DetId& detId,
108  const EcalChannelStatus& chStatus,
109  const CaloGeometry* geo,
110  const CaloTopology* caloTopology,
111  const EcalSeverityLevelAlgo* sevlv,
112  const EcalTrigTowerConstituentsMap& ttMap,
113  int ieta,
114  int iphi,
115  double ebThr = -100,
116  double eeThr = -100,
117  double tMin = -500,
118  double tMax = 500,
119  bool debug = false);
120 
121  std::pair<double, bool> eECALmatrix(const HcalDetId& detId,
124  const CaloGeometry* geo,
125  const CaloTowerConstituentsMap* ctmap,
126  const EcalSeverityLevelAlgo* sevlv,
127  double ebThr = -100,
128  double eeThr = -100,
129  double tMin = -500,
130  double tMax = 500,
131  bool debug = false);
132 
133  // returns vector of hits in NxN matrix
134  template <typename T>
137  int ieta,
138  int iphi,
139  std::vector<typename T::const_iterator>& hitlist,
140  bool debug = false);
141 
142  // returns energy deposited from the vector of hits
143  template <typename T>
144  double energyECAL(std::vector<DetId>& vdets,
145  edm::Handle<T>& hitsEB,
146  edm::Handle<T>& hitsEE,
147  double ebThr = -100,
148  double eeThr = -100,
149  double tMin = -500,
150  double tMax = 500,
151  bool debug = false);
152 
153  template <typename T>
154  double energyECAL(std::vector<DetId>& vdets,
155  edm::Handle<T>& hitsEB,
156  edm::Handle<T>& hitsEE,
157  const EcalTrigTowerConstituentsMap& ttMap,
158  double ebThr = -100,
159  double eeThr = -100,
160  double tMin = -500,
161  double tMax = 500,
162  bool debug = false);
163 
164  // returns energy in the EB/EE tower
165  template <typename T>
166  double energyECALTower(const DetId& detId,
167  edm::Handle<T>& hitsEB,
168  edm::Handle<T>& hitsEE,
169  const EcalTrigTowerConstituentsMap& ttMap,
170  bool debug = false);
171 
172  // Hot Crystal
173  template <typename T>
174  DetId hotCrystal(const DetId& detId,
175  edm::Handle<T>& hitsEB,
176  edm::Handle<T>& hitsEE,
177  const CaloGeometry* geo,
178  const CaloTopology* caloTopology,
179  int ieta,
180  int iphi,
181  double tMin = -500,
182  double tMax = 500,
183  bool debug = false);
184 
185  template <typename T>
186  DetId hotCrystal(std::vector<DetId>& detId,
187  edm::Handle<T>& hitsEB,
188  edm::Handle<T>& hitsEE,
189  double tMin = -500,
190  double tMax = 500,
191  bool debug = false);
192 } // namespace spr
193 
194 #include "Calibration/IsolatedParticles/interface/eECALMatrix.icc"
195 
196 #endif
EcalSeverityLevelAlgo
Definition: EcalSeverityLevelAlgo.h:33
Handle.h
spr::hitECALmatrix
void hitECALmatrix(CaloNavigator< DetId > &navigator, edm::Handle< T > &hits, int ieta, int iphi, std::vector< typename T::const_iterator > &hitlist, bool debug=false)
spr::hotCrystal
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)
spr
Definition: CaloConstants.h:6
CaloNavigator.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
CaloTowerConstituentsMap.h
EcalCondObjectContainer< EcalChannelStatusCode >
edm::Handle
Definition: AssociativeIterator.h:50
CaloTopology
Definition: CaloTopology.h:19
EcalRecHitCollections.h
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
CaloGeometry
Definition: CaloGeometry.h:21
debug
#define debug
Definition: HDRShower.cc:19
spr::eECALmatrix
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)
HLT_2018_cff.navigator
navigator
Definition: HLT_2018_cff.py:11734
CaloTowerConstituentsMap
Definition: CaloTowerConstituentsMap.h:18
MatrixECALDetIds.h
spr::energyECALTower
double energyECALTower(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const EcalTrigTowerConstituentsMap &ttMap, bool debug=false)
spr::energyECAL
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)
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalDetId.h
HcalDetId
Definition: HcalDetId.h:12
CaloTopology.h
EcalTrigTowerConstituentsMap.h
CaloNavigator
Definition: CaloNavigator.h:7
DetId.h
Frameworkfwd.h
CaloGeometry.h
Candidate.h
EcalChannelStatus.h