Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:51

0001 #ifndef _RADIAL_STRIP_TOPOLOGY_H_
0002 #define _RADIAL_STRIP_TOPOLOGY_H_
0003 
0004 #include "Geometry/CommonTopologies/interface/StripTopology.h"
0005 
0006 /**
0007  * \class RadialStripTopology
0008  * A StripTopology in which the component strips subtend a constant
0009  * angular width, and, if projected, intersect at a point.
0010  *
0011  * \author Tim Cox
0012  *
0013  * WARNING! Wherever 'float strip' is used the units of 'strip' are angular
0014  * widths of each strip. The range is from 0.0 at the extreme edge of the
0015  * 'first' strip at one edge of the detector, to nstrip*angular width
0016  * at the other edge. <BR>
0017  * The centre of the first strip is at strip = 0.5 <BR>
0018  * The centre of the last strip is at strip = 0.5 + (nstrip-1) <BR>
0019  * This is for consistency with CommonDet usage of 'float strip' (but
0020  * where units are strip pitch rather than strip angular width.)<BR>
0021  *
0022  * WARNING! If the mid-point along local y of the plane of strips does not correspond
0023  * to the local coordinate origin, set the final ctor argument appropriately. <BR>
0024  *
0025  * now is an abstract class to allow different specialization for tracker and muon
0026  */
0027 
0028 class RadialStripTopology : public StripTopology {
0029 public:
0030   /** 
0031    * Destructor
0032    */
0033   ~RadialStripTopology() override {}
0034 
0035   // =========================================================
0036   // StripTopology interface - implement pure virtual methods
0037   // =========================================================
0038 
0039   /** 
0040    * LocalPoint on x axis for given 'strip'
0041    * 'strip' is a float in units of the strip (angular) width
0042    */
0043   LocalPoint localPosition(float strip) const override = 0;
0044 
0045   using StripTopology::localPosition;
0046   /** 
0047    * LocalPoint for a given MeasurementPoint <BR>
0048    * What's a MeasurementPoint?  <BR>
0049    * In analogy with that used with TrapezoidalStripTopology objects,
0050    * a MeasurementPoint is a 2-dim object.<BR>
0051    * The first dimension measures the
0052    * angular position wrt central line of symmetry of detector,
0053    * in units of strip (angular) widths (range 0 to total angle subtended
0054    * by a detector).<BR>
0055    * The second dimension measures
0056    * the fractional position along the strip (range -0.5 to +0.5).<BR>
0057    * BEWARE! The components are not Cartesian.<BR>
0058    */
0059   LocalPoint localPosition(const MeasurementPoint&) const override = 0;
0060 
0061   using StripTopology::localError;
0062   /** 
0063    * LocalError for a pure strip measurement, where 'strip'
0064    * is the (float) position (a 'phi' angle wrt y axis) and
0065    * stripErr2 is the sigma-squared. Both quantities are expressed in
0066    * units of theAngularWidth of a strip.
0067    */
0068   LocalError localError(float strip, float stripErr2) const override = 0;
0069 
0070   /** 
0071    * LocalError for a given MeasurementPoint with known MeasurementError.
0072    * This may be used in Kalman filtering and hence must allow possible
0073    * correlations between the components.
0074    */
0075   LocalError localError(const MeasurementPoint&, const MeasurementError&) const override = 0;
0076 
0077   /** 
0078    * Strip in which a given LocalPoint lies. This is a float which
0079    * represents the fractional strip position within the detector.<BR>
0080    * Returns zero if the LocalPoint falls at the extreme low edge of the
0081    * detector or BELOW, and float(nstrips) if it falls at the extreme high
0082    * edge or ABOVE.
0083    */
0084   float strip(const LocalPoint&) const override = 0;
0085 
0086   /** 
0087    * BEWARE: calling pitch() throws an exception.<BR>
0088    * Pitch is conventional name for width of something, but this is
0089    * not sensible for a RadialStripTopology since strip widths vary with local y.
0090    * Use localPitch(.) instead.
0091    */
0092   float pitch() const final;
0093 
0094   /** 
0095    * Pitch (strip width) at a given LocalPoint. <BR>
0096    * BEWARE: are you sure you really want to call this for a RadialStripTopology?
0097    */
0098   float localPitch(const LocalPoint&) const override = 0;
0099 
0100   /** 
0101    * Angle between strip and symmetry axis (=local y axis)
0102    * for given strip. <BR>
0103    * This is like a phi angle but measured clockwise from y axis 
0104    * rather than counter clockwise from x axis.
0105    * Note that 'strip' is a float with a continuous range from 0 to 
0106    * float(nstrips) to cover the whole detector, and the centres of
0107    * strips correspond to half-integer values 0.5, 1.5, ..., nstrips-0.5
0108    * whereas values 1, 2, ... nstrips correspond to the upper phi edges of
0109    * the strips.
0110    */
0111   float stripAngle(float strip) const override = 0;
0112 
0113   /** 
0114    * Total number of strips 
0115    */
0116   int nstrips() const override = 0;
0117 
0118   /** 
0119    * Height of detector (= length of long symmetry axis of the plane of strips).
0120    */
0121   float stripLength() const override = 0;
0122 
0123   /** 
0124    * Length of a strip passing through a given LocalPpoint
0125    */
0126   float localStripLength(const LocalPoint&) const override = 0;
0127 
0128   // =========================================================
0129   // Topology interface (not already implemented for
0130   // StripTopology interface)
0131   // =========================================================
0132 
0133   MeasurementPoint measurementPosition(const LocalPoint&) const override = 0;
0134 
0135   MeasurementError measurementError(const LocalPoint&, const LocalError&) const override = 0;
0136 
0137   /** 
0138    * Channel number corresponding to a given LocalPoint.<BR>
0139    * This is effectively an integer version of strip(), with range 0 to
0140    * nstrips-1.  <BR>
0141    * LocalPoints outside the detector strip plane will be considered
0142    * as contributing to the edge channels 0 or nstrips-1.
0143    */
0144   int channel(const LocalPoint&) const override = 0;
0145 
0146   // =========================================================
0147   // RadialStripTopology interface itself
0148   // =========================================================
0149 
0150   /** 
0151    * Angular width of a each strip
0152    */
0153   virtual float angularWidth() const = 0;
0154 
0155   /** 
0156    * Phi pitch of each strip (= angular width!)
0157    */
0158   virtual float phiPitch(void) const = 0;
0159 
0160   /** 
0161    * Length of long symmetry axis of plane of strips
0162    */
0163   virtual float detHeight() const = 0;
0164 
0165   /** 
0166    * y extent of strip plane
0167    */
0168   virtual float yExtentOfStripPlane() const = 0;  // same as detHeight()
0169 
0170   /** 
0171    * Distance from the intersection of the projections of
0172    * the extreme edges of the two extreme strips to the symmetry
0173    * centre of the plane of strips. 
0174    */
0175   virtual float centreToIntersection() const = 0;
0176   /** 
0177    * (y) distance from intersection of the projections of the strips
0178    * to the local coordinate origin. Same as centreToIntersection()
0179    * if symmetry centre of strip plane coincides with local origin.
0180    */
0181   virtual float originToIntersection() const = 0;
0182   /**
0183    * Convenience function to access azimuthal angle of extreme edge of first strip 
0184    * measured relative to long symmetry axis of the plane of strips. <BR>
0185    *
0186    * WARNING! This angle is measured clockwise from the local y axis 
0187    * which means it is in the conventional azimuthal phi plane, 
0188    * but azimuth is of course measured from local x axis not y. 
0189    * The range of this angle is
0190    *  -(full angle)/2 to +(full angle)/2. <BR>
0191    * where (full angle) = nstrips() * angularWidth(). <BR>
0192    *
0193    */
0194   virtual float phiOfOneEdge() const = 0;
0195 
0196   /**
0197    * Local x where centre of strip intersects input local y <BR>
0198    * 'strip' should be in range 1 to nstrips() <BR>
0199    */
0200   virtual float xOfStrip(int strip, float y) const = 0;
0201 
0202   /**
0203    * Nearest strip to given LocalPoint
0204    */
0205   virtual int nearestStrip(const LocalPoint&) const = 0;
0206 
0207   /** 
0208    * y axis orientation, 1 means detector width increases with local y
0209    */
0210   virtual float yAxisOrientation() const = 0;
0211 
0212   /**
0213    * Offset in local y between midpoint of detector (strip plane) extent and local origin
0214    */
0215   virtual float yCentreOfStripPlane() const = 0;
0216 
0217   /**
0218    * Distance in local y from a hit to the point of intersection of projected strips
0219    */
0220   virtual float yDistanceToIntersection(float y) const = 0;
0221 
0222   friend std::ostream& operator<<(std::ostream&, const RadialStripTopology&);
0223 };
0224 
0225 #endif