CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

ProxyPixelTopology Class Reference

#include <ProxyPixelTopology.h>

Inheritance diagram for ProxyPixelTopology:
PixelTopology Topology

List of all members.

Public Member Functions

virtual int channel (const LocalPoint &) const
virtual int channel (const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const
 conversion taking also the angle from the track state
virtual bool containsBigPixelInX (const int &ixmin, const int &ixmax) const
virtual bool containsBigPixelInY (const int &iymin, const int &iymax) const
virtual bool isItBigPixelInX (const int ixbin) const
virtual bool isItBigPixelInY (const int iybin) const
virtual bool isItEdgePixel (int ixbin, int iybin) const
virtual bool isItEdgePixelInX (int ixbin) const
virtual bool isItEdgePixelInY (int iybin) const
virtual LocalError localError (const MeasurementPoint &, const MeasurementError &) const
virtual LocalError localError (const MeasurementPoint &mp, const MeasurementError &me, const Topology::LocalTrackPred &trkPred) const
 conversion taking also the predicted track state
virtual LocalPoint localPosition (const MeasurementPoint &) const
virtual LocalPoint localPosition (const MeasurementPoint &mp, const Topology::LocalTrackPred &trkPred) const
 conversion taking also the predicted track state
virtual float localX (const float mpX) const
virtual float localX (const float mpX, const Topology::LocalTrackPred &trkPred) const
virtual float localY (const float mpY) const
virtual float localY (const float mpY, const Topology::LocalTrackPred &trkPred) const
virtual MeasurementError measurementError (const LocalPoint &lp, const LocalError &le) const
virtual MeasurementError measurementError (const LocalPoint &lp, const LocalError &le, const Topology::LocalTrackAngles &dir) const
 conversion taking also the angle from the track state
virtual MeasurementPoint measurementPosition (const LocalPoint &) const
virtual MeasurementPoint measurementPosition (const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const
 conversion taking also the angle from the track state
virtual int ncolumns () const
virtual int nrows () const
virtual std::pair< float, float > pitch () const
virtual std::pair< float, float > pixel (const LocalPoint &p) const
virtual std::pair< float, float > pixel (const LocalPoint &p, const Topology::LocalTrackAngles &ltp) const
 conversion taking also the angle from the track state
 ProxyPixelTopology (PixelGeomDetType *type, BoundPlane *bp)
virtual void setSurfaceDeformation (const SurfaceDeformation *deformation)
virtual PixelGeomDetTypespecificType () const
const SurfaceDeformationsurfaceDeformation () const
virtual const GeomDetTypetype () const

Private Member Functions

SurfaceDeformation::Local2DVector positionCorrection (const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const
SurfaceDeformation::Local2DVector positionCorrection (const Topology::LocalTrackPred &trk) const
virtual const PixelTopologyspecificTopology () const

Private Attributes

float theLength
DeepCopyPointerByClone< const
SurfaceDeformation
theSurfaceDeformation
PixelGeomDetTypetheType
float theWidth

Detailed Description

Definition at line 33 of file ProxyPixelTopology.h.


Constructor & Destructor Documentation

ProxyPixelTopology::ProxyPixelTopology ( PixelGeomDetType type,
BoundPlane bp 
)

Definition at line 8 of file ProxyPixelTopology.cc.

  :theType(type), theLength(bp->bounds().length()), theWidth(bp->bounds().width())
{
  
}

Member Function Documentation

int ProxyPixelTopology::channel ( const LocalPoint lp) const [virtual]

Implements Topology.

Definition at line 91 of file ProxyPixelTopology.cc.

References Topology::channel(), and specificTopology().

{
  return specificTopology().channel(lp);
}
int ProxyPixelTopology::channel ( const LocalPoint lp,
const Topology::LocalTrackAngles dir 
) const [virtual]

conversion taking also the angle from the track state

Reimplemented from Topology.

Definition at line 97 of file ProxyPixelTopology.cc.

References Topology::channel(), corr, positionCorrection(), specificTopology(), surfaceDeformation(), PV3DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{
   if (!this->surfaceDeformation()) return specificTopology().channel(lp);

  // subtract correction from SurfaceDeformation
  const SurfaceDeformation::Local2DVector corr(this->positionCorrection(lp, dir));
  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
    
  return specificTopology().channel(posOrig);
}
virtual bool ProxyPixelTopology::containsBigPixelInX ( const int &  ixmin,
const int &  ixmax 
) const [inline, virtual]

Implements PixelTopology.

Definition at line 81 of file ProxyPixelTopology.h.

References PixelTopology::containsBigPixelInX(), and specificTopology().

                                                                             {
    return specificTopology().containsBigPixelInX(ixmin, ixmax);
  }
virtual bool ProxyPixelTopology::containsBigPixelInY ( const int &  iymin,
const int &  iymax 
) const [inline, virtual]

Implements PixelTopology.

Definition at line 84 of file ProxyPixelTopology.h.

References PixelTopology::containsBigPixelInY(), and specificTopology().

                                                                             {
    return specificTopology().containsBigPixelInY(iymin, iymax);
  }
virtual bool ProxyPixelTopology::isItBigPixelInX ( const int  ixbin) const [inline, virtual]

Implements PixelTopology.

Definition at line 75 of file ProxyPixelTopology.h.

References PixelTopology::isItBigPixelInX(), and specificTopology().

                                                      {
    return specificTopology().isItBigPixelInX(ixbin);
  }
virtual bool ProxyPixelTopology::isItBigPixelInY ( const int  iybin) const [inline, virtual]

Implements PixelTopology.

Definition at line 78 of file ProxyPixelTopology.h.

References PixelTopology::isItBigPixelInY(), and specificTopology().

                                                      {
    return specificTopology().isItBigPixelInY(iybin);
  }
virtual bool ProxyPixelTopology::isItEdgePixel ( int  ixbin,
int  iybin 
) const [inline, virtual]

Implements PixelTopology.

Definition at line 94 of file ProxyPixelTopology.h.

References PixelTopology::isItEdgePixel(), and specificTopology().

                                                         {
    return specificTopology().isItEdgePixel(ixbin, iybin);
  }
virtual bool ProxyPixelTopology::isItEdgePixelInX ( int  ixbin) const [inline, virtual]

Implements PixelTopology.

Definition at line 88 of file ProxyPixelTopology.h.

References PixelTopology::isItEdgePixelInX(), and specificTopology().

                                                 {
    return specificTopology().isItEdgePixelInX(ixbin);
  }
virtual bool ProxyPixelTopology::isItEdgePixelInY ( int  iybin) const [inline, virtual]

Implements PixelTopology.

Definition at line 91 of file ProxyPixelTopology.h.

References PixelTopology::isItEdgePixelInY(), and specificTopology().

                                                 {
    return specificTopology().isItEdgePixelInY(iybin);
  }
LocalError ProxyPixelTopology::localError ( const MeasurementPoint mp,
const MeasurementError me,
const Topology::LocalTrackPred trkPred 
) const [virtual]

conversion taking also the predicted track state

Reimplemented from Topology.

Definition at line 41 of file ProxyPixelTopology.cc.

References Topology::localError(), and specificTopology().

{
  // The topology knows to calculate the cartesian error from measurement frame.
  // But assuming no uncertainty on the SurfaceDeformation variables,
  // the errors do not change from a simple shift to compensate
  // that the track 'sees' the surface at another place than it thinks...
  return specificTopology().localError(mp, me);
}
LocalError ProxyPixelTopology::localError ( const MeasurementPoint mp,
const MeasurementError me 
) const [virtual]

Implements Topology.

Definition at line 34 of file ProxyPixelTopology.cc.

References Topology::localError(), and specificTopology().

{
  return specificTopology().localError(mp, me);
}
LocalPoint ProxyPixelTopology::localPosition ( const MeasurementPoint mp,
const Topology::LocalTrackPred trkPred 
) const [virtual]

conversion taking also the predicted track state

Reimplemented from Topology.

Definition at line 21 of file ProxyPixelTopology.cc.

References corr, Topology::localPosition(), localPosition(), positionCorrection(), specificTopology(), surfaceDeformation(), PV3DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{
  if (!this->surfaceDeformation()) return specificTopology().localPosition(mp);
  
  // add correction from SurfaceDeformation
  const LocalPoint posOld(specificTopology().localPosition(mp)); // 'original position'
  const SurfaceDeformation::Local2DVector corr(this->positionCorrection(trkPred));
  
  return LocalPoint(posOld.x()+corr.x(), posOld.y()+corr.y(), posOld.z());
}
LocalPoint ProxyPixelTopology::localPosition ( const MeasurementPoint mp) const [virtual]

Implements Topology.

Definition at line 15 of file ProxyPixelTopology.cc.

References Topology::localPosition(), and specificTopology().

Referenced by localPosition().

{
  return specificTopology().localPosition(mp);
}
float ProxyPixelTopology::localX ( const float  mpX) const [virtual]

Implements PixelTopology.

Definition at line 128 of file ProxyPixelTopology.cc.

References PixelTopology::localX(), and specificTopology().

{
  return specificTopology().localX(mpX);
}
float ProxyPixelTopology::localX ( const float  mpX,
const Topology::LocalTrackPred trkPred 
) const [virtual]

Reimplemented from PixelTopology.

Definition at line 134 of file ProxyPixelTopology.cc.

References corr, PixelTopology::localX(), positionCorrection(), specificTopology(), surfaceDeformation(), and PV2DBase< T, PVType, FrameType >::x().

{
  if (!this->surfaceDeformation()) return specificTopology().localX(mpX);
  
  // add correction from SurfaceDeformation
  float xOld = specificTopology().localX(mpX); // 'original position'
  const SurfaceDeformation::Local2DVector corr(this->positionCorrection(trkPred));
  
  return xOld + corr.x();
}
float ProxyPixelTopology::localY ( const float  mpY) const [virtual]

Implements PixelTopology.

Definition at line 147 of file ProxyPixelTopology.cc.

References PixelTopology::localY(), and specificTopology().

{
  return specificTopology().localY(mpY);
}
float ProxyPixelTopology::localY ( const float  mpY,
const Topology::LocalTrackPred trkPred 
) const [virtual]

Reimplemented from PixelTopology.

Definition at line 153 of file ProxyPixelTopology.cc.

References corr, PixelTopology::localY(), positionCorrection(), specificTopology(), surfaceDeformation(), and PV2DBase< T, PVType, FrameType >::y().

{
  if (!this->surfaceDeformation()) return specificTopology().localY(mpY);

  // add correction from SurfaceDeformation
  float yOld = specificTopology().localY(mpY); // 'original position'
  const SurfaceDeformation::Local2DVector corr(this->positionCorrection(trkPred));
  
  return yOld + corr.y();
}
MeasurementError ProxyPixelTopology::measurementError ( const LocalPoint lp,
const LocalError le,
const Topology::LocalTrackAngles dir 
) const [virtual]

conversion taking also the angle from the track state

Reimplemented from Topology.

Definition at line 78 of file ProxyPixelTopology.cc.

References corr, Topology::measurementError(), positionCorrection(), specificTopology(), surfaceDeformation(), PV3DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{
  if (!this->surfaceDeformation()) return specificTopology().measurementError(lp, le);

  // subtract correction from SurfaceDeformation
  const SurfaceDeformation::Local2DVector corr(this->positionCorrection(lp, dir));
  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());

  return specificTopology().measurementError(posOrig, le);
}
MeasurementError ProxyPixelTopology::measurementError ( const LocalPoint lp,
const LocalError le 
) const [virtual]

Implements Topology.

Definition at line 72 of file ProxyPixelTopology.cc.

References Topology::measurementError(), and specificTopology().

{
  return specificTopology().measurementError(lp, le);
}
MeasurementPoint ProxyPixelTopology::measurementPosition ( const LocalPoint lp) const [virtual]

Implements Topology.

Definition at line 53 of file ProxyPixelTopology.cc.

References Topology::measurementPosition(), and specificTopology().

MeasurementPoint ProxyPixelTopology::measurementPosition ( const LocalPoint lp,
const Topology::LocalTrackAngles dir 
) const [virtual]

conversion taking also the angle from the track state

Reimplemented from Topology.

Definition at line 59 of file ProxyPixelTopology.cc.

References corr, Topology::measurementPosition(), positionCorrection(), specificTopology(), surfaceDeformation(), PV3DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{
  if (!this->surfaceDeformation()) return specificTopology().measurementPosition(lp);

  // subtract correction from SurfaceDeformation
  const SurfaceDeformation::Local2DVector corr(this->positionCorrection(lp, dir));
  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());

  return specificTopology().measurementPosition(posOrig);
}
int ProxyPixelTopology::ncolumns ( ) const [virtual]

Implements PixelTopology.

Definition at line 172 of file ProxyPixelTopology.cc.

References PixelTopology::ncolumns(), and specificTopology().

{ return specificTopology().ncolumns(); }
int ProxyPixelTopology::nrows ( ) const [virtual]

Implements PixelTopology.

Definition at line 169 of file ProxyPixelTopology.cc.

References PixelTopology::nrows(), and specificTopology().

{ return specificTopology().nrows(); }
std::pair< float, float > ProxyPixelTopology::pitch ( ) const [virtual]

Implements PixelTopology.

Definition at line 166 of file ProxyPixelTopology.cc.

References PixelTopology::pitch(), and specificTopology().

{ return specificTopology().pitch(); }
std::pair< float, float > ProxyPixelTopology::pixel ( const LocalPoint p) const [virtual]

Implements PixelTopology.

Definition at line 109 of file ProxyPixelTopology.cc.

References PixelTopology::pixel(), and specificTopology().

{
  return specificTopology().pixel(lp);
}
std::pair< float, float > ProxyPixelTopology::pixel ( const LocalPoint p,
const Topology::LocalTrackAngles ltp 
) const [virtual]

conversion taking also the angle from the track state

Reimplemented from PixelTopology.

Definition at line 115 of file ProxyPixelTopology.cc.

References corr, PixelTopology::pixel(), positionCorrection(), specificTopology(), surfaceDeformation(), PV3DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{
  if (!this->surfaceDeformation()) return specificTopology().pixel(lp);

  // subtract correction from SurfaceDeformation
  const SurfaceDeformation::Local2DVector corr(this->positionCorrection(lp, dir));
  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
  
  return specificTopology().pixel(posOrig);
}
SurfaceDeformation::Local2DVector ProxyPixelTopology::positionCorrection ( const Topology::LocalTrackPred trk) const [private]

Internal method to get correction of the position from SurfaceDeformation, must not be called if 'theSurfaceDeformation' is a null pointer.

Definition at line 205 of file ProxyPixelTopology.cc.

References Topology::LocalTrackPred::angles(), Topology::LocalTrackPred::point(), SurfaceDeformation::positionCorrection(), surfaceDeformation(), theLength, and theWidth.

{
  return this->surfaceDeformation()->positionCorrection(trk.point(), trk.angles(),
                                                        theLength, theWidth);
}
SurfaceDeformation::Local2DVector ProxyPixelTopology::positionCorrection ( const LocalPoint pos,
const Topology::LocalTrackAngles dir 
) const [private]

Internal method to get correction of the position from SurfaceDeformation, must not be called if 'theSurfaceDeformation' is a null pointer.

Definition at line 194 of file ProxyPixelTopology.cc.

References SurfaceDeformation::positionCorrection(), surfaceDeformation(), theLength, theWidth, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by channel(), localPosition(), localX(), localY(), measurementError(), measurementPosition(), and pixel().

{
  const SurfaceDeformation::Local2DPoint pos2D(pos.x(), pos.y());// change precision and dimension

  return this->surfaceDeformation()->positionCorrection(pos2D, dir,
                                                        theLength, theWidth);
}
void ProxyPixelTopology::setSurfaceDeformation ( const SurfaceDeformation deformation) [virtual]

Definition at line 187 of file ProxyPixelTopology.cc.

References theSurfaceDeformation.

{ 
  theSurfaceDeformation = deformation;
}
const PixelTopology & ProxyPixelTopology::specificTopology ( ) const [private, virtual]
PixelGeomDetType & ProxyPixelTopology::specificType ( ) const [virtual]

Definition at line 178 of file ProxyPixelTopology.cc.

References theType.

Referenced by specificTopology().

{ return *theType; }
const SurfaceDeformation* ProxyPixelTopology::surfaceDeformation ( ) const [inline]
const GeomDetType & ProxyPixelTopology::type ( ) const [virtual]

Definition at line 175 of file ProxyPixelTopology.cc.

References theType.

{ return *theType; }

Member Data Documentation

Definition at line 119 of file ProxyPixelTopology.h.

Referenced by positionCorrection().

Definition at line 120 of file ProxyPixelTopology.h.

Referenced by setSurfaceDeformation(), and surfaceDeformation().

Definition at line 118 of file ProxyPixelTopology.h.

Referenced by specificType(), and type().

Definition at line 119 of file ProxyPixelTopology.h.

Referenced by positionCorrection().