Belle II Software  release-05-02-19
GeneralizedCircle.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/geometry/Line2D.h>
13 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
14 
15 #include <tracking/trackFindingCDC/numerics/EForwardBackward.h>
16 #include <tracking/trackFindingCDC/numerics/ERightLeft.h>
17 #include <tracking/trackFindingCDC/numerics/ERotation.h>
18 #include <tracking/trackFindingCDC/numerics/ESign.h>
19 
20 #include <utility>
21 #include <iosfwd>
22 #include <cmath>
23 
24 namespace Belle2 {
30  namespace TrackFindingCDC {
31  class Circle2D;
32 
53  class GeneralizedCircle {
54 
55  public:
58 
60  GeneralizedCircle(double n0, double n1, double n2, double n3 = 0);
61 
63  GeneralizedCircle(double n0, const Vector2D& n12, double n3 = 0);
64 
66  explicit GeneralizedCircle(const Line2D& n012);
67 
69  explicit GeneralizedCircle(const Circle2D& circle);
70 
79  static GeneralizedCircle
81  double absRadius,
82  ERotation orientation = ERotation::c_CounterClockwise);
83 
88  static GeneralizedCircle
90 
95  static GeneralizedCircle
96  fromPerigeeParameters(double curvature, double tangentialPhi, double impact);
97 
98  protected:
104  void setN0(const double n0)
105  {
106  m_n0 = n0;
107  }
108 
114  void setN1(const double n1)
115  {
116  m_n12.setX(n1);
117  }
118 
124  void setN2(const double n2)
125  {
126  m_n12.setY(n2);
127  }
128 
134  void setN12(const double n1, const double n2)
135  {
136  m_n12.setXY(n1, n2);
137  }
138 
144  void setN12(const Vector2D& n12)
145  {
146  m_n12.setXY(n12);
147  }
148 
154  void setN3(const double n3)
155  {
156  m_n3 = n3;
157  }
158 
159  public:
161  void setCenterAndRadius(const Vector2D& center,
162  double absRadius,
163  ERotation orientation = ERotation::c_CounterClockwise);
164 
166  void setPerigeeParameters(double curvature, const Vector2D& tangential, double impact);
167 
169  void
170  setPerigeeParameters(const double curvature, const double tangentialPhi, const double impact)
171  {
173  }
174 
180  void setN(const double n0, const double n1, const double n2, const double n3 = 0.0)
181  {
182  setN0(n0);
183  setN12(n1, n2);
184  setN3(n3);
185  normalize();
186  }
187 
193  void setN(const double n0, const Vector2D& n12, const double n3 = 0.0)
194  {
195  setN0(n0);
196  setN12(n12);
197  setN3(n3);
198  normalize();
199  }
200 
202  void setN(const Line2D& n012)
203  {
204  setN(n012.n0(), n012.n12());
205  }
206 
208  void setN(const GeneralizedCircle& n0123)
209  {
210  setN(n0123.n0(), n0123.n12(), n0123.n3());
211  }
212 
214  void invalidate()
215  {
216  setN(0.0, 0.0, 0.0, 0.0);
217  }
218 
220  void reverse()
221  {
222  scaleN(-1);
223  }
224 
231  void conformalTransform()
232  {
233  std::swap(m_n0, m_n3);
234  reverse(); // Correct orientation
235  }
236 
241  void passiveMoveBy(const Vector2D& by)
242  {
243  setN(fastDistance(by), gradient(by), n3());
244  }
245 
246  protected:
254  void normalize()
255  {
256  double normalization_squared = normalizationSquared();
257  if (normalization_squared > 0) scaleN(1.0 / std::sqrt(normalization_squared));
258  }
259 
260  private:
262  void scaleN(const double factor)
263  {
264  m_n0 *= factor;
265  m_n12 *= factor;
266  m_n3 *= factor;
267  }
268 
269  public:
271  double n0() const
272  {
273  return m_n0;
274  }
275 
277  double n1() const
278  {
279  return m_n12.x();
280  }
281 
283  double n2() const
284  {
285  return m_n12.y();
286  }
287 
289  const Vector2D& n12() const
290  {
291  return m_n12;
292  }
293 
295  double n3() const
296  {
297  return m_n3;
298  }
299 
300  public:
302  bool isInvalid() const
303  {
304  return n0() == 0 and n12().isNull() and n3() == 0;
305  }
306 
308  bool isValid() const
309  {
310  return not isInvalid();
311  }
312 
317  double normalizationSquared() const
318  {
319  return n12().normSquared() - 4 * n0() * n3();
320  }
321 
322  public:
325  {
326  return GeneralizedCircle(-n0(), -n12(), -n3());
327  }
328 
329  public:
338  {
339  return GeneralizedCircle(-n3(), -n12(), -n0());
340  }
341 
342  public:
349  Vector2D gradient(const Vector2D& point) const
350  {
351  return point * (2.0 * n3()) + n12();
352  }
353 
363  Vector2D normal(const Vector2D& point) const
364  {
365  return gradient(point).unit();
366  }
367 
376  Vector2D tangential(const Vector2D& point) const
377  {
378  return normal(point).orthogonal();
379  }
380 
387  Vector2D closest(const Vector2D& point) const;
388 
392  Vector2D perigee() const;
393 
398  Vector2D apogee() const;
399 
410  EForwardBackward isForwardOrBackwardOf(const Vector2D& from, const Vector2D& to) const
411  {
412  Vector2D difference = to - from;
413  Vector2D tangentialAtFrom = tangential(from);
414  return tangentialAtFrom.isForwardOrBackwardOf(difference);
415  }
416 
431  Vector2D
432  chooseNextForwardOf(const Vector2D& start, const Vector2D& end1, const Vector2D& end2) const;
433 
435  std::pair<Belle2::TrackFindingCDC::Vector2D, Belle2::TrackFindingCDC::Vector2D>
436  atCylindricalR(double cylindricalR) const;
437 
451  Vector2D atCylindricalRForwardOf(const Vector2D& startPoint, double cylindricalR) const;
452 
461  double fastDistance(const Vector2D& point) const
462  {
463  return n0() + point.dot(n12()) + point.normSquared() * n3();
464  }
465 
467  double fastImpact() const
468  {
469  return n0();
470  }
471 
476  double distance(const Vector2D& point) const;
477 
483  double distance(double fastDistance) const;
484 
489  double fastDistance(const double distance) const
490  {
491  return (distance * n3() + 1.0) * distance;
492  }
493 
495  double impact() const
496  {
497  return distance(fastImpact());
498  }
499 
501  double d0() const
502  {
503  return -impact();
504  }
505 
507  Vector2D tangential() const
508  {
509  return tangential(Vector2D(0.0, 0.0)).unit();
510  }
511 
513  double tangentialPhi() const
514  {
515  return tangential().phi();
516  }
517 
519  double minimalCylindricalR() const
520  {
521  return std::fabs(impact());
522  }
523 
525  double maximalCylindricalR() const
526  {
527  return std::fabs(impact() + 2 * radius());
528  }
529 
531  double absDistance(const Vector2D& point) const
532  {
533  return fabs(distance(point));
534  }
535 
540  ERightLeft isRightOrLeft(const Vector2D& point) const
541  {
542  return static_cast<ERightLeft>(sign(fastDistance(point)));
543  }
544 
546  bool isLeft(const Vector2D& rhs) const
547  {
548  return isRightOrLeft(rhs) == ERightLeft::c_Left;
549  }
550 
552  bool isRight(const Vector2D& rhs) const
553  {
554  return isRightOrLeft(rhs) == ERightLeft::c_Right;
555  }
556 
558  bool isLine() const
559  {
560  return n3() == 0.0;
561  }
562 
564  bool isCircle() const
565  {
566  return n3() != 0.0;
567  }
568 
570  double radius() const
571  {
572  return 1 / curvature();
573  }
574 
576  double absRadius() const
577  {
578  return fabs(radius());
579  }
580 
582  double curvature() const
583  {
584  return 2 * n3();
585  }
586 
591  double omega() const
592  {
593  return -curvature();
594  }
595 
597  Vector2D center() const
598  {
599  return n12().divided(-2 * n3());
600  }
601 
603  double perimeter() const
604  {
605  return 2 * M_PI * radius();
606  }
607 
614  ERotation orientation() const
615  {
616  return static_cast<ERotation>(sign(n3()));
617  }
618 
620  double arcLengthPeriod() const
621  {
622  return std::fabs(perimeter());
623  }
624 
634  double arcLengthBetween(const Vector2D& from, const Vector2D& to) const;
635 
637  double arcLengthTo(const Vector2D& to) const;
638 
645  double arcLengthToCylindricalR(double cylindricalR) const;
646 
655  double arcLengthFactor(const double directDistance) const
656  {
657  return arcLengthFactor(directDistance, curvature());
658  }
659 
668  static double arcLengthFactor(double directDistance, double curvature);
669 
675  std::pair<Vector2D, Vector2D> intersections(const GeneralizedCircle& generalizedCircle) const;
676 
681  Vector2D atArcLength(double arcLength) const;
682 
683  private:
684  // Order of this parameters make them easier to initialize
685 
687  double m_n3;
688 
690  Vector2D m_n12;
691 
693  double m_n0;
694  };
695 
697  std::ostream& operator<<(std::ostream& output, const GeneralizedCircle& circle);
698  }
700 }
Belle2::TrackFindingCDC::GeneralizedCircle::tangential
Vector2D tangential() const
Gives the tangential vector at the closest approach to the origin / at the perigee.
Definition: GeneralizedCircle.h:515
Belle2::TrackFindingCDC::GeneralizedCircle::isCircle
bool isCircle() const
Indicates if the generalized circle is actually a circle.
Definition: GeneralizedCircle.h:572
Belle2::TrackFindingCDC::GeneralizedCircle::m_n12
Vector2D m_n12
Memory for the second and third parameter.
Definition: GeneralizedCircle.h:698
Belle2::TrackFindingCDC::GeneralizedCircle::fastImpact
double fastImpact() const
Approximate distance to the origin.
Definition: GeneralizedCircle.h:475
Belle2::TrackFindingCDC::Vector2D::orthogonal
Vector2D orthogonal() const
Orthogonal vector to the counterclockwise direction.
Definition: Vector2D.h:303
Belle2::operator<<
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
Definition: IntervalOfValidity.cc:196
Belle2::TrackFindingCDC::Vector2D::setY
void setY(const double y)
Setter for the y coordinate.
Definition: Vector2D.h:624
Belle2::TrackFindingCDC::Vector2D::unit
Vector2D unit() const
Returns a unit vector colaligned with this.
Definition: Vector2D.h:335
Belle2::TrackFindingCDC::GeneralizedCircle::isForwardOrBackwardOf
EForwardBackward isForwardOrBackwardOf(const Vector2D &from, const Vector2D &to) const
Calculates if the to vector is closer to the from vector following the along orientation of the circl...
Definition: GeneralizedCircle.h:418
Belle2::TrackFindingCDC::GeneralizedCircle::setCenterAndRadius
void setCenterAndRadius(const Vector2D &center, double absRadius, ERotation orientation=ERotation::c_CounterClockwise)
Setter for the circle center and radius.
Definition: GeneralizedCircle.cc:96
Belle2::TrackFindingCDC::Vector2D
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:37
Belle2::TrackFindingCDC::GeneralizedCircle::minimalCylindricalR
double minimalCylindricalR() const
Gives the minimal cylindrical radius the circle reaches (unsigned)
Definition: GeneralizedCircle.h:527
Belle2::TrackFindingCDC::Vector2D::normSquared
double normSquared() const
Calculates .
Definition: Vector2D.h:183
Belle2::TrackFindingCDC::GeneralizedCircle::tangentialPhi
double tangentialPhi() const
Gives to azimuth angle phi of the direction of flight at the perigee.
Definition: GeneralizedCircle.h:521
Belle2::TrackFindingCDC::Vector2D::y
double y() const
Getter for the y coordinate.
Definition: Vector2D.h:619
Belle2::TrackFindingCDC::GeneralizedCircle::n2
double n2() const
Getter for the third circle parameter.
Definition: GeneralizedCircle.h:291
Belle2::TrackFindingCDC::GeneralizedCircle::atCylindricalRForwardOf
Vector2D atCylindricalRForwardOf(const Vector2D &startPoint, double cylindricalR) const
Approach on the circle with the given cylindrical radius that lies in the forward direction of a star...
Definition: GeneralizedCircle.cc:239
Belle2::TrackFindingCDC::GeneralizedCircle::setN3
void setN3(const double n3)
Setter for fourth circle parameter.
Definition: GeneralizedCircle.h:162
Belle2::TrackFindingCDC::GeneralizedCircle::perimeter
double perimeter() const
Gives the perimeter of the circle.
Definition: GeneralizedCircle.h:611
Belle2::TrackFindingCDC::GeneralizedCircle::m_n0
double m_n0
Memory for the first parameter.
Definition: GeneralizedCircle.h:701
Belle2::TrackFindingCDC::Vector2D::isNull
bool isNull() const
Checks if the vector is the null vector.
Definition: Vector2D.h:157
Belle2::TrackFindingCDC::GeneralizedCircle::omega
double omega() const
Gives the omega parameter as used by the framework helix.
Definition: GeneralizedCircle.h:599
Belle2::TrackFindingCDC::GeneralizedCircle::d0
double d0() const
Getter for the absolute distance to the z axes at the support point.
Definition: GeneralizedCircle.h:509
Belle2::TrackFindingCDC::Circle2D
A two dimensional circle in its natural representation using center and radius as parameters.
Definition: Circle2D.h:36
Belle2::TrackFindingCDC::GeneralizedCircle::atArcLength
Vector2D atArcLength(double arcLength) const
Calculates the point, which lies at the give perpendicular travel distance (counted from the perigee)
Definition: GeneralizedCircle.cc:354
Belle2::TrackFindingCDC::GeneralizedCircle::setN
void setN(const GeneralizedCircle &n0123)
Setter for all four circle parameters from another circle.
Definition: GeneralizedCircle.h:216
Belle2::TrackFindingCDC::NForwardBackward::EForwardBackward
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: EForwardBackward.h:35
Belle2::TrackFindingCDC::GeneralizedCircle
A generalized circle.
Definition: GeneralizedCircle.h:61
Belle2::TrackFindingCDC::Vector2D::phi
double phi() const
Gives the azimuth angle being the angle to the x axes ( range -M_PI to M_PI )
Definition: Vector2D.h:583
Belle2::TrackFindingCDC::GeneralizedCircle::passiveMoveBy
void passiveMoveBy(const Vector2D &by)
Moves the coordinate system by the given vector.
Definition: GeneralizedCircle.h:249
Belle2::TrackFindingCDC::GeneralizedCircle::distance
double distance(const Vector2D &point) const
Gives the proper distance of the point to the circle line retaining the sign of the fast distance.
Definition: GeneralizedCircle.cc:298
Belle2::TrackFindingCDC::GeneralizedCircle::radius
double radius() const
Gives the signed radius of the circle. If it was a line this will be infinity.
Definition: GeneralizedCircle.h:578
Belle2::TrackFindingCDC::Vector2D::setXY
void setXY(const double x, const double y)
Setter for both coordinate.
Definition: Vector2D.h:630
Belle2::TrackFindingCDC::GeneralizedCircle::GeneralizedCircle
GeneralizedCircle()
Default constructor for ROOT compatibility.
Definition: GeneralizedCircle.cc:28
Belle2::TrackFindingCDC::GeneralizedCircle::n3
double n3() const
Getter for the fourth circle parameter.
Definition: GeneralizedCircle.h:303
Belle2::TrackFindingCDC::GeneralizedCircle::arcLengthTo
double arcLengthTo(const Vector2D &to) const
Calculates the arc length between the perigee and the given point.
Definition: GeneralizedCircle.cc:261
Belle2::TrackFindingCDC::GeneralizedCircle::normal
Vector2D normal(const Vector2D &point) const
Normal vector to the circle near the given position.
Definition: GeneralizedCircle.h:371
Belle2::TrackFindingCDC::GeneralizedCircle::apogee
Vector2D apogee() const
Calculates the point on the circle that is furthest away from the origin.
Definition: GeneralizedCircle.cc:170
Belle2::TrackFindingCDC::GeneralizedCircle::setN
void setN(const double n0, const double n1, const double n2, const double n3=0.0)
Setter for all four circle parameters.
Definition: GeneralizedCircle.h:188
Belle2::TrackFindingCDC::GeneralizedCircle::setN12
void setN12(const double n1, const double n2)
Setter for second and third circle parameter.
Definition: GeneralizedCircle.h:142
Belle2::TrackFindingCDC::GeneralizedCircle::fastDistance
double fastDistance(const Vector2D &point) const
Approximate distance.
Definition: GeneralizedCircle.h:469
Belle2::TrackFindingCDC::GeneralizedCircle::perigee
Vector2D perigee() const
Calculates the closest approach to the two dimensional origin.
Definition: GeneralizedCircle.cc:163
Belle2::TrackFindingCDC::Vector2D::Phi
static Vector2D Phi(const double phi)
Constucts a unit vector with azimuth angle equal to phi.
Definition: Vector2D.h:73
Belle2::TrackFindingCDC::GeneralizedCircle::gradient
Vector2D gradient(const Vector2D &point) const
Gradient of the distance field Gives the gradient of the approximated distance field for the given po...
Definition: GeneralizedCircle.h:357
Belle2::TrackFindingCDC::GeneralizedCircle::m_n3
double m_n3
Memory for the fourth parameter.
Definition: GeneralizedCircle.h:695
Belle2::TrackFindingCDC::GeneralizedCircle::intersections
std::pair< Vector2D, Vector2D > intersections(const GeneralizedCircle &generalizedCircle) const
Calculates the two points common to both circles.
Definition: GeneralizedCircle.cc:324
Belle2::TrackFindingCDC::Vector2D::divided
Vector2D divided(const double denominator) const
Returns a copy where all coordinates got divided by a common denominator.
Definition: Vector2D.h:265
Belle2::TrackFindingCDC::GeneralizedCircle::orientation
ERotation orientation() const
Gives the orientation of the circle.
Definition: GeneralizedCircle.h:622
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::GeneralizedCircle::conformalTransformed
GeneralizedCircle conformalTransformed() const
Returns a copy of the circle in conformal space.
Definition: GeneralizedCircle.h:345
Belle2::TrackFindingCDC::GeneralizedCircle::setN
void setN(const Line2D &n012)
Setter for all four circle parameters from another circle.
Definition: GeneralizedCircle.h:210
Belle2::TrackFindingCDC::GeneralizedCircle::maximalCylindricalR
double maximalCylindricalR() const
Gives the maximal cylindrical radius the circle reaches.
Definition: GeneralizedCircle.h:533
Belle2::TrackFindingCDC::GeneralizedCircle::setN0
void setN0(const double n0)
Setter for first circle parameter.
Definition: GeneralizedCircle.h:112
Belle2::TrackFindingCDC::GeneralizedCircle::fromPerigeeParameters
static GeneralizedCircle fromPerigeeParameters(double curvature, const Vector2D &tangential, double impact)
Constructor of a generalized circle from perigee parameters.
Belle2::TrackFindingCDC::GeneralizedCircle::arcLengthFactor
double arcLengthFactor(const double directDistance) const
Helper function the calculate the factor between the length of a secant line and the length on the ar...
Definition: GeneralizedCircle.h:663
Belle2::TrackFindingCDC::GeneralizedCircle::arcLengthToCylindricalR
double arcLengthToCylindricalR(double cylindricalR) const
Calculates the two dimensional arc length till the cylindrical radius is reached If the radius can no...
Definition: GeneralizedCircle.cc:278
Belle2::TrackFindingCDC::GeneralizedCircle::impact
double impact() const
Gives the signed distance of the origin to the circle.
Definition: GeneralizedCircle.h:503
Belle2::TrackFindingCDC::GeneralizedCircle::isValid
bool isValid() const
Indicates if the combination of the circle parameters makes up a valid circle.
Definition: GeneralizedCircle.h:316
Belle2::TrackFindingCDC::GeneralizedCircle::isRightOrLeft
ERightLeft isRightOrLeft(const Vector2D &point) const
Indicates if the point is on the right or left side of the circle.
Definition: GeneralizedCircle.h:548
Belle2::TrackFindingCDC::GeneralizedCircle::invalidate
void invalidate()
Sets all circle parameters to zero.
Definition: GeneralizedCircle.h:222
Belle2::TrackFindingCDC::GeneralizedCircle::curvature
double curvature() const
Gives the signed curvature of the generalized circle.
Definition: GeneralizedCircle.h:590
Belle2::TrackFindingCDC::NRightLeft::ERightLeft
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition: ERightLeft.h:35
Belle2::TrackFindingCDC::GeneralizedCircle::center
Vector2D center() const
Gives the center of the circle. If it was a line both components will be infinity.
Definition: GeneralizedCircle.h:605
Belle2::TrackFindingCDC::GeneralizedCircle::chooseNextForwardOf
Vector2D chooseNextForwardOf(const Vector2D &start, const Vector2D &end1, const Vector2D &end2) const
Returns the end point which is first reached if one follows the forward direction of the circle start...
Definition: GeneralizedCircle.cc:177
Belle2::TrackFindingCDC::NRotation::ERotation
ERotation
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: ERotation.h:35
Belle2::TrackFindingCDC::GeneralizedCircle::fromCenterAndRadius
static GeneralizedCircle fromCenterAndRadius(const Vector2D &center, double absRadius, ERotation orientation=ERotation::c_CounterClockwise)
Constructor from center, radius and a optional orientation.
Definition: GeneralizedCircle.cc:69
Belle2::TrackFindingCDC::GeneralizedCircle::scaleN
void scaleN(const double factor)
Scales the circle parameters by a common factor.
Definition: GeneralizedCircle.h:270
Belle2::TrackFindingCDC::Vector2D::x
double x() const
Getter for the x coordinate.
Definition: Vector2D.h:609
Belle2::TrackFindingCDC::Line2D
A two dimensional normal line.
Definition: Line2D.h:47
Belle2::TrackFindingCDC::GeneralizedCircle::atCylindricalR
std::pair< Belle2::TrackFindingCDC::Vector2D, Belle2::TrackFindingCDC::Vector2D > atCylindricalR(double cylindricalR) const
Calculates the two points with the given cylindrical radius on the generalised circle.
Definition: GeneralizedCircle.cc:211
Belle2::TrackFindingCDC::GeneralizedCircle::isRight
bool isRight(const Vector2D &rhs) const
Return if the point given is right of the line.
Definition: GeneralizedCircle.h:560
Belle2::TrackFindingCDC::GeneralizedCircle::absDistance
double absDistance(const Vector2D &point) const
Gives the proper absolute distance of the point to the circle line.
Definition: GeneralizedCircle.h:539
Belle2::TrackFindingCDC::GeneralizedCircle::n0
double n0() const
Getter for the first circle parameter.
Definition: GeneralizedCircle.h:279
Belle2::TrackFindingCDC::GeneralizedCircle::conformalTransform
void conformalTransform()
Transforms the generalized circle to conformal space inplace Applies the conformal map in the self-in...
Definition: GeneralizedCircle.h:239
Belle2::TrackFindingCDC::GeneralizedCircle::normalize
void normalize()
Normalizes the circle parameters.
Definition: GeneralizedCircle.h:262
Belle2::TrackFindingCDC::GeneralizedCircle::isLine
bool isLine() const
Indicates if the generalized circle is actually a line.
Definition: GeneralizedCircle.h:566
Belle2::TrackFindingCDC::GeneralizedCircle::closest
Vector2D closest(const Vector2D &point) const
Closest approach on the circle to the point.
Definition: GeneralizedCircle.cc:118
Belle2::TrackFindingCDC::GeneralizedCircle::setN1
void setN1(const double n1)
Setter for second circle parameter.
Definition: GeneralizedCircle.h:122
Belle2::TrackFindingCDC::GeneralizedCircle::n1
double n1() const
Getter for the second circle parameter.
Definition: GeneralizedCircle.h:285
Belle2::TrackFindingCDC::GeneralizedCircle::n12
const Vector2D & n12() const
Getter for the second and third circle parameter which natuarally from a vector.
Definition: GeneralizedCircle.h:297
Belle2::TrackFindingCDC::GeneralizedCircle::setN2
void setN2(const double n2)
Setter for third circle parameter.
Definition: GeneralizedCircle.h:132
Belle2::TrackFindingCDC::Vector2D::setX
void setX(const double x)
Setter for the x coordinate.
Definition: Vector2D.h:614
Belle2::TrackFindingCDC::GeneralizedCircle::setPerigeeParameters
void setPerigeeParameters(double curvature, const Vector2D &tangential, double impact)
Setter for the perigee parameters.
Belle2::TrackFindingCDC::GeneralizedCircle::isLeft
bool isLeft(const Vector2D &rhs) const
Return if the point given is left of the line.
Definition: GeneralizedCircle.h:554
Belle2::TrackFindingCDC::GeneralizedCircle::normalizationSquared
double normalizationSquared() const
Calculates the generalized circle specific squared norm.
Definition: GeneralizedCircle.h:325
Belle2::TrackFindingCDC::GeneralizedCircle::reversed
GeneralizedCircle reversed() const
Returns a copy of the circle with opposite orientation.
Definition: GeneralizedCircle.h:332
Belle2::TrackFindingCDC::GeneralizedCircle::isInvalid
bool isInvalid() const
Indicates if all circle parameters are zero.
Definition: GeneralizedCircle.h:310
Belle2::TrackFindingCDC::GeneralizedCircle::reverse
void reverse()
Flips the orientation of the circle in place.
Definition: GeneralizedCircle.h:228
Belle2::TrackFindingCDC::GeneralizedCircle::absRadius
double absRadius() const
Gives the signed radius of the circle. If it was a line this will be infinity.
Definition: GeneralizedCircle.h:584
Belle2::TrackFindingCDC::GeneralizedCircle::arcLengthBetween
double arcLengthBetween(const Vector2D &from, const Vector2D &to) const
Calculates the arc length between two points of closest approach on the circle.
Definition: GeneralizedCircle.cc:246
Belle2::TrackFindingCDC::GeneralizedCircle::arcLengthPeriod
double arcLengthPeriod() const
Getter for the arc length for a full round of the circle.
Definition: GeneralizedCircle.h:628