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
template<typename... Args>
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma, float maxDisp, Args &&... args)
 
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
 
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() [1/2]

GsfChi2MeasurementEstimator::GsfChi2MeasurementEstimator ( )
inline

Definition at line 17 of file GsfChi2MeasurementEstimator.h.

Referenced by clone().

◆ GsfChi2MeasurementEstimator() [2/2]

GsfChi2MeasurementEstimator::GsfChi2MeasurementEstimator ( double  aMaxChi2)
inline

Definition at line 19 of file GsfChi2MeasurementEstimator.h.

19 : Chi2MeasurementEstimatorBase(aMaxChi2), theEstimator(aMaxChi2) {}

Member Function Documentation

◆ clone()

GsfChi2MeasurementEstimator* GsfChi2MeasurementEstimator::clone ( void  ) const
inlineoverridevirtual

Implements MeasurementEstimator.

Definition at line 23 of file GsfChi2MeasurementEstimator.h.

23 { return new GsfChi2MeasurementEstimator(*this); }

References GsfChi2MeasurementEstimator().

◆ estimate()

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

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

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

Member Data Documentation

◆ theEstimator

Chi2MeasurementEstimator GsfChi2MeasurementEstimator::theEstimator
private

Definition at line 26 of file GsfChi2MeasurementEstimator.h.

Referenced by estimate().

mps_fire.i
i
Definition: mps_fire.py:428
Chi2MeasurementEstimatorBase::returnIt
std::pair< bool, double > returnIt(double est) const
Definition: Chi2MeasurementEstimatorBase.h:40
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
GetComponents
Definition: GetComponents.h:4
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99166
PosteriorWeightsCalculator
Definition: PosteriorWeightsCalculator.h:13
GsfChi2MeasurementEstimator::theEstimator
Chi2MeasurementEstimator theEstimator
Definition: GsfChi2MeasurementEstimator.h:26
PosteriorWeightsCalculator::weights
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
Definition: PosteriorWeightsCalculator.cc:11
Chi2MeasurementEstimatorBase::Chi2MeasurementEstimatorBase
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
Definition: Chi2MeasurementEstimatorBase.h:21
GsfChi2MeasurementEstimator::GsfChi2MeasurementEstimator
GsfChi2MeasurementEstimator()
Definition: GsfChi2MeasurementEstimator.h:17
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
Chi2MeasurementEstimator::estimate
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition: Chi2MeasurementEstimator.cc:32
hit
Definition: SiStripHitEffFromCalibTree.cc:88