Skip to content

Commit f4a50d7

Browse files
committed
Using commond angle normalisation
1 parent 824fcf0 commit f4a50d7

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

‎Detectors/ITSMFT/common/tracking/include/ITSMFTTracking/IndexTableUtils.h‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,14 @@
2727
#include "GPUCommonDef.h"
2828
#include "ITSMFTTracking/Configuration.h"
2929
#include "ITSMFTTracking/IdTypes.h"
30+
#include "ITSMFTTracking/MathUtils.h"
3031

3132
namespace o2::itsmft
3233
{
3334

3435
enum class IndexTableCoordType : uint8_t { PhiZ,
3536
PhiR };
3637

37-
namespace index_table_utils
38-
{
39-
GPUhdi() float getNormalizedPhi(float phi)
40-
{
41-
phi -= o2::constants::math::TwoPI * o2::gpu::GPUCommonMath::Floor(phi * (1.f / o2::constants::math::TwoPI));
42-
return phi;
43-
}
44-
} // namespace index_table_utils
45-
4638
/// Row/column LUT helper. Charts have periodic phi rows and a
4739
/// descriptor-bounded linear column.
4840
/// MaxLayoutSurfaces storage keeps GPUhdi() access device-portable; callers
@@ -211,9 +203,9 @@ GPUhdi() int4 getBinsPhiColumn(float phi, const int layerIndex,
211203
}
212204

213205
return int4{o2::gpu::GPUCommonMath::Max(0, utils.getColBinIndex(layerIndex, colRangeMin)),
214-
utils.getRowBinIndex(index_table_utils::getNormalizedPhi(rowRangeMin)),
206+
utils.getRowBinIndex(o2::its::math_utils::getNormalizedPhi(rowRangeMin)),
215207
o2::gpu::GPUCommonMath::Min(utils.getNcolBins() - 1, utils.getColBinIndex(layerIndex, colRangeMax)),
216-
utils.getRowBinIndex(index_table_utils::getNormalizedPhi(rowRangeMax))};
208+
utils.getRowBinIndex(o2::its::math_utils::getNormalizedPhi(rowRangeMax))};
217209
}
218210

219211
} // namespace o2::itsmft

0 commit comments

Comments
 (0)