19 const unsigned int idet ( det ) ;
26 return ( ( det -
kMinDet )*kMaxSub + subdet - 1 ) ;
52 return ( ok ?
m_geos[ index ] :
nullptr ) ;
64 return ( ok ?
m_geos[ index ] :
nullptr ) ;
74 return (
nullptr == cell ? notFound : cell->
getPosition() ) ;
89 return (
nullptr == geom ?
false : geom->
present(
id ) ) ;
94 std::vector<DetId> returnValue ;
95 returnValue.reserve(
kLength ) ;
97 bool doneHcal (
false ) ;
98 for(
unsigned int i ( 0 ) ;
i !=
m_geos.size() ; ++
i )
102 const std::vector< DetId >& aVec =
m_geos[
i]->getValidDetIds();
104 edm::LogWarning(
"EmptyDetIdList") <<
"Valid det id list at index " << i <<
" is empty!" << std::endl;
106 const bool isHcal ( !aVec.empty() &&
DetId::Hcal == aVec.front().det() ) ;
110 returnValue.insert( returnValue.end(), aVec.begin(), aVec.end() ) ;
112 isHcal ) doneHcal =
true ;
119 const std::vector<DetId>&
129 return ( ok && (
nullptr !=
m_geos[ index ] ) ?
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
virtual bool present(const DetId &id) const
is this detid present in the geometry?
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
static const std::vector< DetId > k_emptyVec
void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry *geom)
Register a subdetector geometry.
std::vector< const CaloSubdetectorGeometry * > m_geos
bool present(const DetId &id) const
is this detid present in the geometry?
static const GlobalPoint notFound(0, 0, 0)
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
unsigned int makeIndex(DetId::Detector det, int subdet, bool &ok) const