#include <TrackingRecHitPropagator.h>
Public Member Functions | |
template<class ResultingHit > | |
TransientTrackingRecHit::RecHitPointer | project (const TransientTrackingRecHit::ConstRecHitPointer hit, const GeomDet &det, const TrajectoryStateOnSurface ts) const |
TrackingRecHitPropagator (const MagneticField *magf) | |
~TrackingRecHitPropagator () | |
Private Attributes | |
const AnalyticalPropagator * | thePropagator |
Definition at line 18 of file TrackingRecHitPropagator.h.
TrackingRecHitPropagator::TrackingRecHitPropagator | ( | const MagneticField * | magf | ) | [inline] |
Definition at line 20 of file TrackingRecHitPropagator.h.
References AnalyticalPropagator_cfi::AnalyticalPropagator, anyDirection, and thePropagator.
{ thePropagator = new AnalyticalPropagator(magf, anyDirection, 1.6); };
TrackingRecHitPropagator::~TrackingRecHitPropagator | ( | ) | [inline] |
Definition at line 24 of file TrackingRecHitPropagator.h.
References thePropagator.
{delete thePropagator;}
TransientTrackingRecHit::RecHitPointer TrackingRecHitPropagator::project | ( | const TransientTrackingRecHit::ConstRecHitPointer | hit, |
const GeomDet & | det, | ||
const TrajectoryStateOnSurface | ts | ||
) | const [inline] |
Definition at line 26 of file TrackingRecHitPropagator.h.
References InvalidTransientRecHit::build(), newFWLiteAna::build, TrajectoryStateOnSurface::charge(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localMomentum(), TrajectoryStateOnSurface::magneticField(), AlCaHLTBitMon_ParallelJobs::p, AnalyticalPropagator::propagate(), TrajectoryStateOnSurface::surface(), GeomDet::surface(), and thePropagator.
Referenced by GenericProjectedRecHit2D::clone(), SiTrackerMultiRecHitUpdator::update(), and SiTrackerMultiRecHitUpdatorMTF::updatecomponents().
{ //1) propagate the best possible track parameters to the surface of the hit you want to "move" using a AnalyticalPropagator ; //2) create LocalTrajectoryParameters with the local x,y of the hit and direction + momentum from the propagated track parameters; //3) create a LocalTrajectoryError matrix which is 0 except for the local x,y submatrix, which is filled with the hit errors; //4) create a TSOS from the result of 2) and 3) and propagate it to the reference surface; //5) create a new hit with the local x,y subspace of the result of 4) if (!ts.isValid()) return InvalidTransientRecHit::build(hit->det()); // LogTrace("SiTrackerMultiRecHitUpdator") << "the tsos is valid"; //check if the ts lays or not on the destination surface and in case propagate it TrajectoryStateOnSurface propagated =ts; if (hit->surface() != &(ts.surface())) propagated = thePropagator->propagate(ts, *(hit->surface())); if (!propagated.isValid()) return InvalidTransientRecHit::build(hit->det()); // LogTrace("SiTrackerMultiRecHitUpdator") << "the propagate tsos is valid"; // LogTrace("SiTrackerMultiRecHitUpdator") << "Original: position: "<<hit->parameters()<<" error: "<<hit->parametersError()<<std::endl; //clone the original hit with this state TransientTrackingRecHit::RecHitPointer updatedOriginal = hit->clone(propagated); // LogTrace("SiTrackerMultiRecHitUpdator") << "New: position: "<<updatedOriginal->parameters()<<" error: "<<updatedOriginal->parametersError()<<std::endl; // LogTrace("SiTrackerMultiRecHitUpdator") << "rechit cloned"; LocalTrajectoryParameters ltp(updatedOriginal->localPosition(), propagated.localMomentum(), propagated.charge()); AlgebraicSymMatrix55 ltem; ltem(3,3) = (updatedOriginal->parametersError())(1,1); ltem(4,4) = (updatedOriginal->parametersError())(2,2); ltem(3,4) = (updatedOriginal->parametersError())(1,2); // LogTrace("SiTrackerMultiRecHitUpdator") <<"The cov matrix: "<<ltem<<std::endl; LocalTrajectoryError lte(ltem); // LogTrace("SiTrackerMultiRecHitUpdator") <<"Original cov matrix: "<<lte.matrix()<<std::endl; TrajectoryStateOnSurface hit_state(ltp, lte, propagated.surface(), propagated.magneticField()); TrajectoryStateOnSurface projected_hit_state = thePropagator->propagate(hit_state, det.surface()); if (!projected_hit_state.isValid()) return InvalidTransientRecHit::build(hit->det()); LocalPoint p = projected_hit_state.localPosition(); LocalError e = projected_hit_state.localError().positionError(); // LogTrace("SiTrackerMultiRecHitUpdator") << "position: "<<p<<" error: "<<e<<std::endl; AlgebraicSymMatrix55 projm=projected_hit_state.localError().matrix(); // for(int i=0;i<5;i++){ // LogTrace("SiTrackerMultiRecHitUpdator") <<"cov matrix: "<<projm<<std::endl; // } return ResultingHit::build(p, e, &det, updatedOriginal->det(), updatedOriginal, this); }
const AnalyticalPropagator* TrackingRecHitPropagator::thePropagator [private] |
Definition at line 69 of file TrackingRecHitPropagator.h.
Referenced by project(), TrackingRecHitPropagator(), and ~TrackingRecHitPropagator().