Project
Loading...
Searching...
No Matches
GPUTPCGMMergedTrack.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 GPUTPCGMMERGEDTRACK_H
16#define GPUTPCGMMERGEDTRACK_H
17
18#include "GPUTPCGMTrackParam.h"
20
21namespace o2::gpu
22{
29{
30 public:
31 GPUd() uint32_t NClusters() const { return mNClusters; }
32 GPUd() uint32_t NClustersFitted() const { return mNClustersFitted; }
33 GPUd() uint32_t FirstClusterRef() const { return mFirstClusterRef; }
34 GPUd() const GPUTPCGMTrackParam& GetParam() const { return mParam; }
35 GPUd() float GetAlpha() const { return mAlpha; }
37 {
38 return mParam;
39 }
40 GPUd() float& Alpha()
41 {
42 return mAlpha;
43 }
44 GPUd() bool OK() const { return mFlags & 0x01; }
45 GPUd() bool Looper() const { return mFlags & 0x02; } // TODO: Get rid of the looper flag, or rename it if still needed.
46 GPUd() bool CSide() const { return mFlags & 0x04; }
47 GPUd() bool CCE() const { return mFlags & 0x08; }
48 GPUd() bool MergedLooperUnconnected() const { return mFlags & 0x10; }
49 GPUd() bool MergedLooperConnected() const { return mFlags & 0x20; }
50 GPUd() bool MergedLooper() const { return mFlags & 0x30; }
51 GPUd() int32_t PrevSegment() const { return mPrevSegment; }
52 template <class T>
53 GPUd() static T* GetFirstSegment_helper(T* me, T* base, bool workaround)
54 {
55 if (me->mPrevSegment < 0) {
56 return me;
57 }
58 T* cur = &base[me->mPrevSegment];
59 while (cur->mPrevSegment >= 0) {
60 T* next = &base[cur->mPrevSegment];
61 if (workaround && next == me) {
62 return cur;
63 }
64 cur = next;
65 }
66 return cur;
67 }
68 GPUd() GPUTPCGMMergedTrack* GetFirstSegment(GPUTPCGMMergedTrack* base, bool workaround) { return GetFirstSegment_helper<GPUTPCGMMergedTrack>(this, base, workaround); }
69 GPUd() const GPUTPCGMMergedTrack* GetFirstSegment(const GPUTPCGMMergedTrack* base, bool workaround) const { return GetFirstSegment_helper<const GPUTPCGMMergedTrack>(this, base, workaround); }
70 GPUd() uint8_t Leg() const { return mLeg; }
71 GPUd() uint8_t Flags() const { return mFlags; }
72
73 GPUd() void SetNClusters(int32_t v) { mNClusters = v; }
74 GPUd() void SetNClustersFitted(int32_t v) { mNClustersFitted = v; }
75 GPUd() void SetFirstClusterRef(int32_t v) { mFirstClusterRef = v; }
76 GPUd() void SetParam(const GPUTPCGMTrackParam& v) { mParam = v; }
77 GPUd() void SetAlpha(float v) { mAlpha = v; }
78 GPUd() void SetPrevSegment(int32_t v) { mPrevSegment = v; }
79 GPUd() void SetLeg(uint8_t v) { mLeg = v; }
80 GPUd() void SetOK(bool v)
81 {
82 if (v) {
83 mFlags |= 0x01;
84 } else {
85 mFlags &= 0xFE;
86 }
87 }
88 GPUd() void SetLooper(bool v)
89 {
90 if (v) {
91 mFlags |= 0x02;
92 } else {
93 mFlags &= 0xFD;
94 }
95 }
96 GPUd() void SetCSide(bool v)
97 {
98 if (v) {
99 mFlags |= 0x04;
100 } else {
101 mFlags &= 0xFB;
102 }
103 }
104 GPUd() void SetCCE(bool v)
105 {
106 if (v) {
107 mFlags |= 0x08;
108 } else {
109 mFlags &= 0xF7;
110 }
111 }
112 GPUd() void SetMergedLooperUnconnected(bool v)
113 {
114 if (v) {
115 mFlags |= 0x10;
116 } else {
117 mFlags &= 0xEF;
118 }
119 }
120 GPUd() void SetMergedLooperConnected(bool v)
121 {
122 if (v) {
123 mFlags |= 0x20;
124 } else {
125 mFlags &= 0xDF;
126 }
127 }
128 GPUd() void SetFlags(uint8_t v) { mFlags = v; }
129
130 GPUd() const gputpcgmmergertypes::GPUTPCOuterParam& OuterParam() const { return mOuterParam; }
131 GPUd() gputpcgmmergertypes::GPUTPCOuterParam& OuterParam() { return mOuterParam; }
132
133 private:
134 GPUTPCGMTrackParam mParam; //* fitted track parameters
135 gputpcgmmergertypes::GPUTPCOuterParam mOuterParam; //* outer param
136
137 float mAlpha; //* alpha angle
138 uint32_t mFirstClusterRef; //* index of the first track cluster in corresponding cluster arrays
139 int32_t mPrevSegment; //* next segment in case of looping track
140 uint16_t mNClusters; //* number of track clusters
141 uint16_t mNClustersFitted; //* number of clusters used in fit
142 uint8_t mFlags;
143 uint8_t mLeg;
144
145#if !defined(GPUCA_STANDALONE)
146 ClassDefNV(GPUTPCGMMergedTrack, 0);
147#endif
148};
149} // namespace o2::gpu
150
151#endif
unsigned short int uint16_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 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 SetNClustersFitted(int32_t v)
GPUd() float GetAlpha() const
GPUd() bool MergedLooperUnconnected() const
GPUd() void SetFlags(uint8_t v)
GPUd() void SetParam(const GPUTPCGMTrackParam &v)
GPUd() uint32_t NClustersFitted() const
GPUd() const GPUTPCGMTrackParam &GetParam() const
GPUd() void SetNClusters(int32_t v)
GPUd() uint8_t Flags() const
GPUd() int32_t PrevSegment() const
GPUd() void SetLeg(uint8_t v)
GPUd() void SetCSide(bool v)
GPUd() GPUTPCGMMergedTrack *GetFirstSegment(GPUTPCGMMergedTrack *base
GPUd() void SetMergedLooperUnconnected(bool v)
GPUd() void SetMergedLooperConnected(bool v)
GPUd() void SetAlpha(float v)
GPUd() uint32_t NClusters() const
GPUd() void SetPrevSegment(int32_t v)
GPUd() uint32_t FirstClusterRef() const
GPUd() bool MergedLooper() const
GPUd() GPUTPCGMTrackParam &Param()
GPUd() void SetFirstClusterRef(int32_t v)
GPUd() void SetLooper(bool v)
GPUd() bool MergedLooperConnected() const
GPUd() const gputpcgmmergertypes
const GLdouble * v
Definition glcorearb.h:832
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)