8 #include <tracking/trackFindingCDC/filters/trackRelation/HitGapTrackRelationVarSet.h>
10 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
12 #include <tracking/trackFindingCDC/numerics/Angle.h>
15 using namespace TrackFindingCDC;
19 if (not ptrTrackRelation)
return false;
26 const CDCTrack& fromTrack = *ptrFromTrack;
27 const CDCTrack& toTrack = *ptrToTrack;
41 const Vector3D hitPosGap = toFirstHitPos - fromLastHitPos;
42 const Vector3D longHitPosGap = toLastHitPos - fromFirstHitPos;
44 const double hitDistance = hitPosGap.
norm();
45 const double longHitDistance = longHitPosGap.
norm();
53 double fromLastHitAlpha = fromLastHit.
getAlpha();
54 double toFirstHitAlpha = toFirstHit.
getAlpha();
62 finitevar<
named(
"delta_hit_distance")>() = longHitDistance - hitDistance;
68 const Vector3D fromStretch = fromLastHitPos - fromFirstHitPos;
69 const Vector3D toStretch = toLastHitPos - toFirstHitPos;
71 const double fromLength = fromStretch.
norm();
72 const double toLength = toStretch.
norm();
74 const Vector3D firstPosGap = toFirstHitPos - fromFirstHitPos;
75 const Vector3D lastPosGap = toLastHitPos - fromLastHitPos;
77 const double firstOffset = firstPosGap.
norm();
78 const double lastOffset = lastPosGap.
norm();
81 firstOffset * lastOffset - longHitDistance * hitDistance - fromLength * toLength;
Class representing a three dimensional reconstructed hit.
double getAlpha() const
Getter for the direction of flight relative to the position.
Vector2D getFlightDirection2D() const
Getter for the direction of flight.
const Vector3D & getRecoPos3D() const
Getter for the 3d position of the hit.
Class representing a sequence of three dimensional reconstructed hits.
bool extract(const Relation< const CDCTrack > *ptrTrackRelation) final
Generate and assign the contained variables.
Type for two related objects.
To * getTo() const
Getter for the pointer to the to side object.
From * getFrom() const
Getter for the pointer to the from side object.
constexpr static int named(const char *name)
Getter for the index from the name.
AssignFinite< Float_t > finitevar()
Reference getter for the value of the ith variable. Transforms non-finite values to finite value.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
double dot(const Vector2D &rhs) const
Calculates the two dimensional dot product.
static Vector2D average(const Vector2D &one, const Vector2D &two)
Constructs the average of two vectors.
double angleWith(const Vector2D &rhs) const
The angle between this and rhs.
A three dimensional vector.
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
double angleWith(const Vector3D &rhs) const
The angle between this and rhs.
double norm() const
Calculates the length of the vector.
double z() const
Getter for the z coordinate.
Abstract base class for different kinds of events.
static double normalised(const double angle)
Normalise an angle to lie in the range from [-pi, pi].