ATLAS Offline Software
Public Member Functions | Friends | List of all members
CaloTowerGeometry Class Reference

Tower geometry store and description provider. More...

#include <CaloTowerGeometry.h>

Collaboration diagram for CaloTowerGeometry:

Public Types

typedef std::size_t uint_t
 Type for unsigned integer. More...
 
typedef IdentifierHash::value_type index_t
 Type for scalar (pseudorapidity,azimuth) index (is an unsigned int type) More...
 
typedef std::tuple< index_t, double > element_t
 Type storing tower index and geometrical weight. More...
 
typedef std::vector< element_telementvector_t
 Type for list of elements holding tower index and list of weights. More...
 
typedef std::vector< elementvector_telementmap_t
 Type for lists of lists of elements (lookup table type) More...
 

Public Member Functions

 CaloTowerGeometry (const CaloDetDescrManager *caloDDM)
 Standard constructor. More...
 
 CaloTowerGeometry ()=delete
 
StatusCode initialize (MsgStream &msg)
 Initialize object. More...
 
Retrieve towers for cells
StatusCode access (IdentifierHash cellHash, std::vector< index_t > &towerIdx, std::vector< double > &towerWghts) const
 Retrieve the list of towers associated with a calorimeter cell referenced its hash identifier. More...
 
elementvector_t getTowers (IdentifierHash cellHash) const
 Retrieve the list of towers associated with a calorimeter cell referenced by its hash identifier. More...
 
Tower bin descriptors and other size information
uint_t maxCellHash () const
 Maximum cell hash value. More...
 
uint_t totalNumberCells () const
 Total number of cells. More...
 
uint_t etaBins () const
 Number of pseudorapidity bins. More...
 
double etaMin () const
 Lower boundary of pseudorapidity range. More...
 
double etaMax () const
 Upper boundary of pseudorapidity range. More...
 
double etaWidth () const
 Width of pseudorapidity bin
More...
 
uint_t phiBins () const
 Number of azimuth bins. More...
 
double phiMin () const
 Lower boundary of azimuth. More...
 
double phiMax () const
 Upper boundary of azimuth. More...
 
double phiWidth () const
 Width of azimuth bin. More...
 
uint_t towerBins () const
 Total number of towers. More...
 
double towerArea () const
 Area of individual tower. More...
 
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. More...
 
index_t etaIndex (double eta) const
 Get tower \( \eta \) bin index for a given value of \( \eta \). More...
 
index_t etaIndexFromTowerIndex (index_t towerIdx) const
 Get tower \( \eta \) bin index for a given global tower index. More...
 
index_t phiIndex (IdentifierHash cellHash) const
 Get tower \( \phi \) bin index for a calorimeter cell referenced by its hash identifier. More...
 
index_t phiIndex (double phi) const
 Get tower \( \phi \) bin index for a given value of \( \phi \). More...
 
index_t phiIndexFromTowerIndex (index_t towerIdx) const
 Get tower \( \phi \) bin index for a given global tower index. More...
 
index_t towerIndex (IdentifierHash cellHash) const
 Get global tower index for a calorimeter cell referenced by its hash identifier. More...
 
index_t towerIndex (double eta, double phi) const
 Get global tower index for a pair of \( (\eta,\phi) \) values. More...
 
index_t towerIndex (index_t etaIdx, index_t phiIdx) const
 Get global tower index for a pair of \( (\eta,\phi) \) indices. More...
 
index_t towerIndex (const element_t &elm) const
 Get global tower index from payload data. More...
 
index_t invalidIndex () const
 Returns value of invalid index. More...
 
bool isInvalidIndex (index_t idx) const
 Returns true if argument is equal to the value provided by invalidIndex() More...
 
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. More...
 
bool isInvalidEtaIndex (index_t idx) const
 Returns true if argument is not a valid pseudorapidity index. More...
 
bool isInvalidPhiIndex (index_t idx) const
 Returns true if argumant is not a valid azimuth index. More...
 
bool isInvalidTowerIndex (index_t idx) const
 Returns true if argument is not a valid tower index. More...
 
Variable generators using tower indices
double towerEtaLocal (index_t etaIndex) const
 Return pseudorapdity from local index (bin center) More...
 
double towerPhiLocal (index_t phiIndex) const
 Return azimuth from local index (bin center) More...
 
double towerEta (index_t towerIndex) const
 Return pseudorapidity from global tower index (bin center) More...
 
double towerPhi (index_t towerIndex) const
 Return azimuth from global tower index (bin center) More...
 
double invalidValue () const
 Return invalid value. More...
 
bool isInvalidValue (double val) const
 Return true if given value is invalid. More...
 
Helper functions
double cellWeight (const element_t &elm) const
 Retrieve cell signal weight from lookup table entry. More...
 
double cellWeight (IdentifierHash cellHash, index_t towerIdx) const
 Retrieve cell signal weight from cell identifier and tower index. More...
 
Access to storage
elementmap_t::const_iterator begin () const
 Iterator points to first entry in internal look-up table (only const access!) More...
 
elementmap_t::const_iterator end () const
 Iterator marks end of internal look-up table (only const access)
More...
 
size_t size () const
 Size of internal look-up table. More...
 
bool empty () const
 Internal look-up table is empty if true. More...
 

Protected Attributes

Internal stores and derived parameters
elementmap_t m_towerLookup
 Cell-to-tower mapping lookup store. More...
 
double m_towerEtaWidth
 Width of tower bin in pseudorapidity. More...
 
double m_towerPhiWidth
 Width of tower bin in azimuth. More...
 
double m_towerArea
 Area of individual tower. More...
 
uint_t m_towerBins
 Maximum number of towers. More...
 
uint_t m_maxCellHash
 Maximum cell hash value. More...
 
uint_t m_numberOfCells {}
 Total number of cells. More...
 
Properties

Internally stored tower grid descriptors

uint_t m_towerEtaBins
 Number of \( \eta \) bins. More...
 
double m_towerEtaMin
 Lower boundary \( \eta_{\rm min} \). More...
 
double m_towerEtaMax
 Upper boundary \( \eta_{\rm max} \). More...
 
bool m_adjustEta
 Adjust FCal cells to eta boundary (default true ) More...
 
uint_t m_towerPhiBins
 Number of \( \phi \) bins. More...
 
double m_towerPhiMin
 Lower boundary \( \phi_{\rm min} \). More...
 
double m_towerPhiMax
 Upper boundary \( \phi_{\rm max} \). More...
 
double m_fcal1Xslice
 Number of x slices for cells in FCal1. More...
 
double m_fcal1Yslice
 Number of y slices for cells in FCal1. More...
 
double m_fcal2Xslice
 Number of x slices for cells in FCal2. More...
 
double m_fcal2Yslice
 Number of y slices for cells in FCal2. More...
 
double m_fcal3Xslice
 Number of x slices for cells in FCal3. More...
 
double m_fcal3Yslice
 Number of y slices for cells in FCal3. More...
 
Stores
std::array< double, 3 > m_ndxFCal {}
 Stores number of fragments along x for each FCal module. More...
 
std::array< double, 3 > m_ndyFCal {}
 Stores number of fragments along y for each FCal module. More...
 
std::array< double, 3 > m_wgtFCal {}
 Stores geometrical weights. More...
 

Private Member Functions

Helpers
StatusCode f_setupTowerGrid (MsgStream &msg)
 Internally used function setting up the lookup store. More...
 
StatusCode f_setupTowerGridFCal (const CaloDetDescrElement *pCaloDDE, MsgStream &msg)
 Internally used function mapping an FCal cell onto the tower grid. More...
 
StatusCode f_setupTowerGridProj (const CaloDetDescrElement *pCaloDDE, MsgStream &msg)
 Internally used function mapping a projective cell onto the tower grid. More...
 
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. More...
 

Private Attributes

Access to detector store and other services and stores
const CaloDetDescrManagerm_caloDDM
 Pointer to calorimeter detector description. More...
 

Friends

class CaloTowerGeometryCondAlg
 

Process flags, helpers and numerical constants

static const index_t m_invalidIndex = index_t(-1)
 Invalid index indicator. More...
 
static const double m_invalidValue = -999.
 Return value for out-of-range indices andother invalid conversions to a physical quantity. More...
 
const CaloDetDescrManagerf_caloDDM () const
 Pointer to calorimeter detector description manager. More...
 
const CaloDetDescrElementf_caloDDE (IdentifierHash cellHash) const
 Retrieve calorimeter detector description element for a given cell hash identifier. More...
 
double f_cellEta (IdentifierHash cellHash) const
 Retrieve calorimeter cell pseudorapidity for a given cell hash identifier. More...
 
double f_cellPhi (IdentifierHash cellHash) const
 Retrieve calorimeter cell azimuth for a given cell hash identifier. More...
 

Detailed Description

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.

Warning
It is recommended to not change the parameters for the FCal cell slicing. This configuration option is provided for expert use for R & D purposes only.
Todo:
Allow regional grids (varying segmentation as function of \( \eta \) . This requires additional interfaces (or interface changes) and and modifications of the index construction.
Author
Peter Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u

Definition at line 23 of file CaloTowerGeometry.h.

Member Typedef Documentation

◆ element_t

typedef std::tuple<index_t,double> CaloTowerGeometry::element_t

Type storing tower index and geometrical weight.

Definition at line 28 of file CaloTowerGeometry.h.

◆ elementmap_t

Type for lists of lists of elements (lookup table type)

Definition at line 30 of file CaloTowerGeometry.h.

◆ elementvector_t

Type for list of elements holding tower index and list of weights.

Definition at line 29 of file CaloTowerGeometry.h.

◆ index_t

Type for scalar (pseudorapidity,azimuth) index (is an unsigned int type)

Definition at line 27 of file CaloTowerGeometry.h.

◆ uint_t

typedef std::size_t CaloTowerGeometry::uint_t

Type for unsigned integer.

Definition at line 26 of file CaloTowerGeometry.h.

Constructor & Destructor Documentation

◆ CaloTowerGeometry() [1/2]

CaloTowerGeometry::CaloTowerGeometry ( const CaloDetDescrManager caloDDM)

Standard constructor.

Definition at line 9 of file CaloTowerGeometry.cxx.

9  :
10  m_caloDDM(caloDDM)
11  , m_towerEtaWidth(0.)
12  , m_towerPhiWidth(0.)
13  , m_towerArea(0.)
14  , m_towerBins(0)
15  , m_maxCellHash(0) //----------------------------------------//
16  , m_towerEtaBins(100) // Default tower definition is "hadronic" //
17  , m_towerEtaMin(-5.0) // towers of size 0.1 x pi/32. //
18  , m_towerEtaMax(5.0) //----------------------------------------//
19  , m_adjustEta(true)
20  , m_towerPhiBins(64)
21  , m_towerPhiMin(-pi) //----------------------------------------//
22  , m_towerPhiMax(pi) // FCal vertical and horizontal cell //
23  , m_fcal1Xslice(8.) // slicing creates "mini-cells" which are //
24  , m_fcal1Yslice(8.) // then projected onto towers. The mini- //
25  , m_fcal2Xslice(8.) // cell signal is 1/(Nx x Ny) x Ecell, //
26  , m_fcal2Yslice(12.) // where Nx(y) are the number of x(y) //
27  , m_fcal3Xslice(12.) // slices. //
28  , m_fcal3Yslice(12.) //----------------------------------------//
29 {}

◆ CaloTowerGeometry() [2/2]

CaloTowerGeometry::CaloTowerGeometry ( )
delete

Member Function Documentation

◆ access()

StatusCode CaloTowerGeometry::access ( IdentifierHash  cellHash,
std::vector< index_t > &  towerIdx,
std::vector< double > &  towerWghts 
) 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.

Returns
Returns StatusCode::SUCCESS if list of towers found, else @s StatusCode::FAILURE.
Parameters
[in]cellHashhash identifier referencing a calorimeter cell.
[in]towerIdxreference to modifiable vector of indices (payload type index_t ); vector is filled if cell is successfully mapped.
[in]towerWghtsreference to modifiable vector of weights (payload type double ); vector is filled if cell is successfully mapped.

Definition at line 234 of file CaloTowerGeometry.cxx.

235 {
236  towerIdx.clear();
237  towerWghts.clear();
238 
239  uint_t cidx(static_cast<uint_t>(cellHash));
240 
241  if ( cidx >= m_towerLookup.size() ) {
242  //ATH_MSG_WARNING("Invalid cell hash index " << cellHash << ", corresponding index " << cidx << " not found in tower lookup");
243  return StatusCode::SUCCESS;
244  }
245 
246  if ( towerIdx.capacity() < m_towerLookup.at(cidx).size() ) { towerIdx.reserve(m_towerLookup.at(cidx).size()); }
247  if ( towerWghts.capacity() < m_towerLookup.at(cidx).size() ) { towerWghts.reserve(m_towerLookup.at(cidx).size()); }
248 
249  for ( const auto& elm : m_towerLookup.at(cidx) ) { towerIdx.push_back(towerIndex(elm)); towerWghts.push_back(cellWeight(elm)); }
250 
251  return StatusCode::SUCCESS;
252 }

◆ begin()

CaloTowerGeometry::elementmap_t::const_iterator CaloTowerGeometry::begin ( ) const
inline

Iterator points to first entry in internal look-up table (only const access!)

Definition at line 329 of file CaloTowerGeometry.h.

329 { return m_towerLookup.begin(); }

◆ cellWeight() [1/2]

double CaloTowerGeometry::cellWeight ( const element_t elm) const
inline

Retrieve cell signal weight from lookup table entry.

Definition at line 337 of file CaloTowerGeometry.h.

337 { return std::get<1>(elm); }

◆ cellWeight() [2/2]

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.

271 {
272  index_t cidx(static_cast<uint_t>(cellHash));
273  double cwght(0.);
274 
275  if ( cidx < m_towerLookup.size() ) {
276  for ( auto elm : m_towerLookup.at(cidx) ) {
277  if ( towerIndex(elm) == towerIdx ) { cwght = cellWeight(elm); break; }
278  }
279  }
280  return cwght;
281 }

◆ empty()

bool CaloTowerGeometry::empty ( ) const
inline

Internal look-up table is empty if true.

Definition at line 332 of file CaloTowerGeometry.h.

332 { return m_towerLookup.empty(); }

◆ end()

CaloTowerGeometry::elementmap_t::const_iterator CaloTowerGeometry::end ( ) const
inline

Iterator marks end of internal look-up table (only const access)

Definition at line 330 of file CaloTowerGeometry.h.

330 { return m_towerLookup.end(); }

◆ etaBins()

CaloTowerGeometry::uint_t CaloTowerGeometry::etaBins ( ) const
inline

Number of pseudorapidity bins.

Definition at line 283 of file CaloTowerGeometry.h.

283 { return m_towerEtaBins; }

◆ etaIndex() [1/2]

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.

294 {
295  return eta >= m_towerEtaMin && eta <= m_towerEtaMax
297  : invalidIndex();
298 }

◆ etaIndex() [2/2]

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.

288 {
289  const auto *const cdde = f_caloDDE(cellHash);
290  return cdde != nullptr ? etaIndex(cdde->eta()) : invalidIndex();
291 }

◆ etaIndexFromTowerIndex()

CaloTowerGeometry::index_t CaloTowerGeometry::etaIndexFromTowerIndex ( index_t  towerIdx) const
inline

Get tower \( \eta \) bin index for a given global tower index.

Definition at line 315 of file CaloTowerGeometry.h.

315 { return (index_t)(towerIdx/phiBins()); }

◆ etaMax()

double CaloTowerGeometry::etaMax ( ) const
inline

Upper boundary of pseudorapidity range.

Definition at line 285 of file CaloTowerGeometry.h.

285 { return m_towerEtaMax; }

◆ etaMin()

double CaloTowerGeometry::etaMin ( ) const
inline

Lower boundary of pseudorapidity range.

Definition at line 284 of file CaloTowerGeometry.h.

284 { return m_towerEtaMin; }

◆ etaWidth()

double CaloTowerGeometry::etaWidth ( ) const
inline

Width of pseudorapidity bin

Definition at line 286 of file CaloTowerGeometry.h.

286 { return m_towerEtaWidth; }

◆ f_assign()

double CaloTowerGeometry::f_assign ( IdentifierHash  cellHash,
index_t  towerIdx,
double  wgt 
)
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.

219 {
220  // check if cell-tower already related
221  uint_t cidx(static_cast<uint_t>(cellHash));
222  for ( element_t& elm : m_towerLookup.at(cidx) ) {
223  if ( towerIndex(elm) == towerIdx ) { std::get<1>(elm) += wght; return cellWeight(elm); }
224  }
225  // not yet related
226  m_towerLookup[cidx].emplace_back(towerIdx,wght);
227  return cellWeight(m_towerLookup.at(cidx).back());
228 }

◆ f_caloDDE()

const CaloDetDescrElement * CaloTowerGeometry::f_caloDDE ( IdentifierHash  cellHash) const
inlineprotected

Retrieve calorimeter detector description element for a given cell hash identifier.

Definition at line 344 of file CaloTowerGeometry.h.

344 { return f_caloDDM()->get_element(cellHash); }

◆ f_caloDDM()

const CaloDetDescrManager * CaloTowerGeometry::f_caloDDM ( ) const
inlineprotected

Pointer to calorimeter detector description manager.

Definition at line 343 of file CaloTowerGeometry.h.

343 { return m_caloDDM; }

◆ f_cellEta()

double CaloTowerGeometry::f_cellEta ( IdentifierHash  cellHash) const
inlineprotected

Retrieve calorimeter cell pseudorapidity for a given cell hash identifier.

Definition at line 346 of file CaloTowerGeometry.h.

346 { return f_caloDDE(cellHash)->eta(); }

◆ f_cellPhi()

double CaloTowerGeometry::f_cellPhi ( IdentifierHash  cellHash) const
inlineprotected

Retrieve calorimeter cell azimuth for a given cell hash identifier.

Definition at line 347 of file CaloTowerGeometry.h.

347 { return CaloPhiRange::fix(f_caloDDE(cellHash)->phi()); }

◆ f_setupTowerGrid()

StatusCode CaloTowerGeometry::f_setupTowerGrid ( MsgStream &  msg)
private

Internally used function setting up the lookup store.

Definition at line 61 of file CaloTowerGeometry.cxx.

62 {
63  // initialized
64  if ( m_maxCellHash == 0 ) {
65  msg << "Service not initialized? Maximum cell hash is " << m_maxCellHash << endmsg;
66  return StatusCode::FAILURE;
67  }
68 
69  // payload template
71 
72  // set up lookup table
73  msg << "Setting up cell-to-tower lookup for " << m_numberOfCells << " calorimeter cells" << endmsg;
75 
76  // loop cells
77  for ( auto fcell(m_caloDDM->element_begin()); fcell != m_caloDDM->element_end(); ++fcell ) {
78  // reference cell descriptor
79  const CaloDetDescrElement* pCaloDDE = *fcell;
80  // check hash id validity
81  index_t cidx(pCaloDDE->calo_hash());
82  if ( cidx >= m_towerLookup.size() ) {
83  msg << MSG::WARNING << "Cell hash identifier out of range " << cidx << "/" << m_towerLookup.size() << ", ignore cell" << endmsg;
84  } else {
85  if ( pCaloDDE->is_lar_fcal() ) {
86  if ( this->f_setupTowerGridFCal(pCaloDDE,msg).isFailure() ) { return StatusCode::FAILURE; }
87  } else {
88  if ( this->f_setupTowerGridProj(pCaloDDE,msg).isFailure() ) { return StatusCode::FAILURE; }
89  }
90  } // cell hash in range?
91  } // loop cell descriptors
92 
93  return StatusCode::SUCCESS;
94 }

◆ f_setupTowerGridFCal()

StatusCode CaloTowerGeometry::f_setupTowerGridFCal ( const CaloDetDescrElement pCaloDDE,
MsgStream &  msg 
)
private

Internally used function mapping an FCal cell onto the tower grid.

Definition at line 96 of file CaloTowerGeometry.cxx.

97 {
98  //-----------------------------------------------------------------------------------------//
99  // FCal special - the rectangular (in linear space) calorimeter cells are sub-divided into //
100  // small cells and then shared across as many towers as the small cells cover. //
101  //-----------------------------------------------------------------------------------------//
102 
103  // collect geometrical variables
104  int cLayer(pCaloDDE->getLayer()-1); // FCal layer number 1..3 -> array indices 0..2
105 
106  double cXpos(pCaloDDE->x_raw()); // FCal cell x position (cell center)
107  double cYpos(pCaloDDE->y_raw()); // FCal cell y position (cell center)
108  double cZpos(pCaloDDE->z_raw()); // FCal cell z position (cell center)
109  double cZpos2(cZpos*cZpos);
110 
111  double cXwid(pCaloDDE->dx()); // FCal cell x full width
112  double cYwid(pCaloDDE->dy()); // FCal cell y full width
113 
114  // double xSlice(cXwid/m_ndxFCal[cLayer]); // FCal cell x slize width
115  // double ySlice(cYwid/m_ndyFCal[cLayer]); // FCal cell y slice width
116  double cWght(m_wgtFCal[cLayer]); // FCal cell geometrical (signal) weight
117 
118  int nXslice((int)m_ndxFCal[cLayer]); // FCal number of x slices
119  int nYslice((int)m_ndyFCal[cLayer]); // FCal number of y slices
120  double cXstp(cXwid/((double)nXslice)); // FCal slice x width
121  double cYstp(cYwid/((double)nYslice)); // FCal slice y width
122 
123  // fill cell fragments
124  // double xoff(cXpos-cXwid/2.+cXstp/2.); double yoff(cYpos-cYwid/2.+cYstp/2.);
125  double x(cXpos-(cXwid-cXstp)/2.);
126  double xlim(cXpos+cXwid/2.); double ylim(cYpos+cYwid/2.);
127  double etaOrig(0.);
128  // for ( int ix(0); ix < nXslice; ++ix ) {
129  // double x(xoff+ix*cXstp);
130  while ( x < xlim ) {
131  // for ( int iy(0); iy < nYslice; ++iy ) {
132  // double y(yoff+iy*cYstp);
133  double y(cYpos-(cYwid-cYstp)/2.);
134  while ( y < ylim ) {
135  double r(std::sqrt(x*x+y*y+cZpos2));
136  double eta(-0.5*std::log((r-cZpos)/(r+cZpos)));
137  bool etaAdjusted(false);
138  if ( m_adjustEta ) {
139  if ( eta < m_towerEtaMin ) {
140  etaAdjusted = true;
141  etaOrig = eta;
143  } else if ( eta > m_towerEtaMax ) {
144  etaAdjusted = true;
145  etaOrig = eta;
147  }
148  }
149  double phi(CaloPhiRange::fix(std::atan2(y,x)));
150  index_t towerIdx(this->towerIndex(eta,phi));
151  // tower index not valid
152  if ( isInvalidIndex(towerIdx) ) {
153  msg << MSG::WARNING << "Found invalid tower index for FCal cell (eta,phi) = (" << eta << "," << phi << ") at (x,y,z) = ("
154  << x << "," << y << "," << cZpos << ") [cell ignored]" << endmsg;
155  } else {
156  // add tower to lookup
157  if ( etaAdjusted ) {
158  msg << MSG::WARNING << "FCal cell direction (eta,phi) = (" << etaOrig << "," << phi << ") for cell at (x,y,z) = ("
159  << x << "," << y << "," << cZpos << ") adjusted to (eta,phi) = (" << eta << "," << phi << ") [cell adjusted]" << endmsg;
160  }
161  f_assign(pCaloDDE->calo_hash(),towerIdx,cWght);
162  } // tower index ok
163  y += cYstp;
164  } // loop on y fragments
165  x += cXstp;
166  } // loop on x fragments
167  return StatusCode::SUCCESS;
168 }

◆ f_setupTowerGridProj()

StatusCode CaloTowerGeometry::f_setupTowerGridProj ( const CaloDetDescrElement pCaloDDE,
MsgStream &  msg 
)
private

Internally used function mapping a projective cell onto the tower grid.

Definition at line 170 of file CaloTowerGeometry.cxx.

171 {
172  // projective readout calos - collect geometrical variables
173  double cEtaPos(pCaloDDE->eta_raw()); // projective cell center in pseudorapidity
174  double cEtaWid(pCaloDDE->deta()); // projective cell width in pseudorapidity
175  double cPhiPos(pCaloDDE->phi_raw()); // projective cell center in azimuth
176  double cPhiWid(pCaloDDE->dphi()); // projective cell width in azimuth
177 
178  // check cell-tower overlap area fractions
179  uint_t kEta(static_cast<uint_t>(cEtaWid/m_towerEtaWidth+0.5)); kEta = kEta == 0 ? 1 : kEta; // fully contained cell may have 0 fragments (protection)
180  uint_t kPhi(static_cast<uint_t>(cPhiWid/m_towerPhiWidth+0.5)); kPhi = kPhi == 0 ? 1 : kPhi;
181 
182  // print out
183  if ( kEta > 1 || kPhi > 1 ) {
184  msg << MSG::VERBOSE << "Found cell [" << pCaloDDE->calo_hash() << "/0x" << std::hex << pCaloDDE->identify().get_compact()
185  << std::dec << "] spawning several towers."
186  << " Neta = " << kEta << ", Nphi = " << kPhi << endmsg;
187  }
188 
189  // share cells
190  double cWght(1./((double)kEta*kPhi)); // area weight
191  double sEta(cEtaWid/((double)kEta)); // step size (pseudorapidity)
192  double sPhi(cPhiWid/((double)kPhi)); // step size (azimuth)
193  double oEta(cEtaPos-sEta/2.); // offset (pseudorapidity)
194  double oPhi(cPhiPos-sPhi/2.); // offset (azimuth)
195 
196  // loop over cell fragments
197  for ( uint_t ie(1); ie<=kEta; ++ie ) {
198  double ceta(oEta+((double)ie-0.5)*sEta); // eta of fragment
199  for ( uint_t ip(1); ip<=kPhi; ++ip ) {
200  double cphi(oPhi+((double)ip-0.5)*sPhi); // phi fragment
201  // tower index
202  index_t towerIdx(this->towerIndex(ceta,cphi));
203  if ( isInvalidIndex(towerIdx) ) {
204  msg << MSG::ERROR << "Found invalid tower index for non-FCal cell (id,eta,phi) = (" << pCaloDDE->calo_hash()
205  << "," << ceta << "," << cphi << ")" << endmsg;
206  return StatusCode::FAILURE;
207  } // invalid tower index
208  f_assign(pCaloDDE->calo_hash(),towerIdx,cWght);
209  } // phi fragment loop
210  } // eta fragment loop
211  return StatusCode::SUCCESS;
212 }

◆ getTowers()

CaloTowerGeometry::elementvector_t CaloTowerGeometry::getTowers ( IdentifierHash  cellHash) const

Retrieve the list of towers associated with a calorimeter cell referenced by its hash identifier.

Returns
Returns a vector of (index,weight) pairs as a elementvector_t container. The container is empty if the cell does not have any overlap with a tower.
Parameters
[in]cellHashhash identifier referencing a calorimeter cell.

Definition at line 254 of file CaloTowerGeometry.cxx.

255 {
256  // check input
257  uint_t cidx(static_cast<uint_t>(cellHash));
258  if ( cidx >= m_towerLookup.size() ) {
259  //ATH_MSG_WARNING( CaloRec::Helpers::fmtMsg("invalid cell hash %6zu beyond range (max hash is %6zu)",cidx,m_maxCellHash) );
260  return {};
261  } else {
262  return m_towerLookup.at(cidx);
263  }
264 }

◆ initialize()

StatusCode CaloTowerGeometry::initialize ( MsgStream &  msg)

Initialize object.

Definition at line 32 of file CaloTowerGeometry.cxx.

33 {
34  // prepare FCal segmentation
37  for ( uint_t i(0); i<m_ndxFCal.size(); ++i ) { m_wgtFCal[i] = 1./(m_ndxFCal.at(i)*m_ndyFCal.at(i)); }
38 
39  // other derived quantities
40  if ( m_towerEtaBins > 0 ) {
42  } else {
43  msg << MSG::ERROR << "Number of tower eta bins is invalid (" << m_towerEtaBins << " bins)" << endmsg;
44  return StatusCode::FAILURE;
45  }
46  if ( m_towerPhiBins > 0 ) {
48  } else {
49  msg << MSG::ERROR << "Number of tower phi bins is invalid (" << m_towerPhiBins << " bins)" << endmsg;
50  return StatusCode::FAILURE;
51  }
52 
57 
58  return f_setupTowerGrid(msg);
59 }

◆ invalidIndex()

CaloTowerGeometry::index_t CaloTowerGeometry::invalidIndex ( ) const
inline

Returns value of invalid index.

Definition at line 275 of file CaloTowerGeometry.h.

275 { return m_invalidIndex; }

◆ invalidValue()

double CaloTowerGeometry::invalidValue ( ) const
inline

Return invalid value.

Definition at line 322 of file CaloTowerGeometry.h.

322 { return m_invalidValue; }

◆ isInvalidEtaIndex()

bool CaloTowerGeometry::isInvalidEtaIndex ( index_t  idx) const
inline

Returns true if argument is not a valid pseudorapidity index.

Definition at line 301 of file CaloTowerGeometry.h.

301 { return isInvalidIndex(idx,m_towerEtaBins); }

◆ isInvalidIndex() [1/2]

bool CaloTowerGeometry::isInvalidIndex ( index_t  idx) const
inline

Returns true if argument is equal to the value provided by invalidIndex()

Definition at line 299 of file CaloTowerGeometry.h.

299 { return idx == invalidIndex(); }

◆ isInvalidIndex() [2/2]

bool CaloTowerGeometry::isInvalidIndex ( index_t  idx,
index_t  maxIdx 
) const
inline

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.

300 { return idx == invalidIndex() || idx >= maxIdx; }

◆ isInvalidPhiIndex()

bool CaloTowerGeometry::isInvalidPhiIndex ( index_t  idx) const
inline

Returns true if argumant is not a valid azimuth index.

Definition at line 302 of file CaloTowerGeometry.h.

302 { return isInvalidIndex(idx,m_towerPhiBins); }

◆ isInvalidTowerIndex()

bool CaloTowerGeometry::isInvalidTowerIndex ( index_t  idx) const
inline

Returns true if argument is not a valid tower index.

Definition at line 303 of file CaloTowerGeometry.h.

303 { return isInvalidIndex(idx,m_towerBins); }

◆ isInvalidValue()

bool CaloTowerGeometry::isInvalidValue ( double  val) const
inline

Return true if given value is invalid.

Definition at line 323 of file CaloTowerGeometry.h.

323 { return val == invalidValue(); }

◆ maxCellHash()

CaloTowerGeometry::uint_t CaloTowerGeometry::maxCellHash ( ) const
inline

Maximum cell hash value.

Definition at line 280 of file CaloTowerGeometry.h.

280 { return m_maxCellHash; }

◆ phiBins()

CaloTowerGeometry::uint_t CaloTowerGeometry::phiBins ( ) const
inline

Number of azimuth bins.

Definition at line 288 of file CaloTowerGeometry.h.

288 { return m_towerPhiBins; }

◆ phiIndex() [1/2]

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.

307 {
308  double dphi(CaloPhiRange::diff(phi,m_towerPhiMin));
309  return dphi >= m_towerPhiMin && dphi <= m_towerPhiMax
311  : invalidIndex();
312 }

◆ phiIndex() [2/2]

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.

301 {
302  const auto *const cdde = f_caloDDE(cellHash);
303  return cdde != nullptr ? phiIndex(cdde->phi()) : invalidIndex();
304 }

◆ phiIndexFromTowerIndex()

CaloTowerGeometry::index_t CaloTowerGeometry::phiIndexFromTowerIndex ( index_t  towerIdx) const
inline

Get tower \( \phi \) bin index for a given global tower index.

Definition at line 316 of file CaloTowerGeometry.h.

316 { return (index_t)(towerIdx%phiBins()); }

◆ phiMax()

double CaloTowerGeometry::phiMax ( ) const
inline

Upper boundary of azimuth.

Definition at line 290 of file CaloTowerGeometry.h.

290 { return m_towerPhiMax; }

◆ phiMin()

double CaloTowerGeometry::phiMin ( ) const
inline

Lower boundary of azimuth.

Definition at line 289 of file CaloTowerGeometry.h.

289 { return m_towerPhiMin; }

◆ phiWidth()

double CaloTowerGeometry::phiWidth ( ) const
inline

Width of azimuth bin.

Definition at line 291 of file CaloTowerGeometry.h.

291 { return m_towerPhiWidth; }

◆ size()

size_t CaloTowerGeometry::size ( ) const
inline

Size of internal look-up table.

Definition at line 331 of file CaloTowerGeometry.h.

331 { return m_towerLookup.size(); }

◆ totalNumberCells()

CaloTowerGeometry::uint_t CaloTowerGeometry::totalNumberCells ( ) const
inline

Total number of cells.

Definition at line 281 of file CaloTowerGeometry.h.

281 { return m_numberOfCells; }

◆ towerArea()

double CaloTowerGeometry::towerArea ( ) const
inline

Area of individual tower.

Definition at line 294 of file CaloTowerGeometry.h.

294 { return m_towerArea; }

◆ towerBins()

CaloTowerGeometry::uint_t CaloTowerGeometry::towerBins ( ) const
inline

Total number of towers.

Definition at line 293 of file CaloTowerGeometry.h.

293 { return m_towerBins; }

◆ towerEta()

double CaloTowerGeometry::towerEta ( index_t  towerIndex) const
inline

Return pseudorapidity from global tower index (bin center)

Definition at line 326 of file CaloTowerGeometry.h.

326 { return towerEtaLocal(etaIndexFromTowerIndex(towerIdx)); }

◆ towerEtaLocal()

double CaloTowerGeometry::towerEtaLocal ( index_t  etaIndex) const
inline

Return pseudorapdity from local index (bin center)

Definition at line 324 of file CaloTowerGeometry.h.

324 { return !isInvalidEtaIndex(etaIdx) ? etaMin()+(static_cast<double>(etaIdx)+0.5)*etaWidth() : invalidValue(); }

◆ towerIndex() [1/4]

CaloTowerGeometry::index_t CaloTowerGeometry::towerIndex ( const element_t elm) const
inline

Get global tower index from payload data.

Definition at line 313 of file CaloTowerGeometry.h.

313 { return std::get<0>(elm); }

◆ towerIndex() [2/4]

CaloTowerGeometry::index_t CaloTowerGeometry::towerIndex ( double  eta,
double  phi 
) const
inline

Get global tower index for a pair of \( (\eta,\phi) \) values.

Definition at line 310 of file CaloTowerGeometry.h.

310 { return towerIndex(etaIndex(eta),phiIndex(phi)); }

◆ towerIndex() [3/4]

CaloTowerGeometry::index_t CaloTowerGeometry::towerIndex ( IdentifierHash  cellHash) const
inline

Get global tower index for a calorimeter cell referenced by its hash identifier.

Definition at line 309 of file CaloTowerGeometry.h.

◆ towerIndex() [4/4]

CaloTowerGeometry::index_t CaloTowerGeometry::towerIndex ( index_t  etaIdx,
index_t  phiIdx 
) const
inline

Get global tower index for a pair of \( (\eta,\phi) \) indices.

Definition at line 311 of file CaloTowerGeometry.h.

311 { return !isInvalidEtaIndex(etaIdx) && !isInvalidPhiIndex(phiIdx) ? phiIdx+etaIdx*m_towerPhiBins : invalidIndex(); }

◆ towerPhi()

double CaloTowerGeometry::towerPhi ( index_t  towerIndex) const
inline

Return azimuth from global tower index (bin center)

Definition at line 327 of file CaloTowerGeometry.h.

327 { return towerPhiLocal(phiIndexFromTowerIndex(towerIdx)); }

◆ towerPhiLocal()

double CaloTowerGeometry::towerPhiLocal ( index_t  phiIndex) const
inline

Return azimuth from local index (bin center)

Definition at line 325 of file CaloTowerGeometry.h.

325 { return !isInvalidPhiIndex(phiIdx) ? phiMin()+(static_cast<double>(phiIdx)+0.5)*phiWidth() : invalidValue(); }

Friends And Related Function Documentation

◆ CaloTowerGeometryCondAlg

friend class CaloTowerGeometryCondAlg
friend

Definition at line 33 of file CaloTowerGeometry.h.

Member Data Documentation

◆ m_adjustEta

bool CaloTowerGeometry::m_adjustEta
protected

Adjust FCal cells to eta boundary (default true )

Definition at line 142 of file CaloTowerGeometry.h.

◆ m_caloDDM

const CaloDetDescrManager* CaloTowerGeometry::m_caloDDM
private

Pointer to calorimeter detector description.

Definition at line 120 of file CaloTowerGeometry.h.

◆ m_fcal1Xslice

double CaloTowerGeometry::m_fcal1Xslice
protected

Number of x slices for cells in FCal1.

Definition at line 146 of file CaloTowerGeometry.h.

◆ m_fcal1Yslice

double CaloTowerGeometry::m_fcal1Yslice
protected

Number of y slices for cells in FCal1.

Definition at line 147 of file CaloTowerGeometry.h.

◆ m_fcal2Xslice

double CaloTowerGeometry::m_fcal2Xslice
protected

Number of x slices for cells in FCal2.

Definition at line 148 of file CaloTowerGeometry.h.

◆ m_fcal2Yslice

double CaloTowerGeometry::m_fcal2Yslice
protected

Number of y slices for cells in FCal2.

Definition at line 149 of file CaloTowerGeometry.h.

◆ m_fcal3Xslice

double CaloTowerGeometry::m_fcal3Xslice
protected

Number of x slices for cells in FCal3.

Definition at line 150 of file CaloTowerGeometry.h.

◆ m_fcal3Yslice

double CaloTowerGeometry::m_fcal3Yslice
protected

Number of y slices for cells in FCal3.

Definition at line 151 of file CaloTowerGeometry.h.

◆ m_invalidIndex

const CaloTowerGeometry::index_t CaloTowerGeometry::m_invalidIndex = index_t(-1)
staticprotected

Invalid index indicator.

Definition at line 156 of file CaloTowerGeometry.h.

◆ m_invalidValue

const double CaloTowerGeometry::m_invalidValue = -999.
staticprotected

Return value for out-of-range indices andother invalid conversions to a physical quantity.

Definition at line 157 of file CaloTowerGeometry.h.

◆ m_maxCellHash

uint_t CaloTowerGeometry::m_maxCellHash
protected

Maximum cell hash value.

Definition at line 132 of file CaloTowerGeometry.h.

◆ m_ndxFCal

std::array<double,3> CaloTowerGeometry::m_ndxFCal {}
protected

Stores number of fragments along x for each FCal module.

Definition at line 169 of file CaloTowerGeometry.h.

◆ m_ndyFCal

std::array<double,3> CaloTowerGeometry::m_ndyFCal {}
protected

Stores number of fragments along y for each FCal module.

Definition at line 170 of file CaloTowerGeometry.h.

◆ m_numberOfCells

uint_t CaloTowerGeometry::m_numberOfCells {}
protected

Total number of cells.

Definition at line 133 of file CaloTowerGeometry.h.

◆ m_towerArea

double CaloTowerGeometry::m_towerArea
protected

Area of individual tower.

Definition at line 130 of file CaloTowerGeometry.h.

◆ m_towerBins

uint_t CaloTowerGeometry::m_towerBins
protected

Maximum number of towers.

Definition at line 131 of file CaloTowerGeometry.h.

◆ m_towerEtaBins

uint_t CaloTowerGeometry::m_towerEtaBins
protected

Number of \( \eta \) bins.

Definition at line 139 of file CaloTowerGeometry.h.

◆ m_towerEtaMax

double CaloTowerGeometry::m_towerEtaMax
protected

Upper boundary \( \eta_{\rm max} \).

Definition at line 141 of file CaloTowerGeometry.h.

◆ m_towerEtaMin

double CaloTowerGeometry::m_towerEtaMin
protected

Lower boundary \( \eta_{\rm min} \).

Definition at line 140 of file CaloTowerGeometry.h.

◆ m_towerEtaWidth

double CaloTowerGeometry::m_towerEtaWidth
protected

Width of tower bin in pseudorapidity.

Definition at line 128 of file CaloTowerGeometry.h.

◆ m_towerLookup

elementmap_t CaloTowerGeometry::m_towerLookup
protected

Cell-to-tower mapping lookup store.

Definition at line 127 of file CaloTowerGeometry.h.

◆ m_towerPhiBins

uint_t CaloTowerGeometry::m_towerPhiBins
protected

Number of \( \phi \) bins.

Definition at line 143 of file CaloTowerGeometry.h.

◆ m_towerPhiMax

double CaloTowerGeometry::m_towerPhiMax
protected

Upper boundary \( \phi_{\rm max} \).

Definition at line 145 of file CaloTowerGeometry.h.

◆ m_towerPhiMin

double CaloTowerGeometry::m_towerPhiMin
protected

Lower boundary \( \phi_{\rm min} \).

Definition at line 144 of file CaloTowerGeometry.h.

◆ m_towerPhiWidth

double CaloTowerGeometry::m_towerPhiWidth
protected

Width of tower bin in azimuth.

Definition at line 129 of file CaloTowerGeometry.h.

◆ m_wgtFCal

std::array<double,3> CaloTowerGeometry::m_wgtFCal {}
protected

Stores geometrical weights.

Definition at line 171 of file CaloTowerGeometry.h.


The documentation for this class was generated from the following files:
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
CaloTowerGeometry::m_fcal2Yslice
double m_fcal2Yslice
Number of y slices for cells in FCal2.
Definition: CaloTowerGeometry.h:149
beamspotman.r
def r
Definition: beamspotman.py:676
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CaloDetDescrManager_Base::element_end
calo_element_const_iterator element_end() const
end of element vector
Definition: CaloDetDescrManager.cxx:117
CaloTowerGeometry::towerPhiLocal
double towerPhiLocal(index_t phiIndex) const
Return azimuth from local index (bin center)
Definition: CaloTowerGeometry.h:325
CaloTowerGeometry::isInvalidEtaIndex
bool isInvalidEtaIndex(index_t idx) const
Returns true if argument is not a valid pseudorapidity index.
Definition: CaloTowerGeometry.h:301
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
CaloTowerGeometry::etaWidth
double etaWidth() const
Width of pseudorapidity bin
Definition: CaloTowerGeometry.h:286
CaloTowerGeometry::m_towerEtaWidth
double m_towerEtaWidth
Width of tower bin in pseudorapidity.
Definition: CaloTowerGeometry.h:128
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
CaloTowerGeometry::index_t
IdentifierHash::value_type index_t
Type for scalar (pseudorapidity,azimuth) index (is an unsigned int type)
Definition: CaloTowerGeometry.h:27
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloTowerGeometry::m_fcal1Yslice
double m_fcal1Yslice
Number of y slices for cells in FCal1.
Definition: CaloTowerGeometry.h:147
CaloTowerGeometry::elementvector_t
std::vector< element_t > elementvector_t
Type for list of elements holding tower index and list of weights.
Definition: CaloTowerGeometry.h:29
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
CaloTowerGeometry::phiBins
uint_t phiBins() const
Number of azimuth bins.
Definition: CaloTowerGeometry.h:288
Identifier::get_compact
value_type get_compact() const
Get the compact id.
CaloTowerGeometry::isInvalidPhiIndex
bool isInvalidPhiIndex(index_t idx) const
Returns true if argumant is not a valid azimuth index.
Definition: CaloTowerGeometry.h:302
CaloTowerGeometry::f_setupTowerGridProj
StatusCode f_setupTowerGridProj(const CaloDetDescrElement *pCaloDDE, MsgStream &msg)
Internally used function mapping a projective cell onto the tower grid.
Definition: CaloTowerGeometry.cxx:170
CaloTowerGeometry::m_caloDDM
const CaloDetDescrManager * m_caloDDM
Pointer to calorimeter detector description.
Definition: CaloTowerGeometry.h:120
CaloTowerGeometry::m_towerEtaMax
double m_towerEtaMax
Upper boundary .
Definition: CaloTowerGeometry.h:141
CaloTowerGeometry::phiMin
double phiMin() const
Lower boundary of azimuth.
Definition: CaloTowerGeometry.h:289
CaloTowerGeometry::f_caloDDE
const CaloDetDescrElement * f_caloDDE(IdentifierHash cellHash) const
Retrieve calorimeter detector description element for a given cell hash identifier.
Definition: CaloTowerGeometry.h:344
x
#define x
CaloTowerGeometry::m_towerBins
uint_t m_towerBins
Maximum number of towers.
Definition: CaloTowerGeometry.h:131
CaloTowerGeometry::etaMin
double etaMin() const
Lower boundary of pseudorapidity range.
Definition: CaloTowerGeometry.h:284
pi
#define pi
Definition: TileMuonFitter.cxx:65
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
CaloTowerGeometry::m_ndyFCal
std::array< double, 3 > m_ndyFCal
Stores number of fragments along y for each FCal module.
Definition: CaloTowerGeometry.h:170
PlotCalibFromCool.ie
ie
Definition: PlotCalibFromCool.py:420
CaloTowerGeometry::m_maxCellHash
uint_t m_maxCellHash
Maximum cell hash value.
Definition: CaloTowerGeometry.h:132
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:63
CaloTowerGeometry::m_towerPhiMin
double m_towerPhiMin
Lower boundary .
Definition: CaloTowerGeometry.h:144
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
ev
int ev
Definition: globals.cxx:25
CaloTowerGeometry::etaIndexFromTowerIndex
index_t etaIndexFromTowerIndex(index_t towerIdx) const
Get tower bin index for a given global tower index.
Definition: CaloTowerGeometry.h:315
CaloTowerGeometry::phiIndex
index_t phiIndex(IdentifierHash cellHash) const
Get tower bin index for a calorimeter cell referenced by its hash identifier.
Definition: CaloTowerGeometry.cxx:300
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CaloTowerGeometry::etaIndex
index_t etaIndex(IdentifierHash cellHash) const
Get tower bin index for a calorimeter cell referenced by its hash identifier.
Definition: CaloTowerGeometry.cxx:287
CaloTowerGeometry::m_towerPhiMax
double m_towerPhiMax
Upper boundary .
Definition: CaloTowerGeometry.h:145
CaloTowerGeometry::m_fcal3Xslice
double m_fcal3Xslice
Number of x slices for cells in FCal3.
Definition: CaloTowerGeometry.h:150
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
CaloTowerGeometry::phiWidth
double phiWidth() const
Width of azimuth bin.
Definition: CaloTowerGeometry.h:291
CaloTowerGeometry::towerEtaLocal
double towerEtaLocal(index_t etaIndex) const
Return pseudorapdity from local index (bin center)
Definition: CaloTowerGeometry.h:324
CaloTowerGeometry::uint_t
std::size_t uint_t
Type for unsigned integer.
Definition: CaloTowerGeometry.h:26
CaloTowerGeometry::f_caloDDM
const CaloDetDescrManager * f_caloDDM() const
Pointer to calorimeter detector description manager.
Definition: CaloTowerGeometry.h:343
CaloDetDescrElement::is_lar_fcal
bool is_lar_fcal() const
cell belongs to FCAL
Definition: CaloDetDescrElement.cxx:137
WriteCellNoiseToCool.cellHash
cellHash
Definition: WriteCellNoiseToCool.py:433
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:14
CaloTowerGeometry::m_numberOfCells
uint_t m_numberOfCells
Total number of cells.
Definition: CaloTowerGeometry.h:133
CaloTowerGeometry::m_towerLookup
elementmap_t m_towerLookup
Cell-to-tower mapping lookup store.
Definition: CaloTowerGeometry.h:127
CaloDetDescrElement::x_raw
float x_raw() const
cell x_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:369
CaloDetDescrElement::z_raw
float z_raw() const
cell z_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:373
CaloDetDescrManager_Base::element_begin
calo_element_const_iterator element_begin() const
first element
Definition: CaloDetDescrManager.cxx:111
CaloTowerGeometry::f_setupTowerGridFCal
StatusCode f_setupTowerGridFCal(const CaloDetDescrElement *pCaloDDE, MsgStream &msg)
Internally used function mapping an FCal cell onto the tower grid.
Definition: CaloTowerGeometry.cxx:96
CaloTowerGeometry::f_setupTowerGrid
StatusCode f_setupTowerGrid(MsgStream &msg)
Internally used function setting up the lookup store.
Definition: CaloTowerGeometry.cxx:61
CaloTowerGeometry::m_towerEtaBins
uint_t m_towerEtaBins
Number of bins.
Definition: CaloTowerGeometry.h:139
CaloTowerGeometry::element_t
std::tuple< index_t, double > element_t
Type storing tower index and geometrical weight.
Definition: CaloTowerGeometry.h:28
CaloTowerGeometry::m_fcal1Xslice
double m_fcal1Xslice
Number of x slices for cells in FCal1.
Definition: CaloTowerGeometry.h:146
CaloTowerGeometry::towerIndex
index_t towerIndex(IdentifierHash cellHash) const
Get global tower index for a calorimeter cell referenced by its hash identifier.
Definition: CaloTowerGeometry.h:309
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
CaloDetDescrElement::getLayer
virtual int getLayer() const
cell layer
Definition: CaloDetDescrElement.cxx:84
y
#define y
CaloDetDescrElement::dx
float dx() const
cell dx
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:375
CaloDetDescrManager_Base::element_size
calo_element_vec_size element_size() const
total number of elements
Definition: CaloDetDescrManager.cxx:105
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
CaloTowerGeometry::m_fcal2Xslice
double m_fcal2Xslice
Number of x slices for cells in FCal2.
Definition: CaloTowerGeometry.h:148
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloTowerGeometry::m_adjustEta
bool m_adjustEta
Adjust FCal cells to eta boundary (default true )
Definition: CaloTowerGeometry.h:142
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
CaloTowerGeometry::m_towerEtaMin
double m_towerEtaMin
Lower boundary .
Definition: CaloTowerGeometry.h:140
CaloTowerGeometry::f_assign
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...
Definition: CaloTowerGeometry.cxx:218
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
CaloTowerGeometry::m_towerPhiWidth
double m_towerPhiWidth
Width of tower bin in azimuth.
Definition: CaloTowerGeometry.h:129
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
CaloTowerGeometry::m_invalidIndex
static const index_t m_invalidIndex
Invalid index indicator.
Definition: CaloTowerGeometry.h:156
CaloDetDescrElement::y_raw
float y_raw() const
cell y_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:371
CaloTowerGeometry::m_fcal3Yslice
double m_fcal3Yslice
Number of y slices for cells in FCal3.
Definition: CaloTowerGeometry.h:151
CaloTowerGeometry::phiIndexFromTowerIndex
index_t phiIndexFromTowerIndex(index_t towerIdx) const
Get tower bin index for a given global tower index.
Definition: CaloTowerGeometry.h:316
CaloDetDescrElement::dy
float dy() const
cell dy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:377
CaloTowerGeometry::cellWeight
double cellWeight(const element_t &elm) const
Retrieve cell signal weight from lookup table entry.
Definition: CaloTowerGeometry.h:337
CaloTowerGeometry::invalidValue
double invalidValue() const
Return invalid value.
Definition: CaloTowerGeometry.h:322
CaloTowerGeometry::m_wgtFCal
std::array< double, 3 > m_wgtFCal
Stores geometrical weights.
Definition: CaloTowerGeometry.h:171
CaloTowerGeometry::invalidIndex
index_t invalidIndex() const
Returns value of invalid index.
Definition: CaloTowerGeometry.h:275
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
CaloTowerGeometry::m_invalidValue
static const double m_invalidValue
Return value for out-of-range indices andother invalid conversions to a physical quantity.
Definition: CaloTowerGeometry.h:157
CaloTowerGeometry::isInvalidIndex
bool isInvalidIndex(index_t idx) const
Returns true if argument is equal to the value provided by invalidIndex()
Definition: CaloTowerGeometry.h:299
CaloTowerGeometry::m_towerArea
double m_towerArea
Area of individual tower.
Definition: CaloTowerGeometry.h:130
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
CaloPhiRange::diff
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
Definition: CaloPhiRange.cxx:22
CaloTowerGeometry::m_ndxFCal
std::array< double, 3 > m_ndxFCal
Stores number of fragments along x for each FCal module.
Definition: CaloTowerGeometry.h:169
CaloTowerGeometry::m_towerPhiBins
uint_t m_towerPhiBins
Number of bins.
Definition: CaloTowerGeometry.h:143