CMS 3D CMS Logo

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

#include <Chi2StripEstimator.h>

Inheritance diagram for Chi2StripEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

Public Member Functions

 Chi2StripEstimator (double maxChi2, double nSigma=3.)
 
virtual Chi2StripEstimatorclone () 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 ()
 

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 MeasurementEstimator that works in the measurement (strip) frame and uses both coordinates of a hit. Ported from ORCA.

Date:
2007/05/09 13:58:19
Revision:
1.1.2.1
Author
todorov, cerati

Definition at line 15 of file Chi2StripEstimator.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file Chi2StripEstimator.h.

Referenced by clone().

18  :
19  Chi2MeasurementEstimatorBase( maxChi2, nSigma) {}
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3.)

Member Function Documentation

virtual Chi2StripEstimator* Chi2StripEstimator::clone ( void  ) const
inlinevirtual

Implements MeasurementEstimator.

Definition at line 24 of file Chi2StripEstimator.h.

References Chi2StripEstimator().

24  {
25  return new Chi2StripEstimator(*this);
26  }
Chi2StripEstimator(double maxChi2, double nSigma=3.)
pair< bool, double > Chi2StripEstimator::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 11 of file Chi2StripEstimator.cc.

References funct::C, TransientTrackingRecHit::detUnit(), invertPosDefMatrix(), GeomDetType::isTrackerPixel(), TrajectoryStateOnSurface::localError(), TrackingRecHit::localPosition(), TrajectoryStateOnSurface::localPosition(), TrackingRecHit::localPositionError(), m, max(), Topology::measurementError(), Topology::measurementPosition(), LocalTrajectoryError::positionError(), csvReporter::r, dttmaxenums::R, GeomDetUnit::topology(), GeomDetUnit::type(), MeasurementError::uu(), MeasurementError::uv(), MeasurementError::vv(), x, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

Referenced by Chi2SwitchingEstimator::estimate().

12  {
13 
14  if(//hit.isMatched() ||
15  hit.detUnit()->type().isTrackerPixel()) {
16  return HitReturnType(false,0);
17  }
18 
19  const StripTopology* topology =
20  dynamic_cast<const StripTopology*>(&(hit.detUnit()->topology()));
21 
24 
26  mp = topology->measurementPosition(hit.localPosition());
27  m[0] = mp.x();
28  m[1] = mp.y();
29 
31  me = topology->measurementError(hit.localPosition(),
32  hit.localPositionError());
33 
34  V(0,0) = me.uu();
35  V(1,0) = me.uv();
36  V(1,1) = me.vv();
37 
39  mp = topology->measurementPosition(state.localPosition());
40  m[0] = mp.x();
41  m[1] = mp.y();
42 
44  me = topology->measurementError(state.localPosition(),
45  state.localError().positionError());
46  C(0,0) = me.uu();
47  C(1,0) = me.uv();
48  C(1,1) = me.vv();
49 
50  AlgebraicVector2 r(m - x);
52  bool ierr = !invertPosDefMatrix(R);
53  if (ierr) {
54  edm::LogError("Chi2StripEstimator")<<" could not invert matrix:\n"<<(V+C);
55  return returnIt( 0.0 );
56  }
57 
58  double est = max(ROOT::Math::Similarity(r, R), 0.000001); // avoid exact zero
59 
60  return returnIt( est);
61 }
float vv() const
T y() const
Definition: PV2DBase.h:40
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
std::pair< bool, double > returnIt(double est) const
virtual const Topology & topology() const =0
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
const T & max(const T &a, const T &b)
float uu() const
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual const GeomDetType & type() const =0
bool isTrackerPixel() const
Definition: GeomDetType.cc:30
std::pair< bool, double > HitReturnType
virtual LocalError localPositionError() const =0
char state
Definition: procUtils.cc:75
virtual const GeomDetUnit * detUnit() const
Definition: DDAxes.h:10
T x() const
Definition: PV2DBase.h:39
virtual LocalPoint localPosition() const =0
ROOT::Math::SVector< double, 2 > AlgebraicVector2
float uv() const