Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DTGeometry_DTChamber_h
0002 #define DTGeometry_DTChamber_h
0003 
0004 /** \class DTChamber
0005  *
0006  *  Model of a Muon Drift Tube chamber.
0007  *   
0008  *  A chamber is a GeomDet; the associated reconstructed objects are 
0009  *  4D segments built in the chamber local reference frame.
0010  *  The chamber is composed by 2 or three DTSuperLayer, which in turn are 
0011  *  composed by four DTLayer each.
0012  *
0013  *  \author S. Lacaprara, N. Amapane
0014  */
0015 
0016 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0017 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0018 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0019 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
0020 
0021 class DTSuperLayer;
0022 class DTLayer;
0023 
0024 class DTChamber : public GeomDet {
0025 public:
0026   /// Constructor
0027   DTChamber(const DTChamberId& id, const ReferenceCountingPointer<BoundPlane>& plane);
0028 
0029   /// Destructor
0030   ~DTChamber() override;
0031 
0032   /// Return the DTChamberId of this chamber
0033   DTChamberId id() const;
0034 
0035   // Which subdetector
0036   SubDetector subDetector() const override { return GeomDetEnumerators::DT; }
0037 
0038   /// equal if the id is the same
0039   bool operator==(const DTChamber& ch) const;
0040 
0041   /// Add SL to the chamber which takes ownership
0042   void add(DTSuperLayer* sl);
0043 
0044   /// Return the superlayers in the chamber
0045   std::vector<const GeomDet*> components() const override;
0046 
0047   /// Return the sub-component (SL or layer) with a given id in this chamber
0048   const GeomDet* component(DetId id) const override;
0049 
0050   /// Return the superlayers in the chamber
0051   const std::vector<const DTSuperLayer*>& superLayers() const;
0052 
0053   /// Return the superlayer corresponding to the given id
0054   const DTSuperLayer* superLayer(const DTSuperLayerId& id) const;
0055 
0056   /// Return the given superlayer.
0057   /// Superlayers are numbered 1 (phi), 2 (Z), 3 (phi)
0058   const DTSuperLayer* superLayer(int isl) const;
0059 
0060   /// Return the layer corresponding to the given id
0061   const DTLayer* layer(const DTLayerId& id) const;
0062 
0063 private:
0064   DTChamberId theId;
0065 
0066   // The chamber owns its SL
0067   std::vector<const DTSuperLayer*> theSLs;
0068 };
0069 #endif