#include <Chi2StripEstimator.h>
Public Member Functions | |
Chi2StripEstimator (double maxChi2, double nSigma=3.) | |
virtual Chi2StripEstimator * | clone () const |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const |
A Chi2 MeasurementEstimator that works in the measurement (strip) frame and uses both coordinates of a hit. Ported from ORCA.
Definition at line 15 of file Chi2StripEstimator.h.
Chi2StripEstimator::Chi2StripEstimator | ( | double | maxChi2, |
double | nSigma = 3. |
||
) | [inline, explicit] |
Definition at line 18 of file Chi2StripEstimator.h.
Referenced by clone().
: Chi2MeasurementEstimatorBase( maxChi2, nSigma) {}
virtual Chi2StripEstimator* Chi2StripEstimator::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 24 of file Chi2StripEstimator.h.
References Chi2StripEstimator().
{ return new Chi2StripEstimator(*this); }
pair< bool, double > Chi2StripEstimator::estimate | ( | const TrajectoryStateOnSurface & | ts, |
const TransientTrackingRecHit & | hit | ||
) | const [virtual] |
Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible. The TrajectoryStateOnSurface must be on the same Surface as the RecHit. For an estimator where there is no value computed, e.g. fixed window estimator, only the first(bool) part is of interest.
Implements Chi2MeasurementEstimatorBase.
Definition at line 11 of file Chi2StripEstimator.cc.
References funct::C, TransientTrackingRecHit::detUnit(), invertPosDefMatrix(), GeomDetType::isTrackerPixel(), TrajectoryStateOnSurface::localError(), TrackingRecHit::localPosition(), TrajectoryStateOnSurface::localPosition(), TrackingRecHit::localPositionError(), m, max(), Topology::measurementError(), Topology::measurementPosition(), LocalTrajectoryError::positionError(), dttmaxenums::R, alignCSCRings::r, GeomDetUnit::topology(), GeomDetUnit::type(), MeasurementError::uu(), MeasurementError::uv(), MeasurementError::vv(), PV2DBase< T, PVType, FrameType >::x(), x, and PV2DBase< T, PVType, FrameType >::y().
Referenced by Chi2SwitchingEstimator::estimate().
{ if(//hit.isMatched() || hit.detUnit()->type().isTrackerPixel()) { return HitReturnType(false,0); } const StripTopology* topology = dynamic_cast<const StripTopology*>(&(hit.detUnit()->topology())); MeasurementPoint mp; MeasurementError me; AlgebraicVector2 m; mp = topology->measurementPosition(hit.localPosition()); m[0] = mp.x(); m[1] = mp.y(); AlgebraicSymMatrix22 V; me = topology->measurementError(hit.localPosition(), hit.localPositionError()); V(0,0) = me.uu(); V(1,0) = me.uv(); V(1,1) = me.vv(); AlgebraicVector2 x; mp = topology->measurementPosition(state.localPosition()); m[0] = mp.x(); m[1] = mp.y(); AlgebraicSymMatrix22 C; me = topology->measurementError(state.localPosition(), state.localError().positionError()); C(0,0) = me.uu(); C(1,0) = me.uv(); C(1,1) = me.vv(); AlgebraicVector2 r(m - x); AlgebraicSymMatrix22 R(V+C); bool ierr = !invertPosDefMatrix(R); if (ierr) { edm::LogError("Chi2StripEstimator")<<" could not invert matrix:\n"<<(V+C); return returnIt( 0.0 ); } double est = max(ROOT::Math::Similarity(r, R), 0.000001); // avoid exact zero return returnIt( est); }