#include <CircleFromThreePoints.h>
Public Types | |
typedef Basic2DVector< float > | Vector2D |
Public Member Functions | |
Vector2D | center () const |
CircleFromThreePoints () | |
dummy More... | |
CircleFromThreePoints (const GlobalPoint &inner, const GlobalPoint &mid, const GlobalPoint &outer, double precision=1.e-7) | |
float | curvature () const |
Private Member Functions | |
void | init (const Vector2D &b, const Vector2D &c, const Vector2D &offset, double precision) |
Private Attributes | |
Vector2D | theCenter |
float | theCurvature |
Computes the curvature (1/radius) and, if possible, the center of the circle passing through three points. The input points are three dimensional for convenience, but the calculation is done in the transverse (x,y) plane. No verification of the reasonableness of the z coordinate is done. If the three points lie on a line the curvature is zero and the center position is undefined. The 3 points are assumed to make sense: if the distance between two of them is very small compared to the ditance to the third the result will be numerically unstable.
Definition at line 18 of file CircleFromThreePoints.h.
typedef Basic2DVector<float> CircleFromThreePoints::Vector2D |
Definition at line 23 of file CircleFromThreePoints.h.
|
inline |
CircleFromThreePoints::CircleFromThreePoints | ( | const GlobalPoint & | inner, |
const GlobalPoint & | mid, | ||
const GlobalPoint & | outer, | ||
double | precision = 1.e-7 |
||
) |
Construct from three points (see class description). The order of points is not essential, but accuracy should be better if the second point lies between the other two on the circle. The optional argument "precision" specifies how accurately the straight line check has to be satisfied for setting the curvature to zero and the center position to "undefined".
Definition at line 3 of file CircleFromThreePoints.cc.
References b, DummyCfis::c, init(), SurfaceOrientation::inner, SurfaceOrientation::outer, ALCARECOEcalPhiSym_cff::precision, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
|
inline |
returns the position of the center of the circle. If curvature is zero, center() throws an exception to avoid use of undefined position. If the curvature is very small the position of the center will be very inaccurate.
Definition at line 50 of file CircleFromThreePoints.h.
References theCenter.
Referenced by ClusterShapeTrackFilter::getGlobalDirs(), PixelFitterByHelixProjections::run(), TrackFitter::run(), and KFBasedPixelFitter::run().
|
inline |
Returns the curvature (1/radius), in cm^(-1). The curvature is precomputed, this is just access method (takes no time). If curvature is zero the center is undefined (see description of presicion above).
Definition at line 42 of file CircleFromThreePoints.h.
References theCurvature.
Referenced by ClusterShapeTrackFilter::getGlobalDirs(), PixelFitterByHelixProjections::run(), TrackFitter::run(), and KFBasedPixelFitter::run().
|
private |
Definition at line 13 of file CircleFromThreePoints.cc.
References b, b2, DummyCfis::c, isotrackApplyRegressor::k, HLT_IsoTrack_cff::offset, ALCARECOEcalPhiSym_cff::precision, mathSSE::sqrt(), theCenter, and theCurvature.
Referenced by CircleFromThreePoints().
|
private |
Definition at line 54 of file CircleFromThreePoints.h.
|
private |
Definition at line 53 of file CircleFromThreePoints.h.
Referenced by curvature(), and init().