Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Geometry_CommonTopologies_StripTopology_H
0002 #define Geometry_CommonTopologies_StripTopology_H
0003 
0004 #include "Geometry/CommonTopologies/interface/Topology.h"
0005 
0006 /** Interface for all strip topologies.
0007  *  Extends the Topology interface with methods relevant for
0008  *  strip or wire detectors.
0009  */
0010 
0011 class StripTopology : public Topology {
0012 public:
0013   ~StripTopology() override {}
0014 
0015   // GF: I hate the stupid hiding feature of C++, see
0016   // http://www.parashift.com/c%2B%2B-faq-lite/strange-inheritance.html#faq-23.9
0017   using Topology::localPosition;
0018   virtual LocalPoint localPosition(float strip) const = 0;
0019   /// conversion taking also the predicted track state
0020   virtual LocalPoint localPosition(float strip, const Topology::LocalTrackPred& /*trkPred*/) const {
0021     return localPosition(strip);
0022   }
0023   virtual LocalError localError(float strip, float stripErr2) const = 0;
0024 
0025   /// conversion taking also the angle from the predicted track state
0026   virtual LocalError localError(float strip, float stripErr2, const Topology::LocalTrackPred& /*trkPred*/) const {
0027     return localError(strip, stripErr2);
0028   }
0029   using Topology::localError;  // see comment about hiding an C++ 'using' feature above
0030   virtual float strip(const LocalPoint&) const = 0;
0031 
0032   /// conversion taking also the angle from the track state (LocalTrajectoryParameters)
0033   virtual float strip(const LocalPoint& lp, const Topology::LocalTrackAngles& /*ltp*/) const { return strip(lp); }
0034 
0035   // the number of strip span by the segment between the two points..
0036   virtual float coveredStrips(const LocalPoint& lp1, const LocalPoint& lp2) const {
0037     return (measurementPosition(lp1) - measurementPosition(lp2)).x();
0038   }
0039 
0040   virtual float pitch() const = 0;
0041   virtual float localPitch(const LocalPoint&) const = 0;
0042 
0043   /// conversion taking also the angle from the track state (LocalTrajectoryParameters)
0044   virtual float localPitch(const LocalPoint& lp, const Topology::LocalTrackAngles& /*ltp*/) const {
0045     return localPitch(lp);
0046   }
0047   virtual float stripAngle(float strip) const = 0;
0048 
0049   virtual int nstrips() const = 0;
0050 
0051   virtual float stripLength() const = 0;
0052   virtual float localStripLength(const LocalPoint& aLP) const = 0;
0053 
0054   /// conversion taking also the angle from the track state (LocalTrajectoryParameters)
0055   virtual float localStripLength(const LocalPoint& lp, const Topology::LocalTrackAngles& /*ltp*/) const {
0056     return localStripLength(lp);
0057   }
0058 };
0059 
0060 #endif