1 /* 2 * Encapsulate results of a 2 point circle fit 3 */ 4 5 package org.lcsim.fit.twopointcircle; 6 7 /** 8 * @author Richard Partridge 9 */ 10 public class TwoPointCircleFit { 11 12 private double _xc; 13 private double _yc; 14 private double _rc; 15 private boolean _cw; 16 private double _s1; 17 private double _s2; 18 19 /** 20 * Fully qualified constructor. 21 * 22 * @param xc x coordinate of circle center 23 * @param yc y coordinate of circle center 24 * @param rc circle radius 25 * @param cw true if the closest hit to the DCA is in the clockwise direction 26 * @param s1 arc length from the DCA to the first hit 27 * @param s2 arc length from the DCA to the second hit 28 */ 29 public TwoPointCircleFit(double xc, double yc, double rc, boolean cw, double s1, double s2) { 30 _xc = xc; 31 _yc = yc; 32 _rc = rc; 33 _cw = cw; 34 _s1 = s1; 35 _s2 = s2; 36 } 37 38 /** 39 * Return the x coordinate of the circle center. 40 * 41 * @return x coordinate of the circle center 42 */ 43 public double xc() { 44 return _xc; 45 } 46 47 /** 48 * Return the y coordinate of the circle center. 49 * 50 * @return y coordinate of the circle center 51 */ 52 public double yc() { 53 return _yc; 54 } 55 56 /** 57 * Return the radius of the circle. 58 * 59 * @return circle radius 60 */ 61 public double rc() { 62 return _rc; 63 } 64 65 /** 66 * Return true if the closest hit to the DCA is in a clockwise direction 67 * relative to the the DCA 68 * 69 * @return true if hits are cw 70 */ 71 public boolean cw() { 72 return _cw; 73 } 74 75 /** 76 * Return the arc length to the first hit. 77 * 78 * @return arc length to the first hit 79 */ 80 public double s1() { 81 return _s1; 82 } 83 84 /** 85 * Return the arc length to the second hit. 86 * 87 * @return arc length to the second hit. 88 */ 89 public double s2() { 90 return _s2; 91 } 92 }