CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
12 class CaloCellGeometry;
13 
23 class CaloGeometry {
24 public:
25  CaloGeometry();
26 
28  void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry* geom);
29 
31  GlobalPoint getPosition(const DetId& id) const;
32 
34  std::shared_ptr<const CaloCellGeometry> getGeometry(const DetId& id) const;
35 
37  std::vector<DetId> getValidDetIds() const;
38 
40  const std::vector<DetId>& getValidDetIds(DetId::Detector det, int subdet) const;
41 
43  bool present(const DetId& id) const;
44 
47 
50 
51  // Get closest cell, etc...
52  //not implemented const DetId getClosestCell( const GlobalPoint& r ) const ;
53 
54 private:
55  static const std::vector<DetId> k_emptyVec;
56 
57  std::vector<const CaloSubdetectorGeometry*> m_geos;
58 
59  unsigned int makeIndex(DetId::Detector det, int subdet, bool& ok) const;
60 
61  enum {
62  kMaxDet = 10,
63  kMinDet = 3,
65  kMaxSub = 6,
68  };
69 };
70 
71 #endif
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
std::vector< const CaloSubdetectorGeometry * > m_geos
Definition: CaloGeometry.h:57
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
static const std::vector< DetId > k_emptyVec
Definition: CaloGeometry.h:55
Definition: DetId.h:17
void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry *geom)
Register a subdetector geometry.
Definition: CaloGeometry.cc:22
Detector
Definition: DetId.h:24
bool present(const DetId &id) const
is this detid present in the geometry?
Definition: CaloGeometry.cc:70
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:75
unsigned int makeIndex(DetId::Detector det, int subdet, bool &ok) const
Definition: CaloGeometry.cc:11
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60