Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Geometry_GEMGeometry_ME0Chamber_h
0002 #define Geometry_GEMGeometry_ME0Chamber_h
0003 
0004 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0005 #include "DataFormats/MuonDetId/interface/ME0DetId.h"
0006 
0007 class ME0Layer;
0008 class ME0EtaPartition;
0009 
0010 class ME0Chamber : public GeomDet {
0011 public:
0012   /// Constructor
0013   ME0Chamber(ME0DetId id, const ReferenceCountingPointer<BoundPlane>& plane);
0014 
0015   /// Destructor
0016   ~ME0Chamber() override;
0017 
0018   /// Return the ME0DetId of this chamber
0019   ME0DetId id() const;
0020 
0021   // Which subdetector
0022   SubDetector subDetector() const override { return GeomDetEnumerators::ME0; }
0023 
0024   /// equal if the id is the same
0025   bool operator==(const ME0Chamber& ch) const;
0026 
0027   /// Add Layer to the chamber which takes ownership
0028   void add(ME0Layer* layer);
0029 
0030   /// Return the rolls in the chamber
0031   std::vector<const GeomDet*> components() const override;
0032 
0033   /// Return the sub-component (roll) with a given id in this chamber
0034   const GeomDet* component(DetId id) const override;
0035 
0036   /// Return the layer corresponding to the given id
0037   const ME0Layer* layer(ME0DetId id) const;
0038 
0039   const ME0Layer* layer(int isl) const;
0040 
0041   /// Return the layers
0042   const std::vector<const ME0Layer*>& layers() const;
0043 
0044   /// Retunr numbers of layers
0045   int nLayers() const;
0046 
0047   /// To support the old ME0 Geometry (with 1 eta partition)
0048   /// Add EtaPartition to the chamber which takes ownership
0049   void add(ME0EtaPartition* roll);
0050 
0051   /// To support the old ME0 Geometry (with 1 eta partition)
0052   /// Return the eta partition corresponding to the given id
0053   const ME0EtaPartition* etaPartition(ME0DetId id) const;
0054 
0055   const ME0EtaPartition* etaPartition(int isl) const;
0056 
0057   /// To support the old ME0 Geometry (with 1 eta partition)
0058   /// Return the eta partitions
0059   const std::vector<const ME0EtaPartition*>& etaPartitions() const;
0060 
0061   /// To support the old ME0 Geometry (with 1 eta partition)
0062   /// Retunr numbers of eta partitions
0063   int nEtaPartitions() const;
0064 
0065   //For a line fit in the chamber frame, compute: global phi position extrapolated
0066   //to the last layer - that extrapolated to the inner layer
0067   float computeDeltaPhi(const LocalPoint& position, const LocalVector& direction) const;
0068 
0069 private:
0070   ME0DetId detId_;
0071 
0072   // vector of layers for a chamber
0073   std::vector<const ME0Layer*> layers_;
0074   // vector of eta partitions for a chamber
0075   std::vector<const ME0EtaPartition*> etaPartitions_;
0076 };
0077 #endif