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 
24 public:
25 
27  GeomDet( bp ), theChamberSpecs( specs ),
28  theComponents(6,(const CSCLayer*)nullptr) {
29  setDetId(id);
30  }
31 
32  ~CSCChamber() override;
33 
34  const GeomDetType& type() const override { return *(specs()); }
35 
37  CSCDetId id() const { return geographicalId(); }
38 
39  // Which subdetector
40  SubDetector subDetector() const override {return GeomDetEnumerators::CSC;}
41 
42  const CSCChamberSpecs* specs() const { return theChamberSpecs; }
43 
45  std::vector< const GeomDet* > components() const override;
46 
48  const GeomDet* component(DetId id) const override;
49 
50 
51  // Extension of the interface
52 
54  void addComponent( int n, const CSCLayer* gd );
55 
57  const std::vector< const CSCLayer* >& layers() const { return theComponents; }
58 
60  const CSCLayer* layer(CSCDetId id) const;
61 
64  const CSCLayer* layer(int ilay) const;
65 
66 private:
67 
69  std::vector< const CSCLayer* > theComponents; // the 6 CSCLayers comprising a CSCChamber; are owned by this class
70 };
71 
72 #endif // Geometry_CSCGeometry_CSCChamber_H
const std::vector< const CSCLayer * > & layers() const
Return all layers.
Definition: CSCChamber.h:57
~CSCChamber() override
Definition: CSCChamber.cc:11
void setDetId(DetId id)
Definition: GeomDet.h:120
CSCDetId id() const
Get the (concrete) DetId.
Definition: CSCChamber.h:37
std::vector< const GeomDet * > components() const override
Return the layers in this chamber.
Definition: CSCChamber.cc:21
#define nullptr
void addComponent(int n, const CSCLayer *gd)
Add a layer.
Definition: CSCChamber.cc:31
const GeomDet * component(DetId id) const override
Return the layer with a given id in this chamber.
Definition: CSCChamber.cc:26
std::vector< const CSCLayer * > theComponents
Definition: CSCChamber.h:69
const CSCChamberSpecs * specs() const
Definition: CSCChamber.h:42
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
CSCChamber(const BoundPlane::BoundPlanePointer &bp, CSCDetId id, const CSCChamberSpecs *specs)
Definition: CSCChamber.h:26
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
Definition: DetId.h:18
const CSCChamberSpecs * theChamberSpecs
Definition: CSCChamber.h:68
SubDetector subDetector() const override
Which subdetector.
Definition: CSCChamber.h:40
const GeomDetType & type() const override
Definition: CSCChamber.h:34