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 class CaloCellGeometry;
11 
21 class CaloGeometry {
22 public:
23  CaloGeometry();
24 
26  void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry* geom);
27 
29  GlobalPoint getPosition(const DetId& id) const;
30 
32  std::shared_ptr<const CaloCellGeometry> getGeometry(const DetId& id) const;
33 
35  std::vector<DetId> getValidDetIds() const;
36 
38  const std::vector<DetId>& getValidDetIds(DetId::Detector det, int subdet) const;
39 
41  bool present(const DetId& id) const;
42 
45 
48 
49  // Get closest cell, etc...
50  //not implemented const DetId getClosestCell( const GlobalPoint& r ) const ;
51 
52 private:
53  static const std::vector<DetId> k_emptyVec;
54 
55  std::vector<const CaloSubdetectorGeometry*> m_geos;
56 
57  unsigned int makeIndex(DetId::Detector det, int subdet, bool& ok) const;
58 
59  enum {
60  kMaxDet = 10,
61  kMinDet = 3,
63  kMaxSub = 6,
66  };
67 };
68 
69 #endif
CaloGeometry::kNSubDets
Definition: CaloGeometry.h:64
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
CaloGeometry::kMaxSub
Definition: CaloGeometry.h:63
CaloGeometry::present
bool present(const DetId &id) const
is this detid present in the geometry?
Definition: CaloGeometry.cc:70
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
CaloGeometry::CaloGeometry
CaloGeometry()
Definition: CaloGeometry.cc:9
CaloGeometry::k_emptyVec
static const std::vector< DetId > k_emptyVec
Definition: CaloGeometry.h:53
CaloGeometry::kLength
Definition: CaloGeometry.h:65
DetId
Definition: DetId.h:17
CaloGeometry
Definition: CaloGeometry.h:21
CaloGeometry::makeIndex
unsigned int makeIndex(DetId::Detector det, int subdet, bool &ok) const
Definition: CaloGeometry.cc:11
CaloGeometry::m_geos
std::vector< const CaloSubdetectorGeometry * > m_geos
Definition: CaloGeometry.h:55
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
CaloGeometry::kNDets
Definition: CaloGeometry.h:62
Point3DBase< float, GlobalTag >
CaloCellGeometry
Definition: CaloCellGeometry.h:50
CaloGeometry::getGeometry
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60
DetId::Detector
Detector
Definition: DetId.h:24
CaloGeometry::getValidDetIds
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:75
DetId.h
CaloGeometry::kMaxDet
Definition: CaloGeometry.h:60
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
CaloGeometry::setSubdetGeometry
void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry *geom)
Register a subdetector geometry.
Definition: CaloGeometry.cc:22
CaloGeometry::kMinDet
Definition: CaloGeometry.h:61
GlobalPoint.h