Belle II Software  release-05-01-25
CDCTrajectory2D.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - 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/eventdata/trajectories/CDCTrajectory2D.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCBFieldUtil.h>
13 
14 #include <tracking/trackFindingCDC/topology/CDCWireTopology.h>
15 #include <tracking/trackFindingCDC/topology/CDCWireLayer.h>
16 #include <tracking/trackFindingCDC/topology/WireLine.h>
17 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
18 
19 #include <tracking/trackFindingCDC/geometry/UncertainPerigeeCircle.h>
20 #include <tracking/trackFindingCDC/geometry/PerigeeCircle.h>
21 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
22 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
23 
24 #include <tracking/trackFindingCDC/numerics/EForwardBackward.h>
25 #include <tracking/trackFindingCDC/numerics/ESign.h>
26 #include <tracking/trackFindingCDC/numerics/Quadratic.h>
27 
28 #include <framework/gearbox/Const.h>
29 
30 #include <vector>
31 #include <utility>
32 #include <ostream>
33 #include <cmath>
34 #include <cassert>
35 
36 using namespace Belle2;
37 using namespace TrackFindingCDC;
38 
40  : m_localOrigin()
41  , m_localPerigeeCircle()
42 {
43 }
44 
46  : m_localOrigin(0.0, 0.0)
47  , m_localPerigeeCircle(perigeeCircle)
48 {
49 }
50 
52  const UncertainPerigeeCircle& localPerigeeCircle,
53  double flightTime)
54  : m_localOrigin(localOrigin)
55  , m_localPerigeeCircle(localPerigeeCircle)
56  , m_flightTime(flightTime)
57 {
58 }
59 
60 CDCTrajectory2D::CDCTrajectory2D(const Vector2D& pos2D,
61  const double time,
62  const Vector2D& mom2D,
63  const double charge,
64  const double bZ)
65  : m_localOrigin(pos2D)
66  , m_localPerigeeCircle(CDCBFieldUtil::absMom2DToCurvature(mom2D.norm(), charge, bZ),
67  mom2D.unit(),
68  0.0)
69  , m_flightTime(time)
70 {
71 }
72 
73 CDCTrajectory2D::CDCTrajectory2D(const Vector2D& pos2D,
74  const double time,
75  const Vector2D& mom2D,
76  const double charge)
77  : m_localOrigin(pos2D)
78  , m_localPerigeeCircle(CDCBFieldUtil::absMom2DToCurvature(mom2D.norm(), charge, pos2D),
79  mom2D.unit(),
80  0.0)
81  , m_flightTime(time)
82 {
83 }
84 
86 {
87  return not getLocalCircle()->isInvalid();
88 }
89 
91 {
92  m_localOrigin.set(0.0, 0.0);
94  m_flightTime = NAN;
95 }
96 
98 {
101 }
102 
103 
105 {
106  CDCTrajectory2D result = *this;
107  result.reverse();
108  return result;
109 }
110 
111 std::array<double, 2> CDCTrajectory2D::reconstructBothZ(const WireLine& wireLine,
112  const double distance,
113  const double z) const
114 {
115  Vector2D globalPos2D = wireLine.sagPos2DAtZ(z);
116  Vector2D movePerZ = wireLine.sagMovePerZ(z);
117 
118  Vector2D localPos2D = globalPos2D - getLocalOrigin();
119  const PerigeeCircle& localCircle = getLocalCircle();
120 
121  double fastDistance = distance != 0.0 ? localCircle.fastDistance(distance) : 0.0;
122 
123  double c = localCircle.fastDistance(localPos2D) - fastDistance;
124  double b = localCircle.gradient(localPos2D).dot(movePerZ);
125  double a = localCircle.n3() * movePerZ.normSquared();
126 
127  const std::pair<double, double> solutionsDeltaZ = solveQuadraticABC(a, b, c);
128 
129  // Put the solution of smaller deviation first
130  const std::array<double, 2> solutionsZ{solutionsDeltaZ.second + z, solutionsDeltaZ.first + z};
131  return solutionsZ;
132 }
133 
135  const double distance,
136  const double z) const
137 {
138  const std::array<double, 2> solutionsZ = reconstructBothZ(wireLine, distance, z);
139 
140  bool firstIsInCDC = (wireLine.backwardZ() < solutionsZ[0] and
141  solutionsZ[0] < wireLine.forwardZ());
142  bool secondIsInCDC = (wireLine.backwardZ() < solutionsZ[1] and
143  solutionsZ[1] < wireLine.forwardZ());
144 
145  // Prefer the solution with the smaller deviation from the given z position which is the first
146  assert(not(std::fabs(solutionsZ[0] - z) > std::fabs(solutionsZ[1] - z)));
147  const double recoZ = (firstIsInCDC or not secondIsInCDC) ? solutionsZ[0] : solutionsZ[1];
148  return recoZ;
149 }
150 
151 std::array<Vector3D, 2> CDCTrajectory2D::reconstructBoth3D(const WireLine& wireLine,
152  const double distance,
153  const double z) const
154 {
155  const std::array<double, 2> solutionsZ = reconstructBothZ(wireLine, distance, z);
156 
157  const Vector3D firstRecoWirePos3D = wireLine.sagPos3DAtZ(solutionsZ[0]);
158  const Vector3D secondRecoWirePos3D = wireLine.sagPos3DAtZ(solutionsZ[1]);
159  return {{{getClosest(firstRecoWirePos3D.xy()), firstRecoWirePos3D.z()},
160  {getClosest(secondRecoWirePos3D.xy()), secondRecoWirePos3D.z()}
161  }};
162 }
163 
165  const double distance,
166  const double z) const
167 {
168  const double recoZ = reconstructZ(wireLine, distance, z);
169  const Vector3D recoWirePos2D = wireLine.sagPos3DAtZ(recoZ);
170  return Vector3D(getClosest(recoWirePos2D.xy()), recoZ);
171 }
172 
174 {
175  return getLocalCircle()->closest(point - getLocalOrigin()) + getLocalOrigin();
176 }
177 
178 ISuperLayer CDCTrajectory2D::getISuperLayerAfter(ISuperLayer iSuperLayer, bool movingOutward) const
179 {
181 
182  ISuperLayer minimalISuperLayer = getMinimalISuperLayer();
183  ISuperLayer maximalISuperLayer = getMaximalISuperLayer();
184  if (minimalISuperLayer == maximalISuperLayer) return ISuperLayerUtil::c_Invalid; // No next super layer to go to
185  if (iSuperLayer == minimalISuperLayer) return ISuperLayerUtil::getNextOutwards(iSuperLayer);
186  if (iSuperLayer == maximalISuperLayer) return ISuperLayerUtil::getNextInwards(iSuperLayer);
187 
188  if (movingOutward) {
189  return ISuperLayerUtil::getNextOutwards(iSuperLayer);
190  } else {
191  return ISuperLayerUtil::getNextInwards(iSuperLayer);
192  }
193 }
194 
195 ISuperLayer CDCTrajectory2D::getISuperLayerAfterStart(bool movingOutward) const
196 {
197  ISuperLayer iSuperLayer = getStartISuperLayer();
198  return getISuperLayerAfter(iSuperLayer, movingOutward);
199 }
200 
201 ISuperLayer CDCTrajectory2D::getISuperLayerAfterStart(const EForwardBackward forwardBackwardInfo) const
202 {
203  bool movingOutward = isMovingOutward();
204  if (forwardBackwardInfo == EForwardBackward::c_Backward) {
205  movingOutward = not movingOutward;
206  }
207  return getISuperLayerAfterStart(movingOutward);
208 }
209 
211 {
212  return getISuperLayerAfterStart(EForwardBackward::c_Forward);
213 }
214 
216 {
217  return getISuperLayerAfterStart(EForwardBackward::c_Backward);
218 }
219 
220 ISuperLayer CDCTrajectory2D::getAxialISuperLayerAfterStart(const EForwardBackward forwardBackwardInfo) const
221 {
222  bool movingOutward = isMovingOutward();
223  if (forwardBackwardInfo == EForwardBackward::c_Backward) {
224  movingOutward = not movingOutward;
225  }
226  ISuperLayer startISuperLayer = getStartISuperLayer();
227  if (ISuperLayerUtil::isInvalid(startISuperLayer)) return ISuperLayerUtil::c_Invalid;
228 
229  ISuperLayer nextISuperLayer = getISuperLayerAfter(startISuperLayer, movingOutward);
230  if (ISuperLayerUtil::isInvalid(nextISuperLayer)) return ISuperLayerUtil::c_Invalid;
231  if (ISuperLayerUtil::isAxial(nextISuperLayer)) return nextISuperLayer;
232 
233  ISuperLayer iSuperLayerStep = nextISuperLayer - startISuperLayer;
234  assert(std::abs(iSuperLayerStep) == 1);
235  bool nextMovingOutward = iSuperLayerStep > 0;
236  return getISuperLayerAfter(nextISuperLayer, nextMovingOutward);
237 }
238 
240 {
241  return getAxialISuperLayerAfterStart(EForwardBackward::c_Forward);
242 }
243 
245 {
246  return getAxialISuperLayerAfterStart(EForwardBackward::c_Backward);
247 }
248 
250 {
251  double maximalCylindricalR = getMaximalCylindricalR();
252  return CDCWireTopology::getInstance().getISuperLayerAtCylindricalR(maximalCylindricalR);
253 }
254 
256 {
257  double startCylindricalR = getLocalOrigin().cylindricalR();
259 }
260 
262 {
263  double minimalCylindricalR = getMinimalCylindricalR();
264  return CDCWireTopology::getInstance().getISuperLayerAtCylindricalR(minimalCylindricalR);
265 }
266 
267 bool CDCTrajectory2D::isCurler(double factor) const
268 {
269  const CDCWireTopology& topology = CDCWireTopology::getInstance();
270  return getMaximalCylindricalR() < factor * topology.getOuterCylindricalR();
271 }
272 
273 bool CDCTrajectory2D::isOriginer(double factor) const
274 {
275  const CDCWireTopology& topology = CDCWireTopology::getInstance();
276  return getMinimalCylindricalR() < factor * topology.getInnerCylindricalR();
277 }
278 
279 
281 {
282  return CDCBFieldUtil::ccwInfoToChargeSign(getLocalCircle()->orientation());
283 }
284 
285 double CDCTrajectory2D::getAbsMom2D(const double bZ) const
286 {
287  return CDCBFieldUtil::curvatureToAbsMom2D(getLocalCircle()->curvature(), bZ);
288 }
289 
291 {
292  Vector2D position = getSupport();
293  return CDCBFieldUtil::curvatureToAbsMom2D(getLocalCircle()->curvature(), position);
294 }
295 
297 {
298  const CDCWireTopology& topology = CDCWireTopology::getInstance();
299  const CDCWireLayer& innerMostLayer = topology.getWireLayers().front();
300  double innerCylindricalR = innerMostLayer.getInnerCylindricalR();
301 
302  const Vector2D support = getSupport();
303  const PerigeeCircle globalCircle = getGlobalCircle();
304  if (support.cylindricalR() < innerCylindricalR) {
305  // If we start within the inner volumn of the CDC we want the trajectory to enter the CDC
306  // and not stop at first intersection with the inner wall.
307  // Therefore we take the inner exit that comes after the apogee (far point of the circle).
308  const Vector2D apogee = globalCircle.apogee();
309  return globalCircle.atCylindricalRForwardOf(apogee, innerCylindricalR);
310 
311  } else {
312  return globalCircle.atCylindricalRForwardOf(support, innerCylindricalR);
313  }
314 }
315 
317 {
318  const CDCWireTopology& topology = CDCWireTopology::getInstance();
319  const CDCWireLayer& outerMostLayer = topology.getWireLayers().back();
320  double outerCylindricalR = outerMostLayer.getOuterCylindricalR() * factor;
321 
322  const Vector2D support = getSupport();
323  const PerigeeCircle globalCircle = getGlobalCircle();
324  if (support.cylindricalR() > outerCylindricalR) {
325  // If we start outside of the volume of the CDC we want the trajectory to enter the CDC
326  // and not stop at first intersection with the outer wall.
327  // Therefore we take the outer exit that comes after the perigee.
328  const Vector2D perigee = globalCircle.perigee();
329  return globalCircle.atCylindricalRForwardOf(perigee, outerCylindricalR);
330 
331  } else {
332  return getGlobalCircle().atCylindricalRForwardOf(support, outerCylindricalR);
333  }
334 }
335 
337 {
338  const Vector2D outerExit = getOuterExit();
339  const Vector2D innerExit = getInnerExit();
340  const Vector2D localExit = getLocalCircle()->chooseNextForwardOf(Vector2D(0, 0),
341  outerExit - getLocalOrigin(),
342  innerExit - getLocalOrigin());
343  return localExit + getLocalOrigin();
344 }
345 
347  const Vector2D& mom2D,
348  const double charge)
349 {
350  m_localOrigin = pos2D;
351  double curvature = CDCBFieldUtil::absMom2DToCurvature(mom2D.norm(), charge, pos2D);
352  Vector2D phiVec = mom2D.unit();
353  double impact = 0.0;
354  m_localPerigeeCircle = UncertainPerigeeCircle(curvature, phiVec, impact);
355 }
356 
357 double CDCTrajectory2D::setLocalOrigin(const Vector2D& localOrigin)
358 {
359  double arcLength2D = calcArcLength2D(localOrigin);
360  m_flightTime += arcLength2D / Const::speedOfLight;
362  m_localOrigin = localOrigin;
363  return arcLength2D;
364 }
365 
366 
367 std::ostream& TrackFindingCDC::operator<<(std::ostream& output, const CDCTrajectory2D& trajectory2D)
368 {
369  return output << "Local origin : " << trajectory2D.getLocalOrigin() << ", "
370  << "local circle : " << trajectory2D.getLocalCircle();
371 }
Belle2::TrackFindingCDC::CDCTrajectory2D::getAxialISuperLayerAfterStart
ISuperLayer getAxialISuperLayerAfterStart(EForwardBackward forwardBackwardInfo) const
Indicates which axial superlayer is traversed after the one, where the start point of the trajectory ...
Definition: CDCTrajectory2D.cc:220
Belle2::TrackFindingCDC::CDCTrajectory2D::isOriginer
bool isOriginer(double factor=1) const
Checks if the trajectory intersects with the inner radius of the CDC time the given tolerance factor.
Definition: CDCTrajectory2D.cc:273
Belle2::TrackFindingCDC::CDCTrajectory2D::getAbsMom2D
double getAbsMom2D() const
Get the estimation for the absolute value of the transvers momentum.
Definition: CDCTrajectory2D.cc:290
Belle2::Vector3D
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:35
Belle2::operator<<
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
Definition: IntervalOfValidity.cc:196
Belle2::TrackFindingCDC::CDCTrajectory2D::getMaximalCylindricalR
double getMaximalCylindricalR() const
Getter for the maximal distance from the origin.
Definition: CDCTrajectory2D.h:400
Belle2::TrackFindingCDC::Vector2D::unit
Vector2D unit() const
Returns a unit vector colaligned with this.
Definition: Vector2D.h:335
Belle2::TrackFindingCDC::CDCTrajectory2D::getOuterExit
Vector2D getOuterExit(double factor=1) const
Calculates the point where the trajectory meets the outer wall of the CDC.
Definition: CDCTrajectory2D.cc:316
Belle2::TrackFindingCDC::CDCTrajectory2D::getMinimalISuperLayer
ISuperLayer getMinimalISuperLayer() const
Indicates the minimal superlayer the trajectory traverses.
Definition: CDCTrajectory2D.cc:261
Belle2::TrackFindingCDC::Vector2D
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:37
Belle2::TrackFindingCDC::WireLine::sagMovePerZ
Vector2D sagMovePerZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
Definition: WireLine.h:85
Belle2::TrackFindingCDC::WireLine::sagPos2DAtZ
Vector2D sagPos2DAtZ(const double z) const
Gives the two dimensional position with wire sag effect of the line at the given z value.
Definition: WireLine.h:70
Belle2::TrackFindingCDC::CDCTrajectory2D::getLocalCircle
const UncertainPerigeeCircle & getLocalCircle() const
Getter for the cirlce in local coordinates.
Definition: CDCTrajectory2D.h:466
Belle2::TrackFindingCDC::Vector2D::normSquared
double normSquared() const
Calculates .
Definition: Vector2D.h:183
Belle2::TrackFindingCDC::CDCTrajectory2D::getNextISuperLayer
ISuperLayer getNextISuperLayer() const
Indicates which superlayer the trajectory traverses after the one, where the start point of the traje...
Definition: CDCTrajectory2D.cc:210
Belle2::TrackFindingCDC::ISuperLayerUtil::c_Invalid
static const ISuperLayer c_Invalid
Constant making an invalid superlayer id.
Definition: ISuperLayer.h:75
Belle2::TrackFindingCDC::CDCTrajectory2D::reverse
void reverse()
Reverses the trajectory in place.
Definition: CDCTrajectory2D.cc:97
Belle2::TrackFindingCDC::CDCWireTopology::getInstance
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
Definition: CDCWireTopology.cc:22
Belle2::TrackFindingCDC::CDCTrajectory2D::getChargeSign
ESign getChargeSign() const
Gets the charge sign of the trajectory.
Definition: CDCTrajectory2D.cc:280
Belle2::TrackFindingCDC::CDCTrajectory2D::reversed
CDCTrajectory2D reversed() const
Returns the reverse trajectory as a copy.
Definition: CDCTrajectory2D.cc:104
Belle2::TrackFindingCDC::CDCTrajectory2D::getStartISuperLayer
ISuperLayer getStartISuperLayer() const
Indicates the superlayer the trajectory starts in.
Definition: CDCTrajectory2D.cc:255
Belle2::TrackFindingCDC::CDCTrajectory2D::setLocalOrigin
double setLocalOrigin(const Vector2D &localOrigin)
Setter for the origin of the local coordinate system.
Definition: CDCTrajectory2D.cc:357
Belle2::TrackFindingCDC::CDCTrajectory2D::getSupport
Vector2D getSupport() const
Get the support point of the trajectory in global coordinates.
Definition: CDCTrajectory2D.h:345
Belle2::TrackFindingCDC::ESignUtil::ESign
ESign
Enumeration for the distinct sign values of floating point variables.
Definition: ESign.h:37
Belle2::TrackFindingCDC::NForwardBackward::EForwardBackward
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: EForwardBackward.h:35
Belle2::TrackFindingCDC::CDCTrajectory2D::getClosest
Vector2D getClosest(const Vector2D &point) const
Calculates the closest approach on the trajectory to the given point.
Definition: CDCTrajectory2D.cc:173
Belle2::TrackFindingCDC::CDCTrajectory2D::isCurler
bool isCurler(double factor=1) const
Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.
Definition: CDCTrajectory2D.cc:267
Belle2::TrackFindingCDC::CDCTrajectory2D::reconstructBoth3D
std::array< Vector3D, 2 > reconstructBoth3D(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the two three dimensional points where the drift circle touches the wire line.
Definition: CDCTrajectory2D.cc:151
Belle2::TrackFindingCDC::Vector2D::dot
double dot(const Vector2D &rhs) const
Calculates the two dimensional dot product.
Definition: Vector2D.h:172
Belle2::TrackFindingCDC::CDCWireTopology::getWireLayers
const std::vector< Belle2::TrackFindingCDC::CDCWireLayer > & getWireLayers() const
Getter for the underlying storing layer vector.
Definition: CDCWireTopology.h:159
Belle2::TrackFindingCDC::CDCWireTopology::getInnerCylindricalR
double getInnerCylindricalR() const
Getter for the inner radius of the inner most wire layer.
Definition: CDCWireTopology.h:485
Belle2::TrackFindingCDC::CDCBFieldUtil::absMom2DToCurvature
static double absMom2DToCurvature(double absMom2D, double charge, double bZ)
Conversion helper for momenta to two dimensional curvature.
Definition: CDCBFieldUtil.cc:111
Belle2::TrackFindingCDC::CDCTrajectory2D
Particle trajectory as it is seen in xy projection represented as a circle.
Definition: CDCTrajectory2D.h:46
Belle2::TrackFindingCDC::CDCBFieldUtil::ccwInfoToChargeSign
static ESign ccwInfoToChargeSign(ERotation ccwInfo)
Conversion helper from clockwise or counterclockwise travel to the charge sign.
Definition: CDCBFieldUtil.cc:77
Belle2::TrackFindingCDC::CDCTrajectory2D::getISuperLayerAfter
ISuperLayer getISuperLayerAfter(ISuperLayer iSuperLayer, bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...
Definition: CDCTrajectory2D.cc:178
Belle2::TrackFindingCDC::CDCTrajectory2D::getMinimalCylindricalR
double getMinimalCylindricalR() const
Getter for the minimal distance from the origin - same as absolute value of the impact parameter.
Definition: CDCTrajectory2D.h:407
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::CDCTrajectory2D::getMaximalISuperLayer
ISuperLayer getMaximalISuperLayer() const
Indicates the maximal superlayer the trajectory traverses.
Definition: CDCTrajectory2D.cc:249
Belle2::TrackFindingCDC::ISuperLayerUtil::getNextOutwards
static ISuperLayer getNextOutwards(ISuperLayer iSuperLayer)
Returns the super layer that is outside of the given super layer.
Definition: ISuperLayer.cc:74
Belle2::TrackFindingCDC::CDCWireLayer::getOuterCylindricalR
double getOuterCylindricalR() const
Getter for outer radius of the layer as taken from the CDCGeometryPar.
Definition: CDCWireLayer.h:259
Belle2::TrackFindingCDC::UncertainPerigeeCircle::passiveMoveBy
void passiveMoveBy(const Vector2D &by)
Moves the coordinate system by the vector by and calculates the new perigee and its covariance matrix...
Definition: UncertainPerigeeCircle.h:238
Belle2::TrackFindingCDC::CDCTrajectory2D::getLocalOrigin
const Vector2D & getLocalOrigin() const
Getter for the origin of the local coordinate system.
Definition: CDCTrajectory2D.h:508
Belle2::TrackFindingCDC::CDCBFieldUtil::curvatureToAbsMom2D
static double curvatureToAbsMom2D(double curvature, double bZ)
Conversion helper for two dimensional curvature to momenta.
Definition: CDCBFieldUtil.cc:132
Belle2::Const::speedOfLight
static const double speedOfLight
[cm/ns]
Definition: Const.h:568
Belle2::TrackFindingCDC::WireLine::sagPos3DAtZ
Vector3D sagPos3DAtZ(const double z) const
Gives the three dimensional position with wire sag effect of the line at the given z value.
Definition: WireLine.h:66
Belle2::TrackFindingCDC::CDCTrajectory2D::m_localOrigin
Vector2D m_localOrigin
Memory for local coordinate origin of the circle representing the trajectory in global coordinates.
Definition: CDCTrajectory2D.h:545
Belle2::TrackFindingCDC::ISuperLayerUtil::isInvalid
static bool isInvalid(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner...
Definition: ISuperLayer.cc:40
Belle2::TrackFindingCDC::UncertainPerigeeCircle
Adds an uncertainty matrix to the circle in perigee parameterisation.
Definition: UncertainPerigeeCircle.h:39
Belle2::TrackFindingCDC::PerigeeCircle::perigee
Vector2D perigee() const
Getter for the perigee point.
Definition: PerigeeCircle.h:302
Belle2::TrackFindingCDC::PerigeeCircle::apogee
Vector2D apogee() const
Getter for the apogee of the circle. If it was a line both components will be infinity.
Definition: PerigeeCircle.h:314
Belle2::TrackFindingCDC::CDCTrajectory2D::getNextAxialISuperLayer
ISuperLayer getNextAxialISuperLayer() const
Indicates which axial superlayer the trajectory traverses after the one, where the start point of the...
Definition: CDCTrajectory2D.cc:239
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::CDCTrajectory2D::getISuperLayerAfterStart
ISuperLayer getISuperLayerAfterStart(bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...
Definition: CDCTrajectory2D.cc:195
Belle2::TrackFindingCDC::ISuperLayerUtil::getNextInwards
static ISuperLayer getNextInwards(ISuperLayer iSuperLayer)
Returns the super layer that is inside of the given super layer.
Definition: ISuperLayer.cc:65
Belle2::TrackFindingCDC::WireLine
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
Definition: WireLine.h:41
Belle2::TrackFindingCDC::CDCWireTopology::getISuperLayerAtCylindricalR
ISuperLayer getISuperLayerAtCylindricalR(double cylindricalR)
Returns the logical superlayer number at the given radius.
Definition: CDCWireTopology.cc:79
Belle2::TrackFindingCDC::CDCTrajectory2D::m_flightTime
double m_flightTime
Memory for the estimation of the time at which the particle arrived at the support point.
Definition: CDCTrajectory2D.h:551
Belle2::TrackFindingCDC::Vector3D
A three dimensional vector.
Definition: Vector3D.h:34
Belle2::TrackFindingCDC::UncertainPerigeeCircle::reverse
void reverse()
Flips the orientation of the circle in place.
Definition: UncertainPerigeeCircle.h:217
Belle2::TrackFindingCDC::Vector2D::cylindricalR
double cylindricalR() const
Gives the cylindrical radius of the vector. Same as norm()
Definition: Vector2D.h:571
Belle2::TrackFindingCDC::PerigeeCircle::isInvalid
bool isInvalid() const
Indicates if all circle parameters are zero.
Definition: PerigeeCircle.cc:170
Belle2::TrackFindingCDC::CDCTrajectory2D::reconstruct3D
Vector3D reconstruct3D(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the one three dimensional postions within the CDC closest to the given z where the given drift ...
Definition: CDCTrajectory2D.cc:164
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::ISuperLayerUtil::isAxial
static bool isAxial(ISuperLayer iSuperLayer)
Returns if the super layer with the given id is axial.
Definition: ISuperLayer.cc:23
Belle2::TrackFindingCDC::CDCWireLayer
Class representating a sense wire layer in the central drift chamber.
Definition: CDCWireLayer.h:51
Belle2::TrackFindingCDC::CDCTrajectory2D::getInnerExit
Vector2D getInnerExit() const
Calculates the point where the trajectory meets the inner wall of the CDC.
Definition: CDCTrajectory2D.cc:296
Belle2::TrackFindingCDC::CDCTrajectory2D::reconstructZ
double reconstructZ(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the one z postions within the CDC closest to the given z where the given drift circle on the wi...
Definition: CDCTrajectory2D.cc:134
Belle2::TrackFindingCDC::Vector3D::xy
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
Definition: Vector3D.h:500
Belle2::TrackFindingCDC::WireLine::forwardZ
double forwardZ() const
Gives the forward z coodinate.
Definition: WireLine.h:140
Belle2::TrackFindingCDC::CDCTrajectory2D::isFitted
bool isFitted() const
Checks if the circle is already set to a valid value.
Definition: CDCTrajectory2D.cc:85
Belle2::TrackFindingCDC::Vector2D::norm
double norm() const
Calculates the length of the vector.
Definition: Vector2D.h:189
Belle2::TrackFindingCDC::CDCTrajectory2D::reconstructBothZ
std::array< double, 2 > reconstructBothZ(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the two z postions where the given drift circle on the wire line touches the trajectory.
Definition: CDCTrajectory2D.cc:111
Belle2::TrackFindingCDC::PerigeeCircle::n3
double n3() const
Getter for the generalised circle parameter n3.
Definition: PerigeeCircle.h:387
Belle2::TrackFindingCDC::WireLine::backwardZ
double backwardZ() const
Gives the backward z coodinate.
Definition: WireLine.h:144
Belle2::TrackFindingCDC::CDCTrajectory2D::getPreviousAxialISuperLayer
ISuperLayer getPreviousAxialISuperLayer() const
Indicates which axial superlayer the trajectory traverses before the one, where the start point of th...
Definition: CDCTrajectory2D.cc:244
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::CDCTrajectory2D::setPosMom2D
void setPosMom2D(const Vector2D &pos2D, const Vector2D &mom2D, double charge)
Setter for start point and momentum at the start point subjected to the charge sign.
Definition: CDCTrajectory2D.cc:346
Belle2::TrackFindingCDC::Vector3D::z
double z() const
Getter for the z coordinate.
Definition: Vector3D.h:488
Belle2::TrackFindingCDC::CDCTrajectory2D::isMovingOutward
bool isMovingOutward() const
Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start...
Definition: CDCTrajectory2D.h:333
Belle2::TrackFindingCDC::CDCTrajectory2D::getExit
Vector2D getExit() const
Calculates the point where the trajectory leaves the CDC.
Definition: CDCTrajectory2D.cc:336
Belle2::TrackFindingCDC::CDCWireLayer::getInnerCylindricalR
double getInnerCylindricalR() const
Getter for inner radius of the layer as taken from the CDCGeometryPar.
Definition: CDCWireLayer.h:255
Belle2::TrackFindingCDC::CDCTrajectory2D::m_localPerigeeCircle
UncertainPerigeeCircle m_localPerigeeCircle
Memory for the generalized circle describing the trajectory in coordinates from the local origin.
Definition: CDCTrajectory2D.h:548
Belle2::TrackFindingCDC::CDCWireTopology::getOuterCylindricalR
double getOuterCylindricalR() const
Getter for the outer radius of the outer most wire layer.
Definition: CDCWireTopology.h:481
Belle2::TrackFindingCDC::Vector2D::set
void set(const double first, const double second)
Setter for both coordinate.
Definition: Vector2D.h:664
Belle2::TrackFindingCDC::CDCTrajectory2D::calcArcLength2D
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.
Definition: CDCTrajectory2D.h:270
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::CDCWireTopology
Class representating the sense wire arrangement in the whole of the central drift chamber.
Definition: CDCWireTopology.h:54
Belle2::TrackFindingCDC::CDCTrajectory2D::clear
void clear()
Clears all information from this trajectoy.
Definition: CDCTrajectory2D.cc:90
Belle2::TrackFindingCDC::UncertainPerigeeCircle::invalidate
void invalidate()
Sets all circle parameters to zero including the covariance matrix.
Definition: UncertainPerigeeCircle.h:208
Belle2::TrackFindingCDC::CDCTrajectory2D::getGlobalCircle
PerigeeCircle getGlobalCircle() const
Getter for the circle in global coordinates.
Definition: CDCTrajectory2D.h:451
Belle2::TrackFindingCDC::CDCTrajectory2D::getPreviousISuperLayer
ISuperLayer getPreviousISuperLayer() const
Indicates which superlayer the trajectory traverses before the one, where the start point of the traj...
Definition: CDCTrajectory2D.cc:215
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::CDCTrajectory2D::CDCTrajectory2D
CDCTrajectory2D()
Default constructor for ROOT compatibility.
Definition: CDCTrajectory2D.cc:39