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 
12 class CaloCellGeometry;
13 
24 {
25  public:
26 
27  CaloGeometry() ;
28 
31  int subdet ,
32  const CaloSubdetectorGeometry* geom ) ;
33 
35  GlobalPoint getPosition( const DetId& id ) const;
36 
38  std::shared_ptr<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 = 10 ,
70  kMinDet = 3 ,
72  kMaxSub = 6 ,
75 };
76 
77 
78 
79 #endif
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:74
static const std::vector< DetId > k_emptyVec
Definition: CaloGeometry.h:61
Definition: DetId.h:18
void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry *geom)
Register a subdetector geometry.
Definition: CaloGeometry.cc:34
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:96
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
unsigned int makeIndex(DetId::Detector det, int subdet, bool &ok) const
Definition: CaloGeometry.cc:15
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:85