#include <Chi2MeasurementEstimatorForTrackerHits.h>
Public Member Functions | |
Chi2MeasurementEstimatorForTrackerHits (double maxChi2, double nSigma=3.) | |
Chi2MeasurementEstimatorForTrackerHits (const Chi2MeasurementEstimatorBase &est) | |
void | clearCache () |
virtual Chi2MeasurementEstimatorForTrackerHits * | clone () const |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const |
Private Attributes | |
bool | cacheUpToDate_ |
AlgebraicSymMatrix22 | tsosMeasuredError_ |
AlgebraicVector2 | tsosMeasuredParameters_ |
A Chi2 Measurement Estimator. 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().
: Chi2MeasurementEstimatorBase( maxChi2, nSigma), cacheUpToDate_(false) {}
Chi2MeasurementEstimatorForTrackerHits::Chi2MeasurementEstimatorForTrackerHits | ( | const Chi2MeasurementEstimatorBase & | est | ) | [inline, explicit] |
Definition at line 26 of file Chi2MeasurementEstimatorForTrackerHits.h.
: Chi2MeasurementEstimatorBase( est.chiSquaredCut(), est.nSigmaCut()), cacheUpToDate_(false) {}
void Chi2MeasurementEstimatorForTrackerHits::clearCache | ( | ) | [inline] |
Definition at line 30 of file Chi2MeasurementEstimatorForTrackerHits.h.
References cacheUpToDate_.
{ cacheUpToDate_ = false; }
virtual Chi2MeasurementEstimatorForTrackerHits* Chi2MeasurementEstimatorForTrackerHits::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 35 of file Chi2MeasurementEstimatorForTrackerHits.h.
References Chi2MeasurementEstimatorForTrackerHits().
{ return new Chi2MeasurementEstimatorForTrackerHits(*this); }
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 8 of file Chi2MeasurementEstimatorForTrackerHits.cc.
References cacheUpToDate_, invertPosDefMatrix(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), LocalTrajectoryError::matrix(), TrackingRecHit::parameters(), TrackingRecHit::parametersError(), dttmaxenums::R, alignCSCRings::r, Chi2MeasurementEstimatorBase::returnIt(), tsosMeasuredError_, tsosMeasuredParameters_, and LocalTrajectoryParameters::vector().
{ if (!cacheUpToDate_) { AlgebraicVector5 par5 = tsos.localParameters().vector(); tsosMeasuredParameters_[0] = par5[3]; tsosMeasuredParameters_[1] = par5[4]; const AlgebraicSymMatrix55 &err5 = tsos.localError().matrix(); tsosMeasuredError_ = err5.Sub<AlgebraicSymMatrix22>(3,3); cacheUpToDate_ = true; } AlgebraicVector2 r = asSVector<2>(aRecHit.parameters()) - tsosMeasuredParameters_; AlgebraicSymMatrix22 R = asSMatrix<2>(aRecHit.parametersError()) + tsosMeasuredError_; invertPosDefMatrix(R); return returnIt( ROOT::Math::Similarity(r, R) ); }
bool Chi2MeasurementEstimatorForTrackerHits::cacheUpToDate_ [mutable, private] |
Definition at line 39 of file Chi2MeasurementEstimatorForTrackerHits.h.
Referenced by clearCache(), and estimate().
AlgebraicSymMatrix22 Chi2MeasurementEstimatorForTrackerHits::tsosMeasuredError_ [mutable, private] |
Definition at line 41 of file Chi2MeasurementEstimatorForTrackerHits.h.
Referenced by estimate().
AlgebraicVector2 Chi2MeasurementEstimatorForTrackerHits::tsosMeasuredParameters_ [mutable, private] |
Definition at line 40 of file Chi2MeasurementEstimatorForTrackerHits.h.
Referenced by estimate().