|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef CALOEVENT_CALOTOWERSEG_H
8 #define CALOEVENT_CALOTOWERSEG_H
131 bool inbound(
double etaVal,
double phiVal)
const;
316 template <
class TOWER_ITERATOR>
318 :
public TOWER_ITERATOR
466 etaInd >= 1 && etaInd <=
m_neta &&
467 phiInd >= 1 && phiInd <=
m_nphi;
476 return phiVal <= m_phimax || phiVal >=
m_phimin;
483 return this->
inbound(etaInd,phiInd)
484 ? (etaInd-1) *
m_nphi + (phiInd-1)
606 template <
class TOWER_ITERATOR>
650 template <
class TOWER_ITERATOR>
653 (
const TOWER_ITERATOR&
it,
657 : TOWER_ITERATOR (
it),
659 m_nphi_skip (nphi_skip),
674 template <
class TOWER_ITERATOR>
689 TOWER_ITERATOR::operator+= (m_nphi_skip);
693 if (++m_phipos2 >=
m_nphi) {
707 template <
class TOWER_ITERATOR>
712 return m_itower + m_phipos;
Iterator over a rectangular window of towers.
bool inbound(index_t etaInd, index_t phiInd) const
Check index range in and .
double eta(index_t etaInd) const
Returns value for a given index.
index_t phimin() const
Lower phi index.
This class defines the phi convention for Calorimeters.
const CaloTowerSeg & parent() const
index_t etamax() const
Upper eta index (inclusive).
static SubSegIterator make(TOWER_ITERATOR beg, const SubSeg &subseg)
Construct a new iterator for iterating over a window.
double m_etamin
Lower boundary value range.
index_t neta() const
Retrieve number of bins.
double m_etamax
Upper boundary value range.
index_t etamin() const
Lower eta index.
CaloTowerSeg::index_t index_t
CaloTowerSeg()
Default constructor.
double deta() const
Retrieve bin size .
index_t nphi() const
Retrieve number of bins.
A rectangular window within the segmentation.
SubSeg(const CaloTowerSeg &parent, index_t etamin, index_t etamax, index_t phimin, index_t phimax)
Constructor.
double phimin() const
Retrieve lower boundary value range.
double dphi() const
Retrieve bin size .
double phi(index_t phiInd) const
Returns value for a given index.
SubSegIterator & operator++()
Advance to the next tower in the window.
size_t itower() const
The tower index to which the iterator is referring.
size_t index_t
Type for eta, phi indices.
CaloPhiRange class declaration.
double phimax() const
Retrieve upper boundary value range.
static double fix(double phi)
index_t m_nphi
Number of bins.
TGCHBChip operator++(TGCHBChip &rs, int)
double etamax() const
Retrieve upper boundary value range.
index_t phiIndex(double phiVal) const
Returns index for a given value.
index_t etaphi(index_t etaInd, index_t phiInd) const
Returns combined continous index from , indices.
index_t phimax() const
Upper phi index (inclusive). phimax<phimin indicates phi wraparound.
CaloTowerSeg segmentation() const
Return a new segmentation object corresponding to this window.
double etamin() const
Retrieve lower boundary value range.
static const CaloPhiRange s_range
~CaloTowerSeg()
Destructor.
const CaloTowerSeg & m_parent
Segmentation of which this is a part.
static const index_t outOfRange
Used to flag out-of-range indices.
Data object stores CaloTower segmentation.
size_t size() const
The number of towers in this window.
double m_phimax
Upper boundary value range.
index_t m_etamin
Inclusive indices. m_phimax < m_phimin indicates phi wraparound.
index_t etaIndex(double etaVal) const
Returns index for a given value.
SubSegIterator(const TOWER_ITERATOR &it, size_t nphi, size_t nphi_skip, size_t phipos)
Constructor.
double m_phimin
Lower boundary value range.
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
SubSeg subseg(double eta, double deta, double phi, double dphi) const
Return a window within the current segmentation.
index_t m_neta
Number of bins.
size_t nphi() const
The number of towers in the phi direction in this window.
size_t neta() const
The number of towers in the eta direction in this window.