12 const unsigned int idet(det);
14 ok = (kMinDet <= idet && kMaxDet >= idet && 0 <= subdet &&
kMaxSub >= subdet);
16 edm::LogWarning(
"CaloGeometry") <<
"Det:Subdet " << idet <<
":" << subdet <<
" min|max Det " <<
kMinDet <<
":" 28 edm::LogVerbatim(
"CaloGeometry") <<
"Detector=" << (
int)det <<
", subset=" << subdet <<
", index=" << index
29 <<
", size=" <<
m_geos.size();
38 return (ok ?
m_geos[index] :
nullptr);
45 return (ok ?
m_geos[index] :
nullptr);
66 return std::shared_ptr<const CaloCellGeometry>();
72 return (
nullptr == geom ?
false : geom->
present(
id));
76 std::vector<DetId> returnValue;
80 for (
unsigned int i(0);
i !=
m_geos.size(); ++
i) {
82 const std::vector<DetId>& aVec =
m_geos[
i]->getValidDetIds();
84 edm::LogWarning(
"CaloGeometry") <<
"Valid det id list at index " << i <<
" is empty!";
86 const bool isHcal(!aVec.empty() &&
DetId::Hcal == aVec.front().det());
87 if (!doneHcal || !isHcal) {
88 returnValue.insert(returnValue.end(), aVec.begin(), aVec.end());
89 if (!doneHcal && isHcal)
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
std::vector< const CaloSubdetectorGeometry * > m_geos
virtual bool present(const DetId &id) const
is this detid present in the geometry?
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.
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
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.
unsigned int makeIndex(DetId::Detector det, int subdet, bool &ok) const
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.