2#ifndef CALOREC_CALOTOWERGEOMETRY_H
3#define CALOREC_CALOTOWERGEOMETRY_H
11#include "CaloDetDescr/CaloDetDescrElement.h"
14#include "GaudiKernel/MsgStream.h"
44 StatusCode
access(
IdentifierHash cellHash,std::vector<index_t>& towerIdx,std::vector<double>& towerWghts)
const;
102 elementmap_t::const_iterator
begin()
const;
103 elementmap_t::const_iterator
end()
const;
177#include "AthenaKernel/CondCont.h"
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Definition of CaloDetDescrManager.
CaloPhiRange class declaration.
#define CONDCONT_DEF(...)
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
This class groups all DetDescr information related to a CaloCell.
float eta() const
cell eta
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
This class provides the client interface for accessing the detector description information common to...
static double fix(double phi)
Retrieve the list of towers associated with a calorimeter cell referenced by its hash identifier.
index_t invalidIndex() const
Returns value of invalid index.
double m_fcal3Xslice
Number of x slices for cells in FCal3.
uint_t m_towerBins
Maximum number of towers.
index_t towerIndex(IdentifierHash cellHash) const
Get global tower index for a calorimeter cell referenced by its hash identifier.
double phiWidth() const
Width of azimuth bin.
double m_fcal2Yslice
Number of y slices for cells in FCal2.
double m_fcal2Xslice
Number of x slices for cells in FCal2.
IdentifierHash::value_type index_t
Type for scalar (pseudorapidity,azimuth) index (is an unsigned int type)
friend class CaloTowerGeometryCondAlg
uint_t etaBins() const
Number of pseudorapidity bins.
static const index_t m_invalidIndex
Invalid index indicator.
double m_fcal3Yslice
Number of y slices for cells in FCal3.
elementmap_t::const_iterator begin() const
Iterator points to first entry in internal look-up table (only const access!)
uint_t m_maxCellHash
Maximum cell hash value.
double towerEtaLocal(index_t etaIndex) const
Return pseudorapdity from local index (bin center)
uint_t totalNumberCells() const
Total number of cells.
double m_towerPhiMin
Lower boundary .
uint_t m_towerPhiBins
Number of bins.
CaloTowerGeometry()=delete
bool isInvalidValue(double val) const
Return true if given value is invalid.
double phiMax() const
Upper boundary of azimuth.
std::vector< elementvector_t > elementmap_t
Type for lists of lists of elements (lookup table type)
index_t etaIndex(IdentifierHash cellHash) const
Get tower bin index for a calorimeter cell referenced by its hash identifier.
StatusCode f_setupTowerGridFCal(const CaloDetDescrElement *pCaloDDE, MsgStream &msg)
Internally used function mapping an FCal cell onto the tower grid.
double m_towerPhiMax
Upper boundary .
uint_t m_towerEtaBins
Internally stored tower grid descriptors.
bool isInvalidTowerIndex(index_t idx) const
Returns true if argument is not a valid tower index.
double towerPhiLocal(index_t phiIndex) const
Return azimuth from local index (bin center)
index_t phiIndex(IdentifierHash cellHash) const
Get tower bin index for a calorimeter cell referenced by its hash identifier.
double m_fcal1Yslice
Number of y slices for cells in FCal1.
std::size_t uint_t
Type for unsigned integer.
double m_towerPhiWidth
Width of tower bin in azimuth.
uint_t m_numberOfCells
Total number of cells.
index_t phiIndexFromTowerIndex(index_t towerIdx) const
Get tower bin index for a given global tower index.
double towerEta(index_t towerIndex) const
Return pseudorapidity from global tower index (bin center)
std::array< double, 3 > m_ndxFCal
Stores number of fragments along x for each FCal module.
const CaloDetDescrElement * f_caloDDE(IdentifierHash cellHash) const
Retrieve calorimeter detector description element for a given cell hash identifier.
double f_cellPhi(IdentifierHash cellHash) const
Retrieve calorimeter cell azimuth for a given cell hash identifier.
size_t size() const
Size of internal look-up table.
double m_towerEtaMin
Lower boundary .
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 assig...
const CaloDetDescrManager * f_caloDDM() const
Pointer to calorimeter detector description manager.
elementmap_t::const_iterator end() const
Iterator marks end of internal look-up table (only const access)
CaloTowerGeometry(const CaloDetDescrManager *caloDDM)
Standard constructor.
double etaWidth() const
Width of pseudorapidity bin.
elementmap_t m_towerLookup
Cell-to-tower mapping lookup store.
double etaMin() const
Lower boundary of pseudorapidity range.
std::array< double, 3 > m_wgtFCal
Stores geometrical weights.
const CaloDetDescrManager * m_caloDDM
Pointer to calorimeter detector description.
std::array< double, 3 > m_ndyFCal
Stores number of fragments along y for each FCal module.
uint_t towerBins() const
Total number of towers.
double etaMax() const
Upper boundary of pseudorapidity range.
StatusCode access(IdentifierHash cellHash, std::vector< index_t > &towerIdx, std::vector< double > &towerWghts) const
double cellWeight(const element_t &elm) const
Retrieve cell signal weight from lookup table entry.
bool isInvalidEtaIndex(index_t idx) const
Returns true if argument is not a valid pseudorapidity index.
std::tuple< index_t, double > element_t
Type storing tower index and geometrical weight.
uint_t phiBins() const
Number of azimuth bins.
double m_towerEtaWidth
Width of tower bin in pseudorapidity.
double m_fcal1Xslice
Number of x slices for cells in FCal1.
double m_towerArea
Area of individual tower.
StatusCode f_setupTowerGrid(MsgStream &msg)
Internally used function setting up the lookup store.
bool isInvalidPhiIndex(index_t idx) const
Returns true if argumant is not a valid azimuth index.
bool m_adjustEta
Adjust FCal cells to eta boundary (default true )
StatusCode f_setupTowerGridProj(const CaloDetDescrElement *pCaloDDE, MsgStream &msg)
Internally used function mapping a projective cell onto the tower grid.
std::vector< element_t > elementvector_t
Type for list of elements holding tower index and list of weights.
bool empty() const
Internal look-up table is empty if true.
double towerPhi(index_t towerIndex) const
Return azimuth from global tower index (bin center)
double invalidValue() const
Return invalid value.
bool isInvalidIndex(index_t idx) const
Returns true if argument is equal to the value provided by invalidIndex()
double towerArea() const
Area of individual tower.
double f_cellEta(IdentifierHash cellHash) const
Retrieve calorimeter cell pseudorapidity for a given cell hash identifier.
static const double m_invalidValue
Return value for out-of-range indices andother invalid conversions to a physical quantity.
elementvector_t getTowers(IdentifierHash cellHash) const
Retrieve the list of towers associated with a calorimeter cell referenced its hash identifier.
index_t etaIndexFromTowerIndex(index_t towerIdx) const
Get tower bin index for a given global tower index.
double m_towerEtaMax
Upper boundary .
double phiMin() const
Lower boundary of azimuth.
uint_t maxCellHash() const
Maximum cell hash value.
This is a "hash" representation of an Identifier.