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)
606template <
class TOWER_ITERATOR>
632 parent.nphi() -
subseg.nphi() + 1,
653template <
class TOWER_ITERATOR>
656 (
const TOWER_ITERATOR& it,
660 : TOWER_ITERATOR (it),
677template <
class TOWER_ITERATOR>
686 TOWER_ITERATOR::operator++();
710template <
class TOWER_ITERATOR>
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
CaloPhiRange class declaration.
This class defines the phi convention for Calorimeters.
Iterator over a rectangular window of towers.
size_t itower() const
The tower index to which the iterator is referring.
SubSegIterator & operator++()
Advance to the next tower in the window.
SubSegIterator(const TOWER_ITERATOR &it, size_t nphi, size_t nphi_skip, size_t phipos)
Constructor.
static SubSegIterator make(TOWER_ITERATOR beg, const SubSeg &subseg)
Construct a new iterator for iterating over a window.
A rectangular window within the segmentation.
const CaloTowerSeg & m_parent
Segmentation of which this is a part.
index_t etamax() const
Upper eta index (inclusive).
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.
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.
size_t neta() const
The number of towers in the eta direction in this window.
index_t phimax() const
Upper phi index (inclusive). phimax<phimin indicates phi wraparound.
CaloTowerSeg::index_t index_t
SubSeg(const CaloTowerSeg &parent, index_t etamin, index_t etamax, index_t phimin, index_t phimax)
Constructor.
CaloTowerSeg segmentation() const
Return a new segmentation object corresponding to this window.
index_t nphi() const
Retrieve number of bins.
double m_phimax
Upper boundary value range.
size_t index_t
Type for eta, phi indices.
CaloTowerSeg()
Default constructor.
double phimin() const
Retrieve lower boundary value range.
index_t etaphi(index_t etaInd, index_t phiInd) const
Returns combined continous index from , indices.
index_t neta() const
Retrieve number of bins.
bool inbound(index_t etaInd, index_t phiInd) const
Check index range in and .
double deta() const
Retrieve bin size .
static const CaloPhiRange s_range
double dphi() const
Retrieve bin size .
index_t phiIndex(double phiVal) const
Returns index for a given value.
SubSeg subseg(double eta, double deta, double phi, double dphi) const
Return a window within the current segmentation.
static const index_t outOfRange
Used to flag out-of-range indices.
double phimax() const
Retrieve upper boundary value range.
double phi(index_t phiInd) const
Returns value for a given index.
double m_etamax
Upper boundary value range.
double etamin() const
Retrieve lower boundary value range.
double etamax() const
Retrieve upper boundary value range.
index_t m_neta
Number of bins.
index_t m_nphi
Number of bins.
double m_etamin
Lower boundary value range.
CaloTowerSeg(index_t neta, index_t nphi, double etamin, double etamax, double phimin=s_range.phi_min(), double phimax=s_range.phi_max())
Constructor.
double eta(index_t etaInd) const
Returns value for a given index.
index_t etaIndex(double etaVal) const
Returns index for a given value.
~CaloTowerSeg()
Destructor.
friend class CaloTowerSegCnv_p1
double m_phimin
Lower boundary value range.