Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:39

0001 #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorBase.h"
0002 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0003 #include "DataFormats/GeometrySurface/interface/Plane.h"
0004 
0005 bool Chi2MeasurementEstimatorBase::estimate(const TrajectoryStateOnSurface& ts, const Plane& plane) const {
0006   if (ts.hasError()) {
0007     return plane.bounds().inside(ts.localPosition(), ts.localError().positionError(), nSigmaCut());
0008   } else
0009     return plane.bounds().inside(ts.localPosition());
0010 }
0011 
0012 MeasurementEstimator::Local2DVector Chi2MeasurementEstimatorBase::maximalLocalDisplacement(
0013     const TrajectoryStateOnSurface& ts, const Plane& plane) const {
0014   const float emax = theMaxDisplacement;
0015   if (ts.hasError()) {
0016     LocalError le = ts.localError().positionError();
0017     return Local2DVector(std::min(emax, std::sqrt(float(le.xx()))) * nSigmaCut(),
0018                          std::min(emax, std::sqrt(float(le.yy()))) * nSigmaCut());
0019   } else
0020     return Local2DVector(emax, emax);
0021 }