CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/Geometry/CSCGeometry/interface/CSCChamber.h

Go to the documentation of this file.
00001 #ifndef Geometry_CSCGeometry_CSCChamber_H
00002 #define Geometry_CSCGeometry_CSCChamber_H
00003 
00014 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
00015 #include <DataFormats/GeometrySurface/interface/BoundPlane.h>
00016 #include <Geometry/CommonDetUnit/interface/GeomDetType.h>
00017 #include <Geometry/CommonDetUnit/interface/GeomDet.h>
00018 #include <Geometry/CSCGeometry/interface/CSCChamberSpecs.h>
00019 
00020 class CSCLayer;
00021 
00022 class CSCChamber : public GeomDet {
00023 
00024 public:
00025 
00026   CSCChamber( const BoundPlane::BoundPlanePointer bp, CSCDetId id, const CSCChamberSpecs* specs ) :
00027   GeomDet( bp ),  theChamberSpecs( specs ), 
00028     theComponents(6,(const CSCLayer*)0) {
00029     setDetId(id);
00030   }
00031 
00032   ~CSCChamber();
00033 
00034   const GeomDetType& type() const { return *(specs()); }
00035 
00037   CSCDetId id() const { return geographicalId(); }
00038 
00039   // Which subdetector
00040   virtual SubDetector subDetector() const {return GeomDetEnumerators::CSC;}
00041 
00042   const CSCChamberSpecs* specs() const { return theChamberSpecs; }
00043 
00045   virtual std::vector< const GeomDet* > components() const;
00046 
00048   virtual const GeomDet* component(DetId id) const;
00049 
00050 
00051   // Extension of the interface
00052 
00054   void addComponent( int n, const CSCLayer* gd );
00055 
00057   const std::vector< const CSCLayer* >& layers() const { return theComponents; }
00058 
00060   const CSCLayer* layer(CSCDetId id) const;
00061   
00064   const CSCLayer* layer(int ilay) const;
00065 
00066 private:
00067 
00068   const CSCChamberSpecs* theChamberSpecs;
00069   std::vector< const CSCLayer* > theComponents; // the 6 CSCLayers comprising a CSCChamber; are owned by this class
00070 };
00071 
00072 #endif // Geometry_CSCGeometry_CSCChamber_H