CMS 3D CMS Logo

MRHChi2MeasurementEstimator Class Reference

#include <TrackingTools/KalmanUpdators/interface/MRHChi2MeasurementEstimator.h>

Inheritance diagram for MRHChi2MeasurementEstimator:

Chi2MeasurementEstimatorBase MeasurementEstimator

List of all members.

Public Member Functions

virtual
MRHChi2MeasurementEstimator
clone () const
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
 Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible.
 MRHChi2MeasurementEstimator (double maxChi2, double nSigma=3.)
 Construct with cuts on chi2 and nSigma.


Detailed Description

Definition at line 8 of file MRHChi2MeasurementEstimator.h.


Constructor & Destructor Documentation

MRHChi2MeasurementEstimator::MRHChi2MeasurementEstimator ( 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 17 of file MRHChi2MeasurementEstimator.h.

Referenced by clone().

00017                                                                            : 
00018     Chi2MeasurementEstimatorBase( maxChi2, nSigma) {}


Member Function Documentation

virtual MRHChi2MeasurementEstimator* MRHChi2MeasurementEstimator::clone ( void   )  const [inline, virtual]

Implements MeasurementEstimator.

Definition at line 23 of file MRHChi2MeasurementEstimator.h.

References MRHChi2MeasurementEstimator().

00023                                                      {
00024     return new MRHChi2MeasurementEstimator(*this);
00025   }

std::pair< bool, double > MRHChi2MeasurementEstimator::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 MRHChi2MeasurementEstimator.cc.

References Exception, TransientTrackingRecHit::getAnnealingFactor(), TrackingRecHit::isValid(), iter, LogDebug, me, MeasurementExtractor::measuredError(), MeasurementExtractor::measuredParameters(), dttmaxenums::R, r, Chi2MeasurementEstimatorBase::returnIt(), and TransientTrackingRecHit::transientHits().

00009                                                                                  {
00010   if (!aRecHit.isValid()) {
00011         throw cms::Exception("MRHChi2MeasurementEstimator") << "Invalid RecHit passed to the MRHChi2MeasurementEstimator ";
00012   }
00013 
00014   typedef AlgebraicROOTObject<2>::Vector Vec;
00015   typedef AlgebraicROOTObject<2>::SymMatrix Mat;
00016   
00017   MeasurementExtractor me(tsos);
00018   double est=0;
00019   double annealing = aRecHit.getAnnealingFactor();
00020   LogDebug("MRHChi2MeasurementEstimator") << "Current annealing factor is " << annealing;               
00021   TransientTrackingRecHit::ConstRecHitContainer components = aRecHit.transientHits();
00022   LogDebug("MRHChi2MeasurementEstimator") << "this hit has " << components.size() << " components";     
00023   for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator iter = components.begin(); iter != components.end(); iter++){              
00024         Vec r = asSVector<2>((*iter)->parameters()) - me.measuredParameters<2>(**iter);
00025         Mat R = asSMatrix<2>((*iter)->parametersError())*annealing + me.measuredError<2>(**iter);
00026         //int ierr = ! R.Invert(); // if (ierr != 0) throw exception; // 
00027         R.Invert();
00028         LogDebug("MRHChi2MeasurementEstimator") << "Hit with weight " << (*iter)->weight(); 
00029         est += ROOT::Math::Similarity(r, R)*((*iter)->weight());
00030   }     
00031   return returnIt(est);
00032 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:25 2009 for CMSSW by  doxygen 1.5.4