CMS 3D CMS Logo

CaloGeometry.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOGEOMETRY_CALOGEOMETRY_H
2 #define GEOMETRY_CALOGEOMETRY_CALOGEOMETRY_H 1
3 
7 #include <vector>
8 
10 
20 class CaloGeometry {
21 public:
22  CaloGeometry();
23 
25  void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry* geom);
26 
28  GlobalPoint getPosition(const DetId& id) const;
29 
32 
34  std::vector<DetId> getValidDetIds() const;
35 
37  const std::vector<DetId>& getValidDetIds(DetId::Detector det, int subdet) const;
38 
40  bool present(const DetId& id) const;
41 
44 
47 
48  // Get closest cell, etc...
49  //not implemented const DetId getClosestCell( const GlobalPoint& r ) const ;
50 
51 private:
52  static const std::vector<DetId> k_emptyVec;
53 
54  std::vector<const CaloSubdetectorGeometry*> m_geos;
55 
56  unsigned int makeIndex(DetId::Detector det, int subdet, bool& ok) const;
57 
58  static constexpr int kMaxDet = 10, kMinDet = 3, kNDets = kMaxDet - kMinDet + 1, kMaxSub = 6, kNSubDets = kMaxSub + 1,
60 };
61 
62 #endif
static constexpr int kNSubDets
Definition: CaloGeometry.h:58
std::vector< const CaloSubdetectorGeometry * > m_geos
Definition: CaloGeometry.h:54
static constexpr int kLength
Definition: CaloGeometry.h:59
static constexpr int kMaxDet
Definition: CaloGeometry.h:58
static constexpr int kNDets
Definition: CaloGeometry.h:58
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
unsigned int makeIndex(DetId::Detector det, int subdet, bool &ok) const
Definition: CaloGeometry.cc:11
static const std::vector< DetId > k_emptyVec
Definition: CaloGeometry.h:52
static constexpr int kMaxSub
Definition: CaloGeometry.h:58
CaloCellGeometryMayOwnPtr getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60
Definition: DetId.h:17
void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry *geom)
Register a subdetector geometry.
Definition: CaloGeometry.cc:22
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:75
Detector
Definition: DetId.h:24
bool present(const DetId &id) const
is this detid present in the geometry?
Definition: CaloGeometry.cc:70
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
static constexpr int kMinDet
Definition: CaloGeometry.h:58