![]() |
ATLAS Offline Software
|
Retrieve the list of towers associated with a calorimeter cell referenced by its hash identifier. More...
#include <CaloTowerGeometry.h>
Public Types | |
| typedef std::size_t | uint_t |
| Type for unsigned integer. | |
| typedef IdentifierHash::value_type | index_t |
| Type for scalar (pseudorapidity,azimuth) index (is an unsigned int type) | |
| typedef std::tuple< index_t, double > | element_t |
| Type storing tower index and geometrical weight. | |
| typedef std::vector< element_t > | elementvector_t |
| Type for list of elements holding tower index and list of weights. | |
| typedef std::vector< elementvector_t > | elementmap_t |
| Type for lists of lists of elements (lookup table type) | |
Public Member Functions | |
| CaloTowerGeometry (const CaloDetDescrManager *caloDDM) | |
| Standard constructor. | |
| CaloTowerGeometry ()=delete | |
| StatusCode | initialize (MsgStream &msg) |
| Initialize object. | |
Retrieve towers for cells | |
| StatusCode | access (IdentifierHash cellHash, std::vector< index_t > &towerIdx, std::vector< double > &towerWghts) const |
| elementvector_t | getTowers (IdentifierHash cellHash) const |
| Retrieve the list of towers associated with a calorimeter cell referenced its hash identifier. | |
Tower bin descriptors and other size information | |
| uint_t | maxCellHash () const |
| Maximum cell hash value. | |
| uint_t | totalNumberCells () const |
| Total number of cells. | |
| uint_t | etaBins () const |
| Number of pseudorapidity bins. | |
| double | etaMin () const |
| Lower boundary of pseudorapidity range. | |
| double | etaMax () const |
| Upper boundary of pseudorapidity range. | |
| double | etaWidth () const |
| Width of pseudorapidity bin. | |
| uint_t | phiBins () const |
| Number of azimuth bins. | |
| double | phiMin () const |
| Lower boundary of azimuth. | |
| double | phiMax () const |
| Upper boundary of azimuth. | |
| double | phiWidth () const |
| Width of azimuth bin. | |
| uint_t | towerBins () const |
| Total number of towers. | |
| double | towerArea () const |
| Area of individual tower. | |
Tower index calculators, translaters, manipulators and converters | |
| index_t | etaIndex (IdentifierHash cellHash) const |
| Get tower \( \eta \) bin index for a calorimeter cell referenced by its hash identifier. | |
| index_t | etaIndex (double eta) const |
| Get tower \( \eta \) bin index for a given value of \( \eta \). | |
| index_t | etaIndexFromTowerIndex (index_t towerIdx) const |
| Get tower \( \eta \) bin index for a given global tower index. | |
| index_t | phiIndex (IdentifierHash cellHash) const |
| Get tower \( \phi \) bin index for a calorimeter cell referenced by its hash identifier. | |
| index_t | phiIndex (double phi) const |
| Get tower \( \phi \) bin index for a given value of \( \phi \). | |
| index_t | phiIndexFromTowerIndex (index_t towerIdx) const |
| Get tower \( \phi \) bin index for a given global tower index. | |
| index_t | towerIndex (IdentifierHash cellHash) const |
| Get global tower index for a calorimeter cell referenced by its hash identifier. | |
| index_t | towerIndex (double eta, double phi) const |
| Get global tower index for a pair of \( (\eta,\phi) \) values. | |
| index_t | towerIndex (index_t etaIdx, index_t phiIdx) const |
| Get global tower index for a pair of \( (\eta,\phi) \) indices. | |
| index_t | towerIndex (const element_t &elm) const |
| Get global tower index from payload data. | |
| index_t | invalidIndex () const |
| Returns value of invalid index. | |
| bool | isInvalidIndex (index_t idx) const |
Returns true if argument is equal to the value provided by invalidIndex() | |
| bool | isInvalidIndex (index_t idx, index_t maxIdx) const |
Returns true if first argument is equal to the value provided by invalidIndex() or if first argument is not smaller than second argument. | |
| bool | isInvalidEtaIndex (index_t idx) const |
Returns true if argument is not a valid pseudorapidity index. | |
| bool | isInvalidPhiIndex (index_t idx) const |
Returns true if argumant is not a valid azimuth index. | |
| bool | isInvalidTowerIndex (index_t idx) const |
Returns true if argument is not a valid tower index. | |
Variable generators using tower indices | |
| double | towerEtaLocal (index_t etaIndex) const |
| Return pseudorapdity from local index (bin center) | |
| double | towerPhiLocal (index_t phiIndex) const |
| Return azimuth from local index (bin center) | |
| double | towerEta (index_t towerIndex) const |
| Return pseudorapidity from global tower index (bin center) | |
| double | towerPhi (index_t towerIndex) const |
| Return azimuth from global tower index (bin center) | |
| double | invalidValue () const |
| Return invalid value. | |
| bool | isInvalidValue (double val) const |
Return true if given value is invalid. | |
Helper functions | |
| double | cellWeight (const element_t &elm) const |
| Retrieve cell signal weight from lookup table entry. | |
| double | cellWeight (IdentifierHash cellHash, index_t towerIdx) const |
| Retrieve cell signal weight from cell identifier and tower index. | |
Access to storage | |
| elementmap_t::const_iterator | begin () const |
Iterator points to first entry in internal look-up table (only const access!) | |
| elementmap_t::const_iterator | end () const |
Iterator marks end of internal look-up table (only const access) | |
| size_t | size () const |
| Size of internal look-up table. | |
| bool | empty () const |
Internal look-up table is empty if true. | |
Protected Attributes | |
Internal stores and derived parameters | |
| elementmap_t | m_towerLookup |
| Cell-to-tower mapping lookup store. | |
| double | m_towerEtaWidth |
| Width of tower bin in pseudorapidity. | |
| double | m_towerPhiWidth |
| Width of tower bin in azimuth. | |
| double | m_towerArea |
| Area of individual tower. | |
| uint_t | m_towerBins |
| Maximum number of towers. | |
| uint_t | m_maxCellHash |
| Maximum cell hash value. | |
| uint_t | m_numberOfCells {} |
| Total number of cells. | |
Properties | |
| uint_t | m_towerEtaBins |
| Internally stored tower grid descriptors. | |
| double | m_towerEtaMin |
| Lower boundary \( \eta_{\rm min} \). | |
| double | m_towerEtaMax |
| Upper boundary \( \eta_{\rm max} \). | |
| bool | m_adjustEta |
Adjust FCal cells to eta boundary (default true ) | |
| uint_t | m_towerPhiBins |
| Number of \( \phi \) bins. | |
| double | m_towerPhiMin |
| Lower boundary \( \phi_{\rm min} \). | |
| double | m_towerPhiMax |
| Upper boundary \( \phi_{\rm max} \). | |
| double | m_fcal1Xslice |
| Number of x slices for cells in FCal1. | |
| double | m_fcal1Yslice |
| Number of y slices for cells in FCal1. | |
| double | m_fcal2Xslice |
| Number of x slices for cells in FCal2. | |
| double | m_fcal2Yslice |
| Number of y slices for cells in FCal2. | |
| double | m_fcal3Xslice |
| Number of x slices for cells in FCal3. | |
| double | m_fcal3Yslice |
| Number of y slices for cells in FCal3. | |
Stores | |
| std::array< double, 3 > | m_ndxFCal {} |
| Stores number of fragments along x for each FCal module. | |
| std::array< double, 3 > | m_ndyFCal {} |
| Stores number of fragments along y for each FCal module. | |
| std::array< double, 3 > | m_wgtFCal {} |
| Stores geometrical weights. | |
Private Member Functions | |
Helpers | |
| StatusCode | f_setupTowerGrid (MsgStream &msg) |
| Internally used function setting up the lookup store. | |
| StatusCode | f_setupTowerGridFCal (const CaloDetDescrElement *pCaloDDE, MsgStream &msg) |
| Internally used function mapping an FCal cell onto the tower grid. | |
| StatusCode | f_setupTowerGridProj (const CaloDetDescrElement *pCaloDDE, MsgStream &msg) |
| Internally used function mapping a projective cell onto the tower grid. | |
| double | f_assign (IdentifierHash cellHash, index_t towerIdx, double wgt) |
| Internally used function assigning tower to cell with update of weight if same tower is already assigned. | |
Private Attributes | |
Access to detector store and other services and stores | |
| const CaloDetDescrManager * | m_caloDDM |
| Pointer to calorimeter detector description. | |
Friends | |
| class | CaloTowerGeometryCondAlg |
Process flags, helpers and numerical constants | |
| static const index_t | m_invalidIndex = index_t(-1) |
| Invalid index indicator. | |
| static const double | m_invalidValue = -999. |
| Return value for out-of-range indices andother invalid conversions to a physical quantity. | |
| const CaloDetDescrManager * | f_caloDDM () const |
| Pointer to calorimeter detector description manager. | |
| const CaloDetDescrElement * | f_caloDDE (IdentifierHash cellHash) const |
| Retrieve calorimeter detector description element for a given cell hash identifier. | |
| double | f_cellEta (IdentifierHash cellHash) const |
| Retrieve calorimeter cell pseudorapidity for a given cell hash identifier. | |
| double | f_cellPhi (IdentifierHash cellHash) const |
| Retrieve calorimeter cell azimuth for a given cell hash identifier. | |
Retrieve the list of towers associated with a calorimeter cell referenced by its hash identifier.
elementvector_t container. The container is empty if the cell does not have any overlap with a tower. | [in] | cellHash | hash identifier referencing a calorimeter cell. |
Tower geometry store and description provider
This service sets up a lookup table storing the geometrical area overlap fraction of a calorimeter cell with towers in a given grid. This lookup table is set up at instantiation of the service. It can only be defined at that time. The default setup is a \( \Delta\eta\times\Delta\phi = 0.1 \times \pi/32 \) grid. Any regular grid can be constructed. The grid definition can be provided as property.
The cell-to-tower information is stored internally as a (random access) lookup table. For a given cell, the hash index is used to retrieve a list of towers this cell overlaps with, and the overlap paramater (area fraction used as a geometrical weight). This indices and geometrical weights are represented by a list of pairs of int and double numbers. Each cell can potential overlap with more than one tower. A more detailed description of towers and the geometrical overlap is available on the calorimeter tower project page.
The lookup table is implemented for random access and using the cell hash identifier to retrieve the requested list of twoer indices and weights. Several retrieval mechanisms are supported (see documentation of the corresponding methods).
To map the azimuth of a cell to a tower, \( -\pi < \phi < \pi \) is used (ATLAS standard). For consistency, all \( \phi \) values are mapped into this range.
The service inherits from AthService and thus from the Service base class in Gaudi. The managed tower grid is defined by service properties, with the following naming convention:
Addtional properties of this service define the granularity of the cell splitting in the ATLAS FCal. This is used to map the FCal readout cells (rectangular slabs) onto the tower grid and calculate the geometrical (area) overlap fraction, which is used to distribute the cell energy to the towers.
Definition at line 23 of file CaloTowerGeometry.h.
| typedef std::tuple<index_t,double> CaloTowerGeometry::element_t |
Type storing tower index and geometrical weight.
Definition at line 28 of file CaloTowerGeometry.h.
| typedef std::vector<elementvector_t> CaloTowerGeometry::elementmap_t |
Type for lists of lists of elements (lookup table type)
Definition at line 30 of file CaloTowerGeometry.h.
| typedef std::vector<element_t> CaloTowerGeometry::elementvector_t |
Type for list of elements holding tower index and list of weights.
Definition at line 29 of file CaloTowerGeometry.h.
Type for scalar (pseudorapidity,azimuth) index (is an unsigned int type)
Definition at line 27 of file CaloTowerGeometry.h.
| typedef std::size_t CaloTowerGeometry::uint_t |
Type for unsigned integer.
Definition at line 26 of file CaloTowerGeometry.h.
| CaloTowerGeometry::CaloTowerGeometry | ( | const CaloDetDescrManager * | caloDDM | ) |
Standard constructor.
Definition at line 9 of file CaloTowerGeometry.cxx.
|
delete |
| StatusCode CaloTowerGeometry::access | ( | IdentifierHash | cellHash, |
| std::vector< index_t > & | towerIdx, | ||
| std::vector< double > & | towerWghts ) const |
Definition at line 234 of file CaloTowerGeometry.cxx.
|
inline |
Iterator points to first entry in internal look-up table (only const access!)
Definition at line 329 of file CaloTowerGeometry.h.
|
inline |
Retrieve cell signal weight from lookup table entry.
Definition at line 337 of file CaloTowerGeometry.h.
| double CaloTowerGeometry::cellWeight | ( | IdentifierHash | cellHash, |
| index_t | towerIdx ) const |
Retrieve cell signal weight from cell identifier and tower index.
Definition at line 270 of file CaloTowerGeometry.cxx.
|
inline |
|
inline |
Iterator marks end of internal look-up table (only const access)
Definition at line 330 of file CaloTowerGeometry.h.
|
inline |
| CaloTowerGeometry::index_t CaloTowerGeometry::etaIndex | ( | double | eta | ) | const |
Get tower \( \eta \) bin index for a given value of \( \eta \).
Definition at line 293 of file CaloTowerGeometry.cxx.
| CaloTowerGeometry::index_t CaloTowerGeometry::etaIndex | ( | IdentifierHash | cellHash | ) | const |
Get tower \( \eta \) bin index for a calorimeter cell referenced by its hash identifier.
Definition at line 287 of file CaloTowerGeometry.cxx.
|
inline |
Get tower \( \eta \) bin index for a given global tower index.
Definition at line 315 of file CaloTowerGeometry.h.
|
inline |
|
inline |
|
inline |
|
private |
Internally used function assigning tower to cell with update of weight if same tower is already assigned.
Definition at line 218 of file CaloTowerGeometry.cxx.
|
inlineprotected |
Retrieve calorimeter detector description element for a given cell hash identifier.
Definition at line 344 of file CaloTowerGeometry.h.
|
inlineprotected |
Pointer to calorimeter detector description manager.
Definition at line 343 of file CaloTowerGeometry.h.
|
inlineprotected |
Retrieve calorimeter cell pseudorapidity for a given cell hash identifier.
Definition at line 346 of file CaloTowerGeometry.h.
|
inlineprotected |
Retrieve calorimeter cell azimuth for a given cell hash identifier.
Definition at line 347 of file CaloTowerGeometry.h.
|
private |
Internally used function setting up the lookup store.
Definition at line 61 of file CaloTowerGeometry.cxx.
|
private |
Internally used function mapping an FCal cell onto the tower grid.
Definition at line 96 of file CaloTowerGeometry.cxx.
|
private |
Internally used function mapping a projective cell onto the tower grid.
Definition at line 170 of file CaloTowerGeometry.cxx.
| CaloTowerGeometry::elementvector_t CaloTowerGeometry::getTowers | ( | IdentifierHash | cellHash | ) | const |
Retrieve the list of towers associated with a calorimeter cell referenced its hash identifier.
The tower indices and weights are returned in two index-parallel vectors. Previous content of these two vectors is removed if this method finds towers for the cell.
StatusCode::SUCCESS if list of towers found, else @s StatusCode::FAILURE. | [in] | cellHash | hash identifier referencing a calorimeter cell. |
| [in] | towerIdx | reference to modifiable vector of indices (payload type index_t ); vector is filled if cell is successfully mapped. |
| [in] | towerWghts | reference to modifiable vector of weights (payload type double ); vector is filled if cell is successfully mapped. |
Definition at line 254 of file CaloTowerGeometry.cxx.
| StatusCode CaloTowerGeometry::initialize | ( | MsgStream & | msg | ) |
Initialize object.
Definition at line 32 of file CaloTowerGeometry.cxx.
|
inline |
Returns value of invalid index.
Definition at line 275 of file CaloTowerGeometry.h.
|
inline |
Return invalid value.
Definition at line 322 of file CaloTowerGeometry.h.
|
inline |
Returns true if argument is not a valid pseudorapidity index.
Definition at line 301 of file CaloTowerGeometry.h.
|
inline |
Returns true if argument is equal to the value provided by invalidIndex()
Definition at line 299 of file CaloTowerGeometry.h.
Returns true if first argument is equal to the value provided by invalidIndex() or if first argument is not smaller than second argument.
Definition at line 300 of file CaloTowerGeometry.h.
|
inline |
Returns true if argumant is not a valid azimuth index.
Definition at line 302 of file CaloTowerGeometry.h.
|
inline |
Returns true if argument is not a valid tower index.
Definition at line 303 of file CaloTowerGeometry.h.
|
inline |
Return true if given value is invalid.
Definition at line 323 of file CaloTowerGeometry.h.
|
inline |
|
inline |
| CaloTowerGeometry::index_t CaloTowerGeometry::phiIndex | ( | double | phi | ) | const |
Get tower \( \phi \) bin index for a given value of \( \phi \).
Definition at line 306 of file CaloTowerGeometry.cxx.
| CaloTowerGeometry::index_t CaloTowerGeometry::phiIndex | ( | IdentifierHash | cellHash | ) | const |
Get tower \( \phi \) bin index for a calorimeter cell referenced by its hash identifier.
Definition at line 300 of file CaloTowerGeometry.cxx.
|
inline |
Get tower \( \phi \) bin index for a given global tower index.
Definition at line 316 of file CaloTowerGeometry.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return pseudorapidity from global tower index (bin center)
Definition at line 326 of file CaloTowerGeometry.h.
|
inline |
Return pseudorapdity from local index (bin center)
Definition at line 324 of file CaloTowerGeometry.h.
|
inline |
Get global tower index from payload data.
Definition at line 313 of file CaloTowerGeometry.h.
|
inline |
Get global tower index for a pair of \( (\eta,\phi) \) values.
Definition at line 310 of file CaloTowerGeometry.h.
|
inline |
Get global tower index for a calorimeter cell referenced by its hash identifier.
Definition at line 309 of file CaloTowerGeometry.h.
|
inline |
Get global tower index for a pair of \( (\eta,\phi) \) indices.
Definition at line 311 of file CaloTowerGeometry.h.
|
inline |
Return azimuth from global tower index (bin center)
Definition at line 327 of file CaloTowerGeometry.h.
|
inline |
Return azimuth from local index (bin center)
Definition at line 325 of file CaloTowerGeometry.h.
|
friend |
Definition at line 33 of file CaloTowerGeometry.h.
|
protected |
Adjust FCal cells to eta boundary (default true )
Definition at line 142 of file CaloTowerGeometry.h.
|
private |
Pointer to calorimeter detector description.
Definition at line 120 of file CaloTowerGeometry.h.
|
protected |
Number of x slices for cells in FCal1.
Definition at line 146 of file CaloTowerGeometry.h.
|
protected |
Number of y slices for cells in FCal1.
Definition at line 147 of file CaloTowerGeometry.h.
|
protected |
Number of x slices for cells in FCal2.
Definition at line 148 of file CaloTowerGeometry.h.
|
protected |
Number of y slices for cells in FCal2.
Definition at line 149 of file CaloTowerGeometry.h.
|
protected |
Number of x slices for cells in FCal3.
Definition at line 150 of file CaloTowerGeometry.h.
|
protected |
Number of y slices for cells in FCal3.
Definition at line 151 of file CaloTowerGeometry.h.
|
staticprotected |
Invalid index indicator.
Definition at line 156 of file CaloTowerGeometry.h.
|
staticprotected |
Return value for out-of-range indices andother invalid conversions to a physical quantity.
Definition at line 157 of file CaloTowerGeometry.h.
|
protected |
Maximum cell hash value.
Definition at line 132 of file CaloTowerGeometry.h.
|
protected |
Stores number of fragments along x for each FCal module.
Definition at line 169 of file CaloTowerGeometry.h.
|
protected |
Stores number of fragments along y for each FCal module.
Definition at line 170 of file CaloTowerGeometry.h.
|
protected |
|
protected |
Area of individual tower.
Definition at line 130 of file CaloTowerGeometry.h.
|
protected |
Maximum number of towers.
Definition at line 131 of file CaloTowerGeometry.h.
|
protected |
Internally stored tower grid descriptors.
Number of \( \eta \) bins
Definition at line 139 of file CaloTowerGeometry.h.
|
protected |
Upper boundary \( \eta_{\rm max} \).
Definition at line 141 of file CaloTowerGeometry.h.
|
protected |
Lower boundary \( \eta_{\rm min} \).
Definition at line 140 of file CaloTowerGeometry.h.
|
protected |
Width of tower bin in pseudorapidity.
Definition at line 128 of file CaloTowerGeometry.h.
|
protected |
Cell-to-tower mapping lookup store.
Definition at line 127 of file CaloTowerGeometry.h.
|
protected |
Number of \( \phi \) bins.
Definition at line 143 of file CaloTowerGeometry.h.
|
protected |
Upper boundary \( \phi_{\rm max} \).
Definition at line 145 of file CaloTowerGeometry.h.
|
protected |
Lower boundary \( \phi_{\rm min} \).
Definition at line 144 of file CaloTowerGeometry.h.
|
protected |
Width of tower bin in azimuth.
Definition at line 129 of file CaloTowerGeometry.h.
|
protected |