ATLAS Offline Software
Loading...
Searching...
No Matches
HECCell Class Reference

A cell of the hadronic endcap calorimeter readout geometry. More...

#include <HECCell.h>

Inheritance diagram for HECCell:
Collaboration diagram for HECCell:

Public Types

enum  CELLPOS { FRONT , CENTER , BACK }

Public Member Functions

 HECCell (unsigned int endcap, const HECDetDescr *hecDescriptor, unsigned int eta, unsigned int phi)
 Constructor.
unsigned int getPhiIndex () const
 The Phi Index of this Cell.
unsigned int getEndcapIndex () const
 The EndcapIndex of this Cell (0=negative, 1=positive)
unsigned int getEtaIndex () const
 The eta index of this cell.
unsigned int getSamplingIndex () const
 The sampling index of this cell.
unsigned int getRegionIndex () const
 The region index of this cell.
unsigned int getNumBlocks () const
 The number of blocks in this cell.
unsigned int getBlockIndex (unsigned int block) const
 The block index of cell i.
double getZMin (unsigned int block) const
 Minimum Z of Block i.
double getZMax (unsigned int block) const
 Maximum Z of block i.
double getPhiLocalLower () const
 Gets the phi value at the "lower" edge of a cell.
double getPhiLocalUpper () const
 Gets the phi value at the "upper" edge of the cell.
double getPhiMinNominal () const
 returns a nominal phi min in global coords; assume canonical placement
double getPhiMaxNominal () const
 returns a nominal phi max in global coords; assume canonical placement
double getEtaMinNominal () const
 Nominal Eta Min (geometry is not projective)
double getEtaMaxNominal () const
 Nominal Eta Min (geometry is not projective)
double getZLocal (CELLPOS position) const
 Z for the cell at (FRONT,CENTER,BACK)
double getRMinLocalNominal (CELLPOS position) const
 Nominal RMin for the cell at (FRONT,CENTER,BACK)
double getRMaxLocalNominal (CELLPOS position) const
 Nominal RMax for the cell at (FRONT,CENTER,BACK)
double getRMin (unsigned int block) const
 Minimum r of block i.
double getRMax (unsigned int block) const
 Maximum r of block i.
const HECDetDescrgetDescriptor () const
 Returns a pointer to the descriptor.
bool occupiesBlock (unsigned int block) const
 Returns true if the cell occupies (or overlaps) this longitudinal block.
unsigned int getNumSubgaps () const
 @Get num subgaps
const HECHVSubgapgetSubgap (unsigned int i) const
 @Get subgap

Private Member Functions

 HECCell (const HECCell &right)
virtual ~HECCell ()
HECCelloperator= (const HECCell &right)
const std::vector< const HECHVSubgap * > & getSubgaps () const
void initHV (std::vector< const HECHVSubgap * > &subgaps) const

Private Attributes

const HECDetDescrm_hecDetDescr
 Pointer to the Descriptor.
unsigned int m_clockwork
 Bitpacked indices.
CxxUtils::CachedValue< std::vector< const HECHVSubgap * > > m_subgaps
 Cache of subgaps.

Friends

class ImaginaryFriend
 Additional Implementation Declarations.

Detailed Description

A cell of the hadronic endcap calorimeter readout geometry.

This class represents a single HEC Cell. A cell spans multiple blocks and has different boundaries at each block. For access to the HEC Cells, use the HECDetector Region class.

Use the HEC Cells through HEC Cell Links please!!! This will free the memory used by the cell when the last link to the cell disappears.

Definition at line 30 of file HECCell.h.

Member Enumeration Documentation

◆ CELLPOS

Enumerator
FRONT 
CENTER 
BACK 

Definition at line 34 of file HECCell.h.

@ BACK
Definition HECCell.h:34
@ FRONT
Definition HECCell.h:34
@ CENTER
Definition HECCell.h:34

Constructor & Destructor Documentation

◆ HECCell() [1/2]

HECCell::HECCell ( unsigned int endcap,
const HECDetDescr * hecDescriptor,
unsigned int eta,
unsigned int phi )
inline

Constructor.

Definition at line 212 of file HECCell.h.

216 :m_hecDetDescr(hecDescriptor),m_clockwork(phi | (eta<<6) | (endcap <<10))
217
218{
219
220
221}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
const HECDetDescr * m_hecDetDescr
Pointer to the Descriptor.
Definition HECCell.h:187
unsigned int m_clockwork
Bitpacked indices.
Definition HECCell.h:192

◆ HECCell() [2/2]

HECCell::HECCell ( const HECCell & right)
private

Member Function Documentation

◆ getBlockIndex()

unsigned int HECCell::getBlockIndex ( unsigned int block) const
inline

The block index of cell i.

In more detail: there are 7 longitudinal blocks in the full HEC. This cell contains (n=numBlocks()) of them. The block index of cell i tells you which block you are in within the full HEC.

Definition at line 269 of file HECCell.h.

270{
271
272 return getDescriptor()->getBlockIndex(block);
273
274}
const HECDetDescr * getDescriptor() const
Returns a pointer to the descriptor.
Definition HECCell.h:372
unsigned int getBlockIndex(unsigned int block) const
Gets the block index for the ith block (in case it is ever needed).

◆ getDescriptor()

const HECDetDescr * HECCell::getDescriptor ( ) const
inline

Returns a pointer to the descriptor.

Definition at line 372 of file HECCell.h.

373{
374
375 return m_hecDetDescr;
376
377}

◆ getEndcapIndex()

unsigned int HECCell::getEndcapIndex ( ) const
inline

The EndcapIndex of this Cell (0=negative, 1=positive)

Definition at line 233 of file HECCell.h.

234{
235
236 return (m_clockwork & 0x00000400) >> 10;
237
238}

◆ getEtaIndex()

unsigned int HECCell::getEtaIndex ( ) const
inline

The eta index of this cell.

Definition at line 240 of file HECCell.h.

241{
242
243 // 4 Bits for eta:
244 return (m_clockwork & 0x000003C0) >> 6;
245
246}

◆ getEtaMaxNominal()

double HECCell::getEtaMaxNominal ( ) const
inline

Nominal Eta Min (geometry is not projective)

Definition at line 311 of file HECCell.h.

312{
313
314 return getDescriptor()->getEtaBinning().binUpper(getEtaIndex());
315
316}
unsigned int getEtaIndex() const
The eta index of this cell.
Definition HECCell.h:240
const CellBinning & getEtaBinning() const
The Binning in Eta.

◆ getEtaMinNominal()

double HECCell::getEtaMinNominal ( ) const
inline

Nominal Eta Min (geometry is not projective)

Definition at line 304 of file HECCell.h.

305{
306
307 return getDescriptor()->getEtaBinning().binLower(getEtaIndex());
308
309}

◆ getNumBlocks()

unsigned int HECCell::getNumBlocks ( ) const
inline

The number of blocks in this cell.

Definition at line 262 of file HECCell.h.

263{
264
265 return getDescriptor()->getNumBlocks();
266
267}
unsigned int getNumBlocks() const
Number of blocks in the region.

◆ getNumSubgaps()

unsigned int HECCell::getNumSubgaps ( ) const

@Get num subgaps

Definition at line 14 of file HECCell.cxx.

14 {
15 return getSubgaps().size();
16}
const std::vector< const HECHVSubgap * > & getSubgaps() const
Definition HECCell.cxx:24

◆ getPhiIndex()

unsigned int HECCell::getPhiIndex ( ) const
inline

The Phi Index of this Cell.

Definition at line 226 of file HECCell.h.

227{
228
229 return m_clockwork & 0x0000003F;
230
231}

◆ getPhiLocalLower()

double HECCell::getPhiLocalLower ( ) const
inline

Gets the phi value at the "lower" edge of a cell.

This is a local phi!!! It's useful for constructing exact phi boundaries in the local coordinate system.

Definition at line 290 of file HECCell.h.

291{
292
293 return getDescriptor()->getPhiBinning().binLower(getPhiIndex());
294
295}
unsigned int getPhiIndex() const
The Phi Index of this Cell.
Definition HECCell.h:226
const CellBinning & getPhiBinning() const
The Binning in Phi.

◆ getPhiLocalUpper()

double HECCell::getPhiLocalUpper ( ) const
inline

Gets the phi value at the "upper" edge of the cell.

This is a local phi!!! It's useful for constructing exact phi boundaries in the local coordinate system.

Definition at line 297 of file HECCell.h.

298{
299
300 return getDescriptor()->getPhiBinning().binUpper(getPhiIndex());
301
302}

◆ getPhiMaxNominal()

double HECCell::getPhiMaxNominal ( ) const
inline

returns a nominal phi max in global coords; assume canonical placement

Definition at line 392 of file HECCell.h.

393{
395}
#define M_PI
unsigned int getEndcapIndex() const
The EndcapIndex of this Cell (0=negative, 1=positive)
Definition HECCell.h:233
double getPhiLocalLower() const
Gets the phi value at the "lower" edge of a cell.
Definition HECCell.h:290
double getPhiLocalUpper() const
Gets the phi value at the "upper" edge of the cell.
Definition HECCell.h:297

◆ getPhiMinNominal()

double HECCell::getPhiMinNominal ( ) const
inline

returns a nominal phi min in global coords; assume canonical placement

Definition at line 387 of file HECCell.h.

388{
390}

◆ getRegionIndex()

unsigned int HECCell::getRegionIndex ( ) const
inline

The region index of this cell.

Definition at line 255 of file HECCell.h.

256{
257
258 return getDescriptor()->getRegionIndex();
259
260}
unsigned int getRegionIndex() const
The region Index.

◆ getRMax()

double HECCell::getRMax ( unsigned int block) const
inline

Maximum r of block i.

Definition at line 365 of file HECCell.h.

366{
367
368 return getDescriptor()->getRMax(block,getEtaIndex());
369
370}
double getRMax(unsigned int block, unsigned int eta) const
Returns max r at block i.

◆ getRMaxLocalNominal()

double HECCell::getRMaxLocalNominal ( CELLPOS position) const
inline

Nominal RMax for the cell at (FRONT,CENTER,BACK)

Definition at line 346 of file HECCell.h.

347{
348 bool hec2 = getSamplingIndex() > 1;
349 if (hec2) {
350 return (getDescriptor()->getManager()->getFocalToRef2() + getZLocal(position))/sinh(getEtaMinNominal());
351 }
352 else {
353 return (getDescriptor()->getManager()->getFocalToRef1() + getZLocal(position))/sinh(getEtaMinNominal());
354 }
355
356}
double getZLocal(CELLPOS position) const
Z for the cell at (FRONT,CENTER,BACK)
Definition HECCell.h:318
unsigned int getSamplingIndex() const
The sampling index of this cell.
Definition HECCell.h:248
double getEtaMinNominal() const
Nominal Eta Min (geometry is not projective)
Definition HECCell.h:304

◆ getRMin()

double HECCell::getRMin ( unsigned int block) const
inline

Minimum r of block i.

Definition at line 358 of file HECCell.h.

359{
360
361 return getDescriptor()->getRMin(block,getEtaIndex());
362
363}
double getRMin(unsigned int block, unsigned int eta) const
Returns min r for block i.

◆ getRMinLocalNominal()

double HECCell::getRMinLocalNominal ( CELLPOS position) const
inline

Nominal RMin for the cell at (FRONT,CENTER,BACK)

Definition at line 334 of file HECCell.h.

335{
336 bool hec2 = getSamplingIndex() > 1;
337 if (hec2) {
338 return (getDescriptor()->getManager()->getFocalToRef2() + getZLocal(position))/sinh(getEtaMaxNominal());
339 }
340 else {
341 return (getDescriptor()->getManager()->getFocalToRef1() + getZLocal(position))/sinh(getEtaMaxNominal());
342 }
343
344}
double getEtaMaxNominal() const
Nominal Eta Min (geometry is not projective)
Definition HECCell.h:311

◆ getSamplingIndex()

unsigned int HECCell::getSamplingIndex ( ) const
inline

The sampling index of this cell.

Definition at line 248 of file HECCell.h.

249{
250
252
253}
unsigned int getSamplingIndex() const
The sampling index.

◆ getSubgap()

const HECHVSubgap & HECCell::getSubgap ( unsigned int i) const

@Get subgap

Definition at line 18 of file HECCell.cxx.

18 {
19 return *getSubgaps()[i];
20}

◆ getSubgaps()

const std::vector< const HECHVSubgap * > & HECCell::getSubgaps ( ) const
private

Definition at line 24 of file HECCell.cxx.

25{
26 if (!m_subgaps.isValid()) {
27 std::vector<const HECHVSubgap*> subgaps;
28 initHV (subgaps);
29 m_subgaps.set (std::move (subgaps));
30 }
31 return *m_subgaps.ptr();
32}
CxxUtils::CachedValue< std::vector< const HECHVSubgap * > > m_subgaps
Cache of subgaps.
Definition HECCell.h:197
void initHV(std::vector< const HECHVSubgap * > &subgaps) const
Definition HECCell.cxx:35

◆ getZLocal()

double HECCell::getZLocal ( CELLPOS position) const
inline

Z for the cell at (FRONT,CENTER,BACK)

Definition at line 318 of file HECCell.h.

319{
320
321 switch (position) {
322 case FRONT:
323 return getZMin(0);
324 case CENTER:
325 return (getZLocal(FRONT) + getZLocal(BACK))/2.0;
326 case BACK:
327 return getZMax(getNumBlocks()-1);
328 default :
329 return 0;
330 };
331
332}
double getZMax(unsigned int block) const
Maximum Z of block i.
Definition HECCell.h:283
unsigned int getNumBlocks() const
The number of blocks in this cell.
Definition HECCell.h:262
double getZMin(unsigned int block) const
Minimum Z of Block i.
Definition HECCell.h:276

◆ getZMax()

double HECCell::getZMax ( unsigned int block) const
inline

Maximum Z of block i.

Definition at line 283 of file HECCell.h.

284{
285
286 return getDescriptor()->getZMax(block);
287
288}
double getZMax(unsigned int block) const
Returns max z for the ith block at eta index.

◆ getZMin()

double HECCell::getZMin ( unsigned int block) const
inline

Minimum Z of Block i.

Definition at line 276 of file HECCell.h.

277{
278
279 return getDescriptor()->getZMin(block);
280
281}
double getZMin(unsigned int block) const
Returns min z for the ith block at eta index.

◆ initHV()

void HECCell::initHV ( std::vector< const HECHVSubgap * > & subgaps) const
private

Definition at line 35 of file HECCell.cxx.

36{
37 const HECHVManager& hvManager=getDescriptor()->getManager()->getHVManager();
38
39
40 unsigned int iSide=getEndcapIndex();
41
42 double phiUpper = getPhiMaxNominal();
43 double phiLower = getPhiMinNominal();
44 double phi=fabs(phiUpper+phiLower)/2.0;
45 const CellBinning & phiBinning=hvManager.getDescriptor().getPhiBinning();
46 unsigned int iPhi = int((phi - phiBinning.getStart())/phiBinning.getDelta()) + phiBinning.getFirstDivisionNumber();
47
48 unsigned int iSampling=getSamplingIndex();
49
50 const HECHVModule& hvMod = hvManager.getHVModule(iSide,iPhi,iSampling);
51 for (unsigned int iSubgap=0;iSubgap<4;iSubgap++) {
52 const HECHVSubgap& hvElec = hvMod.getSubgap(iSubgap);
53 subgaps.push_back(&hvElec);
54 }
55}
double getPhiMaxNominal() const
returns a nominal phi max in global coords; assume canonical placement
Definition HECCell.h:392
double getPhiMinNominal() const
returns a nominal phi min in global coords; assume canonical placement
Definition HECCell.h:387
const HECDetectorManager * getManager() const
The manager.
const HECHVManager & getHVManager() const
Get the HV Manager.
const CellBinning & getPhiBinning() const
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
const HECHVDescriptor & getDescriptor() const
const HECHVSubgap & getSubgap(unsigned int iElectrode) const
@ iPhi
Definition ParamDefs.h:47

◆ occupiesBlock()

bool HECCell::occupiesBlock ( unsigned int block) const
inline

Returns true if the cell occupies (or overlaps) this longitudinal block.

Definition at line 379 of file HECCell.h.

380{
381
382 return getDescriptor()->getRadialSegment(block,getEtaIndex())!=NULL;
383
384}
const HECRadialSegment * getRadialSegment(unsigned int block, unsigned int eta) const
Returns the radial segment of in block b with eta index i, or else NULL.

◆ operator=()

HECCell & HECCell::operator= ( const HECCell & right)
private

◆ ~HECCell()

HECCell::~HECCell ( )
privatevirtualdefault

◆ ImaginaryFriend

friend class ImaginaryFriend
friend

Additional Implementation Declarations.

Definition at line 202 of file HECCell.h.

Member Data Documentation

◆ m_clockwork

unsigned int HECCell::m_clockwork
private

Bitpacked indices.

Definition at line 192 of file HECCell.h.

◆ m_hecDetDescr

const HECDetDescr* HECCell::m_hecDetDescr
private

Pointer to the Descriptor.

This class responds to its interface mostly by forwarding requests to the descriptor.

Definition at line 187 of file HECCell.h.

◆ m_subgaps

CxxUtils::CachedValue<std::vector<const HECHVSubgap*> > HECCell::m_subgaps
private

Cache of subgaps.

Definition at line 197 of file HECCell.h.


The documentation for this class was generated from the following files: