Skip to content

Commit 3f3f793

Browse files
committed
GPU TPC: Rename slice to sector
1 parent f041ea2 commit 3f3f793

File tree

148 files changed

+2184
-2184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2184
-2184
lines changed

GPU/GPUTracking/Base/GPUConstantMem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ namespace gpu
4141
struct GPUConstantMem {
4242
GPUParam param;
4343
GPUTPCTracker
44-
tpcTrackers[GPUCA_NSLICES];
44+
tpcTrackers[GPUCA_NSECTORS];
4545
GPUTPCConvert tpcConverter;
4646
GPUTPCCompression tpcCompressor;
4747
GPUTPCDecompression tpcDecompressor;
4848
GPUTPCGMMerger tpcMerger;
4949
GPUTRDTrackerGPU trdTrackerGPU;
5050
GPUTRDTracker trdTrackerO2;
51-
GPUTPCClusterFinder tpcClusterer[GPUCA_NSLICES];
51+
GPUTPCClusterFinder tpcClusterer[GPUCA_NSECTORS];
5252
GPUITSFitter itsFitter;
5353
GPUTrackingRefitProcessor trackingRefit;
5454
GPUTrackingInOutPointers ioPtrs;

GPU/GPUTracking/Base/GPUParam.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,22 @@ void GPUParam::SetDefaults(float solenoidBz)
9191
constexpr float plusZmax = 249.778;
9292
constexpr float minusZmin = -249.645;
9393
constexpr float minusZmax = -0.0799937;
94-
for (int32_t i = 0; i < GPUCA_NSLICES; i++) {
95-
const bool zPlus = (i < GPUCA_NSLICES / 2);
96-
SliceParam[i].ZMin = zPlus ? plusZmin : minusZmin;
97-
SliceParam[i].ZMax = zPlus ? plusZmax : minusZmax;
94+
for (int32_t i = 0; i < GPUCA_NSECTORS; i++) {
95+
const bool zPlus = (i < GPUCA_NSECTORS / 2);
96+
SectorParam[i].ZMin = zPlus ? plusZmin : minusZmin;
97+
SectorParam[i].ZMax = zPlus ? plusZmax : minusZmax;
9898
int32_t tmp = i;
99-
if (tmp >= GPUCA_NSLICES / 2) {
100-
tmp -= GPUCA_NSLICES / 2;
99+
if (tmp >= GPUCA_NSECTORS / 2) {
100+
tmp -= GPUCA_NSECTORS / 2;
101101
}
102-
if (tmp >= GPUCA_NSLICES / 4) {
103-
tmp -= GPUCA_NSLICES / 2;
102+
if (tmp >= GPUCA_NSECTORS / 4) {
103+
tmp -= GPUCA_NSECTORS / 2;
104104
}
105-
SliceParam[i].Alpha = 0.174533f + par.dAlpha * tmp;
106-
SliceParam[i].CosAlpha = CAMath::Cos(SliceParam[i].Alpha);
107-
SliceParam[i].SinAlpha = CAMath::Sin(SliceParam[i].Alpha);
108-
SliceParam[i].AngleMin = SliceParam[i].Alpha - par.dAlpha / 2.f;
109-
SliceParam[i].AngleMax = SliceParam[i].Alpha + par.dAlpha / 2.f;
105+
SectorParam[i].Alpha = 0.174533f + par.dAlpha * tmp;
106+
SectorParam[i].CosAlpha = CAMath::Cos(SectorParam[i].Alpha);
107+
SectorParam[i].SinAlpha = CAMath::Sin(SectorParam[i].Alpha);
108+
SectorParam[i].AngleMin = SectorParam[i].Alpha - par.dAlpha / 2.f;
109+
SectorParam[i].AngleMax = SectorParam[i].Alpha + par.dAlpha / 2.f;
110110
}
111111

112112
par.assumeConstantBz = false;

GPU/GPUTracking/Base/GPUParam.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ struct GPUSettingsRec;
3939
struct GPUSettingsGTP;
4040
struct GPURecoStepConfiguration;
4141

42-
struct GPUParamSlice {
43-
float Alpha; // slice angle
44-
float CosAlpha, SinAlpha; // sign and cosine of the slice angle
42+
struct GPUParamSector {
43+
float Alpha; // sector angle
44+
float CosAlpha, SinAlpha; // sign and cosine of the sector angle
4545
float AngleMin, AngleMax; // minimal and maximal angle
46-
float ZMin, ZMax; // slice Z range
46+
float ZMin, ZMax; // sector Z range
4747
};
4848

4949
namespace internal
@@ -66,7 +66,7 @@ struct GPUParam_t {
6666
const uint32_t* occupancyMap; // Ptr to TPC occupancy map
6767
uint32_t occupancyTotal; // Total occupancy in the TPC (nCl / nHbf)
6868

69-
GPUParamSlice SliceParam[GPUCA_NSLICES];
69+
GPUParamSector SectorParam[GPUCA_NSECTORS];
7070

7171
protected:
7272
#ifdef GPUCA_TPC_GEOMETRY_O2
@@ -88,15 +88,15 @@ struct GPUParam : public internal::GPUParam_t<GPUSettingsRec, GPUSettingsParam>
8888
void UpdateRun3ClusterErrors(const float* yErrorParam, const float* zErrorParam);
8989
#endif
9090

91-
GPUd() float Alpha(int32_t iSlice) const
91+
GPUd() float Alpha(int32_t iSector) const
9292
{
93-
if (iSlice >= GPUCA_NSLICES / 2) {
94-
iSlice -= GPUCA_NSLICES / 2;
93+
if (iSector >= GPUCA_NSECTORS / 2) {
94+
iSector -= GPUCA_NSECTORS / 2;
9595
}
96-
if (iSlice >= GPUCA_NSLICES / 4) {
97-
iSlice -= GPUCA_NSLICES / 2;
96+
if (iSector >= GPUCA_NSECTORS / 4) {
97+
iSector -= GPUCA_NSECTORS / 2;
9898
}
99-
return 0.174533f + par.dAlpha * iSlice;
99+
return 0.174533f + par.dAlpha * iSector;
100100
}
101101
GPUd() float GetClusterErrorSeeding(int32_t yz, int32_t type, float zDiff, float angle2, float unscaledMult) const;
102102
GPUd() void GetClusterErrorsSeeding2(uint8_t sector, int32_t row, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const;
@@ -108,8 +108,8 @@ struct GPUParam : public internal::GPUParam_t<GPUSettingsRec, GPUSettingsParam>
108108
GPUd() void UpdateClusterError2ByState(int16_t clusterState, float& ErrY2, float& ErrZ2) const;
109109
GPUd() float GetUnscaledMult(float time) const;
110110

111-
GPUd() void Slice2Global(int32_t iSlice, float x, float y, float z, float* X, float* Y, float* Z) const;
112-
GPUd() void Global2Slice(int32_t iSlice, float x, float y, float z, float* X, float* Y, float* Z) const;
111+
GPUd() void Sector2Global(int32_t iSector, float x, float y, float z, float* X, float* Y, float* Z) const;
112+
GPUd() void Global2Sector(int32_t iSector, float x, float y, float z, float* X, float* Y, float* Z) const;
113113

114114
GPUd() bool rejectEdgeClusterByY(float uncorrectedY, int32_t iRow, float trackSigmaY) const;
115115
};

GPU/GPUTracking/Base/GPUParam.inc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ namespace o2
2424
namespace gpu
2525
{
2626

27-
GPUdi() void GPUParam::Slice2Global(int32_t iSlice, float x, float y, float z, float* X, float* Y, float* Z) const
27+
GPUdi() void GPUParam::Sector2Global(int32_t iSector, float x, float y, float z, float* X, float* Y, float* Z) const
2828
{
2929
// conversion of coordinates sector->global
30-
*X = x * SliceParam[iSlice].CosAlpha - y * SliceParam[iSlice].SinAlpha;
31-
*Y = y * SliceParam[iSlice].CosAlpha + x * SliceParam[iSlice].SinAlpha;
30+
*X = x * SectorParam[iSector].CosAlpha - y * SectorParam[iSector].SinAlpha;
31+
*Y = y * SectorParam[iSector].CosAlpha + x * SectorParam[iSector].SinAlpha;
3232
*Z = z;
3333
}
3434

35-
GPUdi() void GPUParam::Global2Slice(int32_t iSlice, float X, float Y, float Z, float* x, float* y, float* z) const
35+
GPUdi() void GPUParam::Global2Sector(int32_t iSector, float X, float Y, float Z, float* x, float* y, float* z) const
3636
{
3737
// conversion of coordinates global->sector
38-
*x = X * SliceParam[iSlice].CosAlpha + Y * SliceParam[iSlice].SinAlpha;
39-
*y = Y * SliceParam[iSlice].CosAlpha - X * SliceParam[iSlice].SinAlpha;
38+
*x = X * SectorParam[iSector].CosAlpha + Y * SectorParam[iSector].SinAlpha;
39+
*y = Y * SectorParam[iSector].CosAlpha - X * SectorParam[iSector].SinAlpha;
4040
*z = Z;
4141
}
4242

@@ -117,7 +117,7 @@ GPUdi() float GPUParam::GetSystematicClusterErrorC122(float x, float y, uint8_t
117117
return 0.f;
118118
}
119119
constexpr float dEdgeInv = 18.f / CAMath::Pi();
120-
const float dy = (sector == (GPUCA_NSLICES / 2 + 1) ? 0.5f : -0.5f) * (y / x) * dEdgeInv + 0.5f;
120+
const float dy = (sector == (GPUCA_NSECTORS / 2 + 1) ? 0.5f : -0.5f) * (y / x) * dEdgeInv + 0.5f;
121121
const float errC12 = rec.tpc.sysClusErrorC12Norm * occupancyTotal * dy;
122122
return errC12 * errC12;
123123
}

GPU/GPUTracking/Base/GPUReconstruction.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ GPUReconstruction::GPUReconstruction(const GPUSettingsDeviceBackend& cfg) : mHos
9090
new (&mGRPSettings) GPUSettingsGRP;
9191
param().SetDefaults(&mGRPSettings);
9292
mMemoryScalers.reset(new GPUMemorySizeScalers);
93-
for (uint32_t i = 0; i < NSLICES; i++) {
94-
processors()->tpcTrackers[i].SetSlice(i); // TODO: Move to a better place
95-
processors()->tpcClusterer[i].mISlice = i;
93+
for (uint32_t i = 0; i < NSECTORS; i++) {
94+
processors()->tpcTrackers[i].SetSector(i); // TODO: Move to a better place
95+
processors()->tpcClusterer[i].mISector = i;
9696
}
9797
#ifndef GPUCA_NO_ROOT
9898
mROOTDump = GPUROOTDumpCore::getAndCreate();
@@ -273,8 +273,8 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
273273
if (mProcessingSettings.trackletSelectorInPipeline < 0) {
274274
mProcessingSettings.trackletSelectorInPipeline = 1;
275275
}
276-
if (mProcessingSettings.trackletSelectorSlices < 0) {
277-
mProcessingSettings.trackletSelectorSlices = 1;
276+
if (mProcessingSettings.trackletSelectorSectors < 0) {
277+
mProcessingSettings.trackletSelectorSectors = 1;
278278
}
279279
}
280280
if (mProcessingSettings.createO2Output > 1 && mProcessingSettings.runQA && mProcessingSettings.qcRunFraction == 100.f) {
@@ -334,14 +334,14 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
334334
}
335335

336336
if (mProcessingSettings.nTPCClustererLanes == -1) {
337-
mProcessingSettings.nTPCClustererLanes = (GetRecoStepsGPU() & RecoStep::TPCClusterFinding) ? 3 : std::max<int32_t>(1, std::min<int32_t>(GPUCA_NSLICES, mProcessingSettings.inKernelParallel ? (mMaxHostThreads >= 4 ? std::min<int32_t>(mMaxHostThreads / 2, mMaxHostThreads >= 32 ? GPUCA_NSLICES : 4) : 1) : mMaxHostThreads));
337+
mProcessingSettings.nTPCClustererLanes = (GetRecoStepsGPU() & RecoStep::TPCClusterFinding) ? 3 : std::max<int32_t>(1, std::min<int32_t>(GPUCA_NSECTORS, mProcessingSettings.inKernelParallel ? (mMaxHostThreads >= 4 ? std::min<int32_t>(mMaxHostThreads / 2, mMaxHostThreads >= 32 ? GPUCA_NSECTORS : 4) : 1) : mMaxHostThreads));
338338
}
339339
if (mProcessingSettings.overrideClusterizerFragmentLen == -1) {
340340
mProcessingSettings.overrideClusterizerFragmentLen = ((GetRecoStepsGPU() & RecoStep::TPCClusterFinding) || (mMaxHostThreads / mProcessingSettings.nTPCClustererLanes >= 3)) ? TPC_MAX_FRAGMENT_LEN_GPU : TPC_MAX_FRAGMENT_LEN_HOST;
341341
}
342-
if (mProcessingSettings.nTPCClustererLanes > GPUCA_NSLICES) {
342+
if (mProcessingSettings.nTPCClustererLanes > GPUCA_NSECTORS) {
343343
GPUError("Invalid value for nTPCClustererLanes: %d", mProcessingSettings.nTPCClustererLanes);
344-
mProcessingSettings.nTPCClustererLanes = GPUCA_NSLICES;
344+
mProcessingSettings.nTPCClustererLanes = GPUCA_NSECTORS;
345345
}
346346

347347
if (mProcessingSettings.doublePipeline && (mChains.size() != 1 || mChains[0]->SupportsDoublePipeline() == false || !IsGPU() || mProcessingSettings.memoryAllocationStrategy != GPUMemoryResource::ALLOCATION_GLOBAL)) {

GPU/GPUTracking/Base/GPUReconstruction.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "GPUOutputControl.h"
3232
#include "GPUMemoryResource.h"
3333
#include "GPUConstantMem.h"
34-
#include "GPUTPCSliceOutput.h"
34+
#include "GPUTPCSectorOutput.h"
3535
#include "GPULogging.h"
3636

3737
namespace o2
@@ -76,7 +76,7 @@ class GPUReconstruction
7676
GPUReconstruction& operator=(const GPUReconstruction&) = delete;
7777

7878
// General definitions
79-
constexpr static uint32_t NSLICES = GPUCA_NSLICES;
79+
constexpr static uint32_t NSECTORS = GPUCA_NSECTORS;
8080

8181
using GeometryType = GPUDataTypes::GeometryType;
8282
using DeviceType = GPUDataTypes::DeviceType;
@@ -94,8 +94,8 @@ class GPUReconstruction
9494

9595
static DeviceType GetDeviceType(const char* type);
9696
enum InOutPointerType : uint32_t { CLUSTER_DATA = 0,
97-
SLICE_OUT_TRACK = 1,
98-
SLICE_OUT_CLUSTER = 2,
97+
SECTOR_OUT_TRACK = 1,
98+
SECTOR_OUT_CLUSTER = 2,
9999
MC_LABEL_TPC = 3,
100100
MC_INFO_TPC = 4,
101101
MERGED_TRACK = 5,
@@ -113,10 +113,10 @@ class GPUReconstruction
113113
TRD_SPACEPOINT = 17,
114114
TRD_TRIGGERRECORDS = 18,
115115
TF_SETTINGS = 19 };
116-
static constexpr const char* const IOTYPENAMES[] = {"TPC HLT Clusters", "TPC Slice Tracks", "TPC Slice Track Clusters", "TPC Cluster MC Labels", "TPC Track MC Informations", "TPC Tracks", "TPC Track Clusters", "TRD Tracks", "TRD Tracklets",
116+
static constexpr const char* const IOTYPENAMES[] = {"TPC HLT Clusters", "TPC Sector Tracks", "TPC Sector Track Clusters", "TPC Cluster MC Labels", "TPC Track MC Informations", "TPC Tracks", "TPC Track Clusters", "TRD Tracks", "TRD Tracklets",
117117
"TPC Raw Clusters", "TPC Native Clusters", "TRD Tracklet MC Labels", "TPC Compressed Clusters", "TPC Digit", "TPC ZS Page", "TPC Native Clusters MC Labels", "TPC Digit MC Labeels",
118118
"TRD Spacepoints", "TRD Triggerrecords", "TF Settings"};
119-
static uint32_t getNIOTypeMultiplicity(InOutPointerType type) { return (type == CLUSTER_DATA || type == SLICE_OUT_TRACK || type == SLICE_OUT_CLUSTER || type == RAW_CLUSTERS || type == TPC_DIGIT || type == TPC_DIGIT_MC) ? NSLICES : 1; }
119+
static uint32_t getNIOTypeMultiplicity(InOutPointerType type) { return (type == CLUSTER_DATA || type == SECTOR_OUT_TRACK || type == SECTOR_OUT_CLUSTER || type == RAW_CLUSTERS || type == TPC_DIGIT || type == TPC_DIGIT_MC) ? NSECTORS : 1; }
120120

121121
// Functionality to create an instance of GPUReconstruction for the desired device
122122
static GPUReconstruction* CreateInstance(const GPUSettingsDeviceBackend& cfg);

GPU/GPUTracking/Base/GPUReconstructionCPU.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include "GPUChain.h"
1919

2020
#include "GPUTPCClusterData.h"
21-
#include "GPUTPCSliceOutput.h"
22-
#include "GPUTPCSliceOutCluster.h"
21+
#include "GPUTPCSectorOutput.h"
22+
#include "GPUTPCSectorOutCluster.h"
2323
#include "GPUTPCGMMergedTrack.h"
2424
#include "GPUTPCGMMergedTrackHit.h"
2525
#include "GPUTRDTrackletWord.h"

0 commit comments

Comments
 (0)