Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:24

0001 #ifndef Geometry_CSCGeometry_CSCChamber_H
0002 #define Geometry_CSCGeometry_CSCChamber_H
0003 
0004 /** \class CSCChamber
0005  *
0006  * Describes the geometry of the second-level detector unit 
0007  * modelled by a C++ object in the endcap muon CSC system.
0008  * A CSCChamber is composed of 6 CSCLayer's and is,
0009  * of course, a Cathode Strip Chamber Chamber!
0010  *
0011  * \author Tim Cox
0012  */
0013 
0014 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0015 #include <DataFormats/GeometrySurface/interface/BoundPlane.h>
0016 #include <Geometry/CommonDetUnit/interface/GeomDetType.h>
0017 #include <Geometry/CommonDetUnit/interface/GeomDet.h>
0018 #include <Geometry/CSCGeometry/interface/CSCChamberSpecs.h>
0019 
0020 class CSCLayer;
0021 
0022 class CSCChamber : public GeomDet {
0023 public:
0024   CSCChamber(const BoundPlane::BoundPlanePointer& bp, CSCDetId id, const CSCChamberSpecs* specs)
0025       : GeomDet(bp), theChamberSpecs(specs), theComponents(6, (const CSCLayer*)nullptr) {
0026     setDetId(id);
0027   }
0028 
0029   ~CSCChamber() override;
0030 
0031   const GeomDetType& type() const override { return *(specs()); }
0032 
0033   /// Get the (concrete) DetId.
0034   CSCDetId id() const { return geographicalId(); }
0035 
0036   // Which subdetector
0037   SubDetector subDetector() const override { return GeomDetEnumerators::CSC; }
0038 
0039   const CSCChamberSpecs* specs() const { return theChamberSpecs; }
0040 
0041   /// Return the layers in this chamber
0042   std::vector<const GeomDet*> components() const override;
0043 
0044   /// Return the layer with a given id in this chamber
0045   const GeomDet* component(DetId id) const override;
0046 
0047   // Extension of the interface
0048 
0049   /// Add a layer
0050   void addComponent(int n, const CSCLayer* gd);
0051 
0052   /// Return all layers
0053   const std::vector<const CSCLayer*>& layers() const { return theComponents; }
0054 
0055   /// Return the layer corresponding to the given id
0056   const CSCLayer* layer(CSCDetId id) const;
0057 
0058   /// Return the given layer.
0059   /// Layers are numbered 1-6.
0060   const CSCLayer* layer(int ilay) const;
0061 
0062 private:
0063   const CSCChamberSpecs* theChamberSpecs;
0064   std::vector<const CSCLayer*> theComponents;  // the 6 CSCLayers comprising a CSCChamber; are owned by this class
0065 };
0066 
0067 #endif  // Geometry_CSCGeometry_CSCChamber_H