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 )
36 const DetId id ( baseIds[
i] );
39 m_hbIds.push_back(
id ) ;
45 m_heIds.push_back(
id ) ;
51 m_hoIds.push_back(
id ) ;
57 m_hfIds.push_back(
id ) ;
63 std::sort( m_hbIds.begin(), m_hbIds.end() ) ;
64 std::sort( m_heIds.begin(), m_heIds.end() ) ;
65 std::sort( m_hoIds.begin(), m_hoIds.end() ) ;
66 std::sort( m_hfIds.begin(), m_hfIds.end() ) ;
68 m_emptyIds.resize( 0 ) ;
72 std::vector<DetId>
const &
82 (
HcalForward == subdet ? m_hfIds : m_emptyIds ) ) ) ) ) ;
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()
114 phibin =
static_cast<int>(((phi/deg)+
hcalCells_[
i].phiOffset()+
117 if (phibin == 0) phibin =
hcalCells_[
i].nPhiBins();
118 phibin = phibin*4 - 1;
120 phibin =
static_cast<int>(((phi/deg)+
hcalCells_[
i].phiOffset())/
127 int etabin = (r.
z() > 0) ? etaring : -etaring;
129 bestId =
HcalDetId(bc, etabin, phibin, dbin);
136 bestId =
HcalDetId(bc, etabin, phibin, dbin);
144 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::getClosestCell " << bestId;
154 for (
unsigned int i=0;
i<cells.size();
i++) {
158 LogDebug(
"HCalGeom") <<
"HcalDDDGeometry::insertCell " << cells.size()
159 <<
" cells inserted == Total " << num
233 const unsigned int index ( din
245 const unsigned int index ( din
254 return ( 0 == cell || 0 == cell->
param() ? 0 : cell ) ;
CMS_THREAD_GUARD(m_filledDetIds) mutable std CMS_THREAD_GUARD(m_filledDetIds) mutable std CMS_THREAD_GUARD(m_filledDetIds) mutable std CMS_THREAD_GUARD(m_filledDetIds) mutable std CMS_THREAD_GUARD(m_filledDetIds) mutable std const HcalTopology & topo_
virtual unsigned int detId2denseId(const DetId &id) const
return a linear packed id
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const
static boost::mutex mutex
std::atomic< bool > m_filledDetIds
Geom::Phi< T > phi() const
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
CaloCellGeometry::CCGFloat CCGFloat
virtual ~HcalDDDGeometry()
The HcalDDDGeometry will delete all its cell geometries at destruction time.
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)
const CCGFloat * param() const
int insertCell(std::vector< HcalCellType > const &)
HcalDDDGeometry(const HcalTopology &theTopo)
static std::mutex s_fillLock
std::vector< HcalCellType > hcalCells_
void addValidID(const DetId &id)
CaloCellGeometry::CornersMgr * cornersMgr()
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)
virtual DetId getClosestCell(const GlobalPoint &r) const
volatile std::atomic< bool > shutdown_flag false
Detector det() const
get the detector field from this detid