 |
Belle II Software
release-05-02-19
|
12 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
14 #include <tracking/trackFindingCDC/geometry/UncertainPerigeeCircle.h>
15 #include <tracking/trackFindingCDC/geometry/PerigeeCircle.h>
16 #include <tracking/trackFindingCDC/geometry/PerigeeParameters.h>
17 #include <tracking/trackFindingCDC/geometry/Vector3D.h>
18 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
20 #include <tracking/trackFindingCDC/numerics/EForwardBackward.h>
21 #include <tracking/trackFindingCDC/numerics/ERightLeft.h>
22 #include <tracking/trackFindingCDC/numerics/ESign.h>
34 namespace TrackFindingCDC {
38 class CDCTrajectory2D {
59 const UncertainPerigeeCircle& localPerigeeCircle,
60 double flightTime = NAN);
68 const Vector2D& mom2D,
74 CDCTrajectory2D(
const Vector2D& pos2D,
double time,
const Vector2D& mom2D,
double charge);
100 std::array<double, 2>
reconstructBothZ(
const WireLine& wireLine,
double distance = 0.0,
double z = 0)
const;
112 double reconstructZ(
const WireLine& wireLine,
double distance = 0.0,
double z = 0)
const;
123 std::array<Vector3D, 2>
reconstructBoth3D(
const WireLine& wireLine,
double distance = 0.0,
double z = 0)
const;
140 Vector2D
getClosest(
const Vector2D& point)
const;
201 template <
class AHits>
211 template <
class AFromHits,
class AToHits>
214 const Vector2D& fromRecoPos2D = fromHits.back().getRecoPos2D();
215 const Vector2D& toRecoPos2D = toHits.front().getRecoPos2D();
223 template <
class AFromHits,
class AToHits>
226 const Vector2D& fromRecoPos2D = fromHits.front().getRecoPos2D();
227 const Vector2D& toRecoPos2D = toHits.front().getRecoPos2D();
235 template <
class AFromHits,
class AToHits>
238 const Vector2D& fromRecoPos2D = fromHits.back().getRecoPos2D();
239 const Vector2D& toRecoPos2D = toHits.back().getRecoPos2D();
245 template <
class AHits>
248 Vector2D frontRecoPos2D = hits.front().getRecoPos2D();
249 Vector2D backRecoPos2D = hits.back().getRecoPos2D();
385 bool isCurler(
double factor = 1)
const;
476 void setChi2(
const double chi2)
488 void setNDF(std::size_t ndf)
ISuperLayer getAxialISuperLayerAfterStart(EForwardBackward forwardBackwardInfo) const
Indicates which axial superlayer is traversed after the one, where the start point of the trajectory ...
Vector2D getGlobalPerigee() const
Getter for the closest approach on the trajectory to the global origin.
bool isOriginer(double factor=1) const
Checks if the trajectory intersects with the inner radius of the CDC time the given tolerance factor.
double getAbsMom2D() const
Get the estimation for the absolute value of the transvers momentum.
double getPValue() const
Getter for p-value.
double getArcLength2DFrontOffset(const AFromHits &fromHits, const AToHits &toHits) const
Calculates the perpendicular travel distance from the first position of the fromHits to the first pos...
double getTotalArcLength2D(const AHits &hits) const
Calculates the perpendicular travel distance from the first position of the hits to the last position...
Vector2D tangential(const Vector2D &point) const
Tangential vector to the circle near the given position.
HepGeom::Vector3D< double > Vector3D
3D Vector
void setFlightTime(double flightTime)
Setter for the time when the particle reached the support point position.
void setChi2(const double chi2)
Setter for the chi square value of the circle fit.
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
double getMaximalCylindricalR() const
Getter for the maximal distance from the origin.
Vector2D getOuterExit(double factor=1) const
Calculates the point where the trajectory meets the outer wall of the CDC.
double getGlobalImpact() const
Getter for the signed impact parameter of the trajectory.
ISuperLayer getMinimalISuperLayer() const
Indicates the minimal superlayer the trajectory traverses.
size_t getNDF() const
Getter for the number of degrees of freedom of the circle fit.
EPerigeeParameter
Enumeration to address the individual perigee parameters in a vector or matrix.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
const UncertainPerigeeCircle & getLocalCircle() const
Getter for the cirlce in local coordinates.
ISuperLayer getNextISuperLayer() const
Indicates which superlayer the trajectory traverses after the one, where the start point of the traje...
std::size_t ndf() const
Getter for the number of degrees of freediom used in the circle fit.
void reverse()
Reverses the trajectory in place.
Vector2D atArcLength(double arcLength) const
Calculates the point, which lies at the give perpendicular travel distance (counted from the perigee)
ESign getChargeSign() const
Gets the charge sign of the trajectory.
CDCTrajectory2D reversed() const
Returns the reverse trajectory as a copy.
Vector2D getMom2DAtSupport() const
Get the momentum at the support point of the trajectory.
ISuperLayer getStartISuperLayer() const
Indicates the superlayer the trajectory starts in.
double setLocalOrigin(const Vector2D &localOrigin)
Setter for the origin of the local coordinate system.
double arcLengthBetween(const Vector2D &from, const Vector2D &to) const
Calculates the arc length between two points of closest approach on the circle.
double getCurvature() const
Getter for the curvature as seen from the xy projection.
Vector2D getSupport() const
Get the support point of the trajectory in global coordinates.
ESign
Enumeration for the distinct sign values of floating point variables.
double getLocalCovariance(EPerigeeParameter iRow, EPerigeeParameter iCol) const
Getter for an individual element of the covariance matrix of the local helix parameters.
void setChi2(const double chi2)
Setter for the chi square value of the circle fit.
double covariance(const EPerigeeParameter &iRow, const EPerigeeParameter &iCol) const
Getter for individual elements of the covariance matrix.
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
Vector2D getClosest(const Vector2D &point) const
Calculates the closest approach on the trajectory to the given point.
void setGlobalCircle(const UncertainPerigeeCircle &perigeeCircle)
Setter for the generalized circle that describes the trajectory.
bool isCurler(double factor=1) const
Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.
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.
double getLocalVariance(EPerigeeParameter i) const
Getter for an individual diagonal element of the covariance matrix of the local helix parameters.
double getArcLength2DPeriod() const
Getter for the arc length for one round trip around the trajectory.
double dot(const Vector2D &rhs) const
Calculates the two dimensional dot product.
double getChi2() const
Getter for the chi2 value of the circle fit.
Particle trajectory as it is seen in xy projection represented as a circle.
ISuperLayer getISuperLayerAfter(ISuperLayer iSuperLayer, bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...
double getMinimalCylindricalR() const
Getter for the minimal distance from the origin - same as absolute value of the impact parameter.
ISuperLayer getMaximalISuperLayer() const
Indicates the maximal superlayer the trajectory traverses.
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.
void passiveMoveBy(const Vector2D &by)
Moves the coordinate system by the vector by and calculates the new perigee and its covariance matrix...
const Vector2D & getLocalOrigin() const
Getter for the origin of the local coordinate system.
double getFlightTime() const
Getter for the time when the particle reached the support point position.
Vector2D m_localOrigin
Memory for local coordinate origin of the circle representing the trajectory in global coordinates.
Adds an uncertainty matrix to the circle in perigee parameterisation.
Vector2D perigee() const
Getter for the perigee point.
ERightLeft isRightOrLeft(const Vector2D &point) const
Checks if the given point is to the right or to the left of the trajectory.
double chi2() const
Getter for the chi square value of the circle fit.
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...
Vector2D center() const
Getter for the center of the circle. If it was a line both components will be infinity.
ISuperLayer getNextAxialISuperLayer() const
Indicates which axial superlayer the trajectory traverses after the one, where the start point of the...
Abstract base class for different kinds of events.
ISuperLayer getISuperLayerAfterStart(bool movingOutward) const
Returns which superlayer is traversed after the current one following the trajectory outward or inwar...
Vector2D getFlightDirection2D(const Vector2D &point) const
Get the unit direction of flight at the given point, where arcLength2D = 0.
double m_flightTime
Memory for the estimation of the time at which the particle arrived at the support point.
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 ...
void setNDF(std::size_t ndf)
Setter for the number of degrees of freediom used in the circle fit.
double variance(const EPerigeeParameter &i) const
Getter for individual diagonal elements of the covariance matrix.
Extension of the generalized circle also caching the perigee coordinates.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Vector2D getFlightDirection2DAtSupport() const
Get the unit direction of flight at the support point, where arcLength2D = 0.
Vector2D getInnerExit() const
Calculates the point where the trajectory meets the inner wall of the CDC.
double reconstructZ(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the one z postions within the CDC closest to the given z where the given drift circle on the wi...
bool isFitted() const
Checks if the circle is already set to a valid value.
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.
Vector2D getGlobalCenter() const
Getter for the center of the trajectory in global coordinates.
double getArcLength2DGap(const AFromHits &fromHits, const AToHits &toHits) const
Calculates the perpendicular travel distance from the last position of the fromHits to the first posi...
ISuperLayer getPreviousAxialISuperLayer() const
Indicates which axial superlayer the trajectory traverses before the one, where the start point of th...
Vector2D closest(const Vector2D &point) const
Calculates the point of closest approach on the circle to the given point.
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.
double getDist2D(const Vector2D &point) const
Calculates the distance from the point to the trajectory as seen from the xy projection.
bool isMovingOutward() const
Indicates if the trajectory is moving outwards or inwards (to or away from the origin) from the start...
EForwardBackward isForwardOrBackwardTo(const AHits &hits) const
Calculates if this trajectory and the hits are coaligned Returns:
double getArcLength2DBackOffset(const AFromHits &fromHits, const AToHits &toHits) const
Calculates the perpendicular travel distance from the last position of the fromHits to the last posit...
Vector2D getExit() const
Calculates the point where the trajectory leaves the CDC.
Vector2D getPos2DAtArcLength2D(double arcLength2D)
Getter for the position at a given two dimensional arc length.
ERightLeft isRightOrLeft(const Vector2D &point) const
Indicates if the point is on the right or left side of the circle.
double distance(const Vector2D &point) const
Getter for the proper signed distance of the point to the circle.
double curvature() const
Getter for the signed curvature.
UncertainPerigeeCircle m_localPerigeeCircle
Memory for the generalized circle describing the trajectory in coordinates from the local origin.
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.
double arcLengthPeriod() const
Getter for the arc length for a full round of the circle.
void clear()
Clears all information from this trajectoy.
PerigeeCircle getGlobalCircle() const
Getter for the circle in global coordinates.
ISuperLayer getPreviousISuperLayer() const
Indicates which superlayer the trajectory traverses before the one, where the start point of the traj...
CDCTrajectory2D()
Default constructor for ROOT compatibility.