Belle II Software  release-06-00-14
HelixUtils Class Reference

utility for helix<->x,p conversions More...

#include <HelixUtils.h>

Public Types

enum  VertexCoor {
  iX = 0 ,
  iY ,
  iZ ,
  iPx ,
  iPy ,
  iPz
}
 Parameters of the vertex

 
enum  HelixCoor {
  iD0 = 0 ,
  iPhi0 ,
  iOmega ,
  iZ0 ,
  iTanLambda ,
  iArcLength2D
}
 Parameters of the helix.
 

Static Public Member Functions

static void helixFromVertexNumerical (const Eigen::Matrix< double, 3, 1 > &position, const Eigen::Matrix< double, 3, 1 > &momentum, int charge, double Bz, Belle2::Helix &helix, double &flt, Eigen::Matrix< double, 5, 6 > &jacobian)
 get helix from a vertex
 
static void getJacobianToCartesianFrameworkHelix (Eigen::Matrix< double, 5, 6 > &jacobian, const double x, const double y, const double z, const double px, const double py, const double pz, const double bfield, const double charge)
 get the jacobian dh={helix pars}/dx={x,y,z,px,py,pz} for the implementation of the framework helix. More...
 
static void getHelixAndJacobianFromVertexNumerical (const Eigen::Matrix< double, 1, 6 > &positionAndMom, int charge, double Bz, Belle2::Helix &helix, Eigen::Matrix< double, 5, 6 > &jacobian)
 get helix and jacobian from a vertex
 
static void getJacobianFromVertexNumerical (const Eigen::Matrix< double, 1, 6 > &positionAndMom, int charge, double Bz, const Belle2::Helix &helix, Eigen::Matrix< double, 5, 6 > &jacobian, double delta=1e-5)
 get jacobian from a vertex
 
static void helixFromVertex (const Eigen::Matrix< double, 1, 6 > &positionAndMomentum, int charge, double Bz, Belle2::Helix &helix, double &L, Eigen::Matrix< double, 5, 6 > &jacobian)
 vertex --> helix
 
static void vertexFromHelix (const Belle2::Helix &helix, double L, double Bz, TVector3 &position, TVector3 &momentum, int &charge)
 helix --> vertex
 
static std::string helixParName (int i)
 map of the helix parameters by list index
 
static std::string vertexParName (int i)
 map of the vertex parameters by list index
 
static void printVertexPar (const TVector3 &position, const TVector3 &momentum, int charge)
 Print the vertex parameters.
 
static double helixPoca (const Belle2::Helix &helix1, const Belle2::Helix &helix2, double &flt1, double &flt2, TVector3 &vertex, bool parallel=false)
 POCA between two tracks.
 
static double helixPoca (const Belle2::Helix &helix, const TVector3 &point, double &flt)
 POCA between a track and a point.
 
static double phidomain (const double phi)
 the domain of phi
 

Detailed Description

utility for helix<->x,p conversions

Definition at line 19 of file HelixUtils.h.

Member Function Documentation

◆ getJacobianToCartesianFrameworkHelix()

void getJacobianToCartesianFrameworkHelix ( Eigen::Matrix< double, 5, 6 > &  jacobian,
const double  x,
const double  y,
const double  z,
const double  px,
const double  py,
const double  pz,
const double  bfield,
const double  charge 
)
static

get the jacobian dh={helix pars}/dx={x,y,z,px,py,pz} for the implementation of the framework helix.

WARNING only valid right after initialisation!

Definition at line 379 of file HelixUtils.cc.

390  {
391  const double alpha = 1.0 / (bfield * Belle2::Const::speedOfLight) * 1E4;
392  const double aq = charge / alpha;
393 
394  const double pt = std::hypot(px, py);
395  const double pt2 = pt * pt;
396  const double pt3 = pt2 * pt;
397  const double aq2 = aq * aq;
398 
399  const double x2 = x * x;
400  const double y2 = y * y;
401  const double r = x2 + y2;
402 
403  const double px2 = px * px;
404  const double py2 = py * py;
405 
406  const double px0 = px - aq * y;
407  const double py0 = py + aq * x;
408 
409  const double pt02 = px0 * px0 + py0 * py0;
410  const double pt0 = std::sqrt(pt02);
411  double sqrt13 = pt0 / pt;
412 
413  // D d0 / Dx_i
414  jacobian(0, 0) = py0 / pt0;
415  jacobian(0, 1) = -px0 / pt0;
416  jacobian(0, 2) = 0;
417  jacobian(0, 3) = (-(y * (aq2 * r + 2 * aq * py * x + 2 * py2 * (1 + sqrt13))) - px * (2 * py * x * (1 + sqrt13) + aq * (y2 *
418  (-1 + sqrt13) + x2 * (1 + sqrt13)))) /
419  (pt2 * pt0 * (1 + sqrt13) * (1 + sqrt13));
420 
421  jacobian(0, 4) = (2 * px2 * x * (1 + sqrt13) + 2 * px * y * (py - aq * x + py * sqrt13) + aq * (aq * r * x - py * (x2 *
422  (-1 + sqrt13) + y2 * (1 + sqrt13)))) /
423  (pt2 * pt0 * (1 + sqrt13) * (1 + sqrt13));
424  jacobian(0, 5) = 0;
425 
426  // D phi0 / Dx_i0;
427  jacobian(1, 0) = aq * px0 / pt02;
428  jacobian(1, 1) = aq * py0 / pt02;
429  jacobian(1, 2) = 0;
430  jacobian(1, 3) = -py0 / pt02;
431  jacobian(1, 4) = px0 / pt02;
432  jacobian(1, 5) = 0;
433 
434  // D omega / Dx_i
435  jacobian(2, 0) = 0;
436  jacobian(2, 1) = 0;
437  jacobian(2, 2) = 0;
438  jacobian(2, 3) = - aq * px / pt3;
439  jacobian(2, 4) = - aq * py / pt3;
440  jacobian(2, 5) = 0;
441 
442  // D z0 / Dx_i
443  jacobian(3, 0) = -pz * px0 / pt02;
444  jacobian(3, 1) = -pz * py0 / pt02;
445  jacobian(3, 2) = 1;
446  jacobian(3, 3) = (pz * (px2 * x - py * (aq * r + py * x) + 2 * px * py * y)) / (pt2 * pt02);
447  jacobian(3, 4) = (pz * (px * (aq * r + 2 * py * x) - px2 * y + py2 * y)) / (pt2 * pt02);
448  jacobian(3, 5) = std::atan2(-(aq * (px * x + py * y)), (px2 + py * py0 - aq * px * y)) / aq; //pt on num. and denom cancels.
449 
450  // D tan lambda / Dx_i
451  jacobian(4, 0) = 0;
452  jacobian(4, 1) = 0;
453  jacobian(4, 2) = 0;
454  jacobian(4, 3) = -pz * px / pt3;
455  jacobian(4, 4) = -pz * py / pt3;
456  jacobian(4, 5) = 1. / pt;
457  }
static const double speedOfLight
[cm/ns]
Definition: Const.h:575
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:44

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