1212// / \file Cluster.cxx
1313// / \brief
1414// /
15+ #include " GPUCommonMath.h"
16+ #include " GPUCommonArray.h"
1517
1618#include " ITStracking/Cluster.h"
19+ #include " ITStracking/Definitions.h"
1720#include " ITStracking/MathUtils.h"
1821#include " ITStracking/IndexTableUtils.h"
1922
20- #ifndef GPUCA_GPUCODE_DEVICE
21- #include < array>
22- #endif
23-
24- namespace o2
25- {
26- namespace its
27- {
23+ using namespace o2 ::its;
2824
2925using math_utils::computePhi;
3026using math_utils::getNormalizedPhi;
@@ -35,7 +31,7 @@ Cluster::Cluster(const float x, const float y, const float z, const int index)
3531 yCoordinate{y},
3632 zCoordinate{z},
3733 phi{getNormalizedPhi (computePhi (x, y))},
38- radius{hypot (x, y)},
34+ radius{o2::gpu::GPUCommonMath::Hypot (x, y)},
3935 clusterId{index},
4036 indexTableBinIndex{0 }
4137{
@@ -47,7 +43,7 @@ Cluster::Cluster(const int layerIndex, const IndexTableUtils& utils, const Clust
4743 yCoordinate{other.yCoordinate },
4844 zCoordinate{other.zCoordinate },
4945 phi{getNormalizedPhi (computePhi (other.xCoordinate , other.yCoordinate ))},
50- radius{hypot (other.xCoordinate , other.yCoordinate )},
46+ radius{o2::gpu::GPUCommonMath::Hypot (other.xCoordinate , other.yCoordinate )},
5147 clusterId{other.clusterId },
5248 indexTableBinIndex{utils.getBinIndex (utils.getZBinIndex (layerIndex, zCoordinate),
5349 utils.getPhiBinIndex (phi))}
@@ -62,7 +58,7 @@ Cluster::Cluster(const int layerIndex, const float3& primaryVertex, const IndexT
6258 zCoordinate{other.zCoordinate },
6359 phi{getNormalizedPhi (
6460 computePhi (xCoordinate - primaryVertex.x , yCoordinate - primaryVertex.y ))},
65- radius{hypot (xCoordinate - primaryVertex.x , yCoordinate - primaryVertex.y )},
61+ radius{o2::gpu::GPUCommonMath::Hypot (xCoordinate - primaryVertex.x , yCoordinate - primaryVertex.y )},
6662 clusterId{other.clusterId },
6763 indexTableBinIndex{utils.getBinIndex (utils.getZBinIndex (layerIndex, zCoordinate),
6864 utils.getPhiBinIndex (phi))}
@@ -77,7 +73,7 @@ void Cluster::Init(const int layerIndex, const float3& primaryVertex, const Inde
7773 zCoordinate = other.zCoordinate ;
7874 phi = getNormalizedPhi (
7975 computePhi (xCoordinate - primaryVertex.x , yCoordinate - primaryVertex.y ));
80- radius = hypot (xCoordinate - primaryVertex.x , yCoordinate - primaryVertex.y );
76+ radius = o2::gpu::GPUCommonMath::Hypot (xCoordinate - primaryVertex.x , yCoordinate - primaryVertex.y );
8177 clusterId = other.clusterId ;
8278 indexTableBinIndex = utils.getBinIndex (utils.getZBinIndex (layerIndex, zCoordinate),
8379 utils.getPhiBinIndex (phi));
@@ -100,6 +96,3 @@ TrackingFrameInfo::TrackingFrameInfo(float x, float y, float z, float xTF, float
10096{
10197 // Nothing to do
10298}
103-
104- } // namespace its
105- } // namespace o2
0 commit comments