|
|
Go to the documentation of this file.
13 m_hbCellVec(topo.getHBSize()),
14 m_heCellVec(topo.getHESize()),
15 m_hoCellVec(topo.getHOSize()),
16 m_hfCellVec(topo.getHFSize()),
17 m_filledDetIds(
false) {}
28 for (
unsigned int i(0);
i != baseIds.size(); ++
i) {
68 constexpr
double twopi =
M_PI +
M_PI;
69 constexpr
double deg =
M_PI / 180.;
73 double abseta = fabs(
r.eta());
78 double z = fabs(
r.z());
80 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell for eta " <<
r.eta() <<
" phi " <<
phi / deg <<
" z "
81 <<
r.z() <<
" radius " <<
radius;
85 if (abseta >= hcalCell.etaMin() && abseta <= hcalCell.etaMax()) {
87 int etaring = hcalCell.etaBin();
89 if (hcalCell.unitPhi() == 4) {
95 static_cast<int>((
phi + hcalCell.phiOffset() + 0.5 * hcalCell.phiBinWidth()) / hcalCell.phiBinWidth());
97 phibin = hcalCell.nPhiBins();
98 phibin = phibin * 4 - 1;
100 phibin = static_cast<int>((
phi + hcalCell.phiOffset()) / hcalCell.phiBinWidth()) + 1;
102 phibin = (phibin - 1) * (hcalCell.unitPhi()) + 1;
106 int etabin = (
r.z() > 0) ? etaring : -etaring;
108 bestId =
HcalDetId(bc, etabin, phibin, dbin);
112 if (hcalCell.depthType())
114 if (rz < hcalCell.depthMax()) {
115 dbin = hcalCell.depthSegment();
116 bestId =
HcalDetId(bc, etabin, phibin, dbin);
124 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell " << bestId;
132 for (
const auto& cell :
cells) {
137 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::insertCell " <<
cells.size() <<
" cells inserted == Total " <<
num
197 return ((
nullptr == cell ||
nullptr == cell->
param()) ?
nullptr : cell);
std::vector< HcalCellType > hcalCells_
constexpr Detector det() const
get the detector field from this detid
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
std::vector< DetId > m_heIds
void increaseReserve(unsigned int extra)
DetId getClosestCell(const GlobalPoint &r) const override
void newCellFast(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
CaloCellGeometry::CCGFloat CCGFloat
std::vector< DetId > m_hbIds
std::vector< DetId > m_validIds
std::vector< DetId > m_hfIds
unsigned int detId2denseId(const DetId &id) const override
return a linear packed id
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)
int insertCell(std::vector< HcalCellType > const &)
const CCGFloat * param() const
HcalDDDGeometry(const HcalTopology &theTopo)
void addValidID(const DetId &id)
std::atomic< bool > m_filledDetIds
~HcalDDDGeometry() override
The HcalDDDGeometry will delete all its cell geometries at destruction time.
std::vector< DetId > m_hoIds
CaloCellGeometry::CornersMgr * cornersMgr()
static std::mutex s_fillLock
std::vector< DetId > m_emptyIds
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)
void newCellImpl(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
const HcalTopology & topo_