13 m_hbCellVec ( topo.getHBSize() ) ,
14 m_heCellVec ( topo.getHESize() ) ,
15 m_hoCellVec ( topo.getHOSize() ) ,
16 m_hfCellVec ( topo.getHFSize() ) ,
34 for(
unsigned int i ( 0 ) ;
i != baseIds.size() ; ++
i )
72 std::vector<DetId>
const &
92 double abseta = fabs(r.
eta());
94 if (phi < 0) phi += twopi;
96 double z = fabs(r.
z());
98 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell for eta " 99 << r.
eta() <<
" phi " << phi/deg <<
" z " << r.
z()
104 if (abseta >=hcalCell.etaMin() && abseta <=hcalCell.etaMax()) {
106 int etaring = hcalCell.etaBin();
108 if (hcalCell.unitPhi() == 4) {
113 phibin =
static_cast<int>((phi+hcalCell.phiOffset()+
114 0.5*hcalCell.phiBinWidth())/
115 hcalCell.phiBinWidth());
116 if (phibin == 0) phibin = hcalCell.nPhiBins();
117 phibin = phibin*4 - 1;
119 phibin =
static_cast<int>((phi+hcalCell.phiOffset())/
120 hcalCell.phiBinWidth()) + 1;
122 phibin = (phibin-1)*(hcalCell.unitPhi()) + 1;
126 int etabin = (r.
z() > 0) ? etaring : -etaring;
128 bestId =
HcalDetId(bc, etabin, phibin, dbin);
132 if (hcalCell.depthType()) rz = radius;
133 if (rz < hcalCell.depthMax()) {
134 dbin = hcalCell.depthSegment();
135 bestId =
HcalDetId(bc, etabin, phibin, dbin);
143 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell " << bestId;
153 for (
const auto & cell : cells) {
157 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::insertCell " << cells.size()
158 <<
" cells inserted == Total " << num
228 const unsigned int ind (din -
m_hbCellVec.size() ) ;
240 return ((
nullptr == cell ||
nullptr == cell->
param()) ?
nullptr : cell ) ;
static boost::mutex mutex
unsigned int detId2denseId(const DetId &id) const override
return a linear packed id
std::vector< DetId > m_hfIds
std::vector< DetId > m_heIds
std::atomic< bool > m_filledDetIds
Geom::Phi< T > phi() const
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
CaloCellGeometry::CCGFloat CCGFloat
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
DetId getClosestCell(const GlobalPoint &r) const override
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
const HcalTopology & topo_
const CCGFloat * param() const
int insertCell(std::vector< HcalCellType > const &)
void increaseReserve(unsigned int extra)
std::vector< DetId > m_validIds
HcalDDDGeometry(const HcalTopology &theTopo)
static std::mutex s_fillLock
void newCellImpl(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
std::vector< HcalCellType > hcalCells_
std::vector< DetId > m_hbIds
~HcalDDDGeometry() override
The HcalDDDGeometry will delete all its cell geometries at destruction time.
std::vector< DetId > m_emptyIds
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
Detector det() const
get the detector field from this detid
std::vector< DetId > m_hoIds
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const override
Get a list of valid detector ids (for the given subdetector)