ATLAS Offline Software
Loading...
Searching...
No Matches
EMECCell.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARREADOUTGEOMETRY_EMECCELL_H
6#define LARREADOUTGEOMETRY_EMECCELL_H
7#include <iostream>
10#include "GeoModelKernel/CellBinning.h"
11#include "GeoModelKernel/RCBase.h"
15
30
31class EMECCell : public RCBase
32{
33
34 public:
35
36 typedef enum {FRONT,CENTER,BACK} CELLPOS;
37
41 EMECCell (unsigned int endcap, const EMECDetDescr *emecDescriptor, unsigned int eta, unsigned int phi);
42
46 unsigned int getPhiIndex () const;
47
51 unsigned int getEndcapIndex () const;
52
56 unsigned int getEtaIndex () const;
57
61 unsigned int getSamplingIndex () const;
62
66 unsigned int getRegionIndex () const;
67
71 unsigned int getRadialIndex () const;
72
76 const EMECDetDescr * getDescriptor () const;
77
81 double getZLocal (CELLPOS position) const;
82
86 double getRMinLocal (CELLPOS position) const;
87
91 double getRMaxLocal (CELLPOS position) const;
92
98 double getPhiLocalLower () const;
99
105 double getPhiLocalUpper () const;
106
110 double getPhiMinNominal() const;
111
115 double getPhiMaxNominal() const;
116
120 double getEtaMin () const;
121
125 double getEtaMax () const;
126
127
131 unsigned int getNumElectrodes() const;
132
136 const EMECHVElectrode& getElectrode (unsigned int i) const;
137
138
143
144 private:
145
146 EMECCell(const EMECCell &right);
147
148 virtual ~EMECCell();
149
150 EMECCell & operator=(const EMECCell &right);
151 // Pointer to the Descriptor. This class responds to its
152 // interface mostly by forwarding requests to the
153 // descriptor.
154
156
157 struct HVInfo
158 {
159 // The cell does NOT own the pointers to its electrodes
160 std::vector<const EMECHVElectrode*> m_electrode;
162 };
164
165 unsigned int m_clockwork;
166
167
168 friend class ImaginaryFriend;
169
170 const HVInfo& getHVInfo() const;
171 void initHV (HVInfo& hvinfo) const;
172};
173
174
175
176
177inline EMECCell::EMECCell (unsigned int endcap, const EMECDetDescr *emecDescriptor, unsigned int eta, unsigned int phi)
178 // 8 bits are needed for phi index, 6 for eta, 1 for endcap.
179 :m_emecDetDescr(emecDescriptor),m_clockwork(phi | (eta<<8) | (endcap <<15) )
180{
181
182}
183
184
185
186
187inline unsigned int EMECCell::getPhiIndex () const
188{
189
190 return m_clockwork & 0x000000FF;
191
192}
193
194inline unsigned int EMECCell::getEndcapIndex () const
195{
196
197 return (m_clockwork & 0x00008000) >> 15;
198
199}
200
201inline unsigned int EMECCell::getEtaIndex () const
202{
203
204 return (m_clockwork & 0x00007F00) >> 8;
205
206}
207
208inline unsigned int EMECCell::getSamplingIndex () const
209{
210
212
213}
214
215inline unsigned int EMECCell::getRegionIndex () const
216{
217
218 return getDescriptor()->getRegionIndex();
219
220}
221
222inline unsigned int EMECCell::getRadialIndex () const
223{
224
225 return getDescriptor()->getRadialIndex();
226
227}
228
230{
231
232 return m_emecDetDescr;
233
234}
235
236inline double EMECCell::getZLocal (CELLPOS position) const
237{
238
239 switch (position) {
240 case FRONT:
242 case CENTER:
244 case BACK:
246 default :
247 return 0;
248 };
249
250}
251
252inline double EMECCell::getRMinLocal (CELLPOS position) const
253{
254
256 return (getDescriptor()->getManager()->getFocalToRef()+toActive+getZLocal(position))/sinh(getEtaMax());
257
258}
259
260inline double EMECCell::getRMaxLocal (CELLPOS position) const
261{
262
264 return (getDescriptor()->getManager()->getFocalToRef()+toActive+getZLocal(position))/sinh(getEtaMin());
265
266}
267
268inline double EMECCell::getPhiLocalLower () const
269{
270
271 return getDescriptor()->getPhiBinning().binLower(getPhiIndex());
272
273}
274
275inline double EMECCell::getPhiLocalUpper () const
276{
277
278 return getDescriptor()->getPhiBinning().binUpper(getPhiIndex());
279
280}
281
282
283inline double EMECCell::getPhiMinNominal () const
284{
286}
287
288inline double EMECCell::getPhiMaxNominal () const
289{
291}
292
293inline double EMECCell::getEtaMin () const
294{
295
296 return getDescriptor()->getEtaBinning().binLower(getEtaIndex());
297
298}
299
300inline double EMECCell::getEtaMax () const
301{
302
303 return getDescriptor()->getEtaBinning().binUpper(getEtaIndex());
304
305}
306
307
308#endif
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Cached value with atomic update.
Cached value with atomic update.
Definition CachedValue.h:55
const EMECDetDescr * m_emecDetDescr
Definition EMECCell.h:155
double getEtaMax() const
Maximum Eta.
Definition EMECCell.h:300
double getPhiLocalLower() const
Gets the phi value at the "lower" edge of a cell.
Definition EMECCell.h:268
const EMECHVElectrode & getElectrode(unsigned int i) const
@Get electrode
Definition EMECCell.cxx:21
unsigned int getPhiIndex() const
The Phi Index of this Cell.
Definition EMECCell.h:187
const EMECPresamplerHVModule & getPresamplerHVModule() const
@Get HVModule (presampler cells)
Definition EMECCell.cxx:25
unsigned int getEndcapIndex() const
The EndcapIndex of this Cell (0=negatiive, 1=positive)
Definition EMECCell.h:194
double getPhiLocalUpper() const
Gets the phi value at the "lower" edge of a cell.
Definition EMECCell.h:275
double getRMaxLocal(CELLPOS position) const
RMax for the cell at (FRONT,CENTER,BACK)
Definition EMECCell.h:260
unsigned int getRadialIndex() const
The radial index of this cell (0=Outer Wheel, 1=Inner Wheel).
Definition EMECCell.h:222
EMECCell(const EMECCell &right)
double getPhiMaxNominal() const
returns a nominal phi max in global coords; assume canonical placement
Definition EMECCell.h:288
virtual ~EMECCell()
const EMECDetDescr * getDescriptor() const
Returns a pointer to the descriptor.
Definition EMECCell.h:229
CxxUtils::CachedValue< HVInfo > m_hvinfo
Definition EMECCell.h:163
unsigned int getRegionIndex() const
The region index of this cell.
Definition EMECCell.h:215
void initHV(HVInfo &hvinfo) const
Definition EMECCell.cxx:41
unsigned int getEtaIndex() const
The eta index of this cell.
Definition EMECCell.h:201
double getEtaMin() const
Minimum Eta.
Definition EMECCell.h:293
EMECCell & operator=(const EMECCell &right)
double getRMinLocal(CELLPOS position) const
RMin for the cell at (FRONT,CENTER,BACK)
Definition EMECCell.h:252
double getZLocal(CELLPOS position) const
Z for the cell at (FRONT,CENTER,BACK)
Definition EMECCell.h:236
unsigned int m_clockwork
Definition EMECCell.h:165
friend class ImaginaryFriend
Definition EMECCell.h:168
unsigned int getSamplingIndex() const
The sampling index of this cell.
Definition EMECCell.h:208
EMECCell(unsigned int endcap, const EMECDetDescr *emecDescriptor, unsigned int eta, unsigned int phi)
Constructor.
Definition EMECCell.h:177
const HVInfo & getHVInfo() const
Definition EMECCell.cxx:30
unsigned int getNumElectrodes() const
@Get num electrodes
Definition EMECCell.cxx:17
double getPhiMinNominal() const
returns a nominal phi min in global coords; assume canonical placement
Definition EMECCell.h:283
Descriptor for regions of the electromagnetic endcap calorimeter.
unsigned int getSamplingIndex() const
The sampling index.
unsigned int getRegionIndex() const
The region index.
double getHalfLength(unsigned int etaIndex) const
gets the cell half-length in z.
const CellBinning & getEtaBinning() const
The Binning in Eta.
unsigned int getRadialIndex() const
The radial index of this cell (0=Outer Wheel, 1=Inner Wheel).
const CellBinning & getPhiBinning() const
The Binning in Phi.
const EMECDetectorManager * getManager() const
The manager.
double getOffset(unsigned int etaIndex) const
Gets the offset position (cell centers with respect to the position of the front of the active volume...
double getRefToActive() const
This provides the distance in CLHEP::mm from the Active EMEC volume to the reference plane.
double getRefToPresampler() const
This provides the distance in CLHEP::mm from the Active Endcap Presampler volume (center) to the refe...
Describes one HV Module within the EMEc Presampler.
std::vector< const EMECHVElectrode * > m_electrode
Definition EMECCell.h:160
const EMECPresamplerHVModule * m_presamplerModule
Definition EMECCell.h:161