ATLAS Offline Software
|
Data object stores CaloTower segmentation. More...
#include <CaloTowerSeg.h>
Classes | |
class | SubSeg |
A rectangular window within the segmentation. More... | |
class | SubSegIterator |
Iterator over a rectangular window of towers. More... | |
Public Types | |
typedef size_t | index_t |
Type for eta, phi indices. More... | |
Public Member Functions | |
CaloTowerSeg () | |
Default constructor. More... | |
CaloTowerSeg (index_t neta, index_t nphi, double etamin, double etamax, double phimin=s_range.phi_min(), double phimax=s_range.phi_max()) | |
Constructor. More... | |
~CaloTowerSeg () | |
Destructor. More... | |
index_t | neta () const |
Retrieve number of \( \eta \) bins. More... | |
index_t | nphi () const |
Retrieve number of \( \varphi \) bins. More... | |
double | deta () const |
Retrieve bin size \( \Delta \eta \). More... | |
double | dphi () const |
Retrieve bin size \( \Delta \varphi \). More... | |
double | etamin () const |
Retrieve lower boundary \( \eta \) value range. More... | |
double | etamax () const |
Retrieve upper boundary \( \eta \) value range. More... | |
double | phimin () const |
Retrieve lower boundary \( \varphi \) value range. More... | |
double | phimax () const |
Retrieve upper boundary \( \varphi \) value range. More... | |
bool | inbound (index_t etaInd, index_t phiInd) const |
Check index range in \( \eta \) and \( \varphi \). More... | |
bool | inbound (double etaVal, double phiVal) const |
Check value range in \( \eta \) and \( \varphi \). More... | |
index_t | etaphi (index_t etaInd, index_t phiInd) const |
Returns combined continous index from \( \eta \), \( \varphi \) indices. More... | |
double | eta (index_t etaInd) const |
Returns \( \eta \) value for a given \( \eta \) index. More... | |
index_t | etaIndex (double etaVal) const |
Returns \( \eta \) index for a given \( \eta \) value. More... | |
index_t | etaIndex (index_t comInd) const |
Returns \( \eta \) index for a given combined index. More... | |
double | phi (index_t phiInd) const |
Returns \( \varphi \) value for a given \( \varphi \) index. More... | |
index_t | phiIndex (double phiVal) const |
Returns \( \varphi \) index for a given \( \varphi \) value. More... | |
index_t | phiIndex (index_t comInd) const |
Returns \( \varphi \) index for a given combined index. More... | |
SubSeg | subseg (double eta, double deta, double phi, double dphi) const |
Return a window within the current segmentation. More... | |
Static Public Attributes | |
static const index_t | outOfRange = static_cast<index_t> (-1) |
Used to flag out-of-range indices. More... | |
Private Attributes | |
index_t | m_neta |
Number of \( \eta \) bins. More... | |
index_t | m_nphi |
Number of \( \varphi \) bins. More... | |
double | m_etamin |
Lower boundary \( \eta \) value range. More... | |
double | m_etamax |
Upper boundary \( \eta \) value range. More... | |
double | m_phimin |
Lower boundary \( \varphi \) value range. More... | |
double | m_phimax |
Upper boundary \( \varphi \) value range. More... | |
double | m_deta |
Bin size \( \Delta \eta \). More... | |
double | m_dphi |
Bin size \( \Delta \varphi \). More... | |
Static Private Attributes | |
static const CaloPhiRange | s_range |
Friends | |
class | CaloTowerSegCnv_p1 |
Data object stores CaloTower segmentation.
The CaloTowerSeg class generates an object which stores the tower segmentation in reguar \( \Delta \eta \times \Delta \varphi \) bins. The bin index convention is \( i \in [1,n] \), where \( n \) is the number of bins for a given variable. In addition a continously running index \( k \) is providing by combining the \( \eta \) and \( \varphi \) indices, with \( k \in [0,N-1] \). \( N \) is total number of bins (sum of the numbers of \( \eta \) and \( \varphi \) bins).
Definition at line 36 of file CaloTowerSeg.h.
typedef size_t CaloTowerSeg::index_t |
Type for eta, phi indices.
Definition at line 59 of file CaloTowerSeg.h.
|
inline |
|
inline |
Constructor.
neta | input number of \( \eta \) bins |
nphi | input number of \( \varphi \) bins |
etamin | input lower boundary \( \eta \) value range |
etamax | input upper boundary \( \eta \) value range |
phimin | input lower boundary \( \varphi \) value range |
phimax | input upper boundary \( \varphi \) value range |
\( \varphi \) by default covers the full circle. CaloPhiRange::phi_min() and CaloPhiRange::phi_max() are used to implement the correct \( \varphi \) range convention.
May have phimin > phimax for the case of wraparound.
Only regular (equidistant) bins are supported in both directions.
Definition at line 93 of file CaloTowerSeg.h.
|
inline |
|
inline |
Retrieve bin size \( \Delta \eta \).
Definition at line 433 of file CaloTowerSeg.h.
|
inline |
Retrieve bin size \( \Delta \varphi \).
Definition at line 438 of file CaloTowerSeg.h.
|
inline |
Returns \( \eta \) value for a given \( \eta \) index.
etaInd | input \( \eta \) index |
Can return \( \eta \) value outside of allowed value range if index out of range (no internal check).
Definition at line 516 of file CaloTowerSeg.h.
|
inline |
Returns \( \eta \) index for a given \( \eta \) value.
etaVal | input \( \eta \) value |
Returns size_t(-1) in case of \( \eta \) being out of allowed value range.
Definition at line 489 of file CaloTowerSeg.h.
|
inline |
Returns \( \eta \) index for a given combined index.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
comInd | input combined index |
Can return an invalid \( \eta \) index if comInd is invalid.
Definition at line 495 of file CaloTowerSeg.h.
|
inline |
Retrieve upper boundary \( \eta \) value range.
Definition at line 448 of file CaloTowerSeg.h.
|
inline |
Retrieve lower boundary \( \eta \) value range.
Definition at line 443 of file CaloTowerSeg.h.
Returns combined continous index from \( \eta \), \( \varphi \) indices.
etaInd | input \( \eta \) index |
phiInd | input \( \varphi \) index |
Calculates a common running index from \(\eta\) and \(\phi\) . Returns size_t(-1) if input outside of allowed index ranges.
Definition at line 481 of file CaloTowerSeg.h.
|
inline |
Check value range in \( \eta \) and \( \varphi \).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
etaVal | input \( \eta \) coordinate |
phiVal | input \( \varphi \) coordinate |
Returns true
when both eta and phi are inside their respective allowed value ranges.
Definition at line 470 of file CaloTowerSeg.h.
Check index range in \( \eta \) and \( \varphi \).
etaInd | input \( \eta \) index |
phiInd | input \( \varphi \) index |
Returns true
when both eta and phi are within their respective allowed index ranges.
Definition at line 463 of file CaloTowerSeg.h.
|
inline |
Retrieve number of \( \eta \) bins.
Definition at line 423 of file CaloTowerSeg.h.
|
inline |
Retrieve number of \( \varphi \) bins.
Definition at line 428 of file CaloTowerSeg.h.
|
inline |
Returns \( \varphi \) value for a given \( \varphi \) index.
phiInd | input \( \varphi \) index |
Can return \( \varphi \) value outside of allowed value range if index out of range (no internal check).
Definition at line 521 of file CaloTowerSeg.h.
|
inline |
Returns \( \varphi \) index for a given \( \varphi \) value.
phiVal | input \( \varphi \) value |
Returns size_t(-1) in case of \( \varphi \) being out of allowed value range.
Definition at line 499 of file CaloTowerSeg.h.
|
inline |
Returns \( \varphi \) index for a given combined index.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
comInd | input combined index |
Can return an invalid \( \varphi \) index if comInd is invalid.
Definition at line 510 of file CaloTowerSeg.h.
|
inline |
Retrieve upper boundary \( \varphi \) value range.
Definition at line 458 of file CaloTowerSeg.h.
|
inline |
Retrieve lower boundary \( \varphi \) value range.
Definition at line 453 of file CaloTowerSeg.h.
CaloTowerSeg::SubSeg CaloTowerSeg::subseg | ( | double | eta, |
double | deta, | ||
double | phi, | ||
double | dphi | ||
) | const |
Return a window within the current segmentation.
The window is centered at eta/phi with half-widths deta/dphi.
Definition at line 23 of file CaloTowerSeg.cxx.
|
friend |
Definition at line 407 of file CaloTowerSeg.h.
|
private |
Bin size \( \Delta \eta \).
Definition at line 429 of file CaloTowerSeg.h.
|
private |
Bin size \( \Delta \varphi \).
Definition at line 431 of file CaloTowerSeg.h.
|
private |
Upper boundary \( \eta \) value range.
Definition at line 422 of file CaloTowerSeg.h.
|
private |
Lower boundary \( \eta \) value range.
Definition at line 420 of file CaloTowerSeg.h.
|
private |
Number of \( \eta \) bins.
Definition at line 415 of file CaloTowerSeg.h.
|
private |
Number of \( \varphi \) bins.
Definition at line 417 of file CaloTowerSeg.h.
|
private |
Upper boundary \( \varphi \) value range.
Definition at line 426 of file CaloTowerSeg.h.
|
private |
Lower boundary \( \varphi \) value range.
Definition at line 424 of file CaloTowerSeg.h.
Used to flag out-of-range indices.
Definition at line 62 of file CaloTowerSeg.h.
|
staticprivate |
Definition at line 435 of file CaloTowerSeg.h.