14 #include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariable.h>
15 #include <framework/geometry/B2Vector3.h>
16 #include <framework/core/FrameworkExceptions.h>
18 #define CIRCLECENTERXY_NAME CircleCenterXY
29 template <
typename Po
intType >
33 BELLE2_DEFINE_EXCEPTION(Straight_Line,
"The hits are on a straight Line (or indistinguishably near to being on it).");
43 double inX = b.X() - c.X();
44 double inY = b.Y() - c.Y();
45 double outX = a.X() - b.X();
46 double outY = a.Y() - b.Y();
53 double b1 = b.X() + outX * 0.5 - (c.X() + inX * 0.5);
54 double b2 = b.Y() + outY * 0.5 - (c.Y() + inY * 0.5);
56 if (a11 * a22 == a12 * a21) {
throw Straight_Line(); }
58 double s = (b1 * a22 - b2 * a21) / (a11 * a22 - a12 * a21);
60 return B2Vector3<double>(c.X() + inX * 0.5 + s * inY, c.Y() + inY * 0.5 - s * inX, 0.);