|
|
Go to the documentation of this file.
7 #include <cuda_runtime.h>
26 double *__restrict__
phits,
30 constexpr uint32_t hitsInFit =
N;
48 auto tuple_idx = local_idx +
offset;
64 for (
unsigned int i = 0;
i < hitsInFit; ++
i) {
69 .detParams(
hhp->detectorIndex(
hit))
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));
90 double *__restrict__
phits,
92 double *__restrict__ pfast_fit_input,
104 auto tuple_idx = local_idx +
offset;
132 double *__restrict__
phits,
134 double *__restrict__ pfast_fit_input,
147 auto tuple_idx = local_idx +
offset;
162 results->stateAtBS.copyFromCircle(
163 circle_fit[local_idx].par, circle_fit[local_idx].cov, line_fit.par, line_fit.cov, 1.f /
float(
bField), tkid);
165 results->eta(tkid) = asinhf(line_fit.par(0));
166 results->chi2(tkid) = (circle_fit[local_idx].chi2 + line_fit.chi2) / (2 *
N - 5);
169 printf(
"kernelLineFit size %d for %d hits circle.par(0,1,2): %d %f,%f,%f\n",
173 circle_fit[local_idx].par(0),
174 circle_fit[local_idx].par(1),
175 circle_fit[local_idx].par(2));
176 printf(
"kernelLineFit line.par(0,1): %d %f,%f\n", tkid, line_fit.par(0), line_fit.par(1));
177 printf(
"kernelLineFit chi2 cov %f/%f %e,%e,%e,%e,%e\n",
178 circle_fit[local_idx].
chi2,
180 circle_fit[local_idx].cov(0, 0),
181 circle_fit[local_idx].cov(1, 1),
182 circle_fit[local_idx].cov(2, 2),
const caConstants::TupleMultiplicity *__restrict__ uint32_t const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ uint32_t offset
const caConstants::TupleMultiplicity *__restrict__ uint32_t const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ pfast_fit
Eigen::Matrix< double, 2 *N, 2 *N > Matrix2Nd
const caConstants::TupleMultiplicity *__restrict__ uint32_t const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ phits_ge
constexpr uint32_t maxNumberOfConcurrentFits
const caConstants::TupleMultiplicity *__restrict__ uint32_t nHits
__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.
Eigen::Map< Matrix6xNf< N >, 0, Eigen::Stride< 6 *stride, stride > > Map6xNf
const uint32_t *__restrict__ HitContainer * foundNtuplets
__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 ...
Eigen::Matrix< double, N, 1 > VectorNd
const caConstants::TupleMultiplicity *__restrict__ tupleMultiplicity
Eigen::Map< Matrix3xNd< N >, 0, Eigen::Stride< 3 *stride, stride > > Map3xNd
__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...
__host__ __device__ void loadCovariance2D(M6xNf const &ge, M2Nd &hits_cov)
TrackSoA::HitContainer HitContainer
const caConstants::TupleMultiplicity *__restrict__ uint32_t const HitsOnGPU *__restrict__ double *__restrict__ phits
Abs< T >::type abs(const T &t)
__host__ __device__ void fromCircleToPerigee(CircleFit &circle)
Transform circle parameter from (X0,Y0,R) to (phi,Tip,q/R) and consequently covariance matrix.
TrackSoAHeterogeneousT< maxNumber()> TrackSoA
const caConstants::TupleMultiplicity *__restrict__ uint32_t const HitsOnGPU *__restrict__ hhp
Eigen::Map< Vector4d, 0, Eigen::InnerStride< stride > > Map4d