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 class CaloCellGeometry;
10 
22 {
23  public:
24 
25  CaloGeometry() ;
26 
29  int subdet ,
30  const CaloSubdetectorGeometry* geom ) ;
31 
33  const GlobalPoint& getPosition( const DetId& id ) const ;
34 
36  const CaloCellGeometry* getGeometry( const DetId& id ) const ;
37 
39  std::vector<DetId> getValidDetIds() const ;
40 
42  const std::vector<DetId>& getValidDetIds( DetId::Detector det, int subdet ) const;
43 
45  bool present( const DetId& id ) const ;
46 
48  const CaloSubdetectorGeometry* getSubdetectorGeometry( const DetId& id ) const ;
49 
52  int subdet ) const ;
53 
54  // Get closest cell, etc...
55 //not implemented const DetId getClosestCell( const GlobalPoint& r ) const ;
56 
57  private:
58 
59  static const std::vector<DetId> k_emptyVec ;
60 
61  std::vector< const CaloSubdetectorGeometry* > m_geos ;
62 
63  unsigned int makeIndex( DetId::Detector det,
64  int subdet,
65  bool& ok ) const ;
66 
67  enum { kMaxDet = 5 ,
68  kMinDet = 3 ,
70  kMaxSub = 4 ,
72 };
73 
74 
75 
76 #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:59
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:61
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