11#include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariable.h>
12#include <framework/geometry/B2Vector3.h>
13#include <framework/core/FrameworkExceptions.h>
15#define CIRCLECENTERXY_NAME CircleCenterXY
26 template <
typename Po
intType >
36 static B2Vector3D value(
const PointType& a,
const PointType& b,
const PointType& c)
40 double inX = b.X() - c.X();
41 double inY = b.Y() - c.Y();
42 double outX = a.X() - b.X();
43 double outY = a.Y() - b.Y();
50 double b1 = b.X() + outX * 0.5 - (c.X() + inX * 0.5);
51 double b2 = b.Y() + outY * 0.5 - (c.Y() + inY * 0.5);
53 if (a11 * a22 == a12 * a21) {
throw Straight_Line(); }
55 double s = (b1 * a22 - b2 * a21) / (a11 * a22 - a12 * a21);
57 return B2Vector3D(c.X() + inX * 0.5 + s * inY, c.Y() + inY * 0.5 - s * inX, 0.);
calculates the center of the circle for 3 hits in the XY plane and returns a B2Vector3 with the resul...
static B2Vector3D value(const PointType &a, const PointType &b, const PointType &c)
calculates an estimation of circleCenter position, result is returned as the x and y value of the B2V...
PUT_NAME_FUNCTION(CIRCLECENTERXY_NAME)
is replaced by "static const std:string name(void)" frunction which returns name of the Class
BELLE2_DEFINE_EXCEPTION(Straight_Line, "The hits are on a straight Line (or indistinguishably near to being on it).")
this exception is thrown by the CircleFit and occurs when the track is too straight.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Abstract base class for different kinds of events.