8 #include <tracking/trackFindingCDC/filters/axialSegmentPair/HitGapAxialSegmentPairVarSet.h>
10 #include <tracking/trackFindingCDC/eventdata/tracks/CDCAxialSegmentPair.h>
11 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12 #include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit2D.h>
14 #include <tracking/trackFindingCDC/numerics/Angle.h>
17 using namespace TrackFindingCDC;
21 if (not ptrAxialSegmentPair)
return false;
43 const Vector2D hitPosGap = toFirstHitPos - fromLastHitPos;
44 const Vector2D longHitPosGap = toLastHitPos - fromFirstHitPos;
46 const double hitDistance = hitPosGap.
norm();
47 const double longHitDistance = longHitPosGap.
norm();
55 double fromLastHitAlpha = fromLastHit.
getAlpha();
56 double toFirstHitAlpha = toFirstHit.
getAlpha();
62 finitevar<
named(
"delta_hit_distance")>() = longHitDistance - hitDistance;
68 const Vector2D fromStretch = fromLastHitPos - fromFirstHitPos;
69 const Vector2D toStretch = toLastHitPos - toFirstHitPos;
71 const double fromLength = fromStretch.
norm();
72 const double toLength = toStretch.
norm();
74 const Vector2D firstPosGap = toFirstHitPos - fromFirstHitPos;
75 const Vector2D 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 pair of reconstructed axial segements in adjacent superlayer.
const CDCAxialSegment2D * getStartSegment() const
Getter for the start segment.
const CDCAxialSegment2D * getEndSegment() const
Getter for the end segment.
Class representing a two dimensional reconstructed hit in the central drift chamber.
double getAlpha() const
Getter for the direction of flight relative to the position.
Vector2D getFlightDirection2D() const
Getter for the direction of flight.
Vector2D getRecoPos2D() const
Getter for the position in the reference plane.
A reconstructed sequence of two dimensional hits in one super layer.
bool extract(const CDCAxialSegmentPair *ptrAxialSegmentPair) override
Generate and assign the contained variables.
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.
double norm() const
Calculates the length of the vector.
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].