CMS 3D CMS Logo

eHCALMatrix.h
Go to the documentation of this file.
1 /*
2 Functions to return total energy contained in NxN (3x3/5x5/7x7)
3 Hcal towers aroud a given DetId.
4 
5 Inputs :
6 1. HcalTopology,
7 2. DetId around which NxN is to be formed,
8 3. HcalRecHitCollection,
9 4. Number of towers to be navigated along eta and phi along
10  one direction (navigation is done alone +-deta and +-dphi).
11 5. option to include HO
12 
13 Authors: Seema Sharma, Sunanda Banerjee
14 Created: August 2009
15 */
16 
17 #ifndef CalibrationIsolatedParticleseHCALMatrix_h
18 #define CalibrationIsolatedParticleseHCALMatrix_h
19 
20 // system include files
21 #include <memory>
22 #include <map>
23 #include <vector>
24 
25 // user include files
33 
36 
37 namespace spr {
38 
39  template <typename T>
40  double eHCALmatrix(const HcalTopology* topology,
41  const DetId& det,
43  int ieta,
44  int iphi,
45  bool includeHO = false,
46  bool algoNew = true,
47  double hbThr = -100,
48  double heThr = -100,
49  double hfThr = -100,
50  double hoThr = -100,
51  double tMin = -500,
52  double tMax = 500,
53  int useRaw = 0,
54  bool debug = false);
55 
56  double eHCALmatrix(const HcalTopology* topology,
57  const DetId& det,
58  std::vector<PCaloHit>& hits,
59  int ieta,
60  int iphi,
61  bool includeHO = false,
62  double hbThr = -100,
63  double heThr = -100,
64  double hfThr = -100,
65  double hoThr = -100,
66  double tMin = -500,
67  double tMax = 500,
68  bool debug = false);
69 
70  template <typename T>
71  double eHCALmatrix(const HcalTopology* topology,
72  const DetId& det,
74  int ietaE,
75  int ietaW,
76  int iphiN,
77  int iphiS,
78  bool includeHO = false,
79  double hbThr = -100,
80  double heThr = -100,
81  double hfThr = -100,
82  double hoThr = -100,
83  double tMin = -500,
84  double tMax = 500,
85  int useRaw = 0,
86  bool debug = false);
87 
88  template <typename T>
89  double eHCALmatrix(const HcalTopology* topology,
90  const DetId& det0,
92  int ieta,
93  int iphi,
94  int& nRecHits,
95  std::vector<int>& RH_ieta,
96  std::vector<int>& RH_iphi,
97  std::vector<double>& RH_ene,
98  std::set<int>& uniqueIdset,
99  int useRaw = 0);
100 
101  template <typename T>
102  double eHCALmatrix(const CaloGeometry* geo,
103  const HcalTopology* topology,
104  const DetId& det0,
106  int ieta,
107  int iphi,
108  int& nRecHits,
109  std::vector<int>& RH_ieta,
110  std::vector<int>& RH_iphi,
111  std::vector<double>& RH_ene,
112  GlobalPoint& gPosHotCell,
113  int useRaw = 0);
114 
115  template <typename T>
116  double eHCALmatrix(const CaloGeometry* geo,
117  const HcalTopology* topology,
118  const DetId& det0,
120  int ieta,
121  int iphi,
122  HcalDetId& hotCell,
123  bool includeHO = false,
124  int useRaw = 0,
125  bool debug = false);
126 
127  double eHCALmatrix(const CaloGeometry* geo,
128  const HcalTopology* topology,
129  const DetId& det0,
130  std::vector<PCaloHit>& hits,
131  int ieta,
132  int iphi,
133  HcalDetId& hotCell,
134  bool includeHO = false,
135  bool debug = false);
136 
137  template <typename T>
139  const DetId& det,
141  int ieta,
142  int iphi,
143  bool includeHO = false,
144  double hbThr = -100,
145  double heThr = -100,
146  double hfThr = -100,
147  double hoThr = -100,
148  double tMin = -500,
149  double tMax = 500,
150  int useRaw = 0,
151  bool debug = false);
152 
153  template <typename T>
155  const DetId& det,
157  int ietaE,
158  int ietaW,
159  int iphiN,
160  int iphiS,
161  bool includeHO = false,
162  double hbThr = -100,
163  double heThr = -100,
164  double hfThr = -100,
165  double hoThr = -100,
166  double tMin = -500,
167  double tMax = 500,
168  int useRaw = 0,
169  bool debug = false);
170 
171  template <typename T>
172  void hitHCALmatrix(const HcalTopology* topology,
173  const DetId& det,
175  int ieta,
176  int iphi,
177  std::vector<typename T::const_iterator>& hitlist,
178  bool includeHO = false,
179  bool debug = false);
180 
181  template <typename T>
183  const DetId& det,
185  int ietaE,
186  int ietaW,
187  int iphiN,
188  int iphiS,
189  std::vector<typename T::const_iterator>& hitlist,
190  bool includeHO = false,
191  bool debug = false);
192 
193  template <typename T>
194  double energyHCAL(std::vector<DetId>& vdets,
196  double hbThr = -100,
197  double heThr = -100,
198  double hfThr = -100,
199  double hoThr = -100,
200  double tMin = -500,
201  double tMax = 500,
202  int useRaw = 0,
203  bool debug = false);
204 
205  template <typename T>
206  void energyHCALCell(HcalDetId detId,
208  std::vector<std::pair<double, int> >& energyCell,
209  int maxDepth = 1,
210  double hbThr = -100,
211  double heThr = -100,
212  double hfThr = -100,
213  double hoThr = -100,
214  double tMin = -500,
215  double tMax = 500,
216  int useRaw = 0,
217  int depthHE = 3,
218  bool debug = false);
219 
220  void energyHCALCell(HcalDetId detId,
221  std::vector<PCaloHit>& hits,
222  std::vector<std::pair<double, int> >& energyCell,
223  int maxDepth = 1,
224  double hbThr = -100,
225  double heThr = -100,
226  double hfThr = -100,
227  double hoThr = -100,
228  double tMin = -500,
229  double tMax = 500,
230  int depthHE = 3,
231  bool debug = false);
232 
233  template <typename T>
234  void hitsHCAL(std::vector<DetId>& vdets,
236  std::vector<typename T::const_iterator>& hitlist,
237  bool debug = false);
238 
239  HcalDetId getHotCell(std::vector<HBHERecHitCollection::const_iterator>& hit,
240  bool includeHO,
241  int useRaw = 0,
242  bool debug = false);
243 
244  HcalDetId getHotCell(std::vector<std::vector<PCaloHit>::const_iterator>& hit,
245  bool includeHO,
246  int useRaw = 0,
247  bool debug = false);
248 
249  double eHCALThreshold(int subdet, double hbThr = -100, double heThr = -100, double hfThr = -100, double hoThr = -100);
250 } // namespace spr
251 
252 #include "Calibration/IsolatedParticles/interface/eHCALMatrix.icc"
253 #endif
Handle.h
spr
Definition: CaloConstants.h:6
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
HcalTopology
Definition: HcalTopology.h:26
edm::Handle
Definition: AssociativeIterator.h:50
spr::getHotCell
HcalDetId getHotCell(std::vector< HBHERecHitCollection::const_iterator > &hit, bool includeHO, int useRaw=0, bool debug=false)
Definition: eHCALMatrix.cc:195
HLT_FULL_cff.maxDepth
maxDepth
Definition: HLT_FULL_cff.py:8732
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
spr::energyHCAL
double energyHCAL(std::vector< DetId > &vdets, edm::Handle< T > &hits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
CaloGeometry
Definition: CaloGeometry.h:21
debug
#define debug
Definition: HDRShower.cc:19
spr::energyHCALCell
void energyHCALCell(HcalDetId detId, edm::Handle< T > &hits, std::vector< std::pair< double, int > > &energyCell, int maxDepth=1, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, int depthHE=3, bool debug=false)
ecaldqm::topology
const CaloTopology * topology(nullptr)
spr::energyHCALmatrixTotal
double energyHCALmatrixTotal(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ietaE, int ietaW, int iphiN, int iphiS, bool includeHO=false, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
Point3DBase< float, GlobalTag >
spr::hitHCALmatrix
void hitHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, std::vector< typename T::const_iterator > &hitlist, bool includeHO=false, bool debug=false)
spr::eHCALThreshold
double eHCALThreshold(int subdet, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100)
Definition: eHCALMatrix.cc:261
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalDetId
Definition: HcalDetId.h:12
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
HcalTopology.h
DetId.h
Frameworkfwd.h
spr::hitsHCAL
void hitsHCAL(std::vector< DetId > &vdets, edm::Handle< T > &hits, std::vector< typename T::const_iterator > &hitlist, bool debug=false)
CaloGeometry.h
HcalRecHitCollections.h
PCaloHitContainer.h
spr::eHCALmatrix
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
Candidate.h
spr::energyHCALmatrixNew
double energyHCALmatrixNew(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
spr::hitHCALmatrixTotal
void hitHCALmatrixTotal(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ietaE, int ietaW, int iphiN, int iphiS, std::vector< typename T::const_iterator > &hitlist, bool includeHO=false, bool debug=false)
GlobalPoint.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88