Belle II Software development
HelixUtils.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * External Contributor: Wouter Hulsbergen *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9#pragma once
10
11#include <string>
12
13#include <Eigen/Core>
14
15#include <Math/Vector3D.h>
16
17namespace Belle2 {
22 class Helix;
24}
25
26namespace TreeFitter {
27
30 class HelixUtils {
31
32 public:
33
35 enum VertexCoor {iX = 0, iY, iZ, iPx, iPy, iPz} ;
36
38 enum HelixCoor {iD0 = 0, iPhi0, iOmega, iZ0, iTanLambda, iArcLength2D} ;
39
41 static void helixFromVertexNumerical(const Eigen::Matrix<double, 3, 1>& position,
42 const Eigen::Matrix<double, 3, 1>& momentum,
43 int charge, double Bz,
44 Belle2::Helix& helix,
45 double& flt,
46 Eigen::Matrix<double, 5, 6>& jacobian);
47
51 static void getJacobianToCartesianFrameworkHelix(Eigen::Matrix<double, 5, 6>& jacobian,
52 const double x,
53 const double y,
54 const double z,
55 const double px,
56 const double py,
57 const double pz,
58 const double bfield,
59 const double charge
60 );
61
63 static void getHelixAndJacobianFromVertexNumerical(const Eigen::Matrix<double, 1, 6>& positionAndMom,
64 int charge, double Bz,
65 Belle2::Helix& helix,
66 Eigen::Matrix<double, 5, 6>& jacobian);
67
69 static void getJacobianFromVertexNumerical(const Eigen::Matrix<double, 1, 6>& positionAndMom,
70 int charge, double Bz,
71 const Belle2::Helix& helix,
72 Eigen::Matrix<double, 5, 6>& jacobian,
73 double delta = 1e-5
74 );
75
77 static void helixFromVertex(const Eigen::Matrix<double, 1, 6>& positionAndMomentum,
78 int charge, double Bz,
79 Belle2::Helix& helix,
80 double& L,
81 Eigen::Matrix<double, 5, 6>& jacobian);
82
83
85 static void vertexFromHelix(const Belle2::Helix& helix,
86 double L, double Bz,
87 ROOT::Math::XYZVector& position,
88 ROOT::Math::XYZVector& momentum, int& charge);
89
91 static std::string helixParName(int i) ;
92
94 static std::string vertexParName(int i) ;
95
97 static void printVertexPar(const ROOT::Math::XYZVector& position, const ROOT::Math::XYZVector& momentum, int charge) ;
98
100 static double helixPoca(const Belle2::Helix& helix1,
101 const Belle2::Helix& helix2,
102 double& flt1, double& flt2,
103 Eigen::Vector3d& vertex, bool parallel = false) ;
104
106 static double helixPoca(const Belle2::Helix& helix, const ROOT::Math::XYZVector& point,
107 double& flt) ;
108
110 static double phidomain(const double phi) ;
111
112 } ;
113
114}
Helix parameter class.
Definition Helix.h:48
utility for helix<->x,p conversions
Definition HelixUtils.h:30
static std::string vertexParName(int i)
map of the vertex parameters by list index
static void printVertexPar(const ROOT::Math::XYZVector &position, const ROOT::Math::XYZVector &momentum, int charge)
Print the vertex parameters.
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
Definition HelixUtils.cc:34
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 vertexFromHelix(const Belle2::Helix &helix, double L, double Bz, ROOT::Math::XYZVector &position, ROOT::Math::XYZVector &momentum, int &charge)
helix --> vertex
Definition HelixUtils.cc:24
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 std::string helixParName(int i)
map of the helix parameters by list index
Definition HelixUtils.cc:93
static double phidomain(const double phi)
the domain of phi
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.
HelixCoor
Parameters of the helix.
Definition HelixUtils.h:38
static double helixPoca(const Belle2::Helix &helix1, const Belle2::Helix &helix2, double &flt1, double &flt2, Eigen::Vector3d &vertex, bool parallel=false)
POCA between two tracks.
VertexCoor
Parameters of the vertex.
Definition HelixUtils.h:35
Abstract base class for different kinds of events.