test
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 
23 {
24  public:
25 
26  CaloGeometry() ;
27 
30  int subdet ,
31  const CaloSubdetectorGeometry* geom ) ;
32 
34  const GlobalPoint& getPosition( const DetId& id ) const ;
35 
37  const CaloCellGeometry* getGeometry( const DetId& id ) const ;
38 
40  std::vector<DetId> getValidDetIds() const ;
41 
43  const std::vector<DetId>& getValidDetIds( DetId::Detector det, int subdet ) const;
44 
46  bool present( const DetId& id ) const ;
47 
49  const CaloSubdetectorGeometry* getSubdetectorGeometry( const DetId& id ) const ;
50 
53  int subdet ) const ;
54 
55  // Get closest cell, etc...
56 //not implemented const DetId getClosestCell( const GlobalPoint& r ) const ;
57 
58  private:
59 
60  static const std::vector<DetId> k_emptyVec ;
61 
62  std::vector< const CaloSubdetectorGeometry* > m_geos ;
63 
64  unsigned int makeIndex( DetId::Detector det,
65  int subdet,
66  bool& ok ) const ;
67 
68  enum { kMaxDet = 5 ,
69  kMinDet = 3 ,
71  kMaxSub = 6 ,
73 };
74 
75 
76 
77 #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:60
Definition: DetId.h:18
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:62
Detector
Definition: DetId.h:24
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