8#include <tracking/trackFindingCDC/filters/facetRelation/BendFacetRelationVarSet.h>
10#include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
13using namespace TrackFindingCDC;
17 if (not ptrFacetRelation)
return false;
20 const CDCFacet& fromFacet = *facetRelation.first;
21 const CDCFacet& toFacet = *facetRelation.second;
56 const double sAB = fromAB;
57 const double sBC = (fromBC + toBC) / 2;
58 const double sCD = toCD;
60 const double sAC = fromAC;
61 const double sBD = toBD;
65 const double fromDeltaPhi =
67 const double toDeltaPhi =
70 const double deltaPhi = fromDeltaPhi - toDeltaPhi;
72 const double fromCurv = 2 * fromDeltaPhi / sAC;
73 const double toCurv = 2 * toDeltaPhi / sBD;
74 const double deltaCurv = toCurv - fromCurv;
76 const double dPhiA = 1 / sAB;
77 const double dPhiB = 1 / sAB + 2 / sBC;
78 const double dPhiC = 1 / sCD + 2 / sBC;
79 const double dPhiD = 1 / sCD;
81 const double dCurvA = 2 / sAC / sAB;
82 const double dCurvB = 2 / sAC / sAB + (2 / sAC + 2 / sBD) / sBC;
83 const double dCurvC = 2 / sBD / sCD + (2 / sAC + 2 / sBD) / sBC;
84 const double dCurvD = 2 / sBD / sCD;
86 const double varLA = fromStartVarL;
87 const double varLB = (fromMiddleVarL + toStartVarL) / 2;
88 const double varLC = (fromEndVarL + toMiddleVarL) / 2;
89 const double varLD = toEndVarL;
91 const double deltaPhiVar =
92 varLA * dPhiA * dPhiA +
93 varLB * dPhiB * dPhiB +
94 varLC * dPhiC * dPhiC +
95 varLD * dPhiD * dPhiD;
97 const double deltaCurvVar =
98 varLA * dCurvA * dCurvA +
99 varLB * dCurvB * dCurvB +
100 varLC * dCurvC * dCurvC +
101 varLD * dCurvD * dCurvD;
103 const double deltaCurvPull = deltaCurv / std::sqrt(deltaCurvVar);
104 const double deltaPhiPull = deltaPhi / std::sqrt(deltaPhiVar);
106 var<
named(
"delta_phi")>() = std::fabs(deltaPhi);
107 var<
named(
"delta_phi_pull")>() = std::fabs(deltaPhiPull);
108 var<
named(
"delta_curv")>() = std::fabs(deltaCurv);
109 var<
named(
"delta_curv_pull")>() = std::fabs(deltaCurvPull);
112 var<
named(
"delta_phi_pull_per_r")>() = std::fabs(deltaPhiPull) / r;
113 var<
named(
"delta_curv_pull_per_r")>() = std::fabs(deltaCurvPull) / r;
bool extract(const Relation< const CDCFacet > *ptrFacetRelation) final
Generate and assign the contained variables.
Class representing a triple of neighboring oriented wire with additional trajectory information.
ParameterLine2D getStartToEndLine() const
Getter for the tangential line from the first to the third hit.
Vector2D getMiddleRecoPos2D() const
Getter for the reconstructed position at the second hit on the fit line.
ParameterLine2D getStartToMiddleLine() const
Getter for the tangential line from the first to the second hit.
ParameterLine2D getMiddleToEndLine() const
Getter for the tangential line from the second to the third hit.
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
CDCRLWireHit & getEndRLWireHit()
Getter for the third oriented wire hit.
CDCRLWireHit & getMiddleRLWireHit()
Getter for the second oriented wire hit.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
double getRefDriftLengthVariance() const
Getter for the variance of the drift length at the reference position of the wire.
A line with a support point and tangential vector.
const Vector2D & tangential() const
Gives the tangential vector of the line.
Type for two related objects.
static constexpr int named(const char *name)
Getter for the index from the name.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
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.