11#include <Math/Functor.h>
12#include <Math/BrentMinimizer1D.h>
13#include <Math/Vector3D.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 ROOT::Math::XYZVector& poca,
const ROOT::Math::XYZVector& momentum_in_poca,
int charge):
44 const double pt = momentum_in_poca.Rho();
47 const ROOT::Math::XYZVector& 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.Rho();
75 ROOT::Math::BrentMinimizer1D bm;
87 double pathLengthToLine(
const ROOT::Math::XYZVector& a,
const ROOT::Math::XYZVector& b)
const
96 ROOT::Math::BrentMinimizer1D bm;
102 return bm.XMinimum();
112 return ROOT::Math::XYZVector(
123 return m_poca + ROOT::Math::XYZVector(
Helper class representing a helical track.
float m_z0
minimal z distance of point of closest approach to origin
double pathLengthToPoint(const ROOT::Math::XYZVector &p) const
returns the path length (along the helix) to the helix point closest to p.
float m_omega
signed curvature
ROOT::Math::XYZVector momentum(double s=0) const
momentum of the particle, at the helix point corresponding to a flown path length s (from poca).
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].
double pathLengthToLine(const ROOT::Math::XYZVector &a, const ROOT::Math::XYZVector &b) const
returns the path length (along the helix) to the helix point closest to the line going through points...
ROOT::Math::XYZVector position(double s) const
point on helix corresponding to a flown path length s (from poca)
static constexpr double c_cTimesB
magnetic filed times speed of light
HelixHelper(const ROOT::Math::XYZVector &poca, const ROOT::Math::XYZVector &momentum_in_poca, int charge)
construct a helix at an arbitrary position 'poca' (helices built at different points are not comparab...
static double distanceToLine(double s)
same as distanceToPoint, but ignoring z coordinate
float m_cotTheta
cotangens of polar angle
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
ROOT::Math::XYZVector m_poca
point of closest approach to origin
static constexpr double c_maxFlightLength
maximal path length (from origin) considered for extrapolation
static ROOT::Math::XYZVector minimize_distance_to_line_b
second 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 ROOT::Math::XYZVector minimize_distance_to_line_a
first user supplied line we're trying to find the nearest helix point to
static ROOT::Math::XYZVector minimize_distance_to_point
user supplied point we're trying to find the nearest helix point to
Abstract base class for different kinds of events.