ATLAS Offline Software
Loading...
Searching...
No Matches
EMBCell.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_EMBCELL_H
6#define LARREADOUTGEOMETRY_EMBCELL_H
7
11#include "GeoModelKernel/RCBase.h"
13#include <cmath>
14#include <vector>
15
17
29
30class EMBCell : public RCBase
31{
32 public:
33 typedef enum {FRONT,CENTER,BACK} CELLPOS;
34
35 public:
39 EMBCell (unsigned int side, const EMBDetDescr *embDescriptor, unsigned int eta, unsigned int phi);
40
41
45 unsigned int getPhiIndex () const;
46
50 unsigned int getEndcapIndex () const;
51
55 unsigned int getEtaIndex () const;
56
60 unsigned int getSamplingIndex () const;
61
65 unsigned int getRegionIndex () const;
66
70 const EMBDetDescr * getDescriptor () const;
71
75 double getRLocal (CELLPOS position) const;
76
80 double getZMinLocal (CELLPOS position) const;
81
85 double getZMaxLocal (CELLPOS position) const;
86
92 double getPhiLocalLower () const;
93
99 double getPhiLocalUpper () const;
100
104 double getPhiMinNominal() const;
105
109 double getPhiMaxNominal() const;
110
114 double getEtaMin () const;
115
119 double getEtaMax () const;
120
121
127 double getPhiLocalLower (double r) const;
133 double getPhiLocalUpper (double r) const;
134
138 unsigned int getNumElectrodes() const;
139
143 const EMBHVElectrode & getElectrode (unsigned int i) const;
144
148 unsigned int getNumHVPathologies ()const ;
149
153 const EMBHVPathologiesConstLink & getHVPathologies (unsigned int i) const;
154
159
160
165
166
167 private:
168
169 EMBCell(const EMBCell &right);
170
171 virtual ~EMBCell();
172
173 EMBCell & operator=(const EMBCell &right);
174
176
177 struct HVInfo
178 {
179 // The cell does NOT own the pointers to its electrodes
180 std::vector<const EMBHVElectrode*> m_electrode;
182 };
184
185 std::vector<EMBHVPathologiesConstLink> m_hvPathologies;
186
187 unsigned int m_clockwork;
188
189 friend class ImaginaryFriend;
190
191 const HVInfo& getHVInfo() const;
192 void initHV (HVInfo& hvinfo) const;
193};
194
195
196// Class EMBCell
197
198inline EMBCell::EMBCell (unsigned int side, const EMBDetDescr *embDescriptor, unsigned int eta, unsigned int phi)
199 :m_embDetDescr(embDescriptor),m_clockwork(phi | (eta<<8) | (side <<17) )
200{
201}
202
203
204
205inline unsigned int EMBCell::getPhiIndex () const
206{
207 return m_clockwork & 0x000000FF;
208}
209
210inline unsigned int EMBCell::getEndcapIndex () const
211{
212 return (m_clockwork & 0x00020000) >> 17;
213}
214
215inline unsigned int EMBCell::getEtaIndex () const
216{
217 return (m_clockwork & 0x0001FF00) >> 8;
218}
219
220inline unsigned int EMBCell::getSamplingIndex () const
221{
223}
224
225inline unsigned int EMBCell::getRegionIndex () const
226{
227 return getDescriptor()->getRegionIndex();
228}
229
230inline const EMBDetDescr * EMBCell::getDescriptor () const
231{
232 return m_embDetDescr;
233}
234
235inline double EMBCell::getRLocal (CELLPOS position) const
236{
237 switch (position) {
238 case FRONT:
240 case CENTER:
242 case BACK:
244 default :
245 return 0;
246 };
247}
248
249inline double EMBCell::getZMinLocal (CELLPOS position) const
250{
251 return getRLocal(position)*sinh(getEtaMin());
252}
253
254inline double EMBCell::getZMaxLocal (CELLPOS position) const
255{
256 return getRLocal(position)*sinh(getEtaMax());
257}
258
259inline double EMBCell::getPhiLocalLower () const
260{
261 return getDescriptor()->getPhiBinning().binLower(getPhiIndex());
262}
263
264inline double EMBCell::getPhiLocalUpper () const
265{
266 return getDescriptor()->getPhiBinning().binUpper(getPhiIndex());
267}
268
269inline double EMBCell::getPhiMinNominal () const
270{
272}
273
274inline double EMBCell::getPhiMaxNominal () const
275{
277}
278
279inline double EMBCell::getEtaMin () const
280{
281 return getDescriptor()->getEtaBinning().binLower(getEtaIndex());
282}
283
284inline double EMBCell::getEtaMax () const
285{
286 return getDescriptor()->getEtaBinning().binUpper(getEtaIndex());
287}
288
289
290
291
292#endif
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Cached value with atomic update.
GeoIntrusivePtr< const EMBHVPathologies > EMBHVPathologiesConstLink
Cached value with atomic update.
Definition CachedValue.h:55
unsigned int m_clockwork
Definition EMBCell.h:187
double getPhiMinNominal() const
returns a nominal phi min in global coords; assume canonical placement
Definition EMBCell.h:269
@ BACK
Definition EMBCell.h:33
@ CENTER
Definition EMBCell.h:33
@ FRONT
Definition EMBCell.h:33
unsigned int getEtaIndex() const
The eta index of this cell.
Definition EMBCell.h:215
unsigned int getEndcapIndex() const
The Side Index of this Cell (0=negatiive, 1=positive)
Definition EMBCell.h:210
const EMBHVPathologiesConstLink & getHVPathologies(unsigned int i) const
@Get HVPathologies
Definition EMBCell.cxx:123
void initHV(HVInfo &hvinfo) const
Definition EMBCell.cxx:51
unsigned int getNumElectrodes() const
@Get num electrodes
Definition EMBCell.cxx:27
unsigned int getNumHVPathologies() const
@Get num HVPathologies
Definition EMBCell.cxx:119
EMBCell(const EMBCell &right)
double getEtaMin() const
Minimum Eta.
Definition EMBCell.h:279
unsigned int getRegionIndex() const
The region index of this cell.
Definition EMBCell.h:225
const HVInfo & getHVInfo() const
Definition EMBCell.cxx:40
double getZMinLocal(CELLPOS position) const
RMin for the cell at (FRONT,CENTER,BACK)
Definition EMBCell.h:249
CxxUtils::CachedValue< HVInfo > m_hvinfo
Definition EMBCell.h:183
EMBCell & operator=(const EMBCell &right)
EMBCell(unsigned int side, const EMBDetDescr *embDescriptor, unsigned int eta, unsigned int phi)
Constructor.
Definition EMBCell.h:198
const EMBHVElectrode & getElectrode(unsigned int i) const
@Get electrode
Definition EMBCell.cxx:31
unsigned int getPhiIndex() const
The Phi Index of this Cell.
Definition EMBCell.h:205
const EMBDetDescr * getDescriptor() const
Returns a pointer to the descriptor.
Definition EMBCell.h:230
double getEtaMax() const
Maximum Eta.
Definition EMBCell.h:284
void addHVPathologies(const EMBHVPathologiesConstLink &)
@Add HVPathologies
Definition EMBCell.cxx:115
virtual ~EMBCell()
double getZMaxLocal(CELLPOS position) const
RMax for the cell at (FRONT,CENTER,BACK)
Definition EMBCell.h:254
double getPhiLocalUpper() const
Gets the phi value at the "upper" edge of a cell.
Definition EMBCell.h:264
unsigned int getSamplingIndex() const
The sampling index of this cell.
Definition EMBCell.h:220
friend class ImaginaryFriend
Definition EMBCell.h:189
const EMBPresamplerHVModule & getPresamplerHVModule() const
@Get HVModule (presampler cells)
Definition EMBCell.cxx:35
double getPhiMaxNominal() const
returns a nominal phi max in global coords; assume canonical placement
Definition EMBCell.h:274
const EMBDetDescr * m_embDetDescr
Definition EMBCell.h:175
std::vector< EMBHVPathologiesConstLink > m_hvPathologies
Definition EMBCell.h:185
double getPhiLocalLower() const
Gets the phi value at the "lower" edge of a cell.
Definition EMBCell.h:259
double getRLocal(CELLPOS position) const
Z for the cell at (FRONT,CENTER,BACK)
Definition EMBCell.h:235
Descriptor for regions of the electromagnetic barrel calorimeter.
Definition EMBDetDescr.h:27
double getOffset(unsigned int etaIndex) const
Gets the offset position (cell centers with respect to the position of the front of the active volume...
unsigned int getSamplingIndex() const
The sampling index.
const CellBinning & getPhiBinning() const
The Binning in Phi.
double getHalfLength(unsigned int etaIndex) const
gets the cell half-length in z.
unsigned int getRegionIndex() const
The region index.
const CellBinning & getEtaBinning() const
The Binning in Eta.
Describes one HV Module within the EMB Presampler.
int r
Definition globals.cxx:22
const EMBPresamplerHVModule * m_presamplerModule
Definition EMBCell.h:181
std::vector< const EMBHVElectrode * > m_electrode
Definition EMBCell.h:180