Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef GEMGeometry_GEMChamber_h
0002 #define GEMGeometry_GEMChamber_h
0003 
0004 /** \class GEMChamber
0005  *
0006  *  Model of a GEM chamber.
0007  *   
0008  *  A chamber is a GeomDet.
0009  *  The chamber is composed by 6,8 or 10 eta partitions (GeomDetUnit).
0010  *
0011  *  \author S. Dildick
0012  */
0013 
0014 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0015 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0016 
0017 class GEMEtaPartition;
0018 
0019 class GEMChamber : public GeomDet {
0020 public:
0021   /// Constructor
0022   GEMChamber(GEMDetId id, const ReferenceCountingPointer<BoundPlane>& plane);
0023 
0024   /// Destructor
0025   ~GEMChamber() override;
0026 
0027   /// Return the GEMDetId of this chamber
0028   GEMDetId id() const;
0029 
0030   // Which subdetector
0031   SubDetector subDetector() const override { return GeomDetEnumerators::GEM; }
0032 
0033   /// equal if the id is the same
0034   bool operator==(const GEMChamber& ch) const;
0035 
0036   /// Add EtaPartition to the chamber which takes ownership
0037   void add(const GEMEtaPartition* roll);
0038 
0039   /// Return the rolls in the chamber
0040   std::vector<const GeomDet*> components() const override;
0041 
0042   /// Return the sub-component (roll) with a given id in this chamber
0043   const GeomDet* component(DetId id) const override;
0044 
0045   /// Return the eta partition corresponding to the given id
0046   const GEMEtaPartition* etaPartition(GEMDetId id) const;
0047 
0048   const GEMEtaPartition* etaPartition(int isl) const;
0049 
0050   /// Return the eta partitions
0051   const std::vector<const GEMEtaPartition*>& etaPartitions() const;
0052 
0053   /// Retunr numbers of eta partitions
0054   int nEtaPartitions() const;
0055 
0056 private:
0057   GEMDetId detId_;
0058 
0059   // vector of eta partitions for a chamber
0060   std::vector<const GEMEtaPartition*> etaPartitions_;
0061 };
0062 #endif