CMS 3D CMS Logo

CSCChamber.h
Go to the documentation of this file.
1 #ifndef Geometry_CSCGeometry_CSCChamber_H
2 #define Geometry_CSCGeometry_CSCChamber_H
3 
19 
20 class CSCLayer;
21 
22 class CSCChamber : public GeomDet {
23 public:
26  setDetId(id);
27  }
28 
29  ~CSCChamber() override;
30 
31  const GeomDetType& type() const override { return *(specs()); }
32 
34  CSCDetId id() const { return geographicalId(); }
35 
36  // Which subdetector
37  SubDetector subDetector() const override { return GeomDetEnumerators::CSC; }
38 
39  const CSCChamberSpecs* specs() const { return theChamberSpecs; }
40 
42  std::vector<const GeomDet*> components() const override;
43 
45  const GeomDet* component(DetId id) const override;
46 
47  // Extension of the interface
48 
50  void addComponent(int n, const CSCLayer* gd);
51 
53  const std::vector<const CSCLayer*>& layers() const { return theComponents; }
54 
56  const CSCLayer* layer(CSCDetId id) const;
57 
60  const CSCLayer* layer(int ilay) const;
61 
62 private:
64  std::vector<const CSCLayer*> theComponents; // the 6 CSCLayers comprising a CSCChamber; are owned by this class
65 };
66 
67 #endif // Geometry_CSCGeometry_CSCChamber_H
const std::vector< const CSCLayer * > & layers() const
Return all layers.
Definition: CSCChamber.h:53
~CSCChamber() override
Definition: CSCChamber.cc:10
void setDetId(DetId id)
Definition: GeomDet.h:99
CSCDetId id() const
Get the (concrete) DetId.
Definition: CSCChamber.h:34
std::vector< const GeomDet * > components() const override
Return the layers in this chamber.
Definition: CSCChamber.cc:17
#define nullptr
void addComponent(int n, const CSCLayer *gd)
Add a layer.
Definition: CSCChamber.cc:23
const GeomDet * component(DetId id) const override
Return the layer with a given id in this chamber.
Definition: CSCChamber.cc:21
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:64
const CSCChamberSpecs * specs() const
Definition: CSCChamber.h:39
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
CSCChamber(const BoundPlane::BoundPlanePointer &bp, CSCDetId id, const CSCChamberSpecs *specs)
Definition: CSCChamber.h:24
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
Definition: DetId.h:17
const CSCChamberSpecs * theChamberSpecs
Definition: CSCChamber.h:63
SubDetector subDetector() const override
Which subdetector.
Definition: CSCChamber.h:37
const GeomDetType & type() const override
Definition: CSCChamber.h:31