CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/Geometry/TrackerGeometryBuilder/interface/ProxyPixelTopology.h

Go to the documentation of this file.
00001 #ifndef Geometry_TrackerTopology_ProxyPixelTopology_H
00002 #define Geometry_TrackerTopology_ProxyPixelTopology_H
00003 
00015 //
00024 
00025 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
00026 
00027 #include "Geometry/CommonTopologies/interface/SurfaceDeformation.h"
00028 #include "Geometry/CommonTopologies/interface/PixelTopology.h"
00029 
00030 class PixelGeomDetType;
00031 class BoundPlane;
00032 
00033 class ProxyPixelTopology GCC11_FINAL : public PixelTopology {
00034 public:
00035 
00036   ProxyPixelTopology( PixelGeomDetType* type, BoundPlane * bp );
00037 
00038   virtual LocalPoint localPosition( const MeasurementPoint& ) const;
00040   virtual LocalPoint localPosition( const MeasurementPoint& mp,
00041                                     const Topology::LocalTrackPred &trkPred ) const;
00042   
00043   virtual LocalError localError( const MeasurementPoint&,
00044                                  const MeasurementError& ) const;
00046   virtual LocalError localError( const MeasurementPoint& mp,
00047                                  const MeasurementError& me,
00048                                  const Topology::LocalTrackPred &trkPred ) const;
00049 
00050   virtual MeasurementPoint measurementPosition( const LocalPoint & ) const;
00051   virtual MeasurementPoint measurementPosition( const LocalPoint &lp, 
00052                                                 const Topology::LocalTrackAngles &dir ) const;
00053 
00054   virtual MeasurementError measurementError( const LocalPoint &lp, const LocalError &le ) const;
00055   virtual MeasurementError measurementError( const LocalPoint &lp, const LocalError &le,
00056                                              const Topology::LocalTrackAngles &dir ) const;
00057 
00058   virtual int channel( const LocalPoint& ) const;
00059   virtual int channel( const LocalPoint &lp, const Topology::LocalTrackAngles &dir ) const;
00060   
00061   virtual std::pair<float,float> pixel( const LocalPoint& p) const;
00063   virtual std::pair<float,float> pixel( const LocalPoint& p,
00064                                         const Topology::LocalTrackAngles &ltp ) const; 
00065   
00066   virtual std::pair<float,float> pitch() const;
00067   virtual int nrows() const;
00068   virtual int ncolumns() const;
00069 
00070   virtual float localX( const float mpX ) const;
00071   virtual float localX( const float mpX, const Topology::LocalTrackPred &trkPred ) const;
00072   virtual float localY( const float mpY ) const;
00073   virtual float localY( const float mpY, const Topology::LocalTrackPred &trkPred ) const;
00074 
00075   virtual bool isItBigPixelInX(const int ixbin) const {
00076     return specificTopology().isItBigPixelInX(ixbin);
00077   }
00078   virtual bool isItBigPixelInY(const int iybin) const {
00079     return specificTopology().isItBigPixelInY(iybin);
00080   }
00081   virtual bool containsBigPixelInX(const int& ixmin, const int& ixmax) const {
00082     return specificTopology().containsBigPixelInX(ixmin, ixmax);
00083   }
00084   virtual bool containsBigPixelInY(const int& iymin, const int& iymax) const {
00085     return specificTopology().containsBigPixelInY(iymin, iymax);
00086   }
00087 
00088   virtual bool isItEdgePixelInX(int ixbin) const {
00089     return specificTopology().isItEdgePixelInX(ixbin);
00090   }
00091   virtual bool isItEdgePixelInY(int iybin) const {
00092     return specificTopology().isItEdgePixelInY(iybin);
00093   }
00094   virtual bool isItEdgePixel(int ixbin, int iybin) const {
00095     return specificTopology().isItEdgePixel(ixbin, iybin);
00096   }
00097 
00098   virtual const GeomDetType& type() const;
00099   virtual PixelGeomDetType& specificType() const;
00100 
00101   const SurfaceDeformation * surfaceDeformation() const { 
00102     return theSurfaceDeformation.operator->();
00103   }
00104   virtual void setSurfaceDeformation(const SurfaceDeformation * deformation);
00105 
00106 private:
00107   
00108   virtual const PixelTopology& specificTopology() const;
00111   SurfaceDeformation::Local2DVector
00112     positionCorrection(const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const;
00115   SurfaceDeformation::Local2DVector
00116     positionCorrection(const Topology::LocalTrackPred &trk) const;
00117   
00118   PixelGeomDetType* theType;  
00119   float theLength, theWidth;
00120   DeepCopyPointerByClone<const SurfaceDeformation> theSurfaceDeformation;
00121 };
00122 
00123 #endif