CMS 3D CMS Logo

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

#include <MRHChi2MeasurementEstimator.h>

Inheritance diagram for MRHChi2MeasurementEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

Public Member Functions

virtual
MRHChi2MeasurementEstimator
clone () const
 
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TrackingRecHit &) const
 
 MRHChi2MeasurementEstimator (double maxChi2, double nSigma=3.)
 
- Public Member Functions inherited from Chi2MeasurementEstimatorBase
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3.)
 
double chiSquaredCut () const
 
virtual bool estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const
 
virtual Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &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

Definition at line 8 of file MRHChi2MeasurementEstimator.h.

Constructor & Destructor Documentation

MRHChi2MeasurementEstimator::MRHChi2MeasurementEstimator ( 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 Plane and maximalLocalDisplacement.

Definition at line 17 of file MRHChi2MeasurementEstimator.h.

Referenced by clone().

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

Member Function Documentation

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

Implements MeasurementEstimator.

Definition at line 23 of file MRHChi2MeasurementEstimator.h.

References MRHChi2MeasurementEstimator().

23  {
24  return new MRHChi2MeasurementEstimator(*this);
25  }
MRHChi2MeasurementEstimator(double maxChi2, double nSigma=3.)
std::pair< bool, double > MRHChi2MeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TrackingRecHit 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 10 of file MRHChi2MeasurementEstimator.cc.

References makeMuonMisalignmentScenario::components, edm::hlt::Exception, TSiTrackerMultiRecHit::getAnnealingFactor(), invertPosDefMatrix(), TrackingRecHit::isValid(), getDQMSummary::iter, LogDebug, MeasurementExtractor::measuredError(), MeasurementExtractor::measuredParameters(), dttmaxenums::R, alignCSCRings::r, Chi2MeasurementEstimatorBase::returnIt(), and TSiTrackerMultiRecHit::transientHits().

11  {
12  if (!aRecHit.isValid()) {
13  throw cms::Exception("MRHChi2MeasurementEstimator") << "Invalid RecHit passed to the MRHChi2MeasurementEstimator ";
14  }
15 
18 
19  //better be a multihit...
20  TSiTrackerMultiRecHit const & mHit = dynamic_cast<TSiTrackerMultiRecHit const &>(aRecHit);
21  MeasurementExtractor me(tsos);
22  double est=0;
23  double annealing = mHit.getAnnealingFactor();
24  LogDebug("MRHChi2MeasurementEstimator") << "Current annealing factor is " << annealing;
26  LogDebug("MRHChi2MeasurementEstimator") << "this hit has " << components.size() << " components";
27  for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator iter = components.begin(); iter != components.end(); iter++){
28  Vec r = asSVector<2>((*iter)->parameters()) - me.measuredParameters<2>(**iter);
29  Mat R = asSMatrix<2>((*iter)->parametersError())*annealing + me.measuredError<2>(**iter);
30  //int ierr = ! R.Invert(); // if (ierr != 0) throw exception; //
32  LogDebug("MRHChi2MeasurementEstimator") << "Hit with weight " << (*iter)->weight();
33  est += ROOT::Math::Similarity(r, R)*((*iter)->weight());
34  }
35  return returnIt(est);
36 }
#define LogDebug(id)
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
std::pair< bool, double > returnIt(double est) const
bool invertPosDefMatrix(ROOT::Math::SMatrix< T, N, N, ROOT::Math::MatRepSym< T, N > > &m)
float getAnnealingFactor() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
ROOT::Math::SVector< double, D1 > Vector
virtual ConstRecHitContainer transientHits() const