ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTowerSeg::SubSeg Class Reference

A rectangular window within the segmentation. More...

#include <CaloTowerSeg.h>

Collaboration diagram for CaloTowerSeg::SubSeg:

Public Types

typedef CaloTowerSeg::index_t index_t

Public Member Functions

 SubSeg (const CaloTowerSeg &parent, index_t etamin, index_t etamax, index_t phimin, index_t phimax)
 Constructor.
index_t etamin () const
 Lower eta index.
index_t etamax () const
 Upper eta index (inclusive).
index_t phimin () const
 Lower phi index.
index_t phimax () const
 Upper phi index (inclusive). phimax<phimin indicates phi wraparound.
size_t neta () const
 The number of towers in the eta direction in this window.
size_t nphi () const
 The number of towers in the phi direction in this window.
size_t size () const
 The number of towers in this window.
const CaloTowerSegparent () const
CaloTowerSeg segmentation () const
 Return a new segmentation object corresponding to this window.

Private Attributes

const CaloTowerSegm_parent
 Segmentation of which this is a part.
index_t m_etamin
 Inclusive indices. m_phimax < m_phimin indicates phi wraparound.
index_t m_etamax
index_t m_phimin
index_t m_phimax

Detailed Description

A rectangular window within the segmentation.

Definition at line 201 of file CaloTowerSeg.h.

Member Typedef Documentation

◆ index_t

Constructor & Destructor Documentation

◆ SubSeg()

CaloTowerSeg::SubSeg::SubSeg ( const CaloTowerSeg & parent,
index_t etamin,
index_t etamax,
index_t phimin,
index_t phimax )

Constructor.

Parameters
parentSegmentation of which this is a part.
etaminLower eta index.
etamaxUpper eta index (inclusive).
phiminLower phi index.
phimaxUpper phi index (inclusive). If phimax < phimin, then we wrap around in phi.

Definition at line 57 of file CaloTowerSeg.cxx.

60 : m_parent (parent),
65{
66}
const CaloTowerSeg & m_parent
Segmentation of which this is a part.
index_t etamax() const
Upper eta index (inclusive).
index_t etamin() const
Lower eta index.
index_t m_etamin
Inclusive indices. m_phimax < m_phimin indicates phi wraparound.
const CaloTowerSeg & parent() const
index_t phimin() const
Lower phi index.
index_t phimax() const
Upper phi index (inclusive). phimax<phimin indicates phi wraparound.

Member Function Documentation

◆ etamax()

CaloTowerSeg::SubSeg::index_t CaloTowerSeg::SubSeg::etamax ( ) const
inline

Upper eta index (inclusive).

Definition at line 549 of file CaloTowerSeg.h.

550{
551 return m_etamax;
552}

◆ etamin()

CaloTowerSeg::SubSeg::index_t CaloTowerSeg::SubSeg::etamin ( ) const
inline

Lower eta index.

Definition at line 538 of file CaloTowerSeg.h.

539{
540 return m_etamin;
541}

◆ neta()

size_t CaloTowerSeg::SubSeg::neta ( ) const
inline

The number of towers in the eta direction in this window.

Definition at line 581 of file CaloTowerSeg.h.

582{
583 return m_etamax - m_etamin + 1;
584}

◆ nphi()

size_t CaloTowerSeg::SubSeg::nphi ( ) const

The number of towers in the phi direction in this window.

Definition at line 72 of file CaloTowerSeg.cxx.

73{
74 int nphi = m_phimax - m_phimin + 1;
75 // Handle phi wraparound.
76 if (m_phimax < m_phimin)
77 nphi += m_parent.nphi();
78 return nphi;
79}
size_t nphi() const
The number of towers in the phi direction in this window.

◆ parent()

const CaloTowerSeg & CaloTowerSeg::SubSeg::parent ( ) const
inline

Definition at line 240 of file CaloTowerSeg.h.

240{ return m_parent; }

◆ phimax()

CaloTowerSeg::SubSeg::index_t CaloTowerSeg::SubSeg::phimax ( ) const
inline

Upper phi index (inclusive). phimax<phimin indicates phi wraparound.

Upper phi index (inclusive).

phimax<phimin indicates phi wraparound.

Definition at line 571 of file CaloTowerSeg.h.

572{
573 return m_phimax;
574}

◆ phimin()

CaloTowerSeg::SubSeg::index_t CaloTowerSeg::SubSeg::phimin ( ) const
inline

Lower phi index.

Definition at line 560 of file CaloTowerSeg.h.

561{
562 return m_phimin;
563}

◆ segmentation()

CaloTowerSeg CaloTowerSeg::SubSeg::segmentation ( ) const

Return a new segmentation object corresponding to this window.

Definition at line 85 of file CaloTowerSeg.cxx.

86{
87 const double etamin = m_parent.eta (m_etamin) - m_parent.deta()/2;
88 const double etamax = m_parent.eta (m_etamax) + m_parent.deta()/2;
89
90 const double phimin = m_parent.phi (m_phimin) - m_parent.dphi()/2;
91 const double phimax = m_parent.phi (m_phimax) + m_parent.dphi()/2;
92
93 return {neta(), nphi(), etamin, etamax, phimin, phimax};
94}
size_t neta() const
The number of towers in the eta direction in this window.

◆ size()

size_t CaloTowerSeg::SubSeg::size ( ) const
inline

The number of towers in this window.

Definition at line 591 of file CaloTowerSeg.h.

592{
593 return neta() * nphi();
594}

Member Data Documentation

◆ m_etamax

index_t CaloTowerSeg::SubSeg::m_etamax
private

Definition at line 255 of file CaloTowerSeg.h.

◆ m_etamin

index_t CaloTowerSeg::SubSeg::m_etamin
private

Inclusive indices. m_phimax < m_phimin indicates phi wraparound.

Definition at line 254 of file CaloTowerSeg.h.

◆ m_parent

const CaloTowerSeg& CaloTowerSeg::SubSeg::m_parent
private

Segmentation of which this is a part.

Definition at line 251 of file CaloTowerSeg.h.

◆ m_phimax

index_t CaloTowerSeg::SubSeg::m_phimax
private

Definition at line 257 of file CaloTowerSeg.h.

◆ m_phimin

index_t CaloTowerSeg::SubSeg::m_phimin
private

Definition at line 256 of file CaloTowerSeg.h.


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