1 /* 2 * Encapsulate parameters for a straight line through two hits. The straight line 3 * is parameterized by specifying a point of closest approach and the azimuthal 4 * angle of the line. 5 */ 6 7 package org.lcsim.fit.twopointcircle; 8 9 /** 10 * @author Richard Partridge 11 */ 12 public class TwoPointLineFit { 13 private double _x0; 14 private double _y0; 15 private double _phi0; 16 private double _s1; 17 private double _s2; 18 19 /** 20 * Fully qualified constructor. 21 * 22 * @param x0 x coordinate of point of closest approach 23 * @param y0 y coordinate of point of closest approach 24 * @param phi0 angle of line segment 25 * @param s1 distance to point 1 26 * @param s2 distance to point 2 27 */ 28 public TwoPointLineFit(double x0, double y0, double phi0, double s1, double s2) { 29 30 _x0 = x0; 31 _y0 = y0; 32 _phi0 = phi0; 33 _s1 = s1; 34 _s2 = s2; 35 } 36 37 /** 38 * Return the x coordinate of the point of closest approach 39 * 40 * @return x coordinate 41 */ 42 public double x0() { 43 return _x0; 44 } 45 46 /** 47 * Return the y coordinate of the point of closest approach 48 * 49 * @return y coordinate 50 */ 51 public double y0() { 52 return _y0; 53 } 54 55 /** 56 * Return the azimuthal angle of the line segment going from point 1 to point 2 57 * 58 * @return azimuthal angle 59 */ 60 public double phi0() { 61 return _phi0; 62 } 63 64 /** 65 * Return the distance from the point of closest approach to the first point 66 * 67 * @return distance to point 1 68 */ 69 public double s1() { 70 return _s1; 71 } 72 73 /** 74 * Return the distance from the point of closest approach to the second point 75 * 76 * @return distance to point 2 77 */ 78 public double s2() { 79 return _s2; 80 } 81 }