CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Chi2MeasurementEstimatorForTrackerHits Class Reference

#include <Chi2MeasurementEstimatorForTrackerHits.h>

Inheritance diagram for Chi2MeasurementEstimatorForTrackerHits:
Chi2MeasurementEstimatorBase MeasurementEstimator

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
 
- Public Member Functions inherited from Chi2MeasurementEstimatorBase
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3.)
 
double chiSquaredCut () const
 
virtual bool estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
 
virtual Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const
 
double nSigmaCut () const
 
- Public Member Functions inherited from MeasurementEstimator
virtual ~MeasurementEstimator ()
 

Private Attributes

bool cacheUpToDate_
 
AlgebraicSymMatrix22 tsosMeasuredError_
 
AlgebraicVector2 tsosMeasuredParameters_
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
typedef std::pair< bool, double > HitReturnType
 
typedef Vector2DBase< float,
LocalTag
Local2DVector
 
typedef bool SurfaceReturnType
 
- Protected Member Functions inherited from Chi2MeasurementEstimatorBase
std::pair< bool, double > returnIt (double est) const
 

Detailed Description

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.

Constructor & Destructor Documentation

Chi2MeasurementEstimatorForTrackerHits::Chi2MeasurementEstimatorForTrackerHits ( double  maxChi2,
double  nSigma = 3. 
)
inlineexplicit

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().

Chi2MeasurementEstimatorForTrackerHits::Chi2MeasurementEstimatorForTrackerHits ( const Chi2MeasurementEstimatorBase est)
inlineexplicit

Member Function Documentation

void Chi2MeasurementEstimatorForTrackerHits::clearCache ( )
inline
virtual Chi2MeasurementEstimatorForTrackerHits* Chi2MeasurementEstimatorForTrackerHits::clone ( void  ) const
inlinevirtual

Implements MeasurementEstimator.

Definition at line 35 of file Chi2MeasurementEstimatorForTrackerHits.h.

References Chi2MeasurementEstimatorForTrackerHits().

35  {
37  }
Chi2MeasurementEstimatorForTrackerHits(double maxChi2, double nSigma=3.)
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().

10  {
11  if (!cacheUpToDate_) {
12  AlgebraicVector5 par5 = tsos.localParameters().vector();
13  tsosMeasuredParameters_[0] = par5[3];
14  tsosMeasuredParameters_[1] = par5[4];
15  const AlgebraicSymMatrix55 &err5 = tsos.localError().matrix();
17  cacheUpToDate_ = true;
18  }
19  AlgebraicVector2 r = asSVector<2>(aRecHit.parameters()) - tsosMeasuredParameters_;
20  AlgebraicSymMatrix22 R = asSMatrix<2>(aRecHit.parametersError()) + tsosMeasuredError_;
22  return returnIt( ROOT::Math::Similarity(r, R) );
23 }
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
std::pair< bool, double > returnIt(double est) const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
ROOT::Math::SVector< double, 5 > AlgebraicVector5
ROOT::Math::SVector< double, 2 > AlgebraicVector2

Member Data Documentation

bool Chi2MeasurementEstimatorForTrackerHits::cacheUpToDate_
mutableprivate

Definition at line 39 of file Chi2MeasurementEstimatorForTrackerHits.h.

Referenced by clearCache(), and estimate().

AlgebraicSymMatrix22 Chi2MeasurementEstimatorForTrackerHits::tsosMeasuredError_
mutableprivate

Definition at line 41 of file Chi2MeasurementEstimatorForTrackerHits.h.

Referenced by estimate().

AlgebraicVector2 Chi2MeasurementEstimatorForTrackerHits::tsosMeasuredParameters_
mutableprivate

Definition at line 40 of file Chi2MeasurementEstimatorForTrackerHits.h.

Referenced by estimate().