Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:29

0001 #ifndef Geometry_CommonTopologies_ProxyPixelTopology_H
0002 #define Geometry_CommonTopologies_ProxyPixelTopology_H
0003 
0004 /// ProxyStripTopology
0005 ///
0006 /// Class derived from PixelTopology that serves as a proxy to the
0007 /// actual topology for a given PixelGeomDetType. In addition, the
0008 /// class holds a pointer to the surface deformation parameters.
0009 /// ProxyPixelTopology takes over ownership of the surface
0010 /// deformation parameters.
0011 ///
0012 /// All inherited virtual methods that take the predicted track
0013 /// state as a parameter are reimplemented in order to apply
0014 /// corrections due to the surface deformations.
0015 //
0016 /// The 'old' methods without the track predictions simply call
0017 /// the method of the actual topology.
0018 ///
0019 ///  \author    : Andreas Mussgiller
0020 ///  date       : December 2010
0021 
0022 #include "Geometry/CommonTopologies/interface/SurfaceDeformation.h"
0023 #include "Geometry/CommonTopologies/interface/PixelTopology.h"
0024 #include "Geometry/CommonTopologies/interface/PixelGeomDetType.h"
0025 
0026 class Plane;
0027 
0028 class ProxyPixelTopology final : public PixelTopology {
0029 public:
0030   ProxyPixelTopology(PixelGeomDetType const *type, Plane *bp);
0031 
0032   LocalPoint localPosition(const MeasurementPoint &) const override;
0033   /// conversion taking also the predicted track state
0034   LocalPoint localPosition(const MeasurementPoint &mp, const Topology::LocalTrackPred &trkPred) const override;
0035 
0036   LocalError localError(const MeasurementPoint &, const MeasurementError &) const override;
0037   /// conversion taking also the predicted track state
0038   LocalError localError(const MeasurementPoint &mp,
0039                         const MeasurementError &me,
0040                         const Topology::LocalTrackPred &trkPred) const override;
0041 
0042   MeasurementPoint measurementPosition(const LocalPoint &) const override;
0043   MeasurementPoint measurementPosition(const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const override;
0044 
0045   MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const override;
0046   MeasurementError measurementError(const LocalPoint &lp,
0047                                     const LocalError &le,
0048                                     const Topology::LocalTrackAngles &dir) const override;
0049 
0050   int channel(const LocalPoint &) const override;
0051   int channel(const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const override;
0052 
0053   std::pair<float, float> pixel(const LocalPoint &p) const override;
0054   /// conversion taking also the angle from the track state
0055   std::pair<float, float> pixel(const LocalPoint &p, const Topology::LocalTrackAngles &ltp) const override;
0056 
0057   std::pair<float, float> pitch() const override { return specificTopology().pitch(); }
0058   int nrows() const override { return specificTopology().nrows(); }
0059   int ncolumns() const override { return specificTopology().ncolumns(); }
0060   int rocsY() const override { return specificTopology().rocsY(); }
0061   int rocsX() const override { return specificTopology().rocsX(); }
0062   int rowsperroc() const override { return specificTopology().rowsperroc(); }
0063   int colsperroc() const override { return specificTopology().colsperroc(); }
0064   bool isBricked() const override { return specificTopology().isBricked(); }
0065   float localX(const float mpX) const override;
0066   float localX(const float mpX, const Topology::LocalTrackPred &trkPred) const override;
0067   float localY(const float mpY) const override;
0068   float localY(const float mpY, const Topology::LocalTrackPred &trkPred) const override;
0069 
0070   bool isItBigPixelInX(const int ixbin) const override { return specificTopology().isItBigPixelInX(ixbin); }
0071   bool isItBigPixelInY(const int iybin) const override { return specificTopology().isItBigPixelInY(iybin); }
0072   bool containsBigPixelInX(int ixmin, int ixmax) const override {
0073     return specificTopology().containsBigPixelInX(ixmin, ixmax);
0074   }
0075   bool containsBigPixelInY(int iymin, int iymax) const override {
0076     return specificTopology().containsBigPixelInY(iymin, iymax);
0077   }
0078 
0079   bool isItEdgePixelInX(int ixbin) const override { return specificTopology().isItEdgePixelInX(ixbin); }
0080   bool isItEdgePixelInY(int iybin) const override { return specificTopology().isItEdgePixelInY(iybin); }
0081   bool isItEdgePixel(int ixbin, int iybin) const override { return specificTopology().isItEdgePixel(ixbin, iybin); }
0082 
0083   virtual const GeomDetType &type() const { return *theType; }
0084 
0085   virtual PixelGeomDetType const &specificType() const { return *theType; }
0086 
0087   const SurfaceDeformation *surfaceDeformation() const { return theSurfaceDeformation.operator->(); }
0088   virtual void setSurfaceDeformation(const SurfaceDeformation *deformation);
0089 
0090   virtual const PixelTopology &specificTopology() const { return specificType().specificTopology(); }
0091 
0092 private:
0093   /// Internal method to get correction of the position from SurfaceDeformation,
0094   /// must not be called if 'theSurfaceDeformation' is a null pointer.
0095   SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos,
0096                                                        const Topology::LocalTrackAngles &dir) const;
0097   /// Internal method to get correction of the position from SurfaceDeformation,
0098   /// must not be called if 'theSurfaceDeformation' is a null pointer.
0099   SurfaceDeformation::Local2DVector positionCorrection(const Topology::LocalTrackPred &trk) const;
0100 
0101   PixelGeomDetType const *theType;
0102   float theLength, theWidth;
0103   std::unique_ptr<const SurfaceDeformation> theSurfaceDeformation;
0104 };
0105 
0106 #endif