91 const TVector3 start(track.
Start<TVector3>());
92 const TVector3
dir((start - track.
End<TVector3>()).Unit());
95 float sumClosestApproach(0), maxClosestApproach(0);
103 const TVector3 disp(pos - start);
104 const float proj(disp.Dot(
dir));
105 const float thisClosestApproach((disp - proj *
dir).Mag());
107 sumClosestApproach += thisClosestApproach;
108 maxClosestApproach = std::max(maxClosestApproach, thisClosestApproach);
112 return ScatterClosestApproach();
114 const float meanClosestApproach(sumClosestApproach /
counter);
123 const TVector3 disp(pos - start);
124 const float proj(disp.Dot(
dir));
125 const float thisClosestApproach((disp - proj *
dir).Mag());
126 const float thisClosestApproachDev(thisClosestApproach - meanClosestApproach);
128 sumStdDev += thisClosestApproachDev * thisClosestApproachDev;
131 const float stdDevClosestApproach(std::sqrt(sumStdDev /
counter));
133 return ScatterClosestApproach(meanClosestApproach, stdDevClosestApproach, maxClosestApproach);
Point_t const & LocationAtPoint(size_t i) const
bool HasValidPoint(size_t i) const
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Point_t const & Start() const
Access to track position at different points.
Point_t const & End() const