CMS 3D CMS Logo

RPCGeometry.h
Go to the documentation of this file.
1 #ifndef RPCGeometry_RPCGeometry_h
2 #define RPCGeometry_RPCGeometry_h
3 
15 #include <vector>
16 #include <map>
17 
18 class GeomDetType;
19 
20 class RPCGeometry : public TrackingGeometry {
21 public:
23  RPCGeometry();
24 
26  ~RPCGeometry() override;
27 
28  // Return a vector of all det types
29  const DetTypeContainer& detTypes() const override;
30 
31  // Return a vector of all GeomDetUnit
32  const DetContainer& detUnits() const override;
33 
34  // Return a vector of all GeomDet
35  const DetContainer& dets() const override;
36 
37  // Return a vector of all GeomDetUnit DetIds
38  const DetIdContainer& detUnitIds() const override;
39 
40  // Return a vector of all GeomDet DetIds
41  const DetIdContainer& detIds() const override;
42 
43  // Return the pointer to the GeomDetUnit corresponding to a given DetId
44  const GeomDet* idToDetUnit(DetId) const override;
45 
46  // Return the pointer to the GeomDet corresponding to a given DetId
47  const GeomDet* idToDet(DetId) const override;
48 
49  //---- Extension of the interface
50 
52  const std::vector<const RPCChamber*>& chambers() const;
53 
55  const std::vector<const RPCRoll*>& rolls() const;
56 
57  // Return a RPCChamber given its id
58  const RPCChamber* chamber(RPCDetId id) const;
59 
61  const RPCRoll* roll(RPCDetId id) const;
62 
64  void add(RPCRoll* roll);
65 
67  void add(RPCChamber* ch);
68 
69 private:
75 
76  // Map for efficient lookup by DetId
78 
79  std::vector<const RPCRoll*> allRolls; // Are not owned by this class; are owned by their chamber.
80  std::vector<const RPCChamber*> allChambers; // Are owned by this class.
81 };
82 
83 #endif
RPCRoll
Definition: RPCRoll.h:12
RPCGeometry::~RPCGeometry
~RPCGeometry() override
Destructor.
Definition: RPCGeometry.cc:12
TrackingGeometry
Definition: TrackingGeometry.h:26
GeomDet
Definition: GeomDet.h:27
RPCDetId
Definition: RPCDetId.h:16
RPCChamber.h
RPCGeometry::theRollTypes
DetTypeContainer theRollTypes
Definition: RPCGeometry.h:72
RPCGeometry::detTypes
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: RPCGeometry.cc:20
GeomDetType
Definition: GeomDetType.h:9
TrackingGeometry.h
RPCGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: RPCGeometry.cc:22
RPCGeometry::roll
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:50
RPCRoll.h
RPCGeometry::detUnitIds
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
Definition: RPCGeometry.cc:26
RPCGeometry::allRolls
std::vector< const RPCRoll * > allRolls
Definition: RPCGeometry.h:79
RPCChamber
Definition: RPCChamber.h:19
RPCGeometry::chambers
const std::vector< const RPCChamber * > & chambers() const
Return a vector of all RPC chambers.
Definition: RPCGeometry.cc:42
RPCGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: RPCGeometry.cc:30
RPCGeometry::detIds
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: RPCGeometry.cc:28
DetId
Definition: DetId.h:17
RPCGeometry::add
void add(RPCRoll *roll)
Add a RPC roll to the Geometry.
Definition: RPCGeometry.cc:52
RPCGeometry::RPCGeometry
RPCGeometry()
Default constructor.
Definition: RPCGeometry.cc:10
RPCGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: RPCGeometry.cc:24
RPCGeometry::theRollIds
DetIdContainer theRollIds
Definition: RPCGeometry.h:73
RPCGeometry::theRolls
DetContainer theRolls
Definition: RPCGeometry.h:70
TrackingGeometry::DetTypeContainer
std::vector< const GeomDetType * > DetTypeContainer
Definition: TrackingGeometry.h:28
TrackingGeometry::DetIdContainer
std::vector< DetId > DetIdContainer
Definition: TrackingGeometry.h:30
TrackingGeometry::DetContainer
std::vector< const GeomDet * > DetContainer
Definition: TrackingGeometry.h:29
TrackingGeometry::mapIdToDet
std::unordered_map< unsigned int, const GeomDet * > mapIdToDet
Definition: TrackingGeometry.h:32
RPCGeometry::chamber
const RPCChamber * chamber(RPCDetId id) const
Definition: RPCGeometry.cc:46
RPCGeometry::allChambers
std::vector< const RPCChamber * > allChambers
Definition: RPCGeometry.h:80
RPCGeometry::theDetIds
DetIdContainer theDetIds
Definition: RPCGeometry.h:74
DetId.h
RPCGeometry::theDets
DetContainer theDets
Definition: RPCGeometry.h:71
RPCGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: RPCGeometry.cc:32
RPCGeometry
Definition: RPCGeometry.h:20
RPCGeometry::rolls
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
Definition: RPCGeometry.cc:44
RPCGeometry::theMap
mapIdToDet theMap
Definition: RPCGeometry.h:77