15 m_hbCellVec(topo.getHBSize()),
16 m_heCellVec(topo.getHESize()),
17 m_hoCellVec(topo.getHOSize()),
18 m_hfCellVec(topo.getHFSize()),
19 m_filledDetIds(
false) {}
30 for (
unsigned int i(0);
i != baseIds.size(); ++
i) {
70 constexpr
double twopi =
M_PI +
M_PI;
74 double abseta = fabs(
r.eta());
79 double z = fabs(
r.z());
82 constexpr
double deg =
M_PI / 180.;
83 edm::LogVerbatim(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell for eta " <<
r.eta() <<
" phi " <<
phi / deg <<
" z " 84 <<
r.z() <<
" radius " <<
radius;
89 if (abseta >= hcalCell.etaMin() && abseta <= hcalCell.etaMax()) {
91 int etaring = hcalCell.etaBin();
93 if (hcalCell.unitPhi() == 4) {
99 static_cast<int>((
phi + hcalCell.phiOffset() + 0.5 * hcalCell.phiBinWidth()) / hcalCell.phiBinWidth());
101 phibin = hcalCell.nPhiBins();
102 phibin = phibin * 4 - 1;
104 phibin =
static_cast<int>((
phi + hcalCell.phiOffset()) / hcalCell.phiBinWidth()) + 1;
106 phibin = (phibin - 1) * (hcalCell.unitPhi()) + 1;
110 int etabin = (
r.z() > 0) ? etaring : -etaring;
112 bestId =
HcalDetId(bc, etabin, phibin, dbin);
116 if (hcalCell.depthType())
118 if (rz < hcalCell.depthMax()) {
119 dbin = hcalCell.depthSegment();
120 bestId =
HcalDetId(bc, etabin, phibin, dbin);
129 edm::LogVerbatim(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell " << bestId;
137 for (
const auto& cell :
cells) {
142 edm::LogVerbatim(
"HCalGeom") <<
"HcalDDDGeometry::insertCell " <<
cells.size() <<
" cells inserted == Total " <<
num 203 return ((
nullptr == cell ||
nullptr == cell->
param()) ?
nullptr : cell);
Log< level::Info, true > LogVerbatim
std::vector< DetId > m_hfIds
std::vector< DetId > m_heIds
std::atomic< bool > m_filledDetIds
unsigned int detId2denseId(const DetId &id) const override
return a linear packed id
DetId getClosestCell(const GlobalPoint &r) const override
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
CaloCellGeometry::CCGFloat CCGFloat
constexpr Detector det() const
get the detector field from this detid
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
const HcalTopology & topo_
int insertCell(std::vector< HcalCellType > const &)
void increaseReserve(unsigned int extra)
std::vector< DetId > m_validIds
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)
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.
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ cells
std::vector< DetId > m_emptyIds
void addValidID(const DetId &id)
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)
CaloCellGeometry::CornersMgr * cornersMgr()
std::vector< DetId > m_hoIds
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
const CCGFloat * param() const