Project
Loading...
Searching...
No Matches
GPUTPCGMBorderTrack.h
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#ifndef GPUTPCGMBORDERTRACK_H
16#define GPUTPCGMBORDERTRACK_H
17
18#include "GPUCommonDef.h"
19#include "GPUCommonMath.h"
20
21namespace o2::gpu
22{
31{
32 public:
33 GPUd() int32_t TrackID() const { return mTrackID; }
34 GPUd() int16_t NClusters() const { return mNClusters; }
35 GPUd() int16_t Row() const { return mRow; }
36 GPUd() const float* Par() const { return mP; }
37 GPUd() float ZOffsetLinear() const { return mZOffsetLinear; }
38 GPUd() const float* Cov() const { return mC; }
39 GPUd() const float* CovD() const { return mD; }
40
41 GPUd() void SetTrackID(int32_t v) { mTrackID = v; }
42 GPUd() void SetNClusters(int16_t v) { mNClusters = v; }
43 GPUd() void SetRow(int16_t v) { mRow = v; }
44 GPUd() void SetPar(int32_t i, float x) { mP[i] = x; }
45 GPUd() void SetZOffsetLinear(float v) { mZOffsetLinear = v; }
46 GPUd() void SetCov(int32_t i, float x) { mC[i] = x; }
47 GPUd() void SetCovD(int32_t i, float x) { mD[i] = x; }
48
49 GPUd() static bool CheckChi2(float x1, float y1, float cx1, float cxy1, float cy1, float x2, float y2, float cx2, float cxy2, float cy2, float chi2cut)
50 {
51 //* Calculate Chi2/ndf deviation
52 float dx = x1 - x2;
53 float dy = y1 - y2;
54 float cx = cx1 + cx2;
55 float cxy = cxy1 + cxy2;
56 float cy = cy1 + cy2;
57 float det = cx * cy - cxy * cxy;
58 // printf("Res %f Det %f Cut %f %s - ", ( cy*dx - (cxy+cxy)*dy )*dx + cx*dy*dy, det, (det + det) * chi2cut, (CAMath::Abs(( cy*dx - (cxy+cxy)*dy )*dx + cx*dy*dy) < CAMath::Abs((det+det)*chi2cut)) ? "OK" : "Fail");
59 return (CAMath::Abs((cy * dx - (cxy + cxy) * dy) * dx + cx * dy * dy) < CAMath::Abs((det + det) * chi2cut));
60 }
61
62 GPUd() bool CheckChi2Y(const GPUTPCGMBorderTrack& t, float chi2cut) const
63 {
64 float d = mP[0] - t.mP[0];
65 return (d * d < chi2cut * (mC[0] + t.mC[0]));
66 }
67
68 GPUd() bool CheckChi2Z(const GPUTPCGMBorderTrack& t, float chi2cut) const
69 {
70 float d = mP[1] - t.mP[1] + (mZOffsetLinear - t.mZOffsetLinear);
71 return (d * d < chi2cut * (mC[1] + t.mC[1]));
72 }
73
74 GPUd() bool CheckChi2QPt(const GPUTPCGMBorderTrack& t, float chi2cut) const
75 {
76 float d = mP[4] - t.mP[4];
77 if (CAMath::Abs(d) > 0.3f && CAMath::Abs(d) > 0.5f * CAMath::Min(CAMath::Abs(mP[4]), CAMath::Abs(t.mP[4]))) {
78 return false; // Crude cut to avoid some bogus matches, TODO: recheck
79 }
80 return (d * d < chi2cut * (mC[4] + t.mC[4]));
81 }
82
83 GPUd() bool CheckChi2YS(const GPUTPCGMBorderTrack& t, float chi2cut) const { return CheckChi2(mP[0], mP[2], mC[0], mD[0], mC[2], t.mP[0], t.mP[2], t.mC[0], t.mD[0], t.mC[2], chi2cut); }
84
85 GPUd() bool CheckChi2ZT(const GPUTPCGMBorderTrack& t, float chi2cut) const { return CheckChi2(mP[1], mP[3], mC[1], mD[1], mC[3], t.mP[1] + (t.mZOffsetLinear - mZOffsetLinear), t.mP[3], t.mC[1], t.mD[1], t.mC[3], chi2cut); }
86
87 GPUd() void LimitCov()
88 {
89 // TODO: Why are Cov entries so large?
90 for (int32_t i = 0; i < 2; i++) {
91 if (mC[i] > 5.f) {
92 mC[i] = 5.f;
93 }
94 }
95 for (int32_t i = 2; i < 4; i++) {
96 if (mC[i] > 0.5f) {
97 mC[i] = 0.5f;
98 }
99 }
100 float maxCov4 = CAMath::Max(0.5f, mP[4] * mP[4] * 0.25f);
101 if (mC[4] > maxCov4) {
102 mC[4] = maxCov4;
103 }
104 for (int32_t i = 0; i < 2; i++) {
105 if (mD[i] > 0.5f) {
106 mD[i] = 0.5f;
107 }
108 }
109 if (mD[0] * mD[0] > mC[0] * mC[2]) {
110 mD[0] = 0.f;
111 }
112 if (mD[1] * mD[1] > mC[1] * mC[3]) {
113 mD[1] = 0.f;
114 }
115 }
116
117 private:
118 int32_t mTrackID; // track index
119 int16_t mNClusters; // n clusters
120 int16_t mRow;
121 float mP[5];
122 float mZOffsetLinear; // Z Offset, in case of T offset scaled linearly to Z with nominal vDrift. Used only for matching / merging
123 float mC[5];
124 float mD[2];
125
126 ClassDefNV(GPUTPCGMBorderTrack, 1);
127};
128} // namespace o2::gpu
129
130#endif
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
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
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 bool
configStandalone Reconstruction rec_tpc float
GPUd() void SetCovD(int32_t i
GPUd() bool CheckChi2YS(const GPUTPCGMBorderTrack &t
GPUd() float ZOffsetLinear() const
float float float float float x2
GPUd() const float *Par() const
float float float float float float float float float cy2
GPUd() int32_t TrackID() const
GPUd() bool CheckChi2QPt(const GPUTPCGMBorderTrack &t
GPUd() int16_t NClusters() const
GPUd() void SetPar(int32_t i
float float float float float float y2
float float float float cy1
float float float float float float float float cxy2
GPUd() void SetRow(int16_t v)
GPUd() void SetTrackID(int32_t v)
GPUd() const float *CovD() const
float float float float float float float float float float chi2cut
GPUd() void SetNClusters(int16_t v)
GPUd() bool CheckChi2Z(const GPUTPCGMBorderTrack &t
GPUd() void SetZOffsetLinear(float v)
float float float float float float float cx2
GPUd() bool CheckChi2ZT(const GPUTPCGMBorderTrack &t
GPUd() void SetCov(int32_t i
GPUd() const float *Cov() const
GLint GLenum GLint x
Definition glcorearb.h:403
GLuint GLfloat GLfloat GLfloat GLfloat y1
Definition glcorearb.h:5034
const GLdouble * v
Definition glcorearb.h:832
GLuint GLfloat GLfloat GLfloat x1
Definition glcorearb.h:5034
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)