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 &
93 double abseta = fabs(r.
eta());
95 if (phi < 0) phi += twopi;
97 double z = fabs(r.
z());
99 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell for eta " 100 << r.
eta() <<
" phi " << phi/deg <<
" z " << r.
z()
105 if (abseta >=hcalCell.etaMin() && abseta <=hcalCell.etaMax()) {
107 int etaring = hcalCell.etaBin();
109 if (hcalCell.unitPhi() == 4) {
114 phibin =
static_cast<int>((phi+hcalCell.phiOffset()+
115 0.5*hcalCell.phiBinWidth())/
116 hcalCell.phiBinWidth());
117 if (phibin == 0) phibin = hcalCell.nPhiBins();
118 phibin = phibin*4 - 1;
120 phibin =
static_cast<int>((phi+hcalCell.phiOffset())/
121 hcalCell.phiBinWidth()) + 1;
123 phibin = (phibin-1)*(hcalCell.unitPhi()) + 1;
127 int etabin = (r.
z() > 0) ? etaring : -etaring;
129 bestId =
HcalDetId(bc, etabin, phibin, dbin);
133 if (hcalCell.depthType()) rz = radius;
134 if (rz < hcalCell.depthMax()) {
135 dbin = hcalCell.depthSegment();
136 bestId =
HcalDetId(bc, etabin, phibin, dbin);
144 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell " << bestId;
154 for (
const auto & cell : cells) {
158 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::insertCell " << cells.size()
159 <<
" cells inserted == Total " << num
245 const unsigned int index ( din
257 const unsigned int index ( din
266 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
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
const CaloCellGeometry * cellGeomPtr(uint32_t index) 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)