30#include "CaloEvent/CaloTowerContainer.h"
31#include "GaudiKernel/Bootstrap.h"
32#include "GaudiKernel/Service.h"
88 <<
"cannot initialize internal store properly, index offset = "
129 <<
"Can't find element for index " << cellIndex <<
endmsg;
132 double xCell = theElement->
x();
133 double yCell = theElement->
y();
134 double zCell = theElement->
z();
135 double dxCell = theElement->
dx();
136 double dyCell = theElement->
dy();
139 int thisModule = fcalIdHelper.module(theElement->
identify());
142 double theXBin = dxCell / (double)
m_ndxFCal[thisModule];
143 double theYBin = dyCell / (double)
m_ndyFCal[thisModule];
152 for (
double x = xCell-dxCell/2.;
x < xCell+(dxCell-theXBin/8.)/2.;
x += theXBin ){
153 for (
double y = yCell-dyCell/2.;
y < yCell+(dyCell-theYBin/8.)/2.;
y += theYBin ){
155 double r = sqrt(
x *
x +
y *
y + zCell * zCell );
156 double eta = -0.5 * log((
r-zCell)/(
r+zCell));
157 double phi = correctPhi.
fix(atan2(
y,
x));
169 if (i->first==cellIndex){
170 i->second+=theWeight;
176 m_TTCmatrix[towerIndex].push_back(std::make_pair(cellIndex,theWeight));
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Definition of CaloDetDescrManager.
CaloPhiRange class declaration.
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
Helper class for offline cell identifiers.
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
This class groups all DetDescr information related to a CaloCell.
Identifier identify() const override final
cell identifier
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...
This class defines the phi convention for Calorimeters.
static double fix(double phi)
Storable container class for CaloTower.
index_t getTowerIndex(const CaloTower *aTower) const
Returns the combined index of a tower on the grid.
size_t index_t
Tower map index type.
index_t flagOutOfRange() const
Returns the index out-of-range indicator.
bool getTowerIndices(const CaloTower *aTower, index_t &indexEta, index_t &indexPhi) const
Returns both and indices for a given tower.
static SubSegIterator make(tower_iterator beg, const SubSeg &subseg)
A rectangular window within the segmentation.
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
Helper class for LArFCAL offline identifiers.
LArFCalTowerStore()
constructor
tower_iterator towers() const
bool buildLookUp(const CaloCell_ID &cellIdHelper, const CaloDetDescrManager &theManager, CaloTowerContainer *theTowers)
setup trigger
std::vector< unsigned int > m_ndxFCal
CaloTowerSeg::SubSegIterator< tower_iterator > tower_subseg_iterator
tower_table_t m_TTCmatrix
std::vector< unsigned int > m_ndyFCal
~LArFCalTowerStore()
destructor