#include <TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorBase.h>
Public Member Functions | |
Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3.) | |
Construct with cuts on chi2 and nSigma. | |
double | chiSquaredCut () const |
virtual bool | estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
Returns true if the TrajectoryStateOnSurface is compatible with the BoundPlane, false otherwise. | |
virtual std::pair< bool, double > | estimate (const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &) const =0 |
Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible. | |
virtual Local2DVector | maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
Returns the size of the compatibility region around the local position of the TrajectoryStateOnSurface along the directions of local x and y axis. | |
double | nSigmaCut () const |
Protected Member Functions | |
std::pair< bool, double > | returnIt (double est) const |
Private Attributes | |
double | theMaxChi2 |
double | theNSigma |
Implements common functionality. Ported from ORCA.
Definition at line 15 of file Chi2MeasurementEstimatorBase.h.
Chi2MeasurementEstimatorBase::Chi2MeasurementEstimatorBase | ( | 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 Chi2MeasurementEstimatorBase.h.
00023 : 00024 theMaxChi2(maxChi2), theNSigma(nSigma) {}
double Chi2MeasurementEstimatorBase::chiSquaredCut | ( | ) | const [inline] |
Definition at line 36 of file Chi2MeasurementEstimatorBase.h.
References theMaxChi2.
Referenced by returnIt().
00036 {return theMaxChi2;}
bool Chi2MeasurementEstimatorBase::estimate | ( | const TrajectoryStateOnSurface & | ts, | |
const BoundPlane & | plane | |||
) | const [virtual] |
Returns true if the TrajectoryStateOnSurface is compatible with the BoundPlane, false otherwise.
The TrajectoryStateOnSurface must be on the plane.
Implements MeasurementEstimator.
Reimplemented in HICMeasurementEstimator.
Definition at line 5 of file Chi2MeasurementEstimatorBase.cc.
References BoundSurface::bounds(), TrajectoryStateOnSurface::hasError(), Bounds::inside(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), nSigmaCut(), and LocalTrajectoryError::positionError().
00007 { 00008 if ( ts.hasError()) { 00009 return plane.bounds().inside( ts.localPosition(), 00010 ts.localError().positionError(), 00011 nSigmaCut()); 00012 } 00013 else return plane.bounds().inside(ts.localPosition()); 00014 }
virtual std::pair<bool, double> Chi2MeasurementEstimatorBase::estimate | ( | const TrajectoryStateOnSurface & | ts, | |
const TransientTrackingRecHit & | hit | |||
) | const [pure 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 MeasurementEstimator.
Implemented in HICMeasurementEstimator, HICMeasurementEstimator, MuonChi2MeasurementEstimator, GsfChi2MeasurementEstimator, Chi2MeasurementEstimator, Chi2MeasurementEstimator, Chi2MeasurementEstimatorForTrackerHits, Chi2Strip1DEstimator, Chi2StripEstimator, Chi2Switching1DEstimator, Chi2SwitchingEstimator, and MRHChi2MeasurementEstimator.
MeasurementEstimator::Local2DVector Chi2MeasurementEstimatorBase::maximalLocalDisplacement | ( | const TrajectoryStateOnSurface & | ts, | |
const BoundPlane & | plane | |||
) | const [virtual] |
Returns the size of the compatibility region around the local position of the TrajectoryStateOnSurface along the directions of local x and y axis.
The TrajectoryStateOnSurface must be on the plane. This method allows to limit the search for compatible detectors or RecHits. The MeasurementEstimator should not return "true" for any RecHit or BoundPlane which is entirely outside of the compatibility region defined by maximalLocalDisplacement().
Reimplemented from MeasurementEstimator.
Definition at line 17 of file Chi2MeasurementEstimatorBase.cc.
References TrajectoryStateOnSurface::hasError(), asciidump::le, TrajectoryStateOnSurface::localError(), nSigmaCut(), LocalTrajectoryError::positionError(), funct::sqrt(), LocalError::xx(), and LocalError::yy().
00019 { 00020 if ( ts.hasError()) { 00021 LocalError le = ts.localError().positionError(); 00022 return Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut()); 00023 } 00024 else return Local2DVector(0,0); 00025 }
double Chi2MeasurementEstimatorBase::nSigmaCut | ( | ) | const [inline] |
Definition at line 37 of file Chi2MeasurementEstimatorBase.h.
References theNSigma.
Referenced by estimate(), and maximalLocalDisplacement().
00037 {return theNSigma;}
std::pair<bool,double> Chi2MeasurementEstimatorBase::returnIt | ( | double | est | ) | const [inline, protected] |
Definition at line 41 of file Chi2MeasurementEstimatorBase.h.
References chiSquaredCut().
Referenced by Chi2Strip1DEstimator::estimate(), Chi2StripEstimator::estimate(), MRHChi2MeasurementEstimator::estimate(), GsfChi2MeasurementEstimator::estimate(), and Chi2MeasurementEstimatorForTrackerHits::estimate().
00041 { 00042 return est > chiSquaredCut() ? HitReturnType(false,est) : HitReturnType(true,est); 00043 }
double Chi2MeasurementEstimatorBase::theMaxChi2 [private] |
Reimplemented in HICMeasurementEstimator.
Definition at line 46 of file Chi2MeasurementEstimatorBase.h.
Referenced by chiSquaredCut().
double Chi2MeasurementEstimatorBase::theNSigma [private] |
Reimplemented in HICMeasurementEstimator.
Definition at line 47 of file Chi2MeasurementEstimatorBase.h.
Referenced by nSigmaCut().