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 
6 #include <memory>
7 #include <vector>
8 
10 class CaloCellGeometry;
11 
21 class CaloGeometry {
22 public:
23  CaloGeometry();
24 
26  void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry* geom);
27 
29  GlobalPoint getPosition(const DetId& id) const;
30 
32  std::shared_ptr<const CaloCellGeometry> getGeometry(const DetId& id) const;
33 
35  std::vector<DetId> getValidDetIds() const;
36 
38  const std::vector<DetId>& getValidDetIds(DetId::Detector det, int subdet) const;
39 
41  bool present(const DetId& id) const;
42 
45 
48 
49  // Get closest cell, etc...
50  //not implemented const DetId getClosestCell( const GlobalPoint& r ) const ;
51 
52 private:
53  static const std::vector<DetId> k_emptyVec;
54 
55  std::vector<const CaloSubdetectorGeometry*> m_geos;
56 
57  unsigned int makeIndex(DetId::Detector det, int subdet, bool& ok) const;
58 
59  enum {
60  kMaxDet = 10,
61  kMinDet = 3,
63  kMaxSub = 6,
66  };
67 };
68 
69 #endif
std::vector< const CaloSubdetectorGeometry * > m_geos
Definition: CaloGeometry.h:55
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60
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:53
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