@@ -55,11 +55,6 @@ namespace o2::its
5555{
5656using Vertex = o2::dataformats::Vertex<o2::dataformats::TimeStamp<int >>;
5757
58- GPUdii () float Sq (float v)
59- {
60- return v * v;
61- }
62-
6358namespace gpu
6459{
6560
@@ -68,9 +63,9 @@ GPUd() const int4 getBinsRect(const Cluster& currentCluster, const int layerInde
6863 const float z1, const float z2, float maxdeltaz, float maxdeltaphi)
6964{
7065 const float zRangeMin = o2::gpu::CAMath::Min (z1, z2) - maxdeltaz;
71- const float phiRangeMin = (maxdeltaphi > constants::math::Pi ) ? 0 .f : currentCluster.phi - maxdeltaphi;
66+ const float phiRangeMin = (maxdeltaphi > o2:: constants::math::PI ) ? 0 .f : currentCluster.phi - maxdeltaphi;
7267 const float zRangeMax = o2::gpu::CAMath::Max (z1, z2) + maxdeltaz;
73- const float phiRangeMax = (maxdeltaphi > constants::math::Pi ) ? constants::math::TwoPi : currentCluster.phi + maxdeltaphi;
68+ const float phiRangeMax = (maxdeltaphi > o2:: constants::math::PI ) ? o2:: constants::math::TwoPI : currentCluster.phi + maxdeltaphi;
7469
7570 if (zRangeMax < -utils.getLayerZ (layerIndex) ||
7671 zRangeMin > utils.getLayerZ (layerIndex) || zRangeMin > zRangeMax) {
@@ -98,7 +93,7 @@ GPUd() bool fitTrack(TrackITSExt& track,
9893 o2::base::PropagatorF::MatCorrType matCorrType)
9994{
10095 for (int iLayer{start}; iLayer != end; iLayer += step) {
101- if (track.getClusterIndex (iLayer) == constants::its:: UnusedIndex) {
96+ if (track.getClusterIndex (iLayer) == constants::UnusedIndex) {
10297 continue ;
10398 }
10499 const TrackingFrameInfo& trackingHit = tfInfos[iLayer][track.getClusterIndex (iLayer)];
@@ -285,7 +280,7 @@ GPUg() void fitTrackSeedsKernel(
285280 temporaryTrack.setChi2 (0 );
286281 int * clusters = seed.getClusters ();
287282 for (int iL{0 }; iL < 7 ; ++iL) {
288- temporaryTrack.setExternalClusterIndex (iL, clusters[iL], clusters[iL] != constants::its:: UnusedIndex);
283+ temporaryTrack.setExternalClusterIndex (iL, clusters[iL], clusters[iL] != constants::UnusedIndex);
289284 }
290285 bool fitSuccess = fitTrack (temporaryTrack, // TrackITSExt& track,
291286 0 , // int lastLayer,
@@ -391,8 +386,6 @@ GPUg() void computeLayerCellsKernel(
391386 const float cellDeltaTanLambdaSigma,
392387 const float nSigmaCut)
393388{
394- constexpr float constants::Radl = 9 .36f ; // Radiation length of Si [cm].
395- constexpr float constants::Rho = 2 .33f ; // Density of Si [g/cm^3].
396389 constexpr float layerxX0[7 ] = {5 .e -3f , 5 .e -3f , 5 .e -3f , 1 .e -2f , 1 .e -2f , 1 .e -2f , 1 .e -2f }; // Hardcoded here for the moment.
397390 for (int iCurrentTrackletIndex = blockIdx .x * blockDim .x + threadIdx .x ; iCurrentTrackletIndex < nTrackletsCurrent; iCurrentTrackletIndex += blockDim .x * gridDim .x ) {
398391 const Tracklet& currentTracklet = tracklets[layer][iCurrentTrackletIndex];
@@ -517,12 +510,12 @@ GPUg() void computeLayerTrackletsMultiROFKernel(
517510 if (primaryVertex.isFlagSet (2 ) && iteration != 3 ) {
518511 continue ;
519512 }
520- const float resolution = o2::gpu::CAMath::Sqrt (Sq (resolutionPV) / primaryVertex.getNContributors () + Sq (positionResolution));
513+ const float resolution = o2::gpu::CAMath::Sqrt (math_utils:: Sq (resolutionPV) / primaryVertex.getNContributors () + math_utils:: Sq (positionResolution));
521514 const float tanLambda{(currentCluster.zCoordinate - primaryVertex.getZ ()) * inverseR0};
522515 const float zAtRmin{tanLambda * (minR - currentCluster.radius ) + currentCluster.zCoordinate };
523516 const float zAtRmax{tanLambda * (maxR - currentCluster.radius ) + currentCluster.zCoordinate };
524- const float sqInverseDeltaZ0{1 .f / (Sq (currentCluster.zCoordinate - primaryVertex.getZ ()) + 2 .e -8f )}; // / protecting from overflows adding the detector resolution
525- const float sigmaZ{o2::gpu::CAMath::Sqrt (Sq (resolution) * Sq (tanLambda) * ((Sq (inverseR0) + sqInverseDeltaZ0) * Sq (meanDeltaR) + 1 .f ) + Sq (meanDeltaR * MSAngle))};
517+ const float sqInverseDeltaZ0{1 .f / (math_utils:: Sq (currentCluster.zCoordinate - primaryVertex.getZ ()) + 2 .e -8f )}; // / protecting from overflows adding the detector resolution
518+ const float sigmaZ{o2::gpu::CAMath::Sqrt (math_utils:: Sq (resolution) * math_utils:: Sq (tanLambda) * ((math_utils:: Sq (inverseR0) + sqInverseDeltaZ0) * math_utils:: Sq (meanDeltaR) + 1 .f ) + math_utils:: Sq (meanDeltaR * MSAngle))};
526519 const int4 selectedBinsRect{getBinsRect (currentCluster, layerIndex + 1 , *utils, zAtRmin, zAtRmax, sigmaZ * NSigmaCut, phiCut)};
527520 if (selectedBinsRect.x == 0 && selectedBinsRect.y == 0 && selectedBinsRect.z == 0 && selectedBinsRect.w == 0 ) {
528521 continue ;
@@ -556,7 +549,7 @@ GPUg() void computeLayerTrackletsMultiROFKernel(
556549 const float deltaPhi{o2::gpu::CAMath::Abs (currentCluster.phi - nextCluster.phi )};
557550 const float deltaZ{o2::gpu::CAMath::Abs (tanLambda * (nextCluster.radius - currentCluster.radius ) + currentCluster.zCoordinate - nextCluster.zCoordinate )};
558551 const int nextSortedIndex{ROFClusters[layerIndex + 1 ][rof1] + nextClusterIndex};
559- if (deltaZ / sigmaZ < NSigmaCut && (deltaPhi < phiCut || o2::gpu::CAMath::Abs (deltaPhi - constants::math::TwoPi ) < phiCut)) {
552+ if (deltaZ / sigmaZ < NSigmaCut && (deltaPhi < phiCut || o2::gpu::CAMath::Abs (deltaPhi - o2:: constants::math::TwoPI ) < phiCut)) {
560553 if constexpr (initRun) {
561554 trackletsLUT[layerIndex][currentSortedIndex]++; // we need l0 as well for usual exclusive sums.
562555 } else {
0 commit comments