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 <vector>
7 
9 
11 class CaloCellGeometry;
12 
24 {
25  public:
26 
27  CaloGeometry() ;
28 
31  int subdet ,
32  const CaloSubdetectorGeometry* geom ) ;
33 
35  const GlobalPoint& getPosition( const DetId& id ) const ;
36 
38  const CaloCellGeometry* getGeometry( const DetId& id ) const ;
39 
41  std::vector<DetId> getValidDetIds() const ;
42 
44  const std::vector<DetId>& getValidDetIds( DetId::Detector det, int subdet ) const;
45 
47  bool present( const DetId& id ) const ;
48 
50  const CaloSubdetectorGeometry* getSubdetectorGeometry( const DetId& id ) const ;
51 
54  int subdet ) const ;
55 
56  // Get closest cell, etc...
57 //not implemented const DetId getClosestCell( const GlobalPoint& r ) const ;
58 
59  private:
60 
61  static const std::vector<DetId> k_emptyVec ;
62 
63  std::vector< const CaloSubdetectorGeometry* > m_geos ;
64 
65  unsigned int makeIndex( DetId::Detector det,
66  int subdet,
67  bool& ok ) const ;
68 
69  enum { kMaxDet = 5 ,
70  kMinDet = 3 ,
72  kMaxSub = 4 ,
74 };
75 
76 
77 
78 #endif
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:43
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:68
static const std::vector< DetId > k_emptyVec
Definition: CaloGeometry.h:61
Definition: DetId.h:20
void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry *geom)
Register a subdetector geometry.
Definition: CaloGeometry.cc:28
std::vector< const CaloSubdetectorGeometry * > m_geos
Definition: CaloGeometry.h:63
Detector
Definition: DetId.h:26
bool present(const DetId &id) const
is this detid present in the geometry?
Definition: CaloGeometry.cc:84
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:76
unsigned int makeIndex(DetId::Detector det, int subdet, bool &ok) const
Definition: CaloGeometry.cc:13