CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GsfChi2MeasurementEstimator Class Reference

#include <GsfChi2MeasurementEstimator.h>

Inheritance diagram for GsfChi2MeasurementEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

Public Member Functions

GsfChi2MeasurementEstimatorclone () const override
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
 
 GsfChi2MeasurementEstimator ()
 
 GsfChi2MeasurementEstimator (double aMaxChi2)
 
- Public Member Functions inherited from Chi2MeasurementEstimatorBase
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
 
template<typename... Args>
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma, float maxDisp, Args &&...args)
 
double chiSquaredCut () const
 
bool estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const final
 
Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const final
 
double nSigmaCut () const
 
- Public Member Functions inherited from MeasurementEstimator
float maxSagitta () const
 
 MeasurementEstimator ()
 
 MeasurementEstimator (float maxSag, float minToll, float mpt)
 
float minPt2ForHitRecoveryInGluedDet () const
 
float minTolerance2 () const
 
virtual bool preFilter (const TrajectoryStateOnSurface &, OpaquePayload const &) const
 
virtual ~MeasurementEstimator ()
 

Private Attributes

Chi2MeasurementEstimator theEstimator
 

Additional Inherited Members

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

Detailed Description

Class which calculates the chisquare of a predicted Gaussian mixture trajectory state with respect to a reconstructed hit according to the Gaussian-sum filter (GSF) strategy. The relevant formulas can be found in R. Fruhwirth, Computer Physics Communications 100 (1997), 1.

Definition at line 15 of file GsfChi2MeasurementEstimator.h.

Constructor & Destructor Documentation

GsfChi2MeasurementEstimator::GsfChi2MeasurementEstimator ( )
inline

Definition at line 18 of file GsfChi2MeasurementEstimator.h.

Referenced by clone().

18  :
20  theEstimator(100.) {}
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
Chi2MeasurementEstimator theEstimator
GsfChi2MeasurementEstimator::GsfChi2MeasurementEstimator ( double  aMaxChi2)
inline

Definition at line 22 of file GsfChi2MeasurementEstimator.h.

References estimate().

22  :
24  theEstimator(aMaxChi2) {}
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
Chi2MeasurementEstimator theEstimator

Member Function Documentation

GsfChi2MeasurementEstimator* GsfChi2MeasurementEstimator::clone ( void  ) const
inlineoverridevirtual

Implements MeasurementEstimator.

Definition at line 29 of file GsfChi2MeasurementEstimator.h.

References GsfChi2MeasurementEstimator().

29  {
30  return new GsfChi2MeasurementEstimator(*this);
31  }
std::pair< bool, double > GsfChi2MeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TrackingRecHit hit 
) const
overridevirtual

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 9 of file GsfChi2MeasurementEstimator.cc.

References vertices_cff::chi2, Chi2MeasurementEstimator::estimate(), mps_fire::i, Chi2MeasurementEstimatorBase::returnIt(), theEstimator, PosteriorWeightsCalculator::weights(), and create_public_lumi_plots::weights.

Referenced by GsfChi2MeasurementEstimator().

10  {
11 
12  GetComponents comps(tsos);
13  auto const & tsvec = comps();
14  if (tsvec.empty()) {
15  edm::LogError("GsfChi2MeasurementEstimator")
16  << "Trying to calculate chi2 of hit with respect to empty mixture!";
17  return std::make_pair(false,0.);
18  }
19 
20  auto const & weights = PosteriorWeightsCalculator(tsvec).weights(hit);
21  if ( weights.empty() ) return std::make_pair(false,0);
22 
23  // Chi2MeasurementEstimator est(chiSquaredCut());
24  double chi2 = 0.;
25  int i = 0;
26  for (auto const & ts : tsvec)
27  chi2 += weights[i++] * theEstimator.estimate(ts,hit).second;
28  // Done - normalisation of weights is ensured
29  // by PosteriorWeightsCalculator
30  return returnIt(chi2);
31 }
std::pair< bool, double > returnIt(double est) const
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Chi2MeasurementEstimator theEstimator

Member Data Documentation

Chi2MeasurementEstimator GsfChi2MeasurementEstimator::theEstimator
private

Definition at line 34 of file GsfChi2MeasurementEstimator.h.

Referenced by estimate().