Project
Loading...
Searching...
No Matches
GPUTPCTrackParam.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 GPUTPCTRACKPARAM_H
16#define GPUTPCTRACKPARAM_H
17
19#include "GPUTPCDef.h"
20#include "GPUCommonMath.h"
21
22namespace o2::gpu
23{
24class GPUTPCTrackLinearisation;
25
34{
35 public:
37 float bethe, e, theta2, EP2, sigmadE2, k22, k33, k43, k44; // parameters
38 };
39
40 GPUd() const GPUTPCBaseTrackParam& GetParam() const { return mParam; }
41 GPUd() void SetParam(const GPUTPCBaseTrackParam& v) { mParam = v; }
42 GPUd() void InitParam();
43
44 GPUd() float X() const { return mParam.X(); }
45 GPUd() float Y() const { return mParam.Y(); }
46 GPUd() float Z() const { return mParam.Z(); }
47 GPUd() float SinPhi() const { return mParam.SinPhi(); }
48 GPUd() float DzDs() const { return mParam.DzDs(); }
49 GPUd() float QPt() const { return mParam.QPt(); }
50 GPUd() float ZOffset() const { return mParam.ZOffset(); }
51 GPUd() float SignCosPhi() const { return mSignCosPhi; }
52 GPUd() float Chi2() const { return mChi2; }
53 GPUd() int32_t NDF() const { return mNDF; }
54
55 GPUd() float Err2Y() const { return mParam.Err2Y(); }
56 GPUd() float Err2Z() const { return mParam.Err2Z(); }
57 GPUd() float Err2SinPhi() const { return mParam.Err2SinPhi(); }
58 GPUd() float Err2DzDs() const { return mParam.Err2DzDs(); }
59 GPUd() float Err2QPt() const { return mParam.Err2QPt(); }
60
61 GPUd() float GetX() const { return mParam.GetX(); }
62 GPUd() float GetY() const { return mParam.GetY(); }
63 GPUd() float GetZ() const { return mParam.GetZ(); }
64 GPUd() float GetSinPhi() const { return mParam.GetSinPhi(); }
65 GPUd() float GetDzDs() const { return mParam.GetDzDs(); }
66 GPUd() float GetQPt() const { return mParam.GetQPt(); }
67 GPUd() float GetSignCosPhi() const { return mSignCosPhi; }
68 GPUd() float GetChi2() const { return mChi2; }
69 GPUd() int32_t GetNDF() const { return mNDF; }
70
71 GPUd() float GetKappa(float Bz) const { return mParam.GetKappa(Bz); }
72 GPUd() float GetCosPhi() const { return mSignCosPhi * CAMath::Sqrt(1 - SinPhi() * SinPhi()); }
73
74 GPUhd() const float* Par() const { return mParam.Par(); }
75 GPUhd() const float* Cov() const { return mParam.Cov(); }
76
77 GPUd() const float* GetPar() const { return mParam.GetPar(); }
78 GPUd() float GetPar(int32_t i) const { return (mParam.GetPar(i)); }
79 GPUd() float GetCov(int32_t i) const { return mParam.GetCov(i); }
80
81 GPUhd() void SetPar(int32_t i, float v) { mParam.SetPar(i, v); }
82 GPUhd() void SetCov(int32_t i, float v) { mParam.SetCov(i, v); }
83
84 GPUd() void SetX(float v) { mParam.SetX(v); }
85 GPUd() void SetY(float v) { mParam.SetY(v); }
86 GPUd() void SetZ(float v) { mParam.SetZ(v); }
87 GPUd() void SetSinPhi(float v) { mParam.SetSinPhi(v); }
88 GPUd() void SetDzDs(float v) { mParam.SetDzDs(v); }
89 GPUd() void SetQPt(float v) { mParam.SetQPt(v); }
90 GPUd() void SetZOffset(float v) { mParam.SetZOffset(v); }
91 GPUd() void SetSignCosPhi(float v) { mSignCosPhi = v >= 0 ? 1 : -1; }
92 GPUd() void SetChi2(float v) { mChi2 = v; }
93 GPUd() void SetNDF(int32_t v) { mNDF = v; }
94
96 GPUd() float GetDistXZ2(const GPUTPCTrackParam& t) const;
97
98 GPUd() float GetS(float x, float y, float Bz) const;
99
100 GPUd() void GetDCAPoint(float x, float y, float z, float& px, float& py, float& pz, float Bz) const;
101
102 GPUd() bool TransportToX(float x, float Bz, float maxSinPhi = constants::MAX_SIN_PHI);
103 GPUd() bool TransportToXWithMaterial(float x, float Bz, float maxSinPhi = constants::MAX_SIN_PHI);
104
105 GPUd() bool TransportToX(float x, GPUTPCTrackLinearisation& t0, float Bz, float maxSinPhi = constants::MAX_SIN_PHI, float* DL = nullptr);
106
107 GPUd() bool TransportToX(float x, float sinPhi0, float cosPhi0, float Bz, float maxSinPhi = constants::MAX_SIN_PHI);
108
109 GPUd() bool TransportToXWithMaterial(float x, GPUTPCTrackLinearisation& t0, GPUTPCTrackFitParam& par, float Bz, float maxSinPhi = constants::MAX_SIN_PHI);
110
111 GPUd() bool TransportToXWithMaterial(float x, GPUTPCTrackFitParam& par, float Bz, float maxSinPhi = constants::MAX_SIN_PHI);
112
113 GPUd() static float ApproximateBetheBloch(float beta2);
114 GPUd() static float BetheBlochGeant(float bg, float kp0 = 2.33f, float kp1 = 0.20f, float kp2 = 3.00f, float kp3 = 173e-9f, float kp4 = 0.49848f);
115 GPUd() static float BetheBlochSolid(float bg);
116 GPUd() static float BetheBlochGas(float bg);
117
118 GPUd() void CalculateFitParameters(GPUTPCTrackFitParam& par, float mass = 0.13957f);
119 GPUd() bool CorrectForMeanMaterial(float xOverX0, float xTimesRho, const GPUTPCTrackFitParam& par);
120
121 GPUd() bool Rotate(float alpha, float maxSinPhi = constants::MAX_SIN_PHI);
122 GPUd() bool Rotate(float alpha, GPUTPCTrackLinearisation& t0, float maxSinPhi = constants::MAX_SIN_PHI);
123 GPUd() bool Filter(float y, float z, float err2Y, float err2Z, float maxSinPhi = constants::MAX_SIN_PHI, bool paramOnly = false);
124
125 GPUd() bool CheckNumericalQuality() const;
126
127 GPUd() void ShiftZ(float z1, float z2, float x1, float x2, float bz, float defaultZOffsetOverR);
128 GPUd() void ConstrainZ(float& z, uint32_t sector, float& z0, float& lastZ);
129 GPUd() int32_t GetPropagatedYZ(float bz, float x, float& projY, float& projZ) const;
130
131 GPUdi() void ConstrainSinPhi(float limit = constants::MAX_SIN_PHI)
132 {
133 if (GetSinPhi() > limit) {
134 SetSinPhi(limit);
135 } else if (GetSinPhi() < -limit) {
136 SetSinPhi(-limit);
137 }
138 }
139
140 GPUd() void Print() const;
141
142#ifndef GPUCA_GPUCODE
143 private:
144#endif
145 GPUTPCBaseTrackParam mParam; // Track Parameters
146
147 private:
148 // WARNING, Track Param Data is copied in the GPU Tracklet Constructor element by element instead of using copy constructor!!!
149 // This is neccessary for performance reasons!!!
150 // Changes to Elements of this class therefore must also be applied to TrackletConstructor!!!
151 float mSignCosPhi; // sign of cosPhi
152 float mChi2; // the chi^2 value
153 int32_t mNDF; // the Number of Degrees of Freedom
154};
155
156GPUdi() void GPUTPCTrackParam::InitParam()
157{
158 // Initialize Tracklet Parameters using default values
159 SetSinPhi(0);
160 SetDzDs(0);
161 SetQPt(0);
162 SetSignCosPhi(1);
163 SetChi2(0);
164 SetNDF(-3);
165 SetCov(0, 1);
166 SetCov(1, 0);
167 SetCov(2, 1);
168 SetCov(3, 0);
169 SetCov(4, 0);
170 SetCov(5, 1);
171 SetCov(6, 0);
172 SetCov(7, 0);
173 SetCov(8, 0);
174 SetCov(9, 1);
175 SetCov(10, 0);
176 SetCov(11, 0);
177 SetCov(12, 0);
178 SetCov(13, 0);
179 SetCov(14, 1000.f);
180 SetZOffset(0);
181}
182} // namespace o2::gpu
183
184#endif // GPUTPCTRACKPARAM_H
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 e
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 false
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 float
float float float float & py
GPUhd() const float *Cov() const
float float float float float & pz
GPUd() const GPUTPCBaseTrackParam &GetParam() const
GPUd() float GetCov(int32_t i) const
GPUd() float Err2DzDs() const
GPUhd() const float *Par() const
float float float float kp3
GPUd() float Err2Y() const
GPUd() float GetZ() const
GPUd() float Chi2() const
GPUd() void SetParam(const GPUTPCBaseTrackParam &v)
float float float float bz
GPUd() void SetZOffset(float v)
GPUd() void SetX(float v)
GPUhd() void SetCov(int32_t i
float float float float float kp4
GPUd() float GetY() const
GPUd() void SetSinPhi(float v)
GPUd() float DzDs() const
GPUd() int32_t NDF() const
GPUd() void SetChi2(float v)
GPUdi() void ConstrainSinPhi(float limit
GPUd() void InitParam()
GPUd() float GetKappa(float Bz) const
float float float float float defaultZOffsetOverR
GPUd() void SetQPt(float v)
GPUd() float SignCosPhi() const
GPUd() const float *GetPar() const
GPUd() float GetX() const
GPUTPCTrackLinearisation float float float * DL
GPUd() float GetCosPhi() const
uint32_t float float & lastZ
GPUd() float GetDist2(const GPUTPCTrackParam &t) const
GPUd() void SetDzDs(float v)
GPUd() float Err2Z() const
GPUd() int32_t GetNDF() const
GPUd() void SetZ(float v)
GPUd() float Err2SinPhi() const
GPUhd() void SetPar(int32_t i
GPUd() void SetY(float v)
GPUd() float GetDzDs() const
float float float float bool paramOnly
GPUd() float GetChi2() const
GPUd() void SetSignCosPhi(float v)
GPUd() float SinPhi() const
GPUTPCTrackLinearisation GPUTPCTrackFitParam & par
GPUd() float GetSignCosPhi() const
GPUd() float GetPar(int32_t i) const
GPUd() float GetSinPhi() const
GPUd() float ZOffset() const
GPUd() float GetQPt() const
GPUd() float QPt() const
GPUd() float Err2QPt() const
GPUd() void SetNDF(int32_t v)
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLint GLenum GLint x
Definition glcorearb.h:403
const GLdouble * v
Definition glcorearb.h:832
GLuint GLfloat GLfloat GLfloat x1
Definition glcorearb.h:5034
GLdouble f
Definition glcorearb.h:310
GLint y
Definition glcorearb.h:270
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
Definition glcorearb.h:5034
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
GPUdi() o2
Definition TrackTRD.h:39