Belle II Software development
CDCTrajectory2D Class Reference

Particle trajectory as it is seen in xy projection represented as a circle. More...

#include <CDCTrajectory2D.h>

Public Member Functions

 CDCTrajectory2D ()
 Default constructor for ROOT compatibility.
 
 CDCTrajectory2D (const UncertainPerigeeCircle &perigeeCircle)
 Constructs a trajectory from a generalized circle.
 
 CDCTrajectory2D (const Vector2D &localOrigin, const UncertainPerigeeCircle &localPerigeeCircle, double flightTime=NAN)
 Constructs a trajectory from a generalized circle and a start point.
 
 CDCTrajectory2D (const Vector2D &pos2D, double time, const Vector2D &mom2D, double charge, double bZ)
 Construct a trajectory with given start point, transverse momentum at the start point, the given charge and the magnetic field value in z direction.
 
 CDCTrajectory2D (const Vector2D &pos2D, double time, const Vector2D &mom2D, double charge)
 Construct a trajectory with given start point, transverse momentum at the start point and given charge.
 
bool isFitted () const
 Checks if the circle is already set to a valid value.
 
void clear ()
 Clears all information from this trajectory.
 
void reverse ()
 Reverses the trajectory in place.
 
CDCTrajectory2D reversed () const
 Returns the reverse trajectory as a copy.
 
std::array< double, 2 > reconstructBothZ (const WireLine &wireLine, double distance=0.0, double z=0) const
 Gives the two z positions where the given drift circle on the wire line touches the trajectory.
 
double reconstructZ (const WireLine &wireLine, double distance=0.0, double z=0) const
 Gives the one z positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.
 
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.
 
Vector3D reconstruct3D (const WireLine &wireLine, double distance=0.0, double z=0) const
 Gives the one three dimensional positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.
 
Vector2D getClosest (const Vector2D &point) const
 Calculates the closest approach on the trajectory to the given point.
 
ISuperLayer getNextISuperLayer () const
 Indicates which superlayer the trajectory traverses after the one, where the start point of the trajectory is located.
 
ISuperLayer getPreviousISuperLayer () const
 Indicates which superlayer the trajectory traverses before the one, where the start point of the trajectory is located.
 
ISuperLayer getNextAxialISuperLayer () const
 Indicates which axial superlayer the trajectory traverses after the one, where the start point of the trajectory is located.
 
ISuperLayer getPreviousAxialISuperLayer () const
 Indicates which axial superlayer the trajectory traverses before the one, where the start point of the trajectory is located.
 
ISuperLayer getMaximalISuperLayer () const
 Indicates the maximal superlayer the trajectory traverses.
 
ISuperLayer getStartISuperLayer () const
 Indicates the superlayer the trajectory starts in.
 
ISuperLayer getMinimalISuperLayer () const
 Indicates the minimal superlayer the trajectory traverses.
 
template<class AHits >
EForwardBackward isForwardOrBackwardTo (const AHits &hits) const
 Calculates if this trajectory and the hits are coaligned Returns:
 
template<class AFromHits , class AToHits >
double getArcLength2DGap (const AFromHits &fromHits, const AToHits &toHits) const
 Calculates the perpendicular travel distance from the last position of the fromHits to the first position of the toHits.
 
template<class AFromHits , class AToHits >
double getArcLength2DFrontOffset (const AFromHits &fromHits, const AToHits &toHits) const
 Calculates the perpendicular travel distance from the first position of the fromHits to the first position of the toHits.
 
template<class AFromHits , class AToHits >
double getArcLength2DBackOffset (const AFromHits &fromHits, const AToHits &toHits) const
 Calculates the perpendicular travel distance from the last position of the fromHits to the last position of the toHits.
 
template<class AHits >
double getTotalArcLength2D (const AHits &hits) const
 Calculates the perpendicular travel distance from the first position of the hits to the last position of the hits.
 
double calcArcLength2D (const Vector2D &point) const
 Calculate the travel distance from the start position of the trajectory.
 
double calcArcLength2DBetween (const Vector2D &fromPoint, const Vector2D &toPoint) const
 Calculate the travel distance between the two given positions Returns the travel distance on the trajectory from the first given point to
the second given point.
 
double getArcLength2DPeriod () const
 Getter for the arc length for one round trip around the trajectory.
 
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.
 
ESign getChargeSign () const
 Gets the charge sign of the trajectory.
 
double getAbsMom2D (double bZ) const
 Get the estimation for the absolute value of the transvers momentum.
 
double getAbsMom2D () const
 Get the estimation for the absolute value of the transvers momentum.
 
Vector2D getMom2DAtSupport (const double bZ) const
 Get the momentum at the support point of the trajectory.
 
Vector2D getMom2DAtSupport () const
 Get the momentum at the support point of the trajectory.
 
Vector2D getFlightDirection2D (const Vector2D &point) const
 Get the unit direction of flight at the given point, where arcLength2D = 0.
 
Vector2D getFlightDirection2DAtSupport () const
 Get the unit direction of flight at the support point, where arcLength2D = 0.
 
bool isMovingOutward () const
 Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start point on.
 
Vector2D getPos2DAtArcLength2D (double arcLength2D)
 Getter for the position at a given two dimensional arc length.
 
Vector2D getSupport () const
 Get the support point of the trajectory in global coordinates.
 
Vector2D getGlobalPerigee () const
 Getter for the closest approach on the trajectory to the global origin.
 
Vector2D getGlobalCenter () const
 Getter for the center of the trajectory in global coordinates.
 
Vector2D getOuterExit (double factor=1) const
 Calculates the point where the trajectory meets the outer wall of the CDC.
 
Vector2D getInnerExit () const
 Calculates the point where the trajectory meets the inner wall of the CDC.
 
Vector2D getExit () const
 Calculates the point where the trajectory leaves the CDC.
 
bool isCurler (double factor=1) const
 Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.
 
bool isOriginer (double factor=1) const
 Checks if the trajectory intersects with the inner radius of the CDC time the given tolerance factor.
 
double getMaximalCylindricalR () const
 Getter for the maximal distance from the origin.
 
double getMinimalCylindricalR () const
 Getter for the minimal distance from the origin - same as absolute value of the impact parameter.
 
double getGlobalImpact () const
 Getter for the signed impact parameter of the trajectory.
 
double getDist2D (const Vector2D &point) const
 Calculates the distance from the point to the trajectory as seen from the xy projection.
 
ERightLeft isRightOrLeft (const Vector2D &point) const
 Checks if the given point is to the right or to the left of the trajectory.
 
double getCurvature () const
 Getter for the curvature as seen from the xy projection.
 
double getLocalCovariance (EPerigeeParameter iRow, EPerigeeParameter iCol) const
 Getter for an individual element of the covariance matrix of the local helix parameters.
 
double getLocalVariance (EPerigeeParameter i) const
 Getter for an individual diagonal element of the covariance matrix of the local helix parameters.
 
PerigeeCircle getGlobalCircle () const
 Getter for the circle in global coordinates.
 
void setGlobalCircle (const UncertainPerigeeCircle &perigeeCircle)
 Setter for the generalized circle that describes the trajectory.
 
const UncertainPerigeeCirclegetLocalCircle () const
 Getter for the circle in local coordinates.
 
double getPValue () const
 Getter for p-value.
 
double getChi2 () const
 Getter for the chi2 value of the circle fit.
 
void setChi2 (const double chi2)
 Setter for the chi square value of the circle fit.
 
size_t getNDF () const
 Getter for the number of degrees of freedom of the circle fit.
 
void setNDF (std::size_t ndf)
 Setter for the number of degrees of freedom of the circle fit.
 
void setLocalCircle (const UncertainPerigeeCircle &localPerigeeCircle)
 Setter for the generalized circle that describes the trajectory.
 
const Vector2DgetLocalOrigin () const
 Getter for the origin of the local coordinate system.
 
double setLocalOrigin (const Vector2D &localOrigin)
 Setter for the origin of the local coordinate system.
 
double getFlightTime () const
 Getter for the time when the particle reached the support point position.
 
void setFlightTime (double flightTime)
 Setter for the time when the particle reached the support point position.
 

Private Member Functions

ISuperLayer getISuperLayerAfter (ISuperLayer iSuperLayer, bool movingOutward) const
 Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.
 
ISuperLayer getISuperLayerAfterStart (bool movingOutward) const
 Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.
 
ISuperLayer getISuperLayerAfterStart (EForwardBackward forwardBackwardInfo) const
 Indicates which superlayer is traversed after the current one following the trajectory forward or backward as indicated by the input.
 
ISuperLayer getAxialISuperLayerAfterStart (EForwardBackward forwardBackwardInfo) const
 Indicates which axial superlayer is traversed after the one, where the start point of the trajectory is located considering if you want to follow the trajectory in the forward or backward direction.
 

Private Attributes

Vector2D m_localOrigin
 Memory for local coordinate origin of the circle representing the trajectory in global coordinates.
 
UncertainPerigeeCircle m_localPerigeeCircle
 Memory for the generalized circle describing the trajectory in coordinates from the local origin.
 
double m_flightTime = NAN
 Memory for the estimation of the time at which the particle arrived at the support point.
 

Detailed Description

Particle trajectory as it is seen in xy projection represented as a circle.

Definition at line 36 of file CDCTrajectory2D.h.

Constructor & Destructor Documentation

◆ CDCTrajectory2D() [1/5]

Default constructor for ROOT compatibility.

Definition at line 37 of file CDCTrajectory2D.cc.

40{
41}
Vector2D m_localOrigin
Memory for local coordinate origin of the circle representing the trajectory in global coordinates.
UncertainPerigeeCircle m_localPerigeeCircle
Memory for the generalized circle describing the trajectory in coordinates from the local origin.

◆ CDCTrajectory2D() [2/5]

CDCTrajectory2D ( const UncertainPerigeeCircle perigeeCircle)
explicit

Constructs a trajectory from a generalized circle.

Constructs a trajectory which is described by the given line or circle. The start point is set to the closest approach to the origin.

Definition at line 43 of file CDCTrajectory2D.cc.

44 : m_localOrigin(0.0, 0.0)
45 , m_localPerigeeCircle(perigeeCircle)
46{
47}

◆ CDCTrajectory2D() [3/5]

CDCTrajectory2D ( const Vector2D localOrigin,
const UncertainPerigeeCircle localPerigeeCircle,
double  flightTime = NAN 
)

Constructs a trajectory from a generalized circle and a start point.

Constructs a trajectory which is described by the given line or circle and starts in the given point. The point is taken to be the closest approach to the circle.

Definition at line 49 of file CDCTrajectory2D.cc.

52 : m_localOrigin(localOrigin)
53 , m_localPerigeeCircle(localPerigeeCircle)
54 , m_flightTime(flightTime)
55{
56}
double m_flightTime
Memory for the estimation of the time at which the particle arrived at the support point.

◆ CDCTrajectory2D() [4/5]

CDCTrajectory2D ( const Vector2D pos2D,
double  time,
const Vector2D mom2D,
double  charge,
double  bZ 
)

Construct a trajectory with given start point, transverse momentum at the start point, the given charge and the magnetic field value in z direction.

Definition at line 58 of file CDCTrajectory2D.cc.

63 : m_localOrigin(pos2D)
65 mom2D.unit(),
66 0.0)
67 , m_flightTime(time)
68{
69}
static double absMom2DToCurvature(double absMom2D, double charge, double bZ)
Conversion helper for momenta to two dimensional curvature.
Vector2D unit() const
Returns a unit vector colaligned with this.
Definition: Vector2D.h:321
double norm() const
Calculates the length of the vector.
Definition: Vector2D.h:175

◆ CDCTrajectory2D() [5/5]

CDCTrajectory2D ( const Vector2D pos2D,
double  time,
const Vector2D mom2D,
double  charge 
)

Construct a trajectory with given start point, transverse momentum at the start point and given charge.

Definition at line 71 of file CDCTrajectory2D.cc.

75 : m_localOrigin(pos2D)
77 mom2D.unit(),
78 0.0)
79 , m_flightTime(time)
80{
81}

Member Function Documentation

◆ calcArcLength2D()

double calcArcLength2D ( const Vector2D point) const
inline

Calculate the travel distance from the start position of the trajectory.

Returns the travel distance on the trajectory from the start point to
the given point. This is subjected to a discontinuity at the far point
of the circle. Hence the value return is in the range from -pi*radius to pi*radius
If you have a heavily curling track you have care about the feasibility of this
calculation.

Definition at line 260 of file CDCTrajectory2D.h.

261 {
262 return getLocalCircle()->arcLengthBetween(Vector2D(0.0, 0.0), point - getLocalOrigin());
263 }
const Vector2D & getLocalOrigin() const
Getter for the origin of the local coordinate system.
const UncertainPerigeeCircle & getLocalCircle() const
Getter for the circle in local coordinates.
double arcLengthBetween(const Vector2D &from, const Vector2D &to) const
Calculates the arc length between two points of closest approach on the circle.

◆ calcArcLength2DBetween()

double calcArcLength2DBetween ( const Vector2D fromPoint,
const Vector2D toPoint 
) const
inline

Calculate the travel distance between the two given positions Returns the travel distance on the trajectory from the first given point to
the second given point.

This is subjected to a discontinuity at the far point
of the circle. Hence the value return is in the range from -pi*radius to pi*radius
If you have a heavily curling track you have care about the feasibility of this
calculation.

Definition at line 273 of file CDCTrajectory2D.h.

274 {
275 return getLocalCircle()->arcLengthBetween(fromPoint - getLocalOrigin(),
276 toPoint - getLocalOrigin());
277 }

◆ clear()

void clear ( )

Clears all information from this trajectory.

Definition at line 88 of file CDCTrajectory2D.cc.

89{
90 m_localOrigin.set(0.0, 0.0);
92 m_flightTime = NAN;
93}
void invalidate()
Sets all circle parameters to zero including the covariance matrix.
void set(const double first, const double second)
Setter for both coordinate.
Definition: Vector2D.h:650

◆ getAbsMom2D() [1/2]

double getAbsMom2D ( ) const

Get the estimation for the absolute value of the transvers momentum.

Definition at line 288 of file CDCTrajectory2D.cc.

289{
290 Vector2D position = getSupport();
291 return CDCBFieldUtil::curvatureToAbsMom2D(getLocalCircle()->curvature(), position);
292}
static double curvatureToAbsMom2D(double curvature, double bZ)
Conversion helper for two dimensional curvature to momenta.
Vector2D getSupport() const
Get the support point of the trajectory in global coordinates.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Definition: Vector2D.h:32

◆ getAbsMom2D() [2/2]

double getAbsMom2D ( double  bZ) const

Get the estimation for the absolute value of the transvers momentum.

Definition at line 283 of file CDCTrajectory2D.cc.

284{
285 return CDCBFieldUtil::curvatureToAbsMom2D(getLocalCircle()->curvature(), bZ);
286}

◆ getArcLength2DBackOffset()

double getArcLength2DBackOffset ( const AFromHits &  fromHits,
const AToHits &  toHits 
) const
inline

Calculates the perpendicular travel distance from the last position of the fromHits to the last position of the toHits.

Definition at line 234 of file CDCTrajectory2D.h.

235 {
236 const Vector2D& fromRecoPos2D = fromHits.back().getRecoPos2D();
237 const Vector2D& toRecoPos2D = toHits.back().getRecoPos2D();
238 return calcArcLength2DBetween(fromRecoPos2D, toRecoPos2D);
239 }
double calcArcLength2DBetween(const Vector2D &fromPoint, const Vector2D &toPoint) const
Calculate the travel distance between the two given positions Returns the travel distance on the traj...

◆ getArcLength2DFrontOffset()

double getArcLength2DFrontOffset ( const AFromHits &  fromHits,
const AToHits &  toHits 
) const
inline

Calculates the perpendicular travel distance from the first position of the fromHits to the first position of the toHits.

Definition at line 222 of file CDCTrajectory2D.h.

223 {
224 const Vector2D& fromRecoPos2D = fromHits.front().getRecoPos2D();
225 const Vector2D& toRecoPos2D = toHits.front().getRecoPos2D();
226 return calcArcLength2DBetween(fromRecoPos2D, toRecoPos2D);
227 }

◆ getArcLength2DGap()

double getArcLength2DGap ( const AFromHits &  fromHits,
const AToHits &  toHits 
) const
inline

Calculates the perpendicular travel distance from the last position of the fromHits to the first position of the toHits.

Definition at line 210 of file CDCTrajectory2D.h.

211 {
212 const Vector2D& fromRecoPos2D = fromHits.back().getRecoPos2D();
213 const Vector2D& toRecoPos2D = toHits.front().getRecoPos2D();
214 return calcArcLength2DBetween(fromRecoPos2D, toRecoPos2D);
215 }

◆ getArcLength2DPeriod()

double getArcLength2DPeriod ( ) const
inline

Getter for the arc length for one round trip around the trajectory.

Definition at line 279 of file CDCTrajectory2D.h.

280 {
282 }
double arcLengthPeriod() const
Getter for the arc length for a full round of the circle.

◆ getAxialISuperLayerAfterStart()

ISuperLayer getAxialISuperLayerAfterStart ( EForwardBackward  forwardBackwardInfo) const
private

Indicates which axial superlayer is traversed after the one, where the start point of the trajectory is located considering if you want to follow the trajectory in the forward or backward direction.

Definition at line 218 of file CDCTrajectory2D.cc.

219{
220 bool movingOutward = isMovingOutward();
221 if (forwardBackwardInfo == EForwardBackward::c_Backward) {
222 movingOutward = not movingOutward;
223 }
224 ISuperLayer startISuperLayer = getStartISuperLayer();
225 if (ISuperLayerUtil::isInvalid(startISuperLayer)) return ISuperLayerUtil::c_Invalid;
226
227 ISuperLayer nextISuperLayer = getISuperLayerAfter(startISuperLayer, movingOutward);
228 if (ISuperLayerUtil::isInvalid(nextISuperLayer)) return ISuperLayerUtil::c_Invalid;
229 if (ISuperLayerUtil::isAxial(nextISuperLayer)) return nextISuperLayer;
230
231 ISuperLayer iSuperLayerStep = nextISuperLayer - startISuperLayer;
232 assert(std::abs(iSuperLayerStep) == 1);
233 bool nextMovingOutward = iSuperLayerStep > 0;
234 return getISuperLayerAfter(nextISuperLayer, nextMovingOutward);
235}
ISuperLayer getISuperLayerAfter(ISuperLayer iSuperLayer, bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...
ISuperLayer getStartISuperLayer() const
Indicates the superlayer the trajectory starts in.
bool isMovingOutward() const
Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start...
static const ISuperLayer c_Invalid
Constant making an invalid superlayer id.
Definition: ISuperLayer.h:65
static bool isAxial(ISuperLayer iSuperLayer)
Returns if the super layer with the given id is axial.
Definition: ISuperLayer.cc:21
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:38

◆ getChargeSign()

ESign getChargeSign ( ) const

Gets the charge sign of the trajectory.

Definition at line 278 of file CDCTrajectory2D.cc.

279{
280 return CDCBFieldUtil::ccwInfoToChargeSign(getLocalCircle()->orientation());
281}
static ESign ccwInfoToChargeSign(ERotation ccwInfo)
Conversion helper from clockwise or counterclockwise travel to the charge sign.

◆ getChi2()

double getChi2 ( ) const
inline

Getter for the chi2 value of the circle fit.

Definition at line 468 of file CDCTrajectory2D.h.

469 {
470 return getLocalCircle().chi2();
471 }
double chi2() const
Getter for the chi square value of the circle fit.

◆ getClosest()

Vector2D getClosest ( const Vector2D point) const

Calculates the closest approach on the trajectory to the given point.

Definition at line 171 of file CDCTrajectory2D.cc.

172{
173 return getLocalCircle()->closest(point - getLocalOrigin()) + getLocalOrigin();
174}
Vector2D closest(const Vector2D &point) const
Calculates the point of closest approach on the circle to the given point.

◆ getCurvature()

double getCurvature ( ) const
inline

Getter for the curvature as seen from the xy projection.

Definition at line 422 of file CDCTrajectory2D.h.

423 {
424 return getLocalCircle()->curvature();
425 }
double curvature() const
Getter for the signed curvature.

◆ getDist2D()

double getDist2D ( const Vector2D point) const
inline

Calculates the distance from the point to the trajectory as seen from the xy projection.

Definition at line 409 of file CDCTrajectory2D.h.

410 {
411 return getLocalCircle()->distance(point - getLocalOrigin());
412 }
double distance(const Vector2D &point) const
Getter for the proper signed distance of the point to the circle.

◆ getExit()

Vector2D getExit ( ) const

Calculates the point where the trajectory leaves the CDC.

This method returns the first point in forward flight direction from the start point of the trajectory where it meets either the radius of the inner most layer or the outer radius of the outer most wall. If the trajectory does not leave the CDC by the inner or outer wall this will return Vector2D(nan,nan).

Definition at line 334 of file CDCTrajectory2D.cc.

335{
336 const Vector2D outerExit = getOuterExit();
337 const Vector2D innerExit = getInnerExit();
338 const Vector2D localExit = getLocalCircle()->chooseNextForwardOf(Vector2D(0, 0),
339 outerExit - getLocalOrigin(),
340 innerExit - getLocalOrigin());
341 return localExit + getLocalOrigin();
342}
Vector2D getOuterExit(double factor=1) const
Calculates the point where the trajectory meets the outer wall of the CDC.
Vector2D getInnerExit() const
Calculates the point where the trajectory meets the inner wall of the CDC.
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 strictly follows ...

◆ getFlightDirection2D()

Vector2D getFlightDirection2D ( const Vector2D point) const
inline

Get the unit direction of flight at the given point, where arcLength2D = 0.

Definition at line 310 of file CDCTrajectory2D.h.

311 {
312 return getLocalCircle()->tangential(point - getLocalOrigin());
313 }
Vector2D tangential(const Vector2D &point) const
Tangential vector to the circle near the given position.

◆ getFlightDirection2DAtSupport()

Vector2D getFlightDirection2DAtSupport ( ) const
inline

Get the unit direction of flight at the support point, where arcLength2D = 0.

Definition at line 316 of file CDCTrajectory2D.h.

317 {
318 return getLocalCircle()->tangential();
319 }

◆ getFlightTime()

double getFlightTime ( ) const
inline

Getter for the time when the particle reached the support point position.

Definition at line 522 of file CDCTrajectory2D.h.

523 {
524 return m_flightTime;
525 }

◆ getGlobalCenter()

Vector2D getGlobalCenter ( ) const
inline

Getter for the center of the trajectory in global coordinates.

Definition at line 347 of file CDCTrajectory2D.h.

348 {
349 return getLocalCircle()->center() + m_localOrigin;
350 }
Vector2D center() const
Getter for the center of the circle. If it was a line both components will be infinity.

◆ getGlobalCircle()

PerigeeCircle getGlobalCircle ( ) const
inline

Getter for the circle in global coordinates.

Definition at line 441 of file CDCTrajectory2D.h.

442 {
443 PerigeeCircle result = getLocalCircle();
444 result.passiveMoveBy(-getLocalOrigin());
445 return result;
446 }

◆ getGlobalImpact()

double getGlobalImpact ( ) const
inline

Getter for the signed impact parameter of the trajectory.

Definition at line 403 of file CDCTrajectory2D.h.

404 {
406 }

◆ getGlobalPerigee()

Vector2D getGlobalPerigee ( ) const
inline

Getter for the closest approach on the trajectory to the global origin.

Definition at line 341 of file CDCTrajectory2D.h.

342 {
344 }

◆ getInnerExit()

Vector2D getInnerExit ( ) const

Calculates the point where the trajectory meets the inner wall of the CDC.

This method returns the first point in forward flight direction from the start point of the trajectory where it meets the inner radius of the inner most layer. If the trajectory does not meet the CDC by the inner wall this will return Vector2D(nan,nan)

Definition at line 294 of file CDCTrajectory2D.cc.

295{
297 const CDCWireLayer& innerMostLayer = topology.getWireLayers().front();
298 double innerCylindricalR = innerMostLayer.getInnerCylindricalR();
299
300 const Vector2D support = getSupport();
301 const PerigeeCircle globalCircle = getGlobalCircle();
302 if (support.cylindricalR() < innerCylindricalR) {
303 // If we start within the inner volume of the CDC we want the trajectory to enter the CDC
304 // and not stop at first intersection with the inner wall.
305 // Therefore we take the inner exit that comes after the apogee (far point of the circle).
306 const Vector2D apogee = globalCircle.apogee();
307 return globalCircle.atCylindricalRForwardOf(apogee, innerCylindricalR);
308
309 } else {
310 return globalCircle.atCylindricalRForwardOf(support, innerCylindricalR);
311 }
312}
PerigeeCircle getGlobalCircle() const
Getter for the circle in global coordinates.
Class representing a sense wire layer in the central drift chamber.
Definition: CDCWireLayer.h:42
double getInnerCylindricalR() const
Getter for inner radius of the layer as taken from the CDCGeometryPar.
Definition: CDCWireLayer.h:245
Class representing the sense wire arrangement in the whole of the central drift chamber.
const std::vector< Belle2::TrackFindingCDC::CDCWireLayer > & getWireLayers() const
Getter for the underlying storing layer vector.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
Extension of the generalized circle also caching the perigee coordinates.
Definition: PerigeeCircle.h:36
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...
Vector2D apogee() const
Getter for the apogee of the circle. If it was a line both components will be infinity.
double cylindricalR() const
Gives the cylindrical radius of the vector. Same as norm()
Definition: Vector2D.h:557

◆ getISuperLayerAfter()

ISuperLayer getISuperLayerAfter ( ISuperLayer  iSuperLayer,
bool  movingOutward 
) const
private

Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.

Definition at line 176 of file CDCTrajectory2D.cc.

177{
179
180 ISuperLayer minimalISuperLayer = getMinimalISuperLayer();
181 ISuperLayer maximalISuperLayer = getMaximalISuperLayer();
182 if (minimalISuperLayer == maximalISuperLayer) return ISuperLayerUtil::c_Invalid; // No next super layer to go to
183 if (iSuperLayer == minimalISuperLayer) return ISuperLayerUtil::getNextOutwards(iSuperLayer);
184 if (iSuperLayer == maximalISuperLayer) return ISuperLayerUtil::getNextInwards(iSuperLayer);
185
186 if (movingOutward) {
187 return ISuperLayerUtil::getNextOutwards(iSuperLayer);
188 } else {
189 return ISuperLayerUtil::getNextInwards(iSuperLayer);
190 }
191}
ISuperLayer getMinimalISuperLayer() const
Indicates the minimal superlayer the trajectory traverses.
ISuperLayer getMaximalISuperLayer() const
Indicates the maximal superlayer the trajectory traverses.
static ISuperLayer getNextInwards(ISuperLayer iSuperLayer)
Returns the super layer that is inside of the given super layer.
Definition: ISuperLayer.cc:63
static ISuperLayer getNextOutwards(ISuperLayer iSuperLayer)
Returns the super layer that is outside of the given super layer.
Definition: ISuperLayer.cc:72

◆ getISuperLayerAfterStart() [1/2]

ISuperLayer getISuperLayerAfterStart ( bool  movingOutward) const
private

Returns which superlayer is traversed after the current one following the trajectory outward or inward as indicated by the boolean input.

Definition at line 193 of file CDCTrajectory2D.cc.

194{
195 ISuperLayer iSuperLayer = getStartISuperLayer();
196 return getISuperLayerAfter(iSuperLayer, movingOutward);
197}

◆ getISuperLayerAfterStart() [2/2]

ISuperLayer getISuperLayerAfterStart ( EForwardBackward  forwardBackwardInfo) const
private

Indicates which superlayer is traversed after the current one following the trajectory forward or backward as indicated by the input.

Definition at line 199 of file CDCTrajectory2D.cc.

200{
201 bool movingOutward = isMovingOutward();
202 if (forwardBackwardInfo == EForwardBackward::c_Backward) {
203 movingOutward = not movingOutward;
204 }
205 return getISuperLayerAfterStart(movingOutward);
206}
ISuperLayer getISuperLayerAfterStart(bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...

◆ getLocalCircle()

const UncertainPerigeeCircle & getLocalCircle ( ) const
inline

Getter for the circle in local coordinates.

Definition at line 456 of file CDCTrajectory2D.h.

457 {
459 }

◆ getLocalCovariance()

double getLocalCovariance ( EPerigeeParameter  iRow,
EPerigeeParameter  iCol 
) const
inline

Getter for an individual element of the covariance matrix of the local helix parameters.

Definition at line 428 of file CDCTrajectory2D.h.

429 {
430 return getLocalCircle().covariance(iRow, iCol);
431 }
double covariance(const EPerigeeParameter &iRow, const EPerigeeParameter &iCol) const
Getter for individual elements of the covariance matrix.

◆ getLocalOrigin()

const Vector2D & getLocalOrigin ( ) const
inline

Getter for the origin of the local coordinate system.

Definition at line 498 of file CDCTrajectory2D.h.

499 {
500 return m_localOrigin;
501 }

◆ getLocalVariance()

double getLocalVariance ( EPerigeeParameter  i) const
inline

Getter for an individual diagonal element of the covariance matrix of the local helix parameters.

Definition at line 435 of file CDCTrajectory2D.h.

436 {
437 return getLocalCircle().variance(i);
438 }
double variance(const EPerigeeParameter &i) const
Getter for individual diagonal elements of the covariance matrix.

◆ getMaximalCylindricalR()

double getMaximalCylindricalR ( ) const
inline

Getter for the maximal distance from the origin.

Definition at line 390 of file CDCTrajectory2D.h.

391 {
392 return std::fabs(getGlobalImpact() + 2 * getLocalCircle()->radius());
393 }
double getGlobalImpact() const
Getter for the signed impact parameter of the trajectory.

◆ getMaximalISuperLayer()

ISuperLayer getMaximalISuperLayer ( ) const

Indicates the maximal superlayer the trajectory traverses.

Definition at line 247 of file CDCTrajectory2D.cc.

248{
249 double maximalCylindricalR = getMaximalCylindricalR();
251}
double getMaximalCylindricalR() const
Getter for the maximal distance from the origin.
ISuperLayer getISuperLayerAtCylindricalR(double cylindricalR)
Returns the logical superlayer number at the given radius.

◆ getMinimalCylindricalR()

double getMinimalCylindricalR ( ) const
inline

Getter for the minimal distance from the origin - same as absolute value of the impact parameter.

Definition at line 397 of file CDCTrajectory2D.h.

398 {
399 return std::fabs(getGlobalImpact());
400 }

◆ getMinimalISuperLayer()

ISuperLayer getMinimalISuperLayer ( ) const

Indicates the minimal superlayer the trajectory traverses.

Definition at line 259 of file CDCTrajectory2D.cc.

260{
261 double minimalCylindricalR = getMinimalCylindricalR();
263}
double getMinimalCylindricalR() const
Getter for the minimal distance from the origin - same as absolute value of the impact parameter.

◆ getMom2DAtSupport() [1/2]

Vector2D getMom2DAtSupport ( ) const
inline

Get the momentum at the support point of the trajectory.

Definition at line 304 of file CDCTrajectory2D.h.

305 {
307 }
Vector2D getFlightDirection2DAtSupport() const
Get the unit direction of flight at the support point, where arcLength2D = 0.
double getAbsMom2D() const
Get the estimation for the absolute value of the transvers momentum.

◆ getMom2DAtSupport() [2/2]

Vector2D getMom2DAtSupport ( const double  bZ) const
inline

Get the momentum at the support point of the trajectory.

Definition at line 298 of file CDCTrajectory2D.h.

299 {
301 }

◆ getNDF()

size_t getNDF ( ) const
inline

Getter for the number of degrees of freedom of the circle fit.

Definition at line 480 of file CDCTrajectory2D.h.

481 {
482 return getLocalCircle().ndf();
483 }
std::size_t ndf() const
Getter for the number of degrees of freediom used in the circle fit.

◆ getNextAxialISuperLayer()

ISuperLayer getNextAxialISuperLayer ( ) const

Indicates which axial superlayer the trajectory traverses after the one, where the start point of the trajectory is located.

Definition at line 237 of file CDCTrajectory2D.cc.

238{
239 return getAxialISuperLayerAfterStart(EForwardBackward::c_Forward);
240}
ISuperLayer getAxialISuperLayerAfterStart(EForwardBackward forwardBackwardInfo) const
Indicates which axial superlayer is traversed after the one, where the start point of the trajectory ...

◆ getNextISuperLayer()

ISuperLayer getNextISuperLayer ( ) const

Indicates which superlayer the trajectory traverses after the one, where the start point of the trajectory is located.

Definition at line 208 of file CDCTrajectory2D.cc.

209{
210 return getISuperLayerAfterStart(EForwardBackward::c_Forward);
211}

◆ getOuterExit()

Vector2D getOuterExit ( double  factor = 1) const

Calculates the point where the trajectory meets the outer wall of the CDC.

This method returns the first point in forward flight direction from the start point of the trajectory where it meets the outer radius of the outer most layer. If the trajectory does not meet the CDC by the outer wall this will return Vector2D(nan,nan) The factor can be used to virtually resize the CDC.

Definition at line 314 of file CDCTrajectory2D.cc.

315{
317 const CDCWireLayer& outerMostLayer = topology.getWireLayers().back();
318 double outerCylindricalR = outerMostLayer.getOuterCylindricalR() * factor;
319
320 const Vector2D support = getSupport();
321 const PerigeeCircle globalCircle = getGlobalCircle();
322 if (support.cylindricalR() > outerCylindricalR) {
323 // If we start outside of the volume of the CDC we want the trajectory to enter the CDC
324 // and not stop at first intersection with the outer wall.
325 // Therefore we take the outer exit that comes after the perigee.
326 const Vector2D perigee = globalCircle.perigee();
327 return globalCircle.atCylindricalRForwardOf(perigee, outerCylindricalR);
328
329 } else {
330 return getGlobalCircle().atCylindricalRForwardOf(support, outerCylindricalR);
331 }
332}
double getOuterCylindricalR() const
Getter for outer radius of the layer as taken from the CDCGeometryPar.
Definition: CDCWireLayer.h:249
Vector2D perigee() const
Getter for the perigee point.

◆ getPos2DAtArcLength2D()

Vector2D getPos2DAtArcLength2D ( double  arcLength2D)
inline

Getter for the position at a given two dimensional arc length.

Definition at line 329 of file CDCTrajectory2D.h.

330 {
331 return getLocalOrigin() + getLocalCircle()->atArcLength(arcLength2D);
332 }
Vector2D atArcLength(double arcLength) const
Calculates the point, which lies at the give perpendicular travel distance (counted from the perigee)

◆ getPreviousAxialISuperLayer()

ISuperLayer getPreviousAxialISuperLayer ( ) const

Indicates which axial superlayer the trajectory traverses before the one, where the start point of the trajectory is located.

Definition at line 242 of file CDCTrajectory2D.cc.

243{
244 return getAxialISuperLayerAfterStart(EForwardBackward::c_Backward);
245}

◆ getPreviousISuperLayer()

ISuperLayer getPreviousISuperLayer ( ) const

Indicates which superlayer the trajectory traverses before the one, where the start point of the trajectory is located.

Definition at line 213 of file CDCTrajectory2D.cc.

214{
215 return getISuperLayerAfterStart(EForwardBackward::c_Backward);
216}

◆ getPValue()

double getPValue ( ) const
inline

Getter for p-value.

Definition at line 462 of file CDCTrajectory2D.h.

463 {
464 return TMath::Prob(getChi2(), getNDF());
465 }
double getChi2() const
Getter for the chi2 value of the circle fit.
size_t getNDF() const
Getter for the number of degrees of freedom of the circle fit.

◆ getStartISuperLayer()

ISuperLayer getStartISuperLayer ( ) const

Indicates the superlayer the trajectory starts in.

Definition at line 253 of file CDCTrajectory2D.cc.

254{
255 double startCylindricalR = getLocalOrigin().cylindricalR();
257}

◆ getSupport()

Vector2D getSupport ( ) const
inline

Get the support point of the trajectory in global coordinates.

Definition at line 335 of file CDCTrajectory2D.h.

336 {
337 return getLocalCircle()->perigee() + getLocalOrigin();
338 }

◆ getTotalArcLength2D()

double getTotalArcLength2D ( const AHits &  hits) const
inline

Calculates the perpendicular travel distance from the first position of the hits to the last position of the hits.

Definition at line 244 of file CDCTrajectory2D.h.

245 {
246 Vector2D frontRecoPos2D = hits.front().getRecoPos2D();
247 Vector2D backRecoPos2D = hits.back().getRecoPos2D();
248 return calcArcLength2DBetween(frontRecoPos2D, backRecoPos2D);
249 }

◆ isCurler()

bool isCurler ( double  factor = 1) const

Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.

Definition at line 265 of file CDCTrajectory2D.cc.

266{
268 return getMaximalCylindricalR() < factor * topology.getOuterCylindricalR();
269}
double getOuterCylindricalR() const
Getter for the outer radius of the outer most wire layer.

◆ isFitted()

bool isFitted ( ) const

Checks if the circle is already set to a valid value.

Definition at line 83 of file CDCTrajectory2D.cc.

84{
85 return not getLocalCircle()->isInvalid();
86}
bool isInvalid() const
Indicates if all circle parameters are zero.

◆ isForwardOrBackwardTo()

EForwardBackward isForwardOrBackwardTo ( const AHits &  hits) const
inline

Calculates if this trajectory and the hits are coaligned Returns:

  • EForwardBackward::c_Forward if the last entity lies behind the first.
  • EForwardBackward::c_Backward if the last entity lies before the first.

Definition at line 200 of file CDCTrajectory2D.h.

201 {
202 return static_cast<EForwardBackward>(sign(getTotalArcLength2D(hits)));
203 }
double getTotalArcLength2D(const AHits &hits) const
Calculates the perpendicular travel distance from the first position of the hits to the last position...
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.

◆ isMovingOutward()

bool isMovingOutward ( ) const
inline

Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start point on.

Definition at line 323 of file CDCTrajectory2D.h.

324 {
326 }
double dot(const Vector2D &rhs) const
Calculates the two dimensional dot product.
Definition: Vector2D.h:158

◆ 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 at line 271 of file CDCTrajectory2D.cc.

272{
274 return getMinimalCylindricalR() < factor * topology.getInnerCylindricalR();
275}
double getInnerCylindricalR() const
Getter for the inner radius of the inner most wire layer.

◆ isRightOrLeft()

ERightLeft isRightOrLeft ( const Vector2D point) const
inline

Checks if the given point is to the right or to the left of the trajectory.

Definition at line 415 of file CDCTrajectory2D.h.

416 {
417 return getLocalCircle()->isRightOrLeft(point - getLocalOrigin());
418 }
ERightLeft isRightOrLeft(const Vector2D &point) const
Indicates if the point is on the right or left side of the circle.

◆ reconstruct3D()

Vector3D reconstruct3D ( const WireLine wireLine,
double  distance = 0.0,
double  z = 0 
) const

Gives the one three dimensional positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.

This method makes the reconstruction of the z coordinate possible by using the skewness
stereo layer of the stereo wires. The point is determined such that it is at the (signed) distance to the wire line.

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 162 of file CDCTrajectory2D.cc.

165{
166 const double recoZ = reconstructZ(wireLine, distance, z);
167 const Vector3D recoWirePos2D = wireLine.sagPos3DAtZ(recoZ);
168 return Vector3D(getClosest(recoWirePos2D.xy()), recoZ);
169}
double reconstructZ(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the one z positions within the CDC closest to the given z where the given drift circle on the w...
Vector2D getClosest(const Vector2D &point) const
Calculates the closest approach on the trajectory to the given point.
A three dimensional vector.
Definition: Vector3D.h:33
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
Definition: Vector3D.h:508
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:56

◆ 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.

Only works for the skew stereo wires.

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 149 of file CDCTrajectory2D.cc.

152{
153 const std::array<double, 2> solutionsZ = reconstructBothZ(wireLine, distance, z);
154
155 const Vector3D firstRecoWirePos3D = wireLine.sagPos3DAtZ(solutionsZ[0]);
156 const Vector3D secondRecoWirePos3D = wireLine.sagPos3DAtZ(solutionsZ[1]);
157 return {{{getClosest(firstRecoWirePos3D.xy()), firstRecoWirePos3D.z()},
158 {getClosest(secondRecoWirePos3D.xy()), secondRecoWirePos3D.z()}
159 }};
160}
std::array< double, 2 > reconstructBothZ(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the two z positions where the given drift circle on the wire line touches the trajectory.
double z() const
Getter for the z coordinate.
Definition: Vector3D.h:496

◆ reconstructBothZ()

std::array< double, 2 > reconstructBothZ ( const WireLine wireLine,
double  distance = 0.0,
double  z = 0 
) const

Gives the two z positions where the given drift circle on the wire line touches the trajectory.

Only works for the skew stereo wires

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 109 of file CDCTrajectory2D.cc.

112{
113 Vector2D globalPos2D = wireLine.sagPos2DAtZ(z);
114 Vector2D movePerZ = wireLine.sagMovePerZ(z);
115
116 Vector2D localPos2D = globalPos2D - getLocalOrigin();
117 const PerigeeCircle& localCircle = getLocalCircle();
118
119 double fastDistance = distance != 0.0 ? localCircle.fastDistance(distance) : 0.0;
120
121 double c = localCircle.fastDistance(localPos2D) - fastDistance;
122 double b = localCircle.gradient(localPos2D).dot(movePerZ);
123 double a = localCircle.n3() * movePerZ.normSquared();
124
125 const std::pair<double, double> solutionsDeltaZ = solveQuadraticABC(a, b, c);
126
127 // Put the solution of smaller deviation first
128 const std::array<double, 2> solutionsZ{solutionsDeltaZ.second + z, solutionsDeltaZ.first + z};
129 return solutionsZ;
130}
double fastDistance(const Vector2D &point) const
Getter for the linearised distance measure to a point.
Vector2D gradient(const Vector2D &point) const
Gradient of the distance field, hence indicates the direction of increasing distance.
double n3() const
Getter for the generalised circle parameter n3.
double normSquared() const
Calculates .
Definition: Vector2D.h:169
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:75
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:60

◆ reconstructZ()

double reconstructZ ( const WireLine wireLine,
double  distance = 0.0,
double  z = 0 
) const

Gives the one z positions within the CDC closest to the given z where the given drift circle on the wire line touches the trajectory.

Only works for the skew stereo wires.

Parameters
wireLineThe geometrical wire line on which the hit is located-
distanceThe desired distance from the wire line a.k.a. drift length
zThe expected value of z to which to closest solution should be selected.

Definition at line 132 of file CDCTrajectory2D.cc.

135{
136 const std::array<double, 2> solutionsZ = reconstructBothZ(wireLine, distance, z);
137
138 bool firstIsInCDC = (wireLine.backwardZ() < solutionsZ[0] and
139 solutionsZ[0] < wireLine.forwardZ());
140 bool secondIsInCDC = (wireLine.backwardZ() < solutionsZ[1] and
141 solutionsZ[1] < wireLine.forwardZ());
142
143 // Prefer the solution with the smaller deviation from the given z position which is the first
144 assert(not(std::fabs(solutionsZ[0] - z) > std::fabs(solutionsZ[1] - z)));
145 const double recoZ = (firstIsInCDC or not secondIsInCDC) ? solutionsZ[0] : solutionsZ[1];
146 return recoZ;
147}
double backwardZ() const
Gives the backward z coordinate.
Definition: WireLine.h:134
double forwardZ() const
Gives the forward z coordinate.
Definition: WireLine.h:130

◆ reverse()

void reverse ( )

Reverses the trajectory in place.

Definition at line 95 of file CDCTrajectory2D.cc.

96{
99}
void reverse()
Flips the orientation of the circle in place.

◆ reversed()

CDCTrajectory2D reversed ( ) const

Returns the reverse trajectory as a copy.

Definition at line 102 of file CDCTrajectory2D.cc.

103{
104 CDCTrajectory2D result = *this;
105 result.reverse();
106 return result;
107}
Particle trajectory as it is seen in xy projection represented as a circle.

◆ setChi2()

void setChi2 ( const double  chi2)
inline

Setter for the chi square value of the circle fit.

Definition at line 474 of file CDCTrajectory2D.h.

475 {
476 return m_localPerigeeCircle.setChi2(chi2);
477 }
void setChi2(const double chi2)
Setter for the chi square value of the circle fit.

◆ setFlightTime()

void setFlightTime ( double  flightTime)
inline

Setter for the time when the particle reached the support point position.

Definition at line 528 of file CDCTrajectory2D.h.

529 {
530 m_flightTime = flightTime;
531 }

◆ setGlobalCircle()

void setGlobalCircle ( const UncertainPerigeeCircle perigeeCircle)
inline

Setter for the generalized circle that describes the trajectory.

Definition at line 449 of file CDCTrajectory2D.h.

450 {
451 m_localPerigeeCircle = perigeeCircle;
453 }
void passiveMoveBy(const Vector2D &by)
Moves the coordinate system by the vector by and calculates the new perigee and its covariance matrix...

◆ setLocalCircle()

void setLocalCircle ( const UncertainPerigeeCircle localPerigeeCircle)
inline

Setter for the generalized circle that describes the trajectory.

Definition at line 492 of file CDCTrajectory2D.h.

493 {
494 m_localPerigeeCircle = localPerigeeCircle;
495 }

◆ setLocalOrigin()

double setLocalOrigin ( const Vector2D localOrigin)

Setter for the origin of the local coordinate system.

This sets the origin point the local circle representation is subjected. The local circle is also changed such that the set of points in global space is not changed on repositioning the local parameterisation. It also implicitly sets up a new reference position for all travel distances.
To be able to keep track how the travel distances have to be shifted by this change
the setter returns the value by which the coordinate s parameter was moved ( passively ).
The relation "old traveldistance - return value == new traveldistance" holds.
(if they are not to far away from the reference points, up to the discontinuity at the
far point on the circle)

Parameters
localOriginNew local reference point in the global coordinate system
Returns
Travel distance from the old to the new origin point

Definition at line 355 of file CDCTrajectory2D.cc.

356{
357 double arcLength2D = calcArcLength2D(localOrigin);
358 m_flightTime += arcLength2D / Const::speedOfLight;
360 m_localOrigin = localOrigin;
361 return arcLength2D;
362}
static const double speedOfLight
[cm/ns]
Definition: Const.h:695
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.

◆ setNDF()

void setNDF ( std::size_t  ndf)
inline

Setter for the number of degrees of freedom of the circle fit.

Definition at line 486 of file CDCTrajectory2D.h.

487 {
488 return m_localPerigeeCircle.setNDF(ndf);
489 }
void setNDF(std::size_t ndf)
Setter for the number of degrees of freediom used in the circle fit.

◆ 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 at line 344 of file CDCTrajectory2D.cc.

347{
348 m_localOrigin = pos2D;
349 double curvature = CDCBFieldUtil::absMom2DToCurvature(mom2D.norm(), charge, pos2D);
350 Vector2D phiVec = mom2D.unit();
351 double impact = 0.0;
352 m_localPerigeeCircle = UncertainPerigeeCircle(curvature, phiVec, impact);
353}
Adds an uncertainty matrix to the circle in perigee parameterisation.

Member Data Documentation

◆ m_flightTime

double m_flightTime = NAN
private

Memory for the estimation of the time at which the particle arrived at the support point.

Definition at line 541 of file CDCTrajectory2D.h.

◆ m_localOrigin

Vector2D m_localOrigin
private

Memory for local coordinate origin of the circle representing the trajectory in global coordinates.

Definition at line 535 of file CDCTrajectory2D.h.

◆ m_localPerigeeCircle

UncertainPerigeeCircle m_localPerigeeCircle
private

Memory for the generalized circle describing the trajectory in coordinates from the local origin.

Definition at line 538 of file CDCTrajectory2D.h.


The documentation for this class was generated from the following files: