Belle II Software development
|
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 UncertainPerigeeCircle & | getLocalCircle () 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 Vector2D & | getLocalOrigin () 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. | |
Particle trajectory as it is seen in xy projection represented as a circle.
Definition at line 36 of file CDCTrajectory2D.h.
CDCTrajectory2D | ( | ) |
Default constructor for ROOT compatibility.
Definition at line 37 of file CDCTrajectory2D.cc.
|
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.
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.
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.
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.
|
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.
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.
void clear | ( | ) |
Clears all information from this trajectory.
Definition at line 88 of file CDCTrajectory2D.cc.
double getAbsMom2D | ( | ) | const |
Get the estimation for the absolute value of the transvers momentum.
Definition at line 288 of file CDCTrajectory2D.cc.
double getAbsMom2D | ( | double | bZ | ) | const |
Get the estimation for the absolute value of the transvers momentum.
Definition at line 283 of file CDCTrajectory2D.cc.
|
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.
|
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.
|
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.
|
inline |
Getter for the arc length for one round trip around the trajectory.
Definition at line 279 of file CDCTrajectory2D.h.
|
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.
ESign getChargeSign | ( | ) | const |
Gets the charge sign of the trajectory.
Definition at line 278 of file CDCTrajectory2D.cc.
|
inline |
Getter for the chi2 value of the circle fit.
Definition at line 468 of file CDCTrajectory2D.h.
Calculates the closest approach on the trajectory to the given point.
Definition at line 171 of file CDCTrajectory2D.cc.
|
inline |
Getter for the curvature as seen from the xy projection.
Definition at line 422 of file CDCTrajectory2D.h.
|
inline |
Calculates the distance from the point to the trajectory as seen from the xy projection.
Definition at line 409 of file CDCTrajectory2D.h.
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.
Get the unit direction of flight at the given point, where arcLength2D = 0.
Definition at line 310 of file CDCTrajectory2D.h.
|
inline |
Get the unit direction of flight at the support point, where arcLength2D = 0.
Definition at line 316 of file CDCTrajectory2D.h.
|
inline |
Getter for the time when the particle reached the support point position.
Definition at line 522 of file CDCTrajectory2D.h.
|
inline |
Getter for the center of the trajectory in global coordinates.
Definition at line 347 of file CDCTrajectory2D.h.
|
inline |
Getter for the circle in global coordinates.
Definition at line 441 of file CDCTrajectory2D.h.
|
inline |
Getter for the signed impact parameter of the trajectory.
Definition at line 403 of file CDCTrajectory2D.h.
|
inline |
Getter for the closest approach on the trajectory to the global origin.
Definition at line 341 of file CDCTrajectory2D.h.
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.
|
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.
|
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.
|
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.
|
inline |
Getter for the circle in local coordinates.
Definition at line 456 of file CDCTrajectory2D.h.
|
inline |
Getter for an individual element of the covariance matrix of the local helix parameters.
Definition at line 428 of file CDCTrajectory2D.h.
|
inline |
Getter for the origin of the local coordinate system.
Definition at line 498 of file CDCTrajectory2D.h.
|
inline |
Getter for an individual diagonal element of the covariance matrix of the local helix parameters.
Definition at line 435 of file CDCTrajectory2D.h.
|
inline |
Getter for the maximal distance from the origin.
Definition at line 390 of file CDCTrajectory2D.h.
ISuperLayer getMaximalISuperLayer | ( | ) | const |
Indicates the maximal superlayer the trajectory traverses.
Definition at line 247 of file CDCTrajectory2D.cc.
|
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.
ISuperLayer getMinimalISuperLayer | ( | ) | const |
Indicates the minimal superlayer the trajectory traverses.
Definition at line 259 of file CDCTrajectory2D.cc.
|
inline |
Get the momentum at the support point of the trajectory.
Definition at line 304 of file CDCTrajectory2D.h.
|
inline |
Get the momentum at the support point of the trajectory.
Definition at line 298 of file CDCTrajectory2D.h.
|
inline |
Getter for the number of degrees of freedom of the circle fit.
Definition at line 480 of file CDCTrajectory2D.h.
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.
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.
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.
|
inline |
Getter for the position at a given two dimensional arc length.
Definition at line 329 of file CDCTrajectory2D.h.
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.
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.
|
inline |
Getter for p-value.
Definition at line 462 of file CDCTrajectory2D.h.
ISuperLayer getStartISuperLayer | ( | ) | const |
Indicates the superlayer the trajectory starts in.
Definition at line 253 of file CDCTrajectory2D.cc.
|
inline |
Get the support point of the trajectory in global coordinates.
Definition at line 335 of file CDCTrajectory2D.h.
|
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.
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.
bool isFitted | ( | ) | const |
Checks if the circle is already set to a valid value.
Definition at line 83 of file CDCTrajectory2D.cc.
|
inline |
Calculates if this trajectory and the hits are coaligned Returns:
Definition at line 200 of file CDCTrajectory2D.h.
|
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.
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.
|
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.
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.
wireLine | The geometrical wire line on which the hit is located- |
distance | The desired distance from the wire line a.k.a. drift length |
z | The expected value of z to which to closest solution should be selected. |
Definition at line 162 of file CDCTrajectory2D.cc.
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.
wireLine | The geometrical wire line on which the hit is located- |
distance | The desired distance from the wire line a.k.a. drift length |
z | The expected value of z to which to closest solution should be selected. |
Definition at line 149 of file CDCTrajectory2D.cc.
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
wireLine | The geometrical wire line on which the hit is located- |
distance | The desired distance from the wire line a.k.a. drift length |
z | The expected value of z to which to closest solution should be selected. |
Definition at line 109 of file CDCTrajectory2D.cc.
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.
wireLine | The geometrical wire line on which the hit is located- |
distance | The desired distance from the wire line a.k.a. drift length |
z | The expected value of z to which to closest solution should be selected. |
Definition at line 132 of file CDCTrajectory2D.cc.
void reverse | ( | ) |
Reverses the trajectory in place.
Definition at line 95 of file CDCTrajectory2D.cc.
CDCTrajectory2D reversed | ( | ) | const |
Returns the reverse trajectory as a copy.
Definition at line 102 of file CDCTrajectory2D.cc.
|
inline |
Setter for the chi square value of the circle fit.
Definition at line 474 of file CDCTrajectory2D.h.
|
inline |
Setter for the time when the particle reached the support point position.
Definition at line 528 of file CDCTrajectory2D.h.
|
inline |
Setter for the generalized circle that describes the trajectory.
Definition at line 449 of file CDCTrajectory2D.h.
|
inline |
Setter for the generalized circle that describes the trajectory.
Definition at line 492 of file CDCTrajectory2D.h.
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)
localOrigin | New local reference point in the global coordinate system |
Definition at line 355 of file CDCTrajectory2D.cc.
|
inline |
Setter for the number of degrees of freedom of the circle fit.
Definition at line 486 of file CDCTrajectory2D.h.
Setter for start point and momentum at the start point subjected to the charge sign.
Definition at line 344 of file CDCTrajectory2D.cc.
|
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.
|
private |
Memory for local coordinate origin of the circle representing the trajectory in global coordinates.
Definition at line 535 of file CDCTrajectory2D.h.
|
private |
Memory for the generalized circle describing the trajectory in coordinates from the local origin.
Definition at line 538 of file CDCTrajectory2D.h.