7 #include <cuda_runtime.h> 18 template <
typename TrackerTraits>
20 template <
typename TrackerTraits>
22 template <
typename TrackerTraits>
25 template <
int N,
typename TrackerTraits>
30 double *__restrict__
phits,
34 constexpr uint32_t hitsInFit =
N;
52 auto tuple_idx = local_idx +
offset;
68 for (
unsigned int i = 0;
i < hitsInFit; ++
i) {
71 hh.cpeParams().detParams(
hh[
hit].detectorIndex()).frame.toGlobal(
hh[
hit].xerrLocal(), 0,
hh[
hit].yerrLocal(), ge);
74 hits_ge.col(
i) << ge[0], ge[1], ge[2], ge[3], ge[4], ge[5];
79 assert(fast_fit(0) == fast_fit(0));
80 assert(fast_fit(1) == fast_fit(1));
81 assert(fast_fit(2) == fast_fit(2));
82 assert(fast_fit(3) == fast_fit(3));
86 template <
int N,
typename TrackerTraits>
90 double *__restrict__
phits,
104 auto tuple_idx = local_idx +
offset;
127 template <
int N,
typename TrackerTraits>
132 double *__restrict__
phits,
146 auto tuple_idx = local_idx +
offset;
173 printf(
"kernelLineFit size %d for %d hits circle.par(0,1,2): %d %f,%f,%f\n",
180 printf(
"kernelLineFit line.par(0,1): %d %f,%f\n", tkid, line_fit.par(0), line_fit.par(1));
181 printf(
"kernelLineFit chi2 cov %f/%f %e,%e,%e,%e,%e\n",
uint32_t double OutputSoAView< TrackerTraits > results_view
Vector3d par
parameter: (X0,Y0,R)
TrackSoAView< TrackerTraits > OutputSoAView
__host__ __device__ LineFit lineFit(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...
typename TrackSoA< TrackerTraits >::HitContainer Tuples
__host__ __device__ CircleFit circleFit(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...
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t TrackingRecHitSoAConstView< TrackerTraits > double *__restrict__ float *__restrict__ double *__restrict__ uint32_t offset
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t TrackingRecHitSoAConstView< TrackerTraits > double *__restrict__ float *__restrict__ phits_ge
Eigen::Matrix< double, N, 1 > VectorNd
Eigen::Map< Matrix3xNd< N >, 0, Eigen::Stride< 3 *stride, stride > > Map3xNd
uint32_t double double *__restrict__ float *__restrict__ double *__restrict__ pfast_fit_input
TupleMultiplicity< TrackerTraits > const *__restrict__ tupleMultiplicity
Abs< T >::type abs(const T &t)
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t TrackingRecHitSoAConstView< TrackerTraits > double *__restrict__ float *__restrict__ double *__restrict__ pfast_fit
Eigen::Map< Matrix6xNf< N >, 0, Eigen::Stride< 6 *stride, stride > > Map6xNf
Eigen::Matrix< double, 2 *N, 2 *N > Matrix2Nd
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t TrackingRecHitSoAConstView< TrackerTraits > hh
typename TrackingRecHitSoA< TrackerTraits >::template TrackingRecHitSoALayout<>::ConstView TrackingRecHitSoAConstView
Eigen::Map< Vector4d, 0, Eigen::InnerStride< stride > > Map4d
auto const & foundNtuplets
uint32_t double double *__restrict__ float *__restrict__ double *__restrict__ riemannFit::CircleFit * circle_fit
__host__ __device__ void fromCircleToPerigee(CircleFit &circle)
Transform circle parameter from (X0,Y0,R) to (phi,Tip,q/R) and consequently covariance matrix...
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::View TrackSoAView
__host__ __device__ void loadCovariance2D(M6xNf const &ge, M2Nd &hits_cov)
static constexpr __host__ __device__ void copyFromCircle(TrackSoAView &tracks, V3 const &cp, M3 const &ccov, V2 const &lp, M2 const &lcov, float b, int32_t i)
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t TrackingRecHitSoAConstView< TrackerTraits > double *__restrict__ phits
__host__ __device__ void fastFit(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 ...
constexpr uint32_t maxNumberOfConcurrentFits