12 #include <Math/Functor.h>
13 #include <Math/BrentMinimizer1D.h>
29 constexpr
static double c_cTimesB = (1.5 * 0.00299792458);
34 HelixHelper(
float z0,
float d0,
float omega,
float cotTheta,
float phi):
36 m_poca(d0 * sin(phi), -d0 * cos(phi), z0)
41 HelixHelper(
const TVector3& poca,
const TVector3& momentum_in_poca,
int charge):
44 const double pt = momentum_in_poca.Pt();
47 const TVector3& dirInPoca = momentum_in_poca.Unit();
50 m_phi = atan2(dirInPoca.y() , dirInPoca.x());
54 const double d0Sign = TMath::Sign(1., poca.x() * dirInPoca.x()
55 + poca.y() * dirInPoca.y());
58 m_d0 = d0Sign * poca.Perp();
75 ROOT::Math::BrentMinimizer1D bm;
96 ROOT::Math::BrentMinimizer1D bm;
102 return bm.XMinimum();
Helper class representing a helical track.
float m_z0
minimal z distance of point of closest approach to origin
float m_omega
signed curvature
TVector3 m_poca
point of closest approach to origin
TVector3 position(double s) const
point on helix corresponding to a flown path length s (from poca)
constexpr static double c_maxFlightLength
maximal path length (from origin) considered for extrapolation
HelixHelper(float z0, float d0, float omega, float cotTheta, float phi)
construct a helix with given helix parameters, as defined for Track objects
float m_phi
Phi at the perigee [-pi, pi].
TVector3 momentum(double s=0) const
momentum of the particle, at the helix point corresponding to a flown path length s (from poca).
constexpr static double c_cTimesB
magnetic filed times speed of light
HelixHelper(const TVector3 &poca, const TVector3 &momentum_in_poca, int charge)
construct a helix at an arbitrary position 'poca' (helices built at different points are not comparab...
double pathLengthToPoint(const TVector3 &p) const
returns the path length (along the helix) to the helix point closest to p.
static double distanceToLine(double s)
same as distanceToPoint, but ignoring z coordinate
float m_cotTheta
cotangens of polar angle
double pathLengthToLine(const TVector3 &a, const TVector3 &b) const
returns the path length (along the helix) to the helix point closest to the line going through points...
static double distanceToPoint(double s)
minimization function, calculates distance to minimize_distance_to_point
float m_d0
minimal r distance of point of closest approach to origin
static TVector3 minimize_distance_to_line_a
first user supplied line we're trying to find the nearest helix point to
static HelixHelper const * helix_object
keep a 'this' pointer around for minimization
static TVector3 minimize_distance_to_point
user supplied point we're trying to find the nearest helix point to
static TVector3 minimize_distance_to_line_b
second user supplied line we're trying to find the nearest helix point to
Abstract base class for different kinds of events.