|
|
Go to the documentation of this file.
9 #include <cuda_runtime.h>
29 double *__restrict__
phits,
34 constexpr uint32_t hitsInFit =
N;
46 #ifdef BROKENLINE_DEBUG
55 auto tuple_idx = local_idx +
offset;
61 assert(tkid < foundNtuplets->nOnes());
82 auto dx =
hhp->xGlobal(hitId[hitsInFit - 1]) -
hhp->xGlobal(hitId[0]);
83 auto dy =
hhp->yGlobal(hitId[hitsInFit - 1]) -
hhp->yGlobal(hitId[0]);
84 auto dz =
hhp->zGlobal(hitId[hitsInFit - 1]) -
hhp->zGlobal(hitId[0]);
87 for (
unsigned int i = 0;
i < hitsInFit; ++
i) {
91 auto const &
dp =
hhp->cpeParams().detParams(
hhp->detectorIndex(
hit));
93 int qbin = 4 -
status.qBin;
94 assert(qbin >= 0 && qbin < 5);
97 dp.frame.rotation().multiply(
dx,
dy,
dz, ux, uy, uz);
99 int bin =
int(cb * (285.
f / 150.
f) * 8.
f) - 4;
101 float yerr =
dp.sigmay[
bin] * 1.e-4
f;
102 yerr *=
dp.yfact[qbin];
105 yerr = nok ?
hhp->yerrLocal(
hit) : yerr;
106 dp.frame.toGlobal(
hhp->xerrLocal(
hit), 0, yerr, ge);
109 .detParams(
hhp->detectorIndex(
hit))
115 printf(
"Hit global: %d: %d hits.col(%d) << %f,%f,%f\n",
122 printf(
"Error: %d: %d hits_ge.col(%d) << %e,%e,%e,%e,%e,%e\n",
124 hhp->detetectorIndex(
hit),
135 hits_ge.col(
i) << ge[0], ge[1], ge[2], ge[3], ge[4], ge[5];
140 assert(fast_fit(0) == fast_fit(0));
141 assert(fast_fit(1) == fast_fit(1));
142 assert(fast_fit(2) == fast_fit(2));
143 assert(fast_fit(3) == fast_fit(3));
151 double *__restrict__
phits,
167 auto tuple_idx = local_idx +
offset;
192 #ifdef BROKENLINE_DEBUG
193 if (!(circle.
chi2 >= 0) || !(
line.chi2 >= 0))
194 printf(
"kernelBLFit failed! %f/%f\n", circle.
chi2,
line.chi2);
195 printf(
"kernelBLFit size %d for %d hits circle.par(0,1,2): %d %f,%f,%f\n",
202 printf(
"kernelBLHits line.par(0,1): %d %f,%f\n", tkid,
line.par(0),
line.par(1));
203 printf(
"kernelBLHits chi2 cov %f/%f %e,%e,%e,%e,%e\n",
Vector3d par
parameter: (X0,Y0,R)
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ phits_ge
__host__ __device__ void prepareBrokenLineData(const M3xN &hits, const V4 &fast_fit, const double bField, PreparedBrokenLineData< n > &results)
Computes the data needed for the Broken Line fit procedure that are mainly common for the circle and ...
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ phits
__host__ __device__ void circleFit(const M3xN &hits, const M6xN &hits_ge, const V4 &fast_fit, const double bField, PreparedBrokenLineData< n > &data, karimaki_circle_fit &circle_results)
Performs the Broken Line fit in the curved track case (that is, the fit parameters are the intercepti...
constexpr uint32_t maxNumberOfConcurrentFits
__host__ __device__ void lineFit(const M6xN &hits_ge, const V4 &fast_fit, const double bField, const PreparedBrokenLineData< n > &data, riemannFit::LineFit &line_results)
Performs the Broken Line fit in the straight track case (that is, the fit parameters are only the int...
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ uint32_t nHits
const caConstants::TupleMultiplicity *__restrict__ tupleMultiplicity
T1 atomicAdd(T1 *a, T2 b)
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ pfast_fit
Eigen::Map< Matrix6xNf< N >, 0, Eigen::Stride< 6 *stride, stride > > Map6xNf
const uint32_t *__restrict__ HitContainer * foundNtuplets
constexpr auto nOnes() const
data needed for the Broken Line fit procedure.
Eigen::Map< Matrix3xNd< N >, 0, Eigen::Stride< 3 *stride, stride > > Map3xNd
char data[epos_bytes_allocation]
TrackSoA::HitContainer HitContainer
Abs< T >::type abs(const T &t)
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ hhp
TrackSoAHeterogeneousT< maxNumber()> TrackSoA
__host__ __device__ void fastFit(const M3xN &hits, V4 &result)
A very fast helix fit.
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ uint32_t uint32_t offset
Eigen::Map< Vector4d, 0, Eigen::InnerStride< stride > > Map4d