Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Geometry_GEMGeometry_GEMEtaPartition_H
0002 #define Geometry_GEMGeometry_GEMEtaPartition_H
0003 
0004 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0005 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
0006 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0007 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0008 
0009 class StripTopology;
0010 class GEMEtaPartitionSpecs;
0011 
0012 class GEMEtaPartition : public GeomDet {
0013 public:
0014   GEMEtaPartition(GEMDetId id, const BoundPlane::BoundPlanePointer& bp, GEMEtaPartitionSpecs* rrs);
0015   ~GEMEtaPartition() override;
0016 
0017   const GEMEtaPartitionSpecs* specs() const { return specs_; }
0018   GEMDetId id() const { return id_; }
0019 
0020   const Topology& topology() const override;
0021   const StripTopology& specificTopology() const;
0022 
0023   const Topology& padTopology() const;
0024   const StripTopology& specificPadTopology() const;
0025 
0026   const GeomDetType& type() const override;
0027 
0028   // strip-related methods:
0029 
0030   /// number of readout strips in partition
0031   int nstrips() const;
0032 
0033   /// returns center of strip position for INTEGER strip number
0034   /// that has a value range of [0, nstrip-1]
0035   LocalPoint centreOfStrip(int strip) const;
0036 
0037   /// returns center of strip position for FRACTIONAL strip number
0038   /// that has a value range of [0.0, nstrip)
0039   LocalPoint centreOfStrip(float strip) const;
0040   LocalError localError(float strip, float cluster_size = 1.) const;
0041   /// returns fractional strip number [0.0, nstrips) for a LocalPoint
0042   /// E.g., if local point hit strip #2, the fractional strip number would be
0043   /// somewhere in the [2.0, 3.0) interval
0044   float strip(const LocalPoint& lp) const;
0045 
0046   float pitch() const;
0047   float localPitch(const LocalPoint& lp) const;
0048 
0049   // GEM-CSC pad-related methods:
0050 
0051   /// number of GEM-CSC trigger readout pads in partition
0052   int npads() const;
0053 
0054   /// returns center of pad position for INTEGER pad number
0055   /// that has a value range of [0, npads-1]
0056   LocalPoint centreOfPad(int pad) const;
0057 
0058   /// returns center of pad position for FRACTIONAL pad number
0059   /// that has a value range of [0., npads)
0060   LocalPoint centreOfPad(float pad) const;
0061 
0062   /// returns FRACTIONAL pad number [0.,npads) for a point
0063   float pad(const LocalPoint& lp) const;
0064 
0065   /// pad pitch in a center
0066   float padPitch() const;
0067   /// pad pitch at a particular point
0068   float localPadPitch(const LocalPoint& lp) const;
0069 
0070   // relations between strips and pads:
0071 
0072   /// returns FRACTIONAL pad number [0.,npads) for an integer strip [0,nstrip-1]
0073   float padOfStrip(int strip) const;
0074 
0075   /// returns first strip (INT number [0,nstrip-1]) for pad (an integer [0,npads-1])
0076   int firstStripInPad(int pad) const;
0077 
0078   /// returns last strip (INT number [0,nstrip-1]) for pad (an integer [0,npads-1])
0079   int lastStripInPad(int pad) const;
0080 
0081   // subsystem
0082   GEMSubDetId::Station subsystem() const;
0083   bool isME0() const;
0084   bool isGE11() const;
0085   bool isGE21() const;
0086 
0087 private:
0088   GEMDetId id_;
0089   GEMEtaPartitionSpecs* specs_;
0090 };
0091 
0092 #endif