+//______________________________________________________________________
+void AliITSv11GeometrySupport::PointFromParallelLines(Double_t x1, Double_t y1,
+ Double_t x2, Double_t y2, Double_t d,
+ Double_t &x, Double_t &y)
+{
+//
+// Determines the X and Y of the first internal point of the Omega shape
+// (i.e. the coordinates of a point given two parallel lines passing by
+// two points and placed at a known distance)
+//
+// Input:
+// x1, y1 : first point
+// x2, y2 : second point
+// d : distance between the two lines
+//
+// Output:
+// x, y : coordinate of the point
+//
+// Created: 22 Feb 2009 Mario Sitta
+//
+//Begin_Html
+/*
+<img src="ITS/doc/PointFromParallelLines.gif">
+*/
+//End_Html
+
+ // The slope of the paralles lines at a distance d
+ Double_t m;
+
+ // The parameters of the solving equation
+ // a x^2 - 2 b x + c = 0
+ Double_t a = (x1 - x2)*(x1 - x2) - d*d;
+ Double_t b = (x1 - x2)*(y1 - y2);
+ Double_t c = (y1 - y2)*(y1 - y2) - d*d;
+
+ // (Delta4 is Delta/4 because we use the reduced formula)
+ Double_t Delta4 = b*b - a*c;
+
+ // Compute the slope of the two parallel lines
+ // (one of the two possible slopes, the one with the smaller
+ // absolute value is needed)
+ if (Delta4 < 0) { // Should never happen with our data, but just to be sure
+ x = -1; // x is expected positive, so this flags an error
+ return;
+ } else
+ m = (b + TMath::Sqrt(Delta4))/a; // b is negative with our data
+
+ // Finally compute the coordinates of the point
+ x = x2 + (y1 - y2 - d)/m;
+ y = y1 - d;
+
+ // Done
+ return;
+}
+
+//______________________________________________________________________
+void AliITSv11GeometrySupport::ReflectPoint(Double_t x1, Double_t y1,
+ Double_t x2, Double_t y2,
+ Double_t x3, Double_t y3,
+ Double_t &x, Double_t &y)
+{
+//
+// Given two points (x1,y1) and (x2,y2), determines the point (x,y)
+// lying on the line parallel to the line passing by these points,
+// at a distance d and passing by the point (x3,y3), which is symmetric to
+// the third point with respect to the axis of the segment delimited by
+// the two first points.
+//
+// Input:
+// x1, y1 : first point
+// x2, y2 : second point
+// x3, y3 : third point
+// d : distance between the two lines
+//
+// Output:
+// x, y : coordinate of the reflected point
+//
+// Created: 22 Feb 2009 Mario Sitta
+//
+//Begin_Html
+/*
+<img src="ITS/doc/ReflectPoint.gif">
+*/
+//End_Html
+
+ // The slope of the line passing by the first two points
+ Double_t k = (y2 - y1)/(x2 - x1);
+
+ // The middle point of the segment 1-2
+ Double_t xK = (x1 + x2)/2.;
+ Double_t yK = (y1 + y2)/2.;
+
+ // The intercept between the axis of the segment 1-2 and the line
+ // passing by 3 and parallel to the line passing by 1-2
+ Double_t xH = (k*k*x3 + k*(yK - y3) + xK)/(k*k + 1);
+ Double_t yH = k*(xH - x3) + y3;
+
+ // The point symmetric to 3 with respect to H
+ x = 2*xH - x3;
+ y = 2*yH - y3;
+
+ // Done
+ return;
+}
+