ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
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
More...
 
unsigned int getPhiIndex () const
 The Phi Index of this Cell. More...
 
unsigned int getEndcapIndex () const
 The EndcapIndex of this Cell (0=negative, 1=positive) More...
 
unsigned int getEtaIndex () const
 The eta index of this cell. More...
 
unsigned int getSamplingIndex () const
 The sampling index of this cell. More...
 
unsigned int getRegionIndex () const
 The region index of this cell. More...
 
unsigned int getNumBlocks () const
 The number of blocks in this cell. More...
 
unsigned int getBlockIndex (unsigned int block) const
 The block index of cell i. More...
 
double getZMin (unsigned int block) const
 Minimum Z of Block i. More...
 
double getZMax (unsigned int block) const
 Maximum Z of block i. More...
 
double getPhiLocalLower () const
 Gets the phi value at the "lower" edge of a cell. More...
 
double getPhiLocalUpper () const
 Gets the phi value at the "upper" edge of the cell. More...
 
double getPhiMinNominal () const
 returns a nominal phi min in global coords; assume canonical placement More...
 
double getPhiMaxNominal () const
 returns a nominal phi max in global coords; assume canonical placement More...
 
double getEtaMinNominal () const
 Nominal Eta Min (geometry is not projective) More...
 
double getEtaMaxNominal () const
 Nominal Eta Min (geometry is not projective) More...
 
double getZLocal (CELLPOS position) const
 Z for the cell at (FRONT,CENTER,BACK) More...
 
double getRMinLocalNominal (CELLPOS position) const
 Nominal RMin for the cell at (FRONT,CENTER,BACK) More...
 
double getRMaxLocalNominal (CELLPOS position) const
 Nominal RMax for the cell at (FRONT,CENTER,BACK) More...
 
double getRMin (unsigned int block) const
 Minimum r of block i. More...
 
double getRMax (unsigned int block) const
 Maximum r of block i. More...
 
const HECDetDescrgetDescriptor () const
 Returns a pointer to the descriptor. More...
 
bool occupiesBlock (unsigned int block) const
 Returns true if the cell occupies (or overlaps) this longitudinal block. More...
 
unsigned int getNumSubgaps () const
 @Get num subgaps More...
 
const HECHVSubgapgetSubgap (unsigned int i) const
 @Get subgap More...
 

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. More...
 
unsigned int m_clockwork
 Bitpacked indices. More...
 
CxxUtils::CachedValue< std::vector< const HECHVSubgap * > > m_subgaps
 Cache of subgaps. More...
 

Friends

class ImaginaryFriend
 Additional Implementation Declarations. More...
 

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.

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 }

◆ HECCell() [2/2]

HECCell::HECCell ( const HECCell right)
private

◆ ~HECCell()

HECCell::~HECCell ( )
privatevirtualdefault

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 }

◆ 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 }

◆ 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 }

◆ getNumSubgaps()

unsigned int HECCell::getNumSubgaps ( ) const

@Get num subgaps

Definition at line 14 of file HECCell.cxx.

14  {
15  return getSubgaps().size();
16 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ getSamplingIndex()

unsigned int HECCell::getSamplingIndex ( ) const
inline

The sampling index of this cell.

Definition at line 248 of file HECCell.h.

249 {
250 
251  return getDescriptor()->getSamplingIndex();
252 
253 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ operator=()

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

Friends And Related Function Documentation

◆ 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:
HECHVModule
Describes one HV Module within the HEC.
Definition: HECHVModule.h:21
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
HECCell::getEtaMaxNominal
double getEtaMaxNominal() const
Nominal Eta Min (geometry is not projective)
Definition: HECCell.h:311
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
HECDetDescr::getRMin
double getRMin(unsigned int block, unsigned int eta) const
Returns min r for block i.
Definition: HECDetDescr.h:141
HECCell::getEtaIndex
unsigned int getEtaIndex() const
The eta index of this cell.
Definition: HECCell.h:240
HECDetDescr::getRadialSegment
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.
Definition: HECDetDescr.h:169
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
HECDetDescr::getZMax
double getZMax(unsigned int block) const
Returns max z for the ith block at eta index.
Definition: HECDetDescr.h:134
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
HECCell::getZLocal
double getZLocal(CELLPOS position) const
Z for the cell at (FRONT,CENTER,BACK)
Definition: HECCell.h:318
HECDetDescr::getRegionIndex
unsigned int getRegionIndex() const
The region Index.
Definition: HECDetDescr.h:208
M_PI
#define M_PI
Definition: ActiveFraction.h:11
HECCell::getDescriptor
const HECDetDescr * getDescriptor() const
Returns a pointer to the descriptor.
Definition: HECCell.h:372
HECCell::getNumBlocks
unsigned int getNumBlocks() const
The number of blocks in this cell.
Definition: HECCell.h:262
HECCell::m_hecDetDescr
const HECDetDescr * m_hecDetDescr
Pointer to the Descriptor.
Definition: HECCell.h:187
HECDetDescr::getBlockIndex
unsigned int getBlockIndex(unsigned int block) const
Gets the block index for the ith block (in case it is ever needed).
Definition: HECDetDescr.h:185
HECCell::getEndcapIndex
unsigned int getEndcapIndex() const
The EndcapIndex of this Cell (0=negative, 1=positive)
Definition: HECCell.h:233
HECCell::BACK
@ BACK
Definition: HECCell.h:34
HECDetDescr::getRMax
double getRMax(unsigned int block, unsigned int eta) const
Returns max r at block i.
Definition: HECDetDescr.h:155
HECCell::getEtaMinNominal
double getEtaMinNominal() const
Nominal Eta Min (geometry is not projective)
Definition: HECCell.h:304
HECCell::getPhiMinNominal
double getPhiMinNominal() const
returns a nominal phi min in global coords; assume canonical placement
Definition: HECCell.h:387
HECCell::FRONT
@ FRONT
Definition: HECCell.h:34
lumiFormat.i
int i
Definition: lumiFormat.py:85
HECHVModule::getSubgap
const HECHVSubgap & getSubgap(unsigned int iElectrode) const
Definition: HECHVModule.cxx:69
HECDetDescr::getEtaBinning
const CellBinning & getEtaBinning() const
The Binning in Eta.
Definition: HECDetDescr.h:222
HECCell::m_subgaps
CxxUtils::CachedValue< std::vector< const HECHVSubgap * > > m_subgaps
Cache of subgaps.
Definition: HECCell.h:197
HECCell::getZMax
double getZMax(unsigned int block) const
Maximum Z of block i.
Definition: HECCell.h:283
HECDetDescr::getManager
const HECDetectorManager * getManager() const
The manager.
Definition: HECDetDescr.h:194
HECHVManager::getDescriptor
const HECHVDescriptor & getDescriptor() const
Definition: HECHVManager.cxx:159
HECCell::getZMin
double getZMin(unsigned int block) const
Minimum Z of Block i.
Definition: HECCell.h:276
HECCell::getPhiLocalLower
double getPhiLocalLower() const
Gets the phi value at the "lower" edge of a cell.
Definition: HECCell.h:290
HECCell::getSamplingIndex
unsigned int getSamplingIndex() const
The sampling index of this cell.
Definition: HECCell.h:248
HECCell::getPhiMaxNominal
double getPhiMaxNominal() const
returns a nominal phi max in global coords; assume canonical placement
Definition: HECCell.h:392
HECCell::getSubgaps
const std::vector< const HECHVSubgap * > & getSubgaps() const
Definition: HECCell.cxx:24
HECDetDescr::getNumBlocks
unsigned int getNumBlocks() const
Number of blocks in the region.
Definition: HECDetDescr.h:229
HECCell::getPhiLocalUpper
double getPhiLocalUpper() const
Gets the phi value at the "upper" edge of the cell.
Definition: HECCell.h:297
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
HECCell::initHV
void initHV(std::vector< const HECHVSubgap * > &subgaps) const
Definition: HECCell.cxx:35
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
HECHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: HECHVManager.h:36
HECDetDescr::getPhiBinning
const CellBinning & getPhiBinning() const
The Binning in Phi.
Definition: HECDetDescr.h:215
HECCell::CENTER
@ CENTER
Definition: HECCell.h:34
HECDetDescr::getSamplingIndex
unsigned int getSamplingIndex() const
The sampling index.
Definition: HECDetDescr.h:201
HECCell::CELLPOS
CELLPOS
Definition: HECCell.h:34
HECHVDescriptor::getPhiBinning
const CellBinning & getPhiBinning() const
Definition: HECHVDescriptor.h:16
HECDetectorManager::getHVManager
const HECHVManager & getHVManager() const
Get the HV Manager.
Definition: HECDetectorManager.cxx:181
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
HECHVSubgap
Definition: HECHVSubgap.h:15
HECHVManager::getHVModule
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
Definition: HECHVManager.cxx:194
HECCell::getPhiIndex
unsigned int getPhiIndex() const
The Phi Index of this Cell.
Definition: HECCell.h:226
HECDetDescr::getZMin
double getZMin(unsigned int block) const
Returns min z for the ith block at eta index.
Definition: HECDetDescr.h:127
HECCell::m_clockwork
unsigned int m_clockwork
Bitpacked indices.
Definition: HECCell.h:192