Project
Loading...
Searching...
No Matches
GPUTrackingRefit.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#define GPUCA_CADEBUG 0
16
17#include "GPUTrackingRefit.h"
18#include "GPUO2DataTypes.h"
19#include "GPUTPCGMTrackParam.h"
20#include "GPUTPCGMMergedTrack.h"
21#include "GPUTPCGMPropagator.h"
22#include "GPUConstantMem.h"
24#include "TPCFastTransformPOD.h"
27#include "GPUParam.inc"
28#include "GPUCommonArray.h"
29#include "GPUParam.h"
31
32#ifndef GPUCA_GPUCODE_DEVICE
33#include <type_traits>
34#endif
35
36using namespace o2::gpu;
37using namespace o2::track;
38using namespace o2::base;
39using namespace o2::tpc;
40
41static GPUglobalconstexpr() int32_t kIGNORE_ENDS = 3;
42
43#define IgnoreErrors(SNP) \
44 if (mIgnoreErrorsOnTrackEnds) { \
45 if (abs(i - stop) <= kIGNORE_ENDS && (CAMath::Abs(SNP) >= Propagator::MAX_SIN_PHI || abs(start - stop) < 30)) { \
46 break; \
47 } \
48 if (abs(i - start) <= kIGNORE_ENDS && (CAMath::Abs(SNP) >= Propagator::MAX_SIN_PHI || abs(start - stop) < 30)) { \
49 continue; \
50 } \
51 }
52// End IgnoreErrors
53
54#ifndef GPUCA_GPUCODE
58
63
67#endif
68
69namespace o2::gpu::internal
70{
71namespace // anonymous
72{
73template <class T>
74struct refitTrackTypes;
75template <>
76struct refitTrackTypes<GPUTPCGMTrackParam> {
77 using propagator = GPUTPCGMPropagator;
78};
79template <>
80struct refitTrackTypes<TrackParCov> {
81 using propagator = const Propagator*;
82};
83} // anonymous namespace
84} // namespace o2::gpu::internal
85
86template <>
87GPUd() void GPUTrackingRefit::initProp<GPUgeneric() GPUTPCGMPropagator>(GPUTPCGMPropagator& prop) // FIXME: GPUgeneric() needed to make the clang spirv output link correctly
88{
89 prop.SetMaterialTPC();
90 prop.SetMaxSinPhi(constants::MAX_SIN_PHI);
91 prop.SetSeedingErrors(false);
92 prop.SetFitInProjections(mPparam->rec.fitInProjections != 0);
93 prop.SetPropagateBzOnly(false);
94 prop.SetPolynomialField(&mPparam->polynomialField);
95 prop.SetMatLUT(mPmatLUT);
96}
97
98template <>
99GPUd() void GPUTrackingRefit::initProp<const Propagator * GPUgeneric()>(const Propagator*& prop) // FIXME: GPUgeneric() needed to make the clang spirv output link correctly
100{
101 prop = mPpropagator;
102}
103
104template <class T, class S, class U>
105GPUd() void GPUTrackingRefit::convertTrack(T& trk, const S& trkX, U& prop, float* chi2)
106{
107 trk = trkX;
108}
109
110// Generic
111template <>
113{
114 convertTrackParam(trk, trkX);
115 prop.SetTrack(&trk, trkX.getAlpha());
116}
117template <>
119{
120 convertTrackParam(trk, trkX);
121 trk.setAlpha(prop.GetAlpha());
122}
123// GPUTPCGMMergedTrack input
124template <>
126{
127 initProp(prop);
128 convertTrackParam(trk, trkX.GetParam());
129 trk.setAlpha(trkX.GetAlpha());
130 *chi2 = trkX.GetParam().GetChi2();
131}
132template <>
134{
135 convertTrackParam(trk.Param(), trkX);
136 trk.SetAlpha(trkX.getAlpha());
137 trk.Param().SetChi2(*chi2);
138}
139template <>
141{
142 initProp(prop);
143 trk = trkX.GetParam();
144 prop.SetTrack(&trk, trkX.GetAlpha());
145}
146template <>
148{
149 trk.SetParam(trkX);
150 trk.SetAlpha(prop.GetAlpha());
151}
152// TrackTPC input
153template <>
154GPUd() void GPUTrackingRefit::convertTrack<TrackParCov, TrackTPC, const Propagator*>(TrackParCov& trk, const TrackTPC& trkX, const Propagator*& prop, float* chi2)
155{
156 initProp(prop);
157 convertTrack<TrackParCov, TrackParCov, const Propagator*>(trk, trkX, prop, nullptr);
158 *chi2 = trkX.getChi2();
159}
160template <>
161GPUd() void GPUTrackingRefit::convertTrack<TrackTPC, TrackParCov, const Propagator*>(TrackTPC& trk, const TrackParCov& trkX, const Propagator*& prop, float* chi2)
162{
163 convertTrack<TrackParCov, TrackParCov, const Propagator*>(trk, trkX, prop, nullptr);
164 trk.setChi2(*chi2);
165}
166template <>
168{
169 initProp(prop);
170 convertTrack<GPUTPCGMTrackParam, TrackParCov, GPUTPCGMPropagator>(trk, trkX, prop, nullptr);
171 trk.SetChi2(trkX.getChi2());
172}
173template <>
175{
176 convertTrack<TrackParCov, GPUTPCGMTrackParam, GPUTPCGMPropagator>(trk, trkX, prop, nullptr);
177 trk.setChi2(trkX.GetChi2());
178}
179// TrackParCovWithArgs input
180template <>
181GPUd() void GPUTrackingRefit::convertTrack<TrackParCov, GPUTrackingRefit::TrackParCovWithArgs, const Propagator*>(TrackParCov& trk, const GPUTrackingRefit::TrackParCovWithArgs& trkX, const Propagator*& prop, float* chi2)
182{
183 initProp(prop);
184 convertTrack<TrackParCov, TrackParCov, const Propagator*>(trk, trkX.trk, prop, nullptr);
185 *chi2 = trkX.chi2 ? *trkX.chi2 : 0.f;
186}
187template <>
188GPUd() void GPUTrackingRefit::convertTrack<GPUTrackingRefit::TrackParCovWithArgs, TrackParCov, const Propagator*>(GPUTrackingRefit::TrackParCovWithArgs& trk, const TrackParCov& trkX, const Propagator*& prop, float* chi2)
189{
190 convertTrack<TrackParCov, TrackParCov, const Propagator*>(trk.trk, trkX, prop, nullptr);
191 if (trk.chi2) {
192 *trk.chi2 = *chi2;
193 }
194}
195template <>
196GPUd() void GPUTrackingRefit::convertTrack<GPUTPCGMTrackParam, GPUTrackingRefit::TrackParCovWithArgs, GPUTPCGMPropagator>(GPUTPCGMTrackParam& trk, const GPUTrackingRefit::TrackParCovWithArgs& trkX, GPUTPCGMPropagator& prop, float* chi2)
197{
198 initProp(prop);
199 convertTrack<GPUTPCGMTrackParam, TrackParCov, GPUTPCGMPropagator>(trk, trkX.trk, prop, nullptr);
200 trk.SetChi2(trkX.chi2 ? *trkX.chi2 : 0.f);
201}
202template <>
203GPUd() void GPUTrackingRefit::convertTrack<GPUTrackingRefit::TrackParCovWithArgs, GPUTPCGMTrackParam, GPUTPCGMPropagator>(GPUTrackingRefit::TrackParCovWithArgs& trk, const GPUTPCGMTrackParam& trkX, GPUTPCGMPropagator& prop, float* chi2)
204{
205 convertTrack<TrackParCov, GPUTPCGMTrackParam, GPUTPCGMPropagator>(trk.trk, trkX, prop, chi2);
206 if (trk.chi2) {
207 *trk.chi2 = trkX.GetChi2();
208 }
209}
210
211GPUd() static const float* getPar(const GPUTPCGMTrackParam& trk) { return trk.GetPar(); }
212GPUd() static const float* getPar(const TrackParCov& trk) { return trk.getParams(); }
213
214template <class T, class S>
215GPUd() int32_t GPUTrackingRefit::RefitTrack(T& trkX, bool outward, bool resetCov)
216{
217 CADEBUG(int32_t ii; printf("\nRefitting track\n"));
218 typename internal::refitTrackTypes<S>::propagator prop;
219 S trk;
220 float TrackParCovChi2 = 0.f;
221 convertTrack<S, T, typename internal::refitTrackTypes<S>::propagator>(trk, trkX, prop, &TrackParCovChi2);
222 int32_t begin = 0, count;
223 float tOffset;
224 [[maybe_unused]] int32_t eLossSign = 0; // energy-loss sign of the TrackParCov propagations (0: from the direction, outward = loss)
225 if constexpr (std::is_same_v<T, GPUTPCGMMergedTrack>) {
226 count = trkX.NClusters();
227 tOffset = trkX.GetParam().GetTOffset();
228 } else if constexpr (std::is_same_v<T, TrackTPC>) {
229 count = trkX.getNClusters();
230 tOffset = trkX.getTime0();
231 } else if constexpr (std::is_same_v<T, TrackParCovWithArgs>) {
232 count = trkX.clusRef.getEntries();
233 tOffset = trkX.time0;
234 eLossSign = trkX.eLossSign;
235 } else {
236 static_assert("Invalid template");
237 }
238 if constexpr (std::is_same_v<S, GPUTPCGMTrackParam>) {
239 CADEBUG(printf("\t%21sInit Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f) --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f\n", "", prop.GetAlpha(), trk.GetX(), trk.Par()[0], trk.Par()[1], trk.Par()[4], prop.GetQPt0(), trk.Par()[2], prop.GetSinPhi0(), sqrtf(trk.Cov()[0]), sqrtf(trk.Cov()[2]), sqrtf(trk.Cov()[5]), sqrtf(trk.Cov()[14])));
240 }
241
242 int32_t direction = outward ? -1 : 1;
243 int32_t start = outward ? count - 1 : begin;
244 int32_t stop = outward ? begin - 1 : count;
245 const ClusterNative* cl = nullptr;
246 uint8_t sector = 255, row = 255;
247 int32_t lastSector = -1, currentSector = -1, currentRow = -1;
248 int16_t clusterState = 0, nextState = 0;
249 int32_t nFitted = 0;
250 float sumInvSqrtCharge = 0.f;
251 int32_t nAvgCharge = 0;
252
253 for (int32_t i = start; i != stop; i += cl ? 0 : direction) {
254 float x = 0, y = 0, z = 0, charge = 0; // FIXME: initialization unneeded, but GCC incorrectly produces uninitialized warnings otherwise
255 float time = 0.f, invCharge = 0.f, invSqrtCharge = 0.f; // Same here...
256 int32_t clusters = 0;
257 while (true) {
258 if (!cl) {
259 CADEBUG(ii = i);
260 if constexpr (std::is_same_v<T, GPUTPCGMMergedTrack>) {
261 const auto& hit = mPtrackHits[trkX.FirstClusterRef() + i];
262 cl = &mPclusterNative->clustersLinear[hit.num];
264 cl = nullptr;
265 if (i + direction != stop) {
266 i += direction;
267 continue;
268 }
269 break;
270 }
271 row = hit.row;
272 sector = hit.sector;
273 nextState = mPclusterState[hit.num];
274 } else if constexpr (std::is_same_v<T, TrackTPC>) {
275 cl = &trkX.getCluster(mPtrackHitReferences, i, *mPclusterNative, sector, row);
276 nextState = mPclusterState[cl - mPclusterNative->clustersLinear];
277 } else if constexpr (std::is_same_v<T, TrackParCovWithArgs>) {
278 cl = &TrackTPC::getCluster(mPtrackHitReferences, i, *mPclusterNative, sector, row, trkX.clusRef);
279 nextState = mPclusterState[cl - mPclusterNative->clustersLinear];
280 } else {
281 static_assert("Invalid template");
282 }
283 }
284 if (clusters == 0 || (row == currentRow && sector == currentSector)) {
285 if (clusters == 1) {
286 x *= charge;
287 y *= charge;
288 z *= charge;
289 }
290 if (clusters == 0) {
291 mPfastTransform->Transform(sector, row, cl->getPad(), cl->getTime(), x, y, z, tOffset);
292 CADEBUG(printf("\tHit %3d/%3d Row %3d: Cluster Alpha %8.3f %3d, X %8.3f - Y %8.3f, Z %8.3f - State %d\n", ii, count, row, mPparam->Alpha(sector), (int32_t)sector, x, y, z, (int32_t)nextState));
293 currentRow = row;
294 currentSector = sector;
295 charge = cl->getQtot();
296 clusterState = nextState;
297 time = cl->getTime();
298 invSqrtCharge = CAMath::InvSqrt(cl->qMax);
299 invCharge = (1.f / cl->qMax);
300 } else {
301 float xx, yy, zz;
302 mPfastTransform->Transform(sector, row, cl->getPad(), cl->getTime(), xx, yy, zz, tOffset);
303 CADEBUG(printf("\tHit %3d/%3d Row %3d: Cluster Alpha %8.3f %3d, X %8.3f - Y %8.3f, Z %8.3f - State %d\n", ii, count, row, mPparam->Alpha(sector), (int32_t)sector, xx, yy, zz, (int32_t)nextState));
304 x += xx * cl->getQtot();
305 y += yy * cl->getQtot();
306 z += zz * cl->getQtot();
307 charge += cl->getQtot();
308 clusterState |= nextState;
309 }
310 cl = nullptr;
311 clusters++;
312 if (i + direction != stop) {
313 i += direction;
314 continue;
315 }
316 }
317 break;
318 }
319 if (clusters == 0) {
320 continue;
321 } else if (clusters > 1) {
322 x /= charge;
323 y /= charge;
324 z /= charge;
325 CADEBUG(printf("\tMerged Hit Row %3d: Cluster Alpha %8.3f %3d, X %8.3f - Y %8.3f, Z %8.3f - State %d\n", row, mPparam->Alpha(sector), (int32_t)sector, x, y, z, (int32_t)clusterState));
326 }
327
328 float invAvgCharge = (sumInvSqrtCharge += invSqrtCharge) / ++nAvgCharge;
329 invAvgCharge *= invAvgCharge;
330
331 if constexpr (std::is_same_v<S, GPUTPCGMTrackParam>) {
332 if (prop.PropagateToXAlpha(x, mPparam->Alpha(currentSector), !outward)) {
333 IgnoreErrors(trk.GetSinPhi());
334 return -2;
335 }
336 if (resetCov) {
337 trk.ResetCovariance();
338 } else if (lastSector != -1 && (lastSector < 18) != (sector < 18)) {
339 if (mPparam->rec.tpc.addErrorsCECrossing) {
340 if (mPparam->rec.tpc.addErrorsCECrossing >= 2) {
341 trk.AddCovDiagErrorsWithCorrelations(mPparam->rec.tpc.errorsCECrossing);
342 } else {
343 trk.AddCovDiagErrors(mPparam->rec.tpc.errorsCECrossing);
344 }
345 } else if (trk.Cov()[2] < 0.5f) {
346 trk.Cov()[2] = 0.5f;
347 }
348 }
349 CADEBUG(printf("\t%21sPropaga Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f) --- Res %8.3f %8.3f --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f - YPt %8.3f\n", "", prop.GetAlpha(), x, trk.Par()[0], trk.Par()[1], trk.Par()[4], prop.GetQPt0(), trk.Par()[2], prop.GetSinPhi0(), trk.Par()[0] - y, trk.Par()[1] - z, sqrtf(trk.Cov()[0]), sqrtf(trk.Cov()[2]), sqrtf(trk.Cov()[5]), sqrtf(trk.Cov()[14]), trk.Cov()[10]));
350 lastSector = sector;
351 if (prop.Update(y, z, row, *mPparam, clusterState, 0, true, sector, time, invAvgCharge, invCharge)) {
352 IgnoreErrors(trk.GetSinPhi());
353 return -3;
354 }
355 trk.ConstrainSinPhi();
356 CADEBUG(printf("\t%21sFit Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f), DzDs %5.2f %16s --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f - YPt %8.3f\n", "", prop.GetAlpha(), x, trk.Par()[0], trk.Par()[1], trk.Par()[4], prop.GetQPt0(), trk.Par()[2], prop.GetSinPhi0(), trk.Par()[3], "", sqrtf(trk.Cov()[0]), sqrtf(trk.Cov()[2]), sqrtf(trk.Cov()[5]), sqrtf(trk.Cov()[14]), trk.Cov()[10]));
357 } else if constexpr (std::is_same_v<S, TrackParCov>) {
358 if (!trk.rotate(mPparam->Alpha(currentSector))) {
359 IgnoreErrors(trk.getSnp());
360 return -1;
361 }
362 if (!prop->PropagateToXBxByBz(trk, x, constants::MAX_SIN_PHI_LOW, Propagator::MAX_STEP, Propagator::MatCorrType::USEMatCorrLUT, nullptr, eLossSign)) {
363 IgnoreErrors(trk.getSnp());
364 return -2;
365 }
366 if (lastSector != -1 && (lastSector < 18) != (sector < 18)) {
367 if (mPparam->rec.tpc.addErrorsCECrossing) {
368 trk.updateCov(mPparam->rec.tpc.errorsCECrossing, mPparam->rec.tpc.addErrorsCECrossing >= 2);
369 } else if (trk.getCov()[2] < 0.5f) {
370 trk.setCov(0.5f, 2);
371 }
372 }
373 if (resetCov) {
374 trk.resetCovariance();
375 float bzkG = prop->getNominalBz(), qptB5Scale = CAMath::Abs(bzkG) > 0.1f ? CAMath::Abs(bzkG) / 5.006680f : 1.f;
376 float q2pt2 = trk.getQ2Pt() * trk.getQ2Pt(), q2pt2Wgh = q2pt2 * qptB5Scale * qptB5Scale;
377 float err2 = (100.f + q2pt2Wgh) / (1.f + q2pt2Wgh) * q2pt2; // -> 100 for high pTs, -> 1 for low pTs.
378 trk.setCov(err2, 14); // 100% error
379 TrackParCovChi2 = 0.f;
380 }
381 CADEBUG(printf("\t%21sPropaga Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f) --- Res %8.3f %8.3f --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f - YPt %8.3f\n", "", trk.getAlpha(), x, trk.getParams()[0], trk.getParams()[1], trk.getParams()[4], trk.getParams()[4], trk.getParams()[2], trk.getParams()[2], trk.getParams()[0] - y, trk.getParams()[1] - z, sqrtf(trk.getCov()[0]), sqrtf(trk.getCov()[2]), sqrtf(trk.getCov()[5]), sqrtf(trk.getCov()[14]), trk.getCov()[10]));
382 std::array<float, 2> p = {y, z};
383 std::array<float, 3> c = {0, 0, 0};
384 GPUTPCGMPropagator::GetErr2(c[0], c[2], *mPparam, getPar(trk)[2], getPar(trk)[3], z, x, y, currentRow, clusterState, sector, time, invAvgCharge, invCharge, false);
385 TrackParCovChi2 += trk.getPredictedChi2(p, c);
386 if (!trk.update(p, c)) {
387 IgnoreErrors(trk.getSnp());
388 return -3;
389 }
390 CADEBUG(printf("\t%21sFit Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f), DzDs %5.2f %16s --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f - YPt %8.3f\n", "", trk.getAlpha(), x, trk.getParams()[0], trk.getParams()[1], trk.getParams()[4], trk.getParams()[4], trk.getParams()[2], trk.getParams()[2], trk.getParams()[3], "", sqrtf(trk.getCov()[0]), sqrtf(trk.getCov()[2]), sqrtf(trk.getCov()[5]), sqrtf(trk.getCov()[14]), trk.getCov()[10]));
391 } else {
392 static_assert("Invalid template");
393 }
394 resetCov = false;
395 nFitted++;
396 }
397 if constexpr (std::is_same_v<S, GPUTPCGMTrackParam>) {
398 float alpha = prop.GetAlpha();
399 trk.MoveToReference(prop, *mPparam, alpha);
400 trk.NormalizeAlpha(alpha);
401 prop.SetAlpha(alpha);
402 } else if constexpr (std::is_same_v<S, TrackParCov>) {
403 constexpr float kDeg2Rad = M_PI / 180.f;
404 constexpr float kSectAngle = 2 * M_PI / 18.f;
405 if (mPparam->rec.tpc.trackReferenceX <= 500) {
406 // a forced energy-loss sign holds along the refit direction: the way to the reference X can run against it
407 const int32_t eLossSignRef = (mPparam->rec.tpc.trackReferenceX > trk.getX()) == outward ? eLossSign : -eLossSign;
408 if (prop->PropagateToXBxByBz(trk, mPparam->rec.tpc.trackReferenceX, Propagator::MAX_SIN_PHI, Propagator::MAX_STEP, Propagator::MatCorrType::USEMatCorrLUT, nullptr, eLossSignRef)) {
409 if (CAMath::Abs(trk.getY()) > trk.getX() * CAMath::Tan(kSectAngle / 2.f)) {
410 float newAlpha = trk.getAlpha() + CAMath::Round(CAMath::ATan2(trk.getY(), trk.getX()) / kDeg2Rad / 20.f) * kSectAngle;
411 GPUTPCGMTrackParam::NormalizeAlpha(newAlpha);
412 trk.rotate(newAlpha) && prop->PropagateToXBxByBz(trk, mPparam->rec.tpc.trackReferenceX, Propagator::MAX_SIN_PHI, Propagator::MAX_STEP, Propagator::MatCorrType::USEMatCorrLUT, nullptr, eLossSignRef);
413 }
414 }
415 }
416 } else {
417 static_assert("Invalid template");
418 }
419
420 convertTrack<T, S, typename internal::refitTrackTypes<S>::propagator>(trkX, trk, prop, &TrackParCovChi2);
421 return nFitted;
422}
423
424#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
425template GPUdni() int32_t GPUTrackingRefit::RefitTrack<GPUTPCGMMergedTrack, TrackParCov>(GPUTPCGMMergedTrack& trk, bool outward, bool resetCov);
426template GPUdni() int32_t GPUTrackingRefit::RefitTrack<GPUTPCGMMergedTrack, GPUTPCGMTrackParam>(GPUTPCGMMergedTrack& trk, bool outward, bool resetCov);
427template GPUdni() int32_t GPUTrackingRefit::RefitTrack<TrackTPC, TrackParCov>(TrackTPC& trk, bool outward, bool resetCov);
428template GPUdni() int32_t GPUTrackingRefit::RefitTrack<TrackTPC, GPUTPCGMTrackParam>(TrackTPC& trk, bool outward, bool resetCov);
429template GPUdni() int32_t GPUTrackingRefit::RefitTrack<GPUTrackingRefit::TrackParCovWithArgs, TrackParCov>(GPUTrackingRefit::TrackParCovWithArgs& trk, bool outward, bool resetCov);
430template GPUdni() int32_t GPUTrackingRefit::RefitTrack<GPUTrackingRefit::TrackParCovWithArgs, GPUTPCGMTrackParam>(GPUTrackingRefit::TrackParCovWithArgs& trk, bool outward, bool resetCov);
431#endif
432
433#ifndef GPUCA_GPUCODE
435{
436 mPclusterState = v->ioPtrs.mergedTrackHitStates;
437 mPclusterNative = v->ioPtrs.clustersNative;
438 mPtrackHits = v->ioPtrs.mergedTrackHits;
439 mPfastTransform = v->calibObjects.fastTransform;
440 mPmatLUT = v->calibObjects.matLUT;
441 mPparam = p ? p : &v->param;
442}
443#endif
Base track model for the Barrel, params only, w/o covariance.
int16_t charge
Definition RawEventData.h:5
int16_t time
Definition RawEventData.h:4
int32_t i
#define GPUdni()
#define GPUgeneric()
#define CADEBUG(...)
Definition GPUDef.h:82
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual sector
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
#define IgnoreErrors(SNP)
float chi2
uint32_t c
Definition RawData.h:2
POD correction map.
void SetMaxData(const GPUTrackingInOutPointers &io)
void SetPtrsFromGPUConstantMem(const GPUConstantMem *v, GPUParam *p=nullptr)
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLint GLenum GLint x
Definition glcorearb.h:403
GLint GLsizei count
Definition glcorearb.h:399
const GLdouble * v
Definition glcorearb.h:832
GLint y
Definition glcorearb.h:270
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
const o2::track::TrackParCov & trkX
GPUd() const expr uint32_t MultivariatePolynomialHelper< Dim
Global TPC definitions and constants.
GPUglobalconstexpr() unsigned char SECTORSPERSIDE
Enum< T >::Iterator begin(Enum< T >)
Definition Defs.h:158
TrackParCovF TrackParCov
Definition Track.h:33
std::vector< Cluster > clusters
std::vector< int > row