Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:10

0001 #ifndef Geometry_GEMGeometry_GEMSuperChamber_h
0002 #define Geometry_GEMGeometry_GEMSuperChamber_h
0003 
0004 /** \class GEMSuperChamber
0005  *
0006  *  Model of a GEM super chamber.
0007  *   
0008  *  The super chamber is composed of 2 chambers.
0009  *  It's detId is layer 0, chambers are layer 1 and 2
0010  *
0011  *  \author S. Dildick
0012  */
0013 
0014 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0015 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0016 
0017 class GEMChamber;
0018 
0019 class GEMSuperChamber : public GeomDet {
0020 public:
0021   /// constructor
0022   GEMSuperChamber(GEMDetId id, const ReferenceCountingPointer<BoundPlane>& plane);
0023 
0024   /// destructor
0025   ~GEMSuperChamber() override;
0026 
0027   /// Return the GEMDetId of this super chamber
0028   GEMDetId id() const;
0029 
0030   /// Return the vector of GEMDetIds in this super chamber
0031   const std::vector<GEMDetId>& ids() const;
0032 
0033   // Which subdetector
0034   SubDetector subDetector() const override { return GeomDetEnumerators::GEM; }
0035 
0036   /// equal if the id is the same
0037   bool operator==(const GEMSuperChamber& sch) const;
0038 
0039   /// Add chamber to the super chamber which takes ownership
0040   void add(const GEMChamber* ch);
0041 
0042   /// Return the chambers in the super chamber
0043   std::vector<const GeomDet*> components() const override;
0044 
0045   /// Return the sub-component (chamber) with a given id in this super chamber
0046   const GeomDet* component(DetId id) const override;
0047 
0048   /// Return the chamber corresponding to the given id
0049   const GEMChamber* chamber(GEMDetId id) const;
0050 
0051   const GEMChamber* chamber(int layer) const;
0052 
0053   /// Return the chambers in the super chamber
0054   const std::vector<const GEMChamber*>& chambers() const;
0055 
0056   /// Return numbers of chambers
0057   int nChambers() const;
0058 
0059   float computeDeltaPhi(const LocalPoint& position, const LocalVector& direction) const;
0060 
0061 private:
0062   GEMDetId detId_;
0063 
0064   // vector of chambers for a super chamber
0065   std::vector<const GEMChamber*> chambers_;
0066 };
0067 #endif