#include <TrackingRecHitProjector.h>
Public Types | |
typedef TransientTrackingRecHit::RecHitPointer | RecHitPointer |
Public Member Functions | |
RecHitPointer | project (const TransientTrackingRecHit &hit, const GeomDet &det, const TrajectoryStateOnSurface &ts) const |
RecHitPointer | project (const TransientTrackingRecHit &hit, const GeomDet &det, const GlobalVector &gdir) const |
RecHitPointer | project (const TransientTrackingRecHit &hit, const GeomDet &det) const |
Definition at line 8 of file TrackingRecHitProjector.h.
typedef TransientTrackingRecHit::RecHitPointer TrackingRecHitProjector< ResultingHit >::RecHitPointer |
Definition at line 11 of file TrackingRecHitProjector.h.
RecHitPointer TrackingRecHitProjector< ResultingHit >::project | ( | const TransientTrackingRecHit & | hit, |
const GeomDet & | det, | ||
const TrajectoryStateOnSurface & | ts | ||
) | const [inline] |
Definition at line 14 of file TrackingRecHitProjector.h.
References TrajectoryStateOnSurface::globalParameters(), and GlobalTrajectoryParameters::momentum().
Referenced by TkGluedMeasurementDet::HitCollectorForFastMeasurements::addProjected(), TkGluedMeasurementDet::HitCollectorForRecHits::addProjected(), CkfDebugger::analyseRecHitExistance(), TkGluedMeasurementDet::checkHitProjection(), ProjectedRecHit2D::clone(), TrackingRecHitProjector< ResultingHit >::project(), ProjectedRecHit2D::ProjectedRecHit2D(), and TkGluedMeasurementDet::projectOnGluedDet().
{ GlobalVector gdir = ts.globalParameters().momentum(); return project(hit, det, gdir); }
RecHitPointer TrackingRecHitProjector< ResultingHit >::project | ( | const TransientTrackingRecHit & | hit, |
const GeomDet & | det, | ||
const GlobalVector & | gdir | ||
) | const [inline] |
Definition at line 27 of file TrackingRecHitProjector.h.
References newFWLiteAna::build, delta, TransientTrackingRecHit::det(), Vector3DBase< T, FrameTag >::dot(), TransientTrackingRecHit::globalPosition(), TrackingRecHit::localPositionError(), Plane::localZ(), Plane::normalVector(), GloballyPositioned< T >::position(), LocalError::rotate(), GeomDet::surface(), Surface::toGlobal(), GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().
{ const BoundPlane& gluedPlane = det.surface(); const BoundPlane& hitPlane = hit.det()->surface(); // check if the planes are parallel //const float epsilon = 1.e-7; // corresponds to about 0.3 miliradian but cannot be reduced // because of float precision //if (fabs(gluedPlane.normalVector().dot( hitPlane.normalVector())) < 1-epsilon) { // std::cout << "TkGluedMeasurementDet plane not parallel to DetUnit plane: dot product is " // << gluedPlane.normalVector().dot( hitPlane.normalVector()) << endl; // FIXME: throw the appropriate exception here... //throw MeasurementDetException("TkGluedMeasurementDet plane not parallel to DetUnit plane"); //} double delta = gluedPlane.localZ( hitPlane.position()); LocalVector ldir = gluedPlane.toLocal(gdir); LocalPoint lhitPos = gluedPlane.toLocal( hit.globalPosition()); LocalPoint projectedHitPos = lhitPos - ldir * delta/ldir.z(); LocalVector hitXAxis = gluedPlane.toLocal( hitPlane.toGlobal( LocalVector(1,0,0))); LocalError hitErr = hit.localPositionError(); if (gluedPlane.normalVector().dot( hitPlane.normalVector()) < 0) { // the two planes are inverted, and the correlation element must change sign hitErr = LocalError( hitErr.xx(), -hitErr.xy(), hitErr.yy()); } LocalError rotatedError = hitErr.rotate( hitXAxis.x(), hitXAxis.y()); return ResultingHit::build( projectedHitPos, rotatedError, &det, hit.det(), hit); }
RecHitPointer TrackingRecHitProjector< ResultingHit >::project | ( | const TransientTrackingRecHit & | hit, |
const GeomDet & | det | ||
) | const [inline] |
Definition at line 21 of file TrackingRecHitProjector.h.
References TransientTrackingRecHit::globalPosition(), and TrackingRecHitProjector< ResultingHit >::project().
{ GlobalVector gdir = hit.globalPosition() - GlobalPoint(0,0,0); return project(hit, det, gdir); }