#include <alpaka/alpaka.hpp>
#include <Eigen/Core>
#include <Eigen/Eigenvalues>
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"
#include "RecoTracker/PixelTrackFitting/interface/alpaka/FitUtils.h"
Go to the source code of this file.
Classes | |
class | riemannFit::helixFit< N > |
Helix fit by three step: -fast pre-fit (see Fast_fit() for further info); -circle fit of hits projected in the transverse plane by Riemann-Chernov algorithm (see Circle_fit() for further info); -line fit of hits projected on cylinder surface by orthogonal distance regression (see Line_fit for further info). Points must be passed ordered (from inner to outer layer). More... | |
Namespaces | |
ALPAKA_ACCELERATOR_NAMESPACE::riemannFit | |
riemannFit | |
Functions | |
template<typename TAcc , typename M2xN > | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE int32_t | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::charge (const TAcc &acc, const M2xN &p2D, const Vector3d &par_uvr) |
Find particle q considering the sign of cross product between particles velocity (estimated by the first 2 hits) and the vector radius between the first hit and the center of the fitted circle. More... | |
template<typename TAcc , typename M2xN , typename V4 , int N> | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE CircleFit | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::circleFit (const TAcc &acc, const M2xN &hits2D, const Matrix2Nd< N > &hits_cov2D, const V4 &fast_fit, const VectorNd< N > &rad, const double bField, const bool error) |
Fit a generic number of 2D points with a circle using Riemann-Chernov algorithm. Covariance matrix of fitted parameter is optionally computed. Multiple scattering (currently only in barrel layer) is optionally handled. More... | |
template<typename TAcc , typename VNd1 , typename VNd2 > | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE void | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::computeRadLenUniformMaterial (const TAcc &acc, const VNd1 &length_values, VNd2 &rad_lengths) |
template<typename TAcc , typename M2xN , int N> | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE VectorNd< N > | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cov_carttorad (const TAcc &acc, const M2xN &p2D, const Matrix2Nd< N > &cov_cart, const VectorNd< N > &rad) |
Transform covariance matrix from Cartesian coordinates (only transverse plane component) to radial coordinates (both radial and tangential component but only diagonal terms, correlation between different point are not managed). More... | |
template<typename TAcc , typename M2xN , typename V4 , int N> | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE VectorNd< N > | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cov_carttorad_prefit (const TAcc &acc, const M2xN &p2D, const Matrix2Nd< N > &cov_cart, V4 &fast_fit, const VectorNd< N > &rad) |
Transform covariance matrix from Cartesian coordinates (only transverse plane component) to coordinates system orthogonal to the pre-fitted circle in each point. Further information in attached documentation. More... | |
template<typename TAcc , typename M2xN , int N> | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE Matrix2Nd< N > | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cov_radtocart (const TAcc &acc, const M2xN &p2D, const MatrixNd< N > &cov_rad, const VectorNd< N > &rad) |
Transform covariance matrix from radial (only tangential component) to Cartesian coordinates (only transverse plane component). More... | |
template<typename TAcc , typename M3xN , typename V4 > | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE void | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::fastFit (const TAcc &acc, const M3xN &hits, V4 &result) |
A very fast helix fit: it fits a circle by three points (first, middle and last point) and a line by two points (first and last). More... | |
template<typename TAcc , typename M3xN , typename M6xN , typename V4 > | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE LineFit | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::lineFit (const TAcc &acc, const M3xN &hits, const M6xN &hits_ge, const CircleFit &circle, const V4 &fast_fit, const double bField, const bool error) |
Perform an ordinary least square fit in the s-z plane to compute the parameters cotTheta and Zip. More... | |
template<typename TAcc > | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE Vector2d | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::min_eigen2D (const TAcc &acc, const Matrix2d &aMat, double &chi2) |
2D version of min_eigen3D(). More... | |
template<typename TAcc > | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE Vector3d | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::min_eigen3D (const TAcc &acc, const Matrix3d &A, double &chi2) |
Compute the eigenvector associated to the minimum eigenvalue. More... | |
template<typename TAcc > | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE Vector3d | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::min_eigen3D_fast (const TAcc &acc, const Matrix3d &A) |
A faster version of min_eigen3D() where double precision is not needed. More... | |
template<typename TAcc , typename M2xN , typename V4 , int N> | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE MatrixNd< N > | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::scatter_cov_rad (const TAcc &acc, const M2xN &p2D, const V4 &fast_fit, VectorNd< N > const &rad, double B) |
Compute the covariance matrix (in radial coordinates) of points in the transverse plane due to multiple Coulomb scattering. More... | |
template<typename TAcc , typename V4 , typename VNd1 , typename VNd2 , int N> | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE auto | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::scatterCovLine (const TAcc &acc, Matrix2d const *cov_sz, const V4 &fast_fit, VNd1 const &s_arcs, VNd2 const &z_values, const double theta, const double bField, MatrixNd< N > &ret) |
Compute the covariance matrix along cartesian S-Z of points due to multiple Coulomb scattering to be used in the line_fit, for the barrel and forward cases. The input covariance matrix is in the variables s-z, original and unrotated. The multiple scattering component is computed in the usual linear approximation, using the 3D path which is computed as the squared root of the squared sum of the s and z components passed in. Internally a rotation by theta is performed and the covariance matrix returned is the one in the direction orthogonal to the rotated S3D axis, i.e. along the rotated Z axis. The choice of the rotation is not arbitrary, but derived from the fact that putting the horizontal axis along the S3D direction allows the usage of the ordinary least squared fitting techiques with the trivial parametrization y = mx + q, avoiding the patological case with m = +/- inf, that would correspond to the case at eta = 0. More... | |
template<typename TAcc , int N> | |
ALPAKA_FN_ACC ALPAKA_FN_INLINE VectorNd< N > | ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::weightCircle (const TAcc &acc, const MatrixNd< N > &cov_rad_inv) |
Compute the points' weights' vector for the circle fit when multiple scattering is managed. Further information in attached documentation. More... | |