Skip to content

Commit b76f2af

Browse files
committed
ITS: include cleaning
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 6c94101 commit b76f2af

File tree

4 files changed

+28
-40
lines changed

4 files changed

+28
-40
lines changed

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Cluster.h

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,12 @@
1616
#ifndef TRACKINGITSU_INCLUDE_CACLUSTER_H_
1717
#define TRACKINGITSU_INCLUDE_CACLUSTER_H_
1818

19-
#include "GPUCommonRtypes.h"
20-
#include "ITStracking/Definitions.h"
21-
#include "ITStracking/MathUtils.h"
22-
23-
#ifndef GPUCA_GPUCODE_DEVICE
2419
#include <array>
25-
#endif
2620

27-
namespace o2
28-
{
29-
namespace its
21+
#include "GPUCommonRtypes.h"
22+
#include "GPUCommonArray.h"
23+
24+
namespace o2::its
3025
{
3126

3227
class IndexTableUtils;
@@ -40,13 +35,13 @@ struct Cluster final {
4035
bool operator==(const Cluster&) const;
4136
GPUhd() void print() const;
4237

43-
float xCoordinate; // = -999.f;
44-
float yCoordinate; // = -999.f;
45-
float zCoordinate; // = -999.f;
46-
float phi; // = -999.f;
47-
float radius; // = -999.f;
48-
int clusterId; // = -1;
49-
int indexTableBinIndex; // = -1;
38+
float xCoordinate{-999.f};
39+
float yCoordinate{-999.f};
40+
float zCoordinate{-999.f};
41+
float phi{-999.f};
42+
float radius{-999.f};
43+
int clusterId{-1};
44+
int indexTableBinIndex{-1};
5045

5146
ClassDefNV(Cluster, 1);
5247
};
@@ -62,11 +57,11 @@ struct TrackingFrameInfo {
6257
TrackingFrameInfo() = default;
6358
TrackingFrameInfo(float x, float y, float z, float xTF, float alpha, std::array<float, 2>&& posTF, std::array<float, 3>&& covTF);
6459

65-
float xCoordinate;
66-
float yCoordinate;
67-
float zCoordinate;
68-
float xTrackingFrame;
69-
float alphaTrackingFrame;
60+
float xCoordinate{-999.f};
61+
float yCoordinate{-999.f};
62+
float zCoordinate{-999.f};
63+
float xTrackingFrame{-999.f};
64+
float alphaTrackingFrame{-999.f};
7065
std::array<float, 2> positionTrackingFrame = {-1., -1.};
7166
std::array<float, 3> covarianceTrackingFrame = {999., 999., 999.};
7267
GPUdi() void print() const
@@ -78,10 +73,8 @@ struct TrackingFrameInfo {
7873
covarianceTrackingFrame[0], covarianceTrackingFrame[1], covarianceTrackingFrame[2]);
7974
#endif
8075
}
81-
82-
ClassDefNV(TrackingFrameInfo, 1);
8376
};
84-
} // namespace its
85-
} // namespace o2
77+
78+
} // namespace o2::its
8679

8780
#endif /* TRACKINGITSU_INCLUDE_CACLUSTER_H_ */

Detectors/ITSMFT/ITS/tracking/include/ITStracking/VertexerTraits.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "ITStracking/IndexTableUtils.h"
2929
#include "ITStracking/TimeFrame.h"
3030
#include "ITStracking/Tracklet.h"
31+
#include "ITStracking/MathUtils.h"
3132

3233
#include "GPUCommonDef.h"
3334
#include "GPUCommonMath.h"

Detectors/ITSMFT/ITS/tracking/src/Cluster.cxx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,15 @@
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

2925
using math_utils::computePhi;
3026
using 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

Detectors/ITSMFT/ITS/tracking/src/TimeFrame.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
///
1515

1616
#include "ITStracking/TimeFrame.h"
17+
#include "ITStracking/MathUtils.h"
1718
#include "DataFormatsITSMFT/Cluster.h"
1819
#include "DataFormatsITSMFT/CompCluster.h"
1920
#include "DataFormatsITSMFT/ROFRecord.h"

0 commit comments

Comments
 (0)