Belle II Software  release-05-02-19
PerigeeCircle.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 - 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 #include <tracking/trackFindingCDC/geometry/PerigeeCircle.h>
11 
12 #include <tracking/trackFindingCDC/geometry/PerigeeParameters.h>
13 
14 #include <tracking/trackFindingCDC/geometry/Circle2D.h>
15 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
16 
17 #include <tracking/trackFindingCDC/numerics/EForwardBackward.h>
18 #include <tracking/trackFindingCDC/numerics/ERotation.h>
19 #include <tracking/trackFindingCDC/numerics/Quadratic.h>
20 #include <tracking/trackFindingCDC/numerics/SpecialFunctions.h>
21 #include <tracking/trackFindingCDC/numerics/Angle.h>
22 
23 #include <ostream>
24 #include <utility>
25 #include <cmath>
26 
27 namespace Belle2 {
32  namespace TrackFindingCDC {
33  class GeneralizedCircle;
34  class Line2D;
35  }
37 }
38 
39 using namespace Belle2;
40 using namespace TrackFindingCDC;
41 
42 
43 
45 {
46  invalidate();
47 }
48 
49 PerigeeCircle::PerigeeCircle(double curvature, const Vector2D& phi0Vec, double impact)
50  : m_curvature(curvature)
51  , m_phi0(phi0Vec.phi())
52  , m_phi0Vec(phi0Vec)
53  , m_impact(impact)
54 {
55 }
56 
57 PerigeeCircle::PerigeeCircle(double curvature, double phi0, double impact)
58  : m_curvature(curvature)
59  , m_phi0(phi0)
60  , m_phi0Vec(Vector2D::Phi(phi0))
61  , m_impact(impact)
62 {
63 }
64 
66  : PerigeeCircle(perigeeParameters(EPerigeeParameter::c_Curv),
67  perigeeParameters(EPerigeeParameter::c_Phi0),
68  perigeeParameters(EPerigeeParameter::c_I))
69 {
70 }
71 
72 PerigeeCircle::PerigeeCircle(double curvature, double phi0, const Vector2D& phi0Vec, double impact)
73  : m_curvature(curvature)
74  , m_phi0(phi0)
75  , m_phi0Vec(phi0Vec)
76  , m_impact(impact)
77 {
79 }
80 
82 {
83  setN(n012);
84 }
85 
87 {
88  setN(n0123);
89 }
90 
92 {
93  setCenterAndRadius(circle.center(), circle.absRadius(), circle.orientation());
94 }
95 
96 PerigeeCircle PerigeeCircle::fromN(double n0, double n1, double n2, double n3)
97 {
98  PerigeeCircle circle;
99  circle.setN(n0, n1, n2, n3);
100  return circle;
101 }
102 
103 PerigeeCircle PerigeeCircle::fromN(double n0, const Vector2D& n12, double n3)
104 {
105  PerigeeCircle circle;
106  circle.setN(n0, n12, n3);
107  return circle;
108 }
109 
110 PerigeeCircle
111 PerigeeCircle::fromCenterAndRadius(const Vector2D& center, double absRadius, ERotation orientation)
112 {
113  PerigeeCircle circle;
115  return circle;
116 }
117 
118 Vector2D PerigeeCircle::atArcLength(double arcLength) const
119 {
120  double chi = arcLength * curvature();
121  double chiHalf = chi / 2.0;
122 
123  double atX = arcLength * sinc(chi);
124  double atY = arcLength * sinc(chiHalf) * sin(chiHalf) + impact();
125  return Vector2D::compose(phi0Vec(), atX, atY);
126 }
127 
129 {
132  m_phi0Vec.reverse();
133  m_impact = -m_impact;
134 }
135 
137 {
139 }
140 
142 {
143  double denominator = 2 + curvature() * impact();
144  std::swap(m_impact, m_curvature);
145  m_curvature *= denominator;
146  m_impact /= denominator;
147  // Also properly fixing the orientation to the opposite.
148  reverse();
149 }
150 
152 {
153  double denominator = 2 + curvature() * impact();
154  // Properly fixing the orientation to the opposite by the minus signs
155  double newCurvature = -impact() * denominator;
156  double newPhi0 = AngleUtil::reversed(phi0());
157  Vector2D newPhi0Vec = -phi0Vec();
158  double newImpact = -curvature() / denominator;
159  return PerigeeCircle(newCurvature, newPhi0, newPhi0Vec, newImpact);
160 }
161 
163 {
164  m_curvature = 0.0;
165  m_phi0 = NAN;
166  m_phi0Vec = Vector2D(0.0, 0.0);
167  m_impact = 0;
168 }
169 
171 {
172  return (not std::isfinite(phi0()) or not std::isfinite(curvature()) or
173  not std::isfinite(impact()) or phi0Vec().isNull());
174 }
175 
177 {
178  double arcLength = arcLengthTo(by);
179  m_impact = distance(by);
180  m_phi0 = m_phi0 + curvature() * arcLength;
183 }
184 
186 {
188  passiveMoveByJacobian(by, jacobian);
189  return jacobian;
190 }
191 
193 {
194  Vector2D deltaVec = by - perigee();
195  double delta = deltaVec.norm();
196  double deltaParallel = phi0Vec().dot(deltaVec);
197  // double deltaOrthogonal = phi0Vec().cross(deltaVec);
198  // double zeta = deltaVec.normSquared();
199 
200  Vector2D UVec = gradient(by);
201  double U = UVec.norm();
202  double USquared = UVec.normSquared();
203  double UOrthogonal = phi0Vec().cross(UVec);
204  // double UParallel = phi0Vec().dot(UVec);
205 
206  // Vector2D CB = gradient(by).orthogonal();
207  // double U = sqrt(1 + curvature() * A);
208  // double xi = 1.0 / CB.normSquared();
209  // double nu = 1 - curvature() * deltaOrthogonal;
210  // double mu = 1.0 / (U * (U + 1)) + curvature() * lambda;
211  // double mu = 1.0 / U / 2.0;
212  // double nu = -UOrthogonal;
213  // double xi = 1 / USquared;
214 
215  // double halfA = fastDistance(by);
216  // double A = 2 * halfA;
217  // double lambda = halfA / ((1 + U) * (1 + U) * U);
218  double dr = distance(by);
219 
220  // Vector2D uVec = gradient(Vector2D(0.0, 0.0));
221  // double u = uVec.norm();
222  double u = 1 + curvature() * impact(); //= n12().cylindricalR()
223 
224  using namespace NPerigeeParameterIndices;
225  jacobian(c_Curv, c_Curv) = 1;
226  jacobian(c_Curv, c_Phi0) = 0;
227  jacobian(c_Curv, c_I) = 0;
228 
229  jacobian(c_Phi0, c_Curv) = deltaParallel / USquared;
230  jacobian(c_Phi0, c_Phi0) = -u * UOrthogonal / USquared;
231  jacobian(c_Phi0, c_I) = -curvature() * curvature() * deltaParallel / USquared;
232 
233  jacobian(c_I, c_Curv) = (delta - dr) * (delta + dr) / U / 2;
234  jacobian(c_I, c_Phi0) = u * deltaParallel / U;
235  jacobian(c_I, c_I) = -UOrthogonal / U;
236 }
237 
238 double PerigeeCircle::arcLengthTo(const Vector2D& point) const
239 {
240  Vector2D closestToPoint = closest(point);
241  double secantLength = perigee().distance(closestToPoint);
242  double deltaParallel = phi0Vec().dot(point);
243  return copysign(arcLengthAtSecantLength(secantLength), deltaParallel);
244 }
245 
246 double PerigeeCircle::arcLengthBetween(const Vector2D& from, const Vector2D& to) const
247 {
248  EForwardBackward lengthSign = isForwardOrBackwardOf(from, to);
249  if (not NForwardBackward::isValid(lengthSign)) return NAN;
250  // Handling the rare case that from and to correspond to opposing points on the circle
251  if (lengthSign == EForwardBackward::c_Unknown) lengthSign = EForwardBackward::c_Forward;
252  Vector2D closestAtFrom = closest(from);
253  Vector2D closestAtTo = closest(to);
254  double secantLength = closestAtFrom.distance(closestAtTo);
255  return lengthSign * arcLengthAtSecantLength(secantLength);
256 }
257 
258 double PerigeeCircle::arcLengthToCylindricalR(double cylindricalR) const
259 {
260  // Slight trick here
261  // Since the sought point is on the helix we treat it as the perigee
262  // and the origin as the point to extrapolate to.
263  // We know the distance of the origin to the circle, which is just d0
264  // The direct distance from the origin to the imaginary perigee is just the given cylindricalR.
265  return arcLengthAtDeltaLength(cylindricalR, impact());
266 }
267 
268 double PerigeeCircle::arcLengthAtDeltaLength(double delta, double dr) const
269 {
270  const double secantLength = sqrt((delta + dr) * (delta - dr) / (1 + dr * curvature()));
271  const double arcLength = arcLengthAtSecantLength(secantLength);
272  return arcLength;
273 }
274 
275 double PerigeeCircle::arcLengthAtSecantLength(double secantLength) const
276 {
277  double x = secantLength * curvature() / 2.0;
278  double arcLengthFactor = asinc(x);
279  return secantLength * arcLengthFactor;
280 }
281 
282 std::pair<Vector2D, Vector2D> PerigeeCircle::atCylindricalR(const double cylindricalR) const
283 {
284  const double u = (1 + curvature() * impact());
285  const double orthogonal = ((square(impact()) + square(cylindricalR)) * curvature() / 2.0 + impact()) / u;
286  const double parallel = sqrt(square(cylindricalR) - square(orthogonal));
287  Vector2D atCylindricalR1 = Vector2D::compose(phi0Vec(), -parallel, orthogonal);
288  Vector2D atCylindricalR2 = Vector2D::compose(phi0Vec(), parallel, orthogonal);
289  std::pair<Vector2D, Vector2D> result(atCylindricalR1, atCylindricalR2);
290  return result;
291 }
292 
294  const double cylindricalR) const
295 {
296  std::pair<Vector2D, Vector2D> candidatePoints = atCylindricalR(cylindricalR);
297  return chooseNextForwardOf(startPoint, candidatePoints.first, candidatePoints.second);
298 }
299 
301  const Vector2D& end1,
302  const Vector2D& end2) const
303 {
304  double arcLength1 = arcLengthBetween(start, end1);
305  double arcLength2 = arcLengthBetween(start, end2);
306  if (arcLength1 < 0) arcLength1 += arcLengthPeriod();
307  if (arcLength2 < 0) arcLength2 += arcLengthPeriod();
308  if (fmin(arcLength1, arcLength2) == arcLength1) {
309  return end1;
310  } else if (fmin(arcLength1, arcLength2) == arcLength2) {
311  return end2;
312  } else {
313  return Vector2D(NAN, NAN);
314  }
315 }
316 
318 {
319  return point - normal(point) * distance(point);
320 }
321 
323 {
324  double A = 2 * fastDistance;
325  double U = std::sqrt(1 + A * curvature());
326  return A / (1.0 + U);
327 }
328 
329 double PerigeeCircle::fastDistance(const Vector2D& point) const
330 {
331  Vector2D delta = point - perigee();
332  double deltaOrthogonal = phi0Vec().cross(delta);
333  return -deltaOrthogonal + curvature() * delta.normSquared() / 2;
334 }
335 
337  double absRadius,
339 {
340  m_curvature = orientation / std::fabs(absRadius);
343  m_phi0 = m_phi0Vec.phi();
344  m_impact = (center.norm() - std::fabs(absRadius)) * orientation;
345 }
346 
347 void PerigeeCircle::setN(double n0, const Vector2D& n12, double n3)
348 {
349  double normalization = sqrt(n12.normSquared() - 4 * n0 * n3);
350  m_curvature = 2 * n3 / normalization;
353  m_phi0 = m_phi0Vec.phi();
354  m_impact = distance(n0 / normalization); // Uses the new curvature
355 }
356 
357 std::ostream& TrackFindingCDC::operator<<(std::ostream& output, const PerigeeCircle& circle)
358 {
359  return output << "PerigeeCircle("
360  << "curvature=" << circle.curvature() << ","
361  << "phi0=" << circle.phi0() << ","
362  << "impact=" << circle.impact() << ")";
363 }
Belle2::TrackFindingCDC::PerigeeCircle::PerigeeCircle
PerigeeCircle()
Default constructor for ROOT compatibility.
Definition: PerigeeCircle.cc:44
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::PerigeeCircle::setN
void setN(double n0, double n1, double n2, double n3=0.0)
Setter for four generalised circle parameters.
Definition: PerigeeCircle.h:393
Belle2::TrackFindingCDC::PerigeeCircle::conformalTransformed
PerigeeCircle conformalTransformed() const
Returns a copy of the circle in conformal space.
Definition: PerigeeCircle.cc:151
Belle2::TrackFindingCDC::NPerigeeParameterIndices::EPerigeeParameter
EPerigeeParameter
Enumeration to address the individual perigee parameters in a vector or matrix.
Definition: PerigeeParameters.h:34
Belle2::TrackFindingCDC::Vector2D
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:37
Belle2::TrackFindingCDC::Vector2D::normalize
double normalize()
Normalizes the vector to unit length.
Definition: Vector2D.h:317
Belle2::TrackFindingCDC::Vector2D::normSquared
double normSquared() const
Calculates .
Definition: Vector2D.h:183
Belle2::TrackFindingCDC::PerigeeCircle::arcLengthAtDeltaLength
double arcLengthAtDeltaLength(double delta, double dr) const
Helper method to calculate the arc length to a point at distance delta to the perigee and dr to circl...
Definition: PerigeeCircle.cc:268
Belle2::TrackFindingCDC::PerigeeCircle::arcLengthTo
double arcLengthTo(const Vector2D &point) const
Calculates the arc length between the perigee and the given point.
Definition: PerigeeCircle.cc:238
Belle2::TrackFindingCDC::PerigeeCircle::fromN
static PerigeeCircle fromN(double n0, double n1, double n2, double n3=0)
Constructor with the four parameters of the generalized circle.
Belle2::TrackFindingCDC::PerigeeCircle::atArcLength
Vector2D atArcLength(double arcLength) const
Calculates the point, which lies at the give perpendicular travel distance (counted from the perigee)
Definition: PerigeeCircle.cc:118
Belle2::TrackFindingCDC::NForwardBackward::isValid
bool isValid(EForwardBackward eForwardBackward)
Check whether the given enum instance is one of the valid values.
Definition: EForwardBackward.h:55
Belle2::TrackFindingCDC::PerigeeCircle::arcLengthBetween
double arcLengthBetween(const Vector2D &from, const Vector2D &to) const
Calculates the arc length between two points of closest approach on the circle.
Definition: PerigeeCircle.cc:246
Belle2::TrackFindingCDC::PerigeeCircle::reversed
PerigeeCircle reversed() const
Returns a copy of the circle with opposite orientation.
Definition: PerigeeCircle.cc:136
Belle2::TrackFindingCDC::PerigeeCircle::impact
double impact() const
Getter for the signed distance of the origin to the circle.
Definition: PerigeeCircle.h:444
Belle2::TrackFindingCDC::Circle2D
A two dimensional circle in its natural representation using center and radius as parameters.
Definition: Circle2D.h:36
Belle2::TrackFindingCDC::AngleUtil::normalise
static void normalise(double &angle)
Normalise an angle inplace to lie in the range from [-pi, pi].
Definition: Angle.h:51
Belle2::TrackFindingCDC::NForwardBackward::EForwardBackward
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: EForwardBackward.h:35
Belle2::TrackFindingCDC::UncertainParametersUtil< PerigeeUtil, EPerigeeParameter >::identity
static CovarianceMatrix identity()
Returns an identity matrix.
Definition: UncertainParameters.icc.h:65
Belle2::TrackFindingCDC::Vector2D::distance
double distance(const Vector2D &rhs=Vector2D(0.0, 0.0)) const
Calculates the distance of this point to the rhs.
Definition: Vector2D.h:218
Belle2::TrackFindingCDC::PerigeeCircle::orientation
ERotation orientation() const
Getter for the orientation of the circle.
Definition: PerigeeCircle.h:272
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::Vector2D::dot
double dot(const Vector2D &rhs) const
Calculates the two dimensional dot product.
Definition: Vector2D.h:172
Belle2::TrackFindingCDC::PerigeeCircle::reverse
void reverse()
Flips the orientation of the circle in place.
Definition: PerigeeCircle.cc:128
Belle2::TrackFindingCDC::PerigeeCircle::n12
Vector2D n12() const
Getter for the generalised circle parameters n1 and n2.
Definition: PerigeeCircle.h:367
Belle2::TrackFindingCDC::PerigeeCircle::passiveMoveByJacobian
PerigeeJacobian passiveMoveByJacobian(const Vector2D &by) const
Computes the Jacobi matrix for a move of the coordinate system by the given vector.
Definition: PerigeeCircle.cc:185
Belle2::TrackFindingCDC::Vector2D::first
double first() const
Getter for the first coordinate.
Definition: Vector2D.h:643
Belle2::TrackFindingCDC::PerigeeCircle::chooseNextForwardOf
Vector2D chooseNextForwardOf(const Vector2D &start, const Vector2D &end1, const Vector2D &end2) const
Returns the one of two end point which is first reached from the given start if one stricly follows t...
Definition: PerigeeCircle.cc:300
Belle2::TrackFindingCDC::Vector2D::cross
double cross(const Vector2D &rhs) const
Calculated the two dimensional cross product.
Definition: Vector2D.h:177
Belle2::TrackFindingCDC::PerigeeCircle::m_curvature
double m_curvature
Memory for the signed curvature.
Definition: PerigeeCircle.h:513
Belle2::TrackFindingCDC::PerigeeCircle::m_phi0
double m_phi0
Memory for the azimuth angle of the direction of flight at the perigee.
Definition: PerigeeCircle.h:516
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::Circle2D::orientation
ERotation orientation() const
Indicates if the circle is to be interpreted counterclockwise or clockwise.
Definition: Circle2D.h:225
Belle2::TrackFindingCDC::PerigeeCircle::perigee
Vector2D perigee() const
Getter for the perigee point.
Definition: PerigeeCircle.h:302
Belle2::TrackFindingCDC::PerigeeCircle::center
Vector2D center() const
Getter for the center of the circle. If it was a line both components will be infinity.
Definition: PerigeeCircle.h:308
Belle2::TrackFindingCDC::PerigeeCircle::fromCenterAndRadius
static PerigeeCircle fromCenterAndRadius(const Vector2D &center, double absRadius, ERotation orientation=ERotation::c_CounterClockwise)
Constructor from center, radius and a optional orientation.
Definition: PerigeeCircle.cc:111
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::PerigeeCircle::phi0
double phi0() const
Getter for the azimuth angle of the direction of flight at the perigee.
Definition: PerigeeCircle.h:432
Belle2::TrackFindingCDC::PerigeeCircle::arcLengthAtSecantLength
double arcLengthAtSecantLength(double secantLength) const
Helper method to calculate the arc length between to points on the circle from a given direct secant ...
Definition: PerigeeCircle.cc:275
Belle2::TrackFindingCDC::Vector2D::reverse
Vector2D & reverse()
Reverses the direction of the vector in place.
Definition: Vector2D.h:341
Belle2::TrackFindingCDC::PerigeeCircle::isInvalid
bool isInvalid() const
Indicates if all circle parameters are zero.
Definition: PerigeeCircle.cc:170
Belle2::TrackFindingCDC::AngleUtil::reversed
static double reversed(const double angle)
Get the angle that point in the opposite direction.
Definition: Angle.h:64
Belle2::TrackFindingCDC::PerigeeCircle::atCylindricalR
std::pair< Vector2D, Vector2D > atCylindricalR(double cylindricalR) const
Calculates the two points with the given cylindrical radius on the generalised circle.
Definition: PerigeeCircle.cc:282
Belle2::TrackFindingCDC::PerigeeCircle
Extension of the generalized circle also caching the perigee coordinates.
Definition: PerigeeCircle.h:46
Belle2::TrackFindingCDC::PerigeeCircle::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: PerigeeCircle.cc:293
Belle2::TrackFindingCDC::PerigeeCircle::phi0Vec
const Vector2D & phi0Vec() const
Getter for the unit vector of the direction of flight at the perigee.
Definition: PerigeeCircle.h:438
Belle2::TrackFindingCDC::PerigeeCircle::passiveMoveBy
void passiveMoveBy(const Vector2D &by)
Moves the coordinates system by the given vector. Updates perigee parameters in place.
Definition: PerigeeCircle.cc:176
Belle2::TrackFindingCDC::PerigeeCircle::n0
double n0() const
Getter for the generalised circle parameter n0.
Definition: PerigeeCircle.h:361
Belle2::TrackFindingCDC::NRotation::ERotation
ERotation
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: ERotation.h:35
Belle2::TrackFindingCDC::PerigeeCircle::n1
double n1() const
Getter for the generalised circle parameters n1.
Definition: PerigeeCircle.h:373
Belle2::TrackFindingCDC::Line2D
A two dimensional normal line.
Definition: Line2D.h:47
Belle2::TrackFindingCDC::Circle2D::center
Vector2D center() const
Getter for the central point of the circle.
Definition: Circle2D.h:231
Belle2::TrackFindingCDC::Vector2D::norm
double norm() const
Calculates the length of the vector.
Definition: Vector2D.h:189
Belle2::TrackFindingCDC::PerigeeCircle::n2
double n2() const
Getter for the generalised circle parameters n2.
Definition: PerigeeCircle.h:380
Belle2::TrackFindingCDC::PerigeeCircle::n3
double n3() const
Getter for the generalised circle parameter n3.
Definition: PerigeeCircle.h:387
Belle2::TrackFindingCDC::PerigeeCircle::setCenterAndRadius
void setCenterAndRadius(const Vector2D &center, double absRadius, ERotation orientation=ERotation::c_CounterClockwise)
Setter for the circle center and radius.
Definition: PerigeeCircle.cc:336
Belle2::TrackFindingCDC::PerigeeCircle::isForwardOrBackwardOf
EForwardBackward isForwardOrBackwardOf(const Vector2D &from, const Vector2D &to) const
Indicates whether to given point lies in the forward direction from the perigee.
Definition: PerigeeCircle.h:190
Belle2::TrackFindingCDC::PerigeeCircle::closest
Vector2D closest(const Vector2D &point) const
Calculates the point of closest approach on the circle to the given point.
Definition: PerigeeCircle.cc:317
Belle2::TrackFindingCDC::Circle2D::absRadius
double absRadius() const
Getter for the absolute radius.
Definition: Circle2D.h:219
Belle2::TrackFindingCDC::PlainMatrix
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:50
Belle2::TrackFindingCDC::PerigeeCircle::arcLengthToCylindricalR
double arcLengthToCylindricalR(double cylindricalR) const
Calculates the two dimensional arc length till the cylindrical radius is reached If the radius can no...
Definition: PerigeeCircle.cc:258
Belle2::TrackFindingCDC::Vector2D::compose
static Vector2D compose(const Vector2D &coordinateVec, const double parallelCoor, const double orthoCoor)
Constructs a vector from a unit coordinate system vector and the coordinates in that system.
Definition: Vector2D.h:85
Belle2::TrackFindingCDC::PerigeeCircle::normal
Vector2D normal(const Vector2D &point) const
Unit normal vector from the circle to the given point.
Definition: PerigeeCircle.h:284
Belle2::TrackFindingCDC::PerigeeCircle::distance
double distance(const Vector2D &point) const
Getter for the proper signed distance of the point to the circle.
Definition: PerigeeCircle.h:220
Belle2::TrackFindingCDC::PerigeeCircle::invalidate
void invalidate()
Sets all circle parameters to zero.
Definition: PerigeeCircle.cc:162
Belle2::TrackFindingCDC::PerigeeCircle::curvature
double curvature() const
Getter for the signed curvature.
Definition: PerigeeCircle.h:426
Belle2::TrackFindingCDC::PerigeeCircle::m_impact
double m_impact
Memory for the signed impact parameter.
Definition: PerigeeCircle.h:522
Belle2::TrackFindingCDC::PerigeeCircle::gradient
Vector2D gradient(const Vector2D &point) const
Gradient of the distance field, hence indicates the direction of increasing distance.
Definition: PerigeeCircle.h:278
Belle2::TrackFindingCDC::PerigeeCircle::arcLengthPeriod
double arcLengthPeriod() const
Getter for the arc length for a full round of the circle.
Definition: PerigeeCircle.h:332
Belle2::TrackFindingCDC::PerigeeCircle::absRadius
double absRadius() const
Gives the signed radius of the circle. If it was a line this will be infinity.
Definition: PerigeeCircle.h:350
Belle2::TrackFindingCDC::PerigeeCircle::m_phi0Vec
Vector2D m_phi0Vec
Cached unit direction of flight at the perigee.
Definition: PerigeeCircle.h:519
Belle2::TrackFindingCDC::NRotation::reversed
ERotation reversed(ERotation eRotation)
Return the reversed rotation. Leaves ERotation::c_Invalid the same.
Definition: ERotation.h:51
Belle2::TrackFindingCDC::PerigeeCircle::fastDistance
double fastDistance(const Vector2D &point) const
Getter for the linearised distance measure to a point.
Definition: PerigeeCircle.cc:329
Belle2::TrackFindingCDC::PerigeeCircle::conformalTransform
void conformalTransform()
Transforms the generalized circle to conformal space inplace.
Definition: PerigeeCircle.cc:141