CMS 3D CMS Logo

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

#include <Chi2MeasurementEstimatorBase.h>

Inheritance diagram for Chi2MeasurementEstimatorBase:
MeasurementEstimator Chi2MeasurementEstimator Chi2MeasurementEstimatorForTrackerHits Chi2Strip1DEstimator Chi2StripEstimator Chi2Switching1DEstimator Chi2SwitchingEstimator EtaPhiEstimator EtaPhiMeasurementEstimator GsfChi2MeasurementEstimator HICMeasurementEstimator MRHChi2MeasurementEstimator MuonChi2MeasurementEstimator

Public Member Functions

 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3.)
 
double chiSquaredCut () const
 
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &) const =0
 
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 MeasurementEstimatorclone () const =0
 
virtual ~MeasurementEstimator ()
 

Protected Member Functions

std::pair< bool, double > returnIt (double est) const
 

Private Attributes

double theMaxChi2
 
double theNSigma
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
typedef std::pair< bool, double > HitReturnType
 
typedef Vector2DBase< float,
LocalTag
Local2DVector
 
typedef bool SurfaceReturnType
 

Detailed Description

A base class for Chi2 – type of Measurement Estimators. Implements common functionality. Ported from ORCA.

Date:
2007/12/19 16:44:46
Revision:
1.3
Author
todorov, cerati

Definition at line 15 of file Chi2MeasurementEstimatorBase.h.

Constructor & Destructor Documentation

Chi2MeasurementEstimatorBase::Chi2MeasurementEstimatorBase ( 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 Chi2MeasurementEstimatorBase.h.

Member Function Documentation

double Chi2MeasurementEstimatorBase::chiSquaredCut ( ) const
inline

Definition at line 36 of file Chi2MeasurementEstimatorBase.h.

References theMaxChi2.

Referenced by returnIt().

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, Chi2MeasurementEstimatorForTrackerHits, Chi2MeasurementEstimator, MuonChi2MeasurementEstimator, Chi2Switching1DEstimator, Chi2SwitchingEstimator, Chi2MeasurementEstimator, EtaPhiMeasurementEstimator, GsfChi2MeasurementEstimator, EtaPhiEstimator, Chi2Strip1DEstimator, Chi2StripEstimator, and MRHChi2MeasurementEstimator.

Referenced by EtaPhiEstimator::estimate().

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, and EtaPhiMeasurementEstimator.

Definition at line 5 of file Chi2MeasurementEstimatorBase.cc.

References BoundSurface::bounds(), TrajectoryStateOnSurface::hasError(), Bounds::inside(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), nSigmaCut(), and LocalTrajectoryError::positionError().

7 {
8  if ( ts.hasError()) {
9  return plane.bounds().inside( ts.localPosition(),
11  nSigmaCut());
12  }
13  else return plane.bounds().inside(ts.localPosition());
14 }
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
LocalError positionError() const
const LocalTrajectoryError & localError() const
const Bounds & bounds() const
Definition: BoundSurface.h:89
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.

Reimplemented in EtaPhiMeasurementEstimator.

Definition at line 17 of file Chi2MeasurementEstimatorBase.cc.

References TrajectoryStateOnSurface::hasError(), vdt::le, TrajectoryStateOnSurface::localError(), nSigmaCut(), LocalTrajectoryError::positionError(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().

19 {
20  if ( ts.hasError()) {
22  return Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut());
23  }
24  else return Local2DVector(0,0);
25 }
float xx() const
Definition: LocalError.h:24
Vector2DBase< float, LocalTag > Local2DVector
LocalError positionError() const
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:46
const LocalTrajectoryError & localError() const
unsigned long long le
Definition: VDTMath.h:202
double Chi2MeasurementEstimatorBase::nSigmaCut ( ) const
inline

Definition at line 37 of file Chi2MeasurementEstimatorBase.h.

References theNSigma.

Referenced by estimate(), and maximalLocalDisplacement().

std::pair<bool,double> Chi2MeasurementEstimatorBase::returnIt ( double  est) const
inlineprotected

Definition at line 41 of file Chi2MeasurementEstimatorBase.h.

References chiSquaredCut().

Referenced by MRHChi2MeasurementEstimator::estimate(), GsfChi2MeasurementEstimator::estimate(), and Chi2MeasurementEstimatorForTrackerHits::estimate().

41  {
42  return est > chiSquaredCut() ? HitReturnType(false,est) : HitReturnType(true,est);
43  }
std::pair< bool, double > HitReturnType

Member Data Documentation

double Chi2MeasurementEstimatorBase::theMaxChi2
private

Definition at line 46 of file Chi2MeasurementEstimatorBase.h.

Referenced by chiSquaredCut().

double Chi2MeasurementEstimatorBase::theNSigma
private

Definition at line 47 of file Chi2MeasurementEstimatorBase.h.

Referenced by nSigmaCut().