Belle II Software  release-08-01-10
HelixHelper Class Reference

Helper class representing a helical track. More...

#include <HelixHelper.h>

Collaboration diagram for HelixHelper:

Public Member Functions

 HelixHelper (float z0, float d0, float omega, float cotTheta, float phi)
 construct a helix with given helix parameters, as defined for Track objects
 
 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 comparable)
 
double pathLengthToPoint (const ROOT::Math::XYZVector &p) const
 returns the path length (along the helix) to the helix point closest to p. More...
 
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 a and b.
 
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).
 
ROOT::Math::XYZVector position (double s) const
 point on helix corresponding to a flown path length s (from poca)
 

Static Private Member Functions

static double distanceToPoint (double s)
 minimization function, calculates distance to minimize_distance_to_point
 
static double distanceToLine (double s)
 same as distanceToPoint, but ignoring z coordinate
 

Private Attributes

float m_z0
 minimal z distance of point of closest approach to origin
 
float m_d0
 minimal r distance of point of closest approach to origin
 
float m_omega
 signed curvature
 
float m_cotTheta
 cotangens of polar angle
 
float m_phi
 Phi at the perigee [-pi, pi].
 
ROOT::Math::XYZVector m_poca
 point of closest approach to origin
 

Static Private Attributes

constexpr static double c_cTimesB = (1.5 * 0.00299792458)
 magnetic filed times speed of light
 
constexpr static double c_maxFlightLength = 150.0
 maximal path length (from origin) considered for extrapolation
 
static ROOT::Math::XYZVector minimize_distance_to_point
 user supplied point we're trying to find the nearest helix point to
 
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_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
 

Detailed Description

Helper class representing a helical track.

It is used as an alternative to Genfit's track representation and provides much faster replacements for its extrapolateToLine/ extrapolateToPoint() methods.

Definition at line 28 of file HelixHelper.h.

Member Function Documentation

◆ pathLengthToPoint()

double pathLengthToPoint ( const ROOT::Math::XYZVector &  p) const
inline

returns the path length (along the helix) to the helix point closest to p.

a path length of 0 corresponds to p = poca

Definition at line 68 of file HelixHelper.h.

69  {
71  helix_object = this; //ok, this is ugly
72  //TODO create a functor object to wrap everything up
73 
74  ROOT::Math::Functor1D functor(&distanceToPoint);
75  ROOT::Math::BrentMinimizer1D bm;
76  bm.SetFunction(functor, 0.0, c_maxFlightLength);
77  bm.Minimize(100); //#iterations, abs. error, rel. error
78 
79  //bm.FValMinimum() is shortest distance
80  //bm.XMinimum() is corresponding path length
81  return bm.XMinimum();
82  }
constexpr static double c_maxFlightLength
maximal path length (from origin) considered for extrapolation
Definition: HelixHelper.h:30
static double distanceToPoint(double s)
minimization function, calculates distance to minimize_distance_to_point
Definition: HelixHelper.h:147
static HelixHelper const * helix_object
keep a 'this' pointer around for minimization
Definition: HelixHelper.h:168
static ROOT::Math::XYZVector minimize_distance_to_point
user supplied point we're trying to find the nearest helix point to
Definition: HelixHelper.h:162

The documentation for this class was generated from the following file: