Belle II Software  release-08-02-06
CDCTrajectory2D Class Reference

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

#include <CDCTrajectory2D.h>

Collaboration diagram for CDCTrajectory2D:

Public Member Functions

 CDCTrajectory2D ()
 Default constructor for ROOT compatibility.
 
 CDCTrajectory2D (const UncertainPerigeeCircle &perigeeCircle)
 Constructs a trajectory from a generalized circle. More...
 
 CDCTrajectory2D (const Vector2D &localOrigin, const UncertainPerigeeCircle &localPerigeeCircle, double flightTime=NAN)
 Constructs a trajectory from a generalized circle and a start point. More...
 
 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 trajectoy.
 
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 postions where the given drift circle on the wire line touches the trajectory. More...
 
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 wire line touches the trajectory. More...
 
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. More...
 
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 circle on the wire line touches the trajectory. More...
 
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: More...
 
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. More...
 
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. More...
 
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. More...
 
Vector2D getInnerExit () const
 Calculates the point where the trajectory meets the inner wall of the CDC. More...
 
Vector2D getExit () const
 Calculates the point where the trajectory leaves the CDC. More...
 
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 cirlce 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. More...
 
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/2]

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 }
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/2]

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.

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

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

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

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

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

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

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

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

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.

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

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


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