#include <TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorForTrackerHits.h>
Public Member Functions | |
Chi2MeasurementEstimatorForTrackerHits (const Chi2MeasurementEstimatorBase &est) | |
Chi2MeasurementEstimatorForTrackerHits (double maxChi2, double nSigma=3.) | |
Construct with cuts on chi2 and nSigma. | |
void | clearCache () |
virtual Chi2MeasurementEstimatorForTrackerHits * | clone () const |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const |
Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible. | |
Private Attributes | |
bool | cacheUpToDate_ |
AlgebraicSymMatrix22 | tsosMeasuredError_ |
AlgebraicVector2 | tsosMeasuredParameters_ |
Computhes the Chi^2 of a TrajectoryState with a RecHit or a BoundPlane. The TrajectoryState must have errors. Works for any RecHit dimension.
Definition at line 15 of file Chi2MeasurementEstimatorForTrackerHits.h.
Chi2MeasurementEstimatorForTrackerHits::Chi2MeasurementEstimatorForTrackerHits | ( | double | maxChi2, | |
double | nSigma = 3. | |||
) | [inline, explicit] |
Construct with cuts on chi2 and nSigma.
The cut on Chi2 is used to define the acceptance of RecHits. The errors of the trajectory state are multiplied by nSigma to define acceptance of BoundPlane and maximalLocalDisplacement.
Definition at line 23 of file Chi2MeasurementEstimatorForTrackerHits.h.
Referenced by clone().
00023 : 00024 Chi2MeasurementEstimatorBase( maxChi2, nSigma), cacheUpToDate_(false) {}
Chi2MeasurementEstimatorForTrackerHits::Chi2MeasurementEstimatorForTrackerHits | ( | const Chi2MeasurementEstimatorBase & | est | ) | [inline, explicit] |
Definition at line 26 of file Chi2MeasurementEstimatorForTrackerHits.h.
00026 : 00027 Chi2MeasurementEstimatorBase( est.chiSquaredCut(), est.nSigmaCut()), 00028 cacheUpToDate_(false) {}
Definition at line 30 of file Chi2MeasurementEstimatorForTrackerHits.h.
References cacheUpToDate_.
00030 { cacheUpToDate_ = false; }
virtual Chi2MeasurementEstimatorForTrackerHits* Chi2MeasurementEstimatorForTrackerHits::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 35 of file Chi2MeasurementEstimatorForTrackerHits.h.
References Chi2MeasurementEstimatorForTrackerHits().
00035 { 00036 return new Chi2MeasurementEstimatorForTrackerHits(*this); 00037 }
std::pair< bool, double > Chi2MeasurementEstimatorForTrackerHits::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 7 of file Chi2MeasurementEstimatorForTrackerHits.cc.
References cacheUpToDate_, err5, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), LocalTrajectoryError::matrix(), TrackingRecHit::parameters(), TrackingRecHit::parametersError(), dttmaxenums::R, r, Chi2MeasurementEstimatorBase::returnIt(), tsosMeasuredError_, tsosMeasuredParameters_, and LocalTrajectoryParameters::vector().
00009 { 00010 if (!cacheUpToDate_) { 00011 AlgebraicVector5 par5 = tsos.localParameters().vector(); 00012 tsosMeasuredParameters_[0] = par5[3]; 00013 tsosMeasuredParameters_[1] = par5[4]; 00014 const AlgebraicSymMatrix55 &err5 = tsos.localError().matrix(); 00015 tsosMeasuredError_ = err5.Sub<AlgebraicSymMatrix22>(3,3); 00016 cacheUpToDate_ = true; 00017 } 00018 AlgebraicVector2 r = asSVector<2>(aRecHit.parameters()) - tsosMeasuredParameters_; 00019 AlgebraicSymMatrix22 R = asSMatrix<2>(aRecHit.parametersError()) + tsosMeasuredError_; 00020 R.Invert(); 00021 return returnIt( ROOT::Math::Similarity(r, R) ); 00022 }
bool Chi2MeasurementEstimatorForTrackerHits::cacheUpToDate_ [mutable, private] |
Definition at line 39 of file Chi2MeasurementEstimatorForTrackerHits.h.
Referenced by clearCache(), and estimate().
AlgebraicSymMatrix22 Chi2MeasurementEstimatorForTrackerHits::tsosMeasuredError_ [mutable, private] |
AlgebraicVector2 Chi2MeasurementEstimatorForTrackerHits::tsosMeasuredParameters_ [mutable, private] |