Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Geometry_TrackerTopology_ProxyStripTopology_H
0002 #define Geometry_TrackerTopology_ProxyStripTopology_H
0003 
0004 /// ProxyStripTopology
0005 ///
0006 /// Class derived from StripTopology that serves as a proxy to the
0007 /// actual topology for a given StripGeomDetType. In addition, the
0008 /// class holds a pointer to the surface deformation parameters.
0009 /// ProxyStripTopology takes over ownership of the surface
0010 /// deformation parameters.
0011 ///
0012 /// All inherited virtual methods that take the
0013 /// predicted track state as a parameter are reimplemented in order
0014 /// to apply corrections due to the surface deformations.
0015 //
0016 /// The 'old' methods without the track predictions simply call
0017 /// the method of the actual StripTopology.
0018 /// While one could easily deduce corrections from the given
0019 /// LocalPosition (and track angles 0) when converting from local frame
0020 /// to measurement frame, this is not done to be consistent with the
0021 /// methods converting the other way round where the essential y-coordinate
0022 /// is basically missing (it is a 1D strip detector...)
0023 ///
0024 ///  \author    : Andreas Mussgiller
0025 ///  date       : November 2010
0026 
0027 #include "Geometry/CommonTopologies/interface/SurfaceDeformation.h"
0028 #include "Geometry/CommonTopologies/interface/StripTopology.h"
0029 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetType.h"
0030 class Plane;
0031 
0032 class ProxyStripTopology final : public StripTopology {
0033 public:
0034   ProxyStripTopology(StripGeomDetType const* type, Plane* bp);
0035 
0036   LocalPoint localPosition(const MeasurementPoint& mp) const override { return specificTopology().localPosition(mp); }
0037   /// conversion taking also the predicted track state
0038   LocalPoint localPosition(const MeasurementPoint& mp, const Topology::LocalTrackPred& trkPred) const override;
0039 
0040   LocalPoint localPosition(float strip) const override { return specificTopology().localPosition(strip); }
0041   /// conversion taking also the predicted track state
0042   LocalPoint localPosition(float strip, const Topology::LocalTrackPred& trkPred) const override;
0043 
0044   LocalError localError(float strip, float stripErr2) const override {
0045     return specificTopology().localError(strip, stripErr2);
0046   }
0047   /// conversion taking also the predicted track state
0048   LocalError localError(float strip, float stripErr2, const Topology::LocalTrackPred& trkPred) const override;
0049 
0050   LocalError localError(const MeasurementPoint& mp, const MeasurementError& me) const override {
0051     return specificTopology().localError(mp, me);
0052   }
0053   /// conversion taking also the predicted track state
0054   LocalError localError(const MeasurementPoint& mp,
0055                         const MeasurementError& me,
0056                         const Topology::LocalTrackPred& trkPred) const override;
0057 
0058   MeasurementPoint measurementPosition(const LocalPoint& lp) const override {
0059     return specificTopology().measurementPosition(lp);
0060   }
0061   MeasurementPoint measurementPosition(const LocalPoint& lp, const Topology::LocalTrackAngles& dir) const override;
0062 
0063   MeasurementError measurementError(const LocalPoint& lp, const LocalError& le) const override {
0064     return specificTopology().measurementError(lp, le);
0065   }
0066   MeasurementError measurementError(const LocalPoint& lp,
0067                                     const LocalError& le,
0068                                     const Topology::LocalTrackAngles& dir) const override;
0069 
0070   int channel(const LocalPoint& lp) const override { return specificTopology().channel(lp); }
0071   int channel(const LocalPoint& lp, const Topology::LocalTrackAngles& dir) const override;
0072 
0073   float strip(const LocalPoint& lp) const override { return specificTopology().strip(lp); }
0074   /// conversion taking also the track state (LocalTrajectoryParameters)
0075   float strip(const LocalPoint& lp, const Topology::LocalTrackAngles& dir) const override;
0076 
0077   float coveredStrips(const LocalPoint& lp1, const LocalPoint& lp2) const override {
0078     return specificTopology().coveredStrips(lp1, lp2);
0079   }
0080 
0081   float pitch() const override { return specificTopology().pitch(); }
0082   float localPitch(const LocalPoint& lp) const override { return specificTopology().localPitch(lp); }
0083   /// conversion taking also the angle from the track state (LocalTrajectoryParameters)
0084   float localPitch(const LocalPoint& lp, const Topology::LocalTrackAngles& dir) const override;
0085 
0086   float stripAngle(float strip) const override { return specificTopology().stripAngle(strip); }
0087 
0088   int nstrips() const override { return specificTopology().nstrips(); }
0089 
0090   float stripLength() const override { return specificTopology().stripLength(); }
0091   float localStripLength(const LocalPoint& lp) const override { return specificTopology().localStripLength(lp); }
0092   float localStripLength(const LocalPoint& lp, const Topology::LocalTrackAngles& dir) const override;
0093 
0094   virtual const GeomDetType& type() const { return *theType; }
0095   virtual StripGeomDetType const& specificType() const { return *theType; }
0096 
0097   const SurfaceDeformation* surfaceDeformation() const { return theSurfaceDeformation.operator->(); }
0098   virtual void setSurfaceDeformation(const SurfaceDeformation* deformation);
0099 
0100   virtual const StripTopology& specificTopology() const { return specificType().specificTopology(); }
0101 
0102 private:
0103   /// Internal method to get correction of the position from SurfaceDeformation,
0104   /// must not be called if 'theSurfaceDeformation' is a null pointer.
0105   SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint& pos,
0106                                                        const Topology::LocalTrackAngles& dir) const;
0107   /// Internal method to get correction of the position from SurfaceDeformation,
0108   /// must not be called if 'theSurfaceDeformation' is a null pointer.
0109   SurfaceDeformation::Local2DVector positionCorrection(const Topology::LocalTrackPred& trk) const;
0110 
0111   StripGeomDetType const* theType;
0112   float theLength, theWidth;
0113   std::unique_ptr<const SurfaceDeformation> theSurfaceDeformation;
0114 };
0115 
0116 #endif