Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GPU/Common/GPUCommonConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
namespace o2::gpu::gpu_common_constants
{
static constexpr const float kCLight = 0.000299792458f; // TODO: Duplicate of MathConstants, fix this now that we use only OpenCL CPP
static constexpr const float kZeroFieldCut = 0.013f;
}

#endif
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Merger/GPUTPCGMMerger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ void GPUTPCGMMerger::SetMaxData(const GPUTrackingInOutPointers& io)
}
}
mNMaxOutputTrackClusters = mRec->MemoryScalers()->NTPCMergedTrackHits(mNClusters);
if (CAMath::Abs(Param().polynomialField.GetNominalBz()) < (0.013f * gpu_common_constants::kCLight)) {
if (CAMath::Abs(Param().polynomialField.GetNominalBz()) < (gpu_common_constants::kZeroFieldCut * gpu_common_constants::kCLight)) {
mNMaxTracks = mRec->MemoryScalers()->getValue(mNTotalSectorTracks, mNTotalSectorTracks); // 0 magnetic field
} else {
mNMaxTracks = mRec->MemoryScalers()->NTPCMergedTracks(mNTotalSectorTracks);
Expand Down Expand Up @@ -1743,7 +1743,7 @@ GPUd() void GPUTPCGMMerger::CollectMergedTracks(int32_t nBlocks, int32_t nThread
p1.DzDs() = p2.DzDs();
p1.QPt() = p2.QPt();
mergedTrack.SetAlpha(p2.Alpha());
if (CAMath::Abs(Param().polynomialField.GetNominalBz()) < (0.013f * gpu_common_constants::kCLight)) {
if (CAMath::Abs(Param().polynomialField.GetNominalBz()) < (gpu_common_constants::kZeroFieldCut * gpu_common_constants::kCLight)) {
p1.QPt() = 100.f / Param().rec.bz0Pt10MeV;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ int32_t GPUTPCGMPolynomialFieldManager::GetPolynomialField(float nominalFieldkG,

StoredField_t type = kUnknown;

if (fabsf(nominalFieldkG) < 0.013f) {
if (fabsf(nominalFieldkG) < gpu_common_constants::kZeroFieldCut) {
type = kUniform;
nominalFieldkG = 0;
} else if (fabsf(fabsf(nominalFieldkG) - 5.00668f) <= fabsf(fabsf(nominalFieldkG) - 2.f)) {
Expand Down