@@ -24,17 +24,15 @@ namespace GPUCA_NAMESPACE
2424namespace gpu
2525{
2626
27- MEM_CLASS_PRE ()
28- GPUdi () void MEM_LG (GPUParam)::Slice2Global (int32_t iSlice, float x, float y, float z, float* X, float* Y, float* Z) const
27+ GPUdi () void GPUParam ::Slice2Global (int32_t iSlice, float x, float y, float z, float* X, float* Y, float* Z) const
2928{
3029 // conversion of coordinates sector->global
3130 * X = x * SliceParam[iSlice].CosAlpha - y * SliceParam[iSlice].SinAlpha;
3231 * Y = y * SliceParam[iSlice].CosAlpha + x * SliceParam[iSlice].SinAlpha;
3332 * Z = z;
3433}
3534
36- MEM_CLASS_PRE ()
37- GPUdi () void MEM_LG (GPUParam)::Global2Slice (int32_t iSlice, float X, float Y, float Z, float* x, float* y, float* z) const
35+ GPUdi () void GPUParam ::Global2Slice (int32_t iSlice, float X, float Y, float Z, float* x, float* y, float* z) const
3836{
3937 // conversion of coordinates global->sector
4038 * x = X * SliceParam[iSlice].CosAlpha + Y * SliceParam[iSlice].SinAlpha;
@@ -44,8 +42,7 @@ GPUdi() void MEM_LG(GPUParam)::Global2Slice(int32_t iSlice, float X, float Y, fl
4442
4543# ifdef GPUCA_TPC_GEOMETRY_O2
4644
47- MEM_CLASS_PRE ()
48- GPUdi () void MEM_LG (GPUParam)::GetClusterErrorsSeeding2 (uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const
45+ GPUdi () void GPUParam ::GetClusterErrorsSeeding2 (uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const
4946{
5047 const int32_t rowType = tpcGeometry.GetROC (iRow);
5148 z = CAMath ::Abs (tpcGeometry.TPCLength () - CAMath ::Abs (z));
@@ -60,30 +57,27 @@ GPUdi() void MEM_LG(GPUParam)::GetClusterErrorsSeeding2(uint8_t sector, int32_t
6057 ErrZ2 = GetClusterErrorSeeding (1 , rowType, z, angleZ2, unscaledMult); // Returns Err2
6158}
6259
63- MEM_CLASS_PRE ()
64- GPUdi () float MEM_LG (GPUParam)::GetClusterErrorSeeding (int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult) const // Note, returns Err2 despite the name not containing 2
60+ GPUdi () float GPUParam ::GetClusterErrorSeeding (int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult) const // Note, returns Err2 despite the name not containing 2
6561{
66- MakeType ( const float* ) c = ParamErrors[yz][type]; // Note: c[0] = p[0]^2, c[1] = p[1]^2 * padHeight, c[2] = p[2]^2 / tpcLength / padHeight, c[3] = p[3]^2 * clusterErrorOccupancyScaler^2
62+ const float* c = ParamErrors[yz][type]; // Note: c[0] = p[0]^2, c[1] = p[1]^2 * padHeight, c[2] = p[2]^2 / tpcLength / padHeight, c[3] = p[3]^2 * clusterErrorOccupancyScaler^2
6763 float v = c[0 ] + c[1 ] * angle2 + c[2 ] * zDiff + c[3 ] * (unscaledMult * unscaledMult);
6864 v = CAMath ::Abs (v);
6965 v *= yz ? rec.tpc.clusterError2CorrectionZ : rec.tpc.clusterError2CorrectionY;
7066 v += yz ? rec.tpc.clusterError2AdditionalZSeeding : rec.tpc.clusterError2AdditionalYSeeding;
7167 return v;
7268}
7369
74- MEM_CLASS_PRE ()
75- GPUdi () float MEM_LG (GPUParam)::GetClusterError2 (int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult, float scaledInvAvgCharge, float scaledInvCharge) const
70+ GPUdi () float GPUParam ::GetClusterError2 (int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult, float scaledInvAvgCharge, float scaledInvCharge) const
7671{
77- MakeType ( const float* ) c = ParamErrors[yz][type]; // Note: c[0] = p[0]^2, c[1] = p[1]^2 * padHeight, c[2] = p[2]^2 / tpcLength / padHeight, c[3] = p[3]^2 * clusterErrorOccupancyScaler^2
72+ const float* c = ParamErrors[yz][type]; // Note: c[0] = p[0]^2, c[1] = p[1]^2 * padHeight, c[2] = p[2]^2 / tpcLength / padHeight, c[3] = p[3]^2 * clusterErrorOccupancyScaler^2
7873 float v = c[0 ] + c[1 ] * angle2 * scaledInvAvgCharge + c[2 ] * zDiff * scaledInvCharge + c[3 ] * (unscaledMult * unscaledMult) * (scaledInvAvgCharge * scaledInvAvgCharge);
7974 v = CAMath ::Abs (v);
8075 v *= yz ? rec.tpc.clusterError2CorrectionZ : rec.tpc.clusterError2CorrectionY;
8176 v += yz ? rec.tpc.clusterError2AdditionalZ : rec.tpc.clusterError2AdditionalY;
8277 return v;
8378}
8479
85- MEM_CLASS_PRE ()
86- GPUdi () float MEM_LG (GPUParam)::GetSystematicClusterErrorIFC2 (float x, float y, float z, bool sideC) const
80+ GPUdi () float GPUParam ::GetSystematicClusterErrorIFC2 (float x, float y, float z, bool sideC) const
8781{
8882 float sysErr = 0 .f;
8983 const float kMaxExpArg = 9 .f; // limit r-dumped error to this exp. argument
@@ -116,8 +110,7 @@ GPUdi() float MEM_LG(GPUParam)::GetSystematicClusterErrorIFC2(float x, float y,
116110 return sysErr;
117111}
118112
119- MEM_CLASS_PRE ()
120- GPUdi () float MEM_LG (GPUParam)::GetSystematicClusterErrorC122 (float x, float y, uint8_t sector) const
113+ GPUdi () float GPUParam ::GetSystematicClusterErrorC122 (float x, float y, uint8_t sector) const
121114{
122115 const float dx = x - 83 .f;
123116 if (dx > occupancyTotal * rec.tpc.sysClusErrorC12Box) {
@@ -131,17 +124,15 @@ GPUdi() float MEM_LG(GPUParam)::GetSystematicClusterErrorC122(float x, float y,
131124
132125# else // GPUCA_TPC_GEOMETRY_O2
133126
134- MEM_CLASS_PRE ()
135- GPUdi () float MEM_LG (GPUParam)::GetClusterErrorSeeding (int32_t yz, int32_t type, float zDiff, float angle2, float scaledMult) const
127+ GPUdi () float GPUParam ::GetClusterErrorSeeding (int32_t yz, int32_t type, float zDiff, float angle2, float scaledMult) const
136128{
137- MakeType ( const float* ) c = ParamErrorsSeeding0[yz][type];
129+ const float* c = ParamErrorsSeeding0[yz][type];
138130 float v = c[0 ] + c[1 ] * zDiff + c[2 ] * angle2;
139131 v = CAMath ::Abs (v);
140132 return v;
141133}
142134
143- MEM_CLASS_PRE ()
144- GPUdi () void MEM_LG (GPUParam)::GetClusterErrorsSeeding2 (uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const
135+ GPUdi () void GPUParam ::GetClusterErrorsSeeding2 (uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const
145136{
146137 int32_t rowType = tpcGeometry.GetROC (iRow);
147138 z = CAMath ::Abs (tpcGeometry.TPCLength () - CAMath ::Abs (z));
@@ -156,10 +147,9 @@ GPUdi() void MEM_LG(GPUParam)::GetClusterErrorsSeeding2(uint8_t sector, int32_t
156147 ErrZ2 = ErrZ2 * ErrZ2 * rec.tpc.clusterError2CorrectionZ + rec.tpc.clusterError2AdditionalZ;
157148}
158149
159- MEM_CLASS_PRE ()
160- GPUdi () float MEM_LG (GPUParam)::GetClusterError2 (int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult, float avgInvCharge, float invCharge) const
150+ GPUdi () float GPUParam ::GetClusterError2 (int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult, float avgInvCharge, float invCharge) const
161151{
162- MakeType ( const float* ) c = ParamS0Par[yz][type];
152+ const float* c = ParamS0Par[yz][type];
163153 float v = c[0 ] + c[1 ] * zDiff + c[2 ] * angle2 + c[3 ] * zDiff * zDiff + c[4 ] * angle2 * angle2 + c[5 ] * zDiff * angle2;
164154 v = CAMath ::Abs (v);
165155 if (v < 0 .0001 f) {
@@ -170,22 +160,19 @@ GPUdi() float MEM_LG(GPUParam)::GetClusterError2(int32_t yz, int32_t type, float
170160 return v;
171161}
172162
173- MEM_CLASS_PRE ()
174- GPUdi () float MEM_LG (GPUParam)::GetSystematicClusterErrorIFC2 (float trackX, float trackY, float z, bool sideC) const
163+ GPUdi () float GPUParam ::GetSystematicClusterErrorIFC2 (float trackX, float trackY, float z, bool sideC) const
175164{
176165 return 0 ;
177166}
178167
179- MEM_CLASS_PRE ()
180- GPUdi () float MEM_LG (GPUParam)::GetSystematicClusterErrorC122 (float trackX, float trackY, uint8_t sector) const
168+ GPUdi () float GPUParam ::GetSystematicClusterErrorC122 (float trackX, float trackY, uint8_t sector) const
181169{
182170 return 0 ;
183171}
184172
185173# endif // !GPUCA_TPC_GEOMETRY_O2
186174
187- MEM_CLASS_PRE ()
188- GPUdi () void MEM_LG (GPUParam)::GetClusterErrors2 (uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float avgInvCharge, float invCharge, float& ErrY2, float& ErrZ2) const
175+ GPUdi () void GPUParam ::GetClusterErrors2 (uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float avgInvCharge, float invCharge, float& ErrY2, float& ErrZ2) const
189176{
190177 const int32_t rowType = tpcGeometry.GetROC (iRow);
191178 z = CAMath ::Abs (tpcGeometry.TPCLength () - CAMath ::Abs (z));
@@ -202,8 +189,7 @@ GPUdi() void MEM_LG(GPUParam)::GetClusterErrors2(uint8_t sector, int32_t iRow, f
202189 ErrZ2 = GetClusterError2 (1 , rowType, z, angleZ2, unscaledMult, scaledInvAvgCharge, scaledInvCharge);
203190}
204191
205- MEM_CLASS_PRE ()
206- GPUdi () void MEM_LG (GPUParam)::UpdateClusterError2ByState (int16_t clusterState, float& ErrY2, float& ErrZ2) const
192+ GPUdi () void GPUParam ::UpdateClusterError2ByState (int16_t clusterState, float& ErrY2, float& ErrZ2) const
207193{
208194 if (clusterState & GPUTPCGMMergedTrackHit ::flagEdge) {
209195 ErrY2 += rec.tpc.extraClusterErrorEdgeY2;
@@ -223,8 +209,7 @@ GPUdi() void MEM_LG(GPUParam)::UpdateClusterError2ByState(int16_t clusterState,
223209 }
224210}
225211
226- MEM_CLASS_PRE ()
227- GPUdi () float MEM_LG (GPUParam)::GetUnscaledMult (float time) const
212+ GPUdi () float GPUParam ::GetUnscaledMult (float time) const
228213{
229214 if (! occupancyMap) {
230215 return 0 .f;
@@ -233,8 +218,7 @@ GPUdi() float MEM_LG(GPUParam)::GetUnscaledMult(float time) const
233218 return occupancyMap[bin];
234219}
235220
236- MEM_CLASS_PRE ()
237- GPUdi () bool MEM_LG (GPUParam)::rejectEdgeClusterByY (float uncorrectedY, int32_t iRow, float trackSigmaY) const
221+ GPUdi () bool GPUParam ::rejectEdgeClusterByY (float uncorrectedY, int32_t iRow, float trackSigmaY) const
238222{
239223 return CAMath ::Abs (uncorrectedY) > (tpcGeometry.NPads (iRow) - 1 ) * 0 .5 f * tpcGeometry.PadWidth (iRow) + rec.tpc.rejectEdgeClustersMargin + trackSigmaY * rec.tpc.rejectEdgeClustersSigmaMargin;
240224}
0 commit comments