Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:00

0001 #ifndef RPCGeometry_RPCChamber_h
0002 #define RPCGeometry_RPCChamber_h
0003 
0004 /** \class RPCChamber
0005  *
0006  *  Model of a RPC chamber.
0007  *   
0008  *  A chamber is a GeomDet.
0009  *  The chamber is composed by 2 or 3 Roll (GeomDetUnit).
0010  *
0011  *  \author R. Trentadue
0012  */
0013 
0014 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0015 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0016 
0017 class RPCRoll;
0018 
0019 class RPCChamber : public GeomDet {
0020 public:
0021   /// Constructor
0022   RPCChamber(RPCDetId id, const ReferenceCountingPointer<BoundPlane>& plane);
0023   /// Destructor
0024   ~RPCChamber() override;
0025 
0026   /// Return the RPCChamberId of this chamber
0027   RPCDetId id() const;
0028 
0029   // Which subdetector
0030   SubDetector subDetector() const override { return GeomDetEnumerators::RPCBarrel; }
0031 
0032   /// equal if the id is the same
0033   bool operator==(const RPCChamber& ch) const;
0034 
0035   /// Add Roll to the chamber which takes ownership
0036   void add(RPCRoll* rl);
0037 
0038   /// Return the rolls in the chamber
0039   std::vector<const GeomDet*> components() const override;
0040 
0041   /// Return the sub-component (roll) with a given id in this chamber
0042   const GeomDet* component(DetId id) const override;
0043 
0044   /// Return the Roll corresponding to the given id
0045   const RPCRoll* roll(RPCDetId id) const;
0046 
0047   const RPCRoll* roll(int isl) const;
0048 
0049   /// Return the Rolls
0050   const std::vector<const RPCRoll*>& rolls() const;
0051 
0052   /// Retunr numbers of rolls
0053   int nrolls() const;
0054 
0055 private:
0056   RPCDetId theId;
0057 
0058   // The chamber owns its Rolls
0059   std::vector<const RPCRoll*> theRolls;
0060 };
0061 #endif