CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
Chi2MeasurementEstimatorBase Class Referenceabstract

#include <Chi2MeasurementEstimatorBase.h>

Inheritance diagram for Chi2MeasurementEstimatorBase:
MeasurementEstimator Chi2MeasurementEstimator Chi2Strip1DEstimator Chi2Switching1DEstimator EtaPhiEstimator GsfChi2MeasurementEstimator MRHChi2MeasurementEstimator MuonChi2MeasurementEstimator

Public Member Functions

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
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const override=0
 
Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const final
 
double nSigmaCut () const
 
- Public Member Functions inherited from MeasurementEstimator
virtual MeasurementEstimatorclone () const =0
 
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 ()
 

Protected Member Functions

std::pair< bool, double > returnIt (double est) const
 

Private Attributes

const double theMaxChi2
 
const float theMaxDisplacement
 
const double theNSigma
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
using HitReturnType = std::pair< bool, double >
 
using Local2DVector = Vector2DBase< float, LocalTag >
 
using SurfaceReturnType = bool
 

Detailed Description

A base class for Chi2 – type of Measurement Estimators. Implements common functionality. Ported from ORCA.

Author
todorov, cerati

Definition at line 14 of file Chi2MeasurementEstimatorBase.h.

Constructor & Destructor Documentation

◆ Chi2MeasurementEstimatorBase() [1/2]

Chi2MeasurementEstimatorBase::Chi2MeasurementEstimatorBase ( double  maxChi2,
double  nSigma = 3.,
float  maxDisp = std::numeric_limits<float>::max() 
)
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 21 of file Chi2MeasurementEstimatorBase.h.

◆ Chi2MeasurementEstimatorBase() [2/2]

template<typename... Args>
Chi2MeasurementEstimatorBase::Chi2MeasurementEstimatorBase ( double  maxChi2,
double  nSigma,
float  maxDisp,
Args &&...  args 
)
inline

Member Function Documentation

◆ chiSquaredCut()

double Chi2MeasurementEstimatorBase::chiSquaredCut ( ) const
inline

Definition at line 36 of file Chi2MeasurementEstimatorBase.h.

36 { return theMaxChi2; }

References theMaxChi2.

Referenced by returnIt().

◆ estimate() [1/2]

bool Chi2MeasurementEstimatorBase::estimate ( const TrajectoryStateOnSurface ts,
const Plane plane 
) const
finalvirtual

Returns true if the TrajectoryStateOnSurface is compatible with the Plane, false otherwise. The TrajectoryStateOnSurface must be on the plane.

Implements MeasurementEstimator.

Definition at line 5 of file Chi2MeasurementEstimatorBase.cc.

5  {
6  if (ts.hasError()) {
7  return plane.bounds().inside(ts.localPosition(), ts.localError().positionError(), nSigmaCut());
8  } else
9  return plane.bounds().inside(ts.localPosition());
10 }

References Surface::bounds(), TrajectoryStateOnSurface::hasError(), Bounds::inside(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), nSigmaCut(), and LocalTrajectoryError::positionError().

◆ estimate() [2/2]

std::pair<bool, double> Chi2MeasurementEstimatorBase::estimate ( const TrajectoryStateOnSurface ts,
const TrackingRecHit hit 
) const
overridepure 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 MeasurementEstimator.

Implemented in EtaPhiEstimator, MRHChi2MeasurementEstimator, MRHChi2MeasurementEstimator, Chi2Switching1DEstimator, MuonChi2MeasurementEstimator, GsfChi2MeasurementEstimator, Chi2MeasurementEstimator, and Chi2Strip1DEstimator.

Referenced by EtaPhiEstimator::estimate().

◆ maximalLocalDisplacement()

MeasurementEstimator::Local2DVector Chi2MeasurementEstimatorBase::maximalLocalDisplacement ( const TrajectoryStateOnSurface ts,
const Plane plane 
) const
finalvirtual

Returns the size of the compatibility region around the local position of the TrajectoryStateOnSurface along the directions of local x and y axis. The TrajectoryStateOnSurface must be on the plane. This method allows to limit the search for compatible detectors or RecHits. The MeasurementEstimator should not return "true" for any RecHit or Plane which is entirely outside of the compatibility region defined by maximalLocalDisplacement().

Implements MeasurementEstimator.

Definition at line 12 of file Chi2MeasurementEstimatorBase.cc.

13  {
14  const float emax = theMaxDisplacement;
15  if (ts.hasError()) {
17  return Local2DVector(std::min(emax, std::sqrt(float(le.xx()))) * nSigmaCut(),
18  std::min(emax, std::sqrt(float(le.yy()))) * nSigmaCut());
19  } else
20  return Local2DVector(emax, emax);
21 }

References TrajectoryStateOnSurface::hasError(), TrajectoryStateOnSurface::localError(), min(), nSigmaCut(), LocalTrajectoryError::positionError(), mathSSE::sqrt(), theMaxDisplacement, LocalError::xx(), and LocalError::yy().

◆ nSigmaCut()

double Chi2MeasurementEstimatorBase::nSigmaCut ( ) const
inline

Definition at line 37 of file Chi2MeasurementEstimatorBase.h.

37 { return theNSigma; }

References theNSigma.

Referenced by estimate(), and maximalLocalDisplacement().

◆ returnIt()

std::pair<bool, double> Chi2MeasurementEstimatorBase::returnIt ( double  est) const
inlineprotected

Member Data Documentation

◆ theMaxChi2

const double Chi2MeasurementEstimatorBase::theMaxChi2
private

Definition at line 45 of file Chi2MeasurementEstimatorBase.h.

Referenced by chiSquaredCut().

◆ theMaxDisplacement

const float Chi2MeasurementEstimatorBase::theMaxDisplacement
private

Definition at line 47 of file Chi2MeasurementEstimatorBase.h.

Referenced by maximalLocalDisplacement().

◆ theNSigma

const double Chi2MeasurementEstimatorBase::theNSigma
private

Definition at line 46 of file Chi2MeasurementEstimatorBase.h.

Referenced by nSigmaCut().

writedatasetfile.args
args
Definition: writedatasetfile.py:18
LocalTrajectoryError::positionError
LocalError positionError() const
Definition: LocalTrajectoryError.h:81
Chi2MeasurementEstimatorBase::nSigmaCut
double nSigmaCut() const
Definition: Chi2MeasurementEstimatorBase.h:37
min
T min(T a, T b)
Definition: MathUtil.h:58
beam_dqm_sourceclient-live_cfg.maxChi2
maxChi2
Definition: beam_dqm_sourceclient-live_cfg.py:147
MeasurementEstimator::Local2DVector
Vector2DBase< float, LocalTag > Local2DVector
Definition: MeasurementEstimator.h:26
MeasurementEstimator::HitReturnType
std::pair< bool, double > HitReturnType
Definition: MeasurementEstimator.h:34
Chi2MeasurementEstimatorBase::theNSigma
const double theNSigma
Definition: Chi2MeasurementEstimatorBase.h:46
Chi2MeasurementEstimatorBase::theMaxDisplacement
const float theMaxDisplacement
Definition: Chi2MeasurementEstimatorBase.h:47
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
LocalError::xx
float xx() const
Definition: LocalError.h:22
TrajectoryStateOnSurface::hasError
bool hasError() const
Definition: TrajectoryStateOnSurface.h:56
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
funct::true
true
Definition: Factorize.h:173
TrajectoryStateOnSurface::localPosition
LocalPoint localPosition() const
Definition: TrajectoryStateOnSurface.h:74
LocalError
Definition: LocalError.h:12
MeasurementEstimator::MeasurementEstimator
MeasurementEstimator()
Definition: MeasurementEstimator.h:28
Chi2MeasurementEstimatorBase::theMaxChi2
const double theMaxChi2
Definition: Chi2MeasurementEstimatorBase.h:45
Chi2MeasurementEstimatorBase::chiSquaredCut
double chiSquaredCut() const
Definition: Chi2MeasurementEstimatorBase.h:36
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
LocalError::yy
float yy() const
Definition: LocalError.h:24
HLTSiStripMonitoring_cff.nSigma
nSigma
Definition: HLTSiStripMonitoring_cff.py:151