Skip to content

Commit 6be78bc

Browse files
committed
GPU: Remove some preprocessor defines, move to GPUParam
1 parent 467c2d8 commit 6be78bc

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

GPU/GPUTracking/Definitions/GPUDefConstantsAndSettings.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
#define GPUCA_MERGER_MAX_TRACK_CLUSTERS 1024 // Maximum number of clusters a track may have after merging
3636

3737
#define GPUCA_MAXN 40 // Maximum number of neighbor hits to consider in one row in neightbors finder
38-
#define GPUCA_MIN_TRACK_PTB5_DEFAULT 0.010f // Default setting for minimum track Pt at some places (at B=0.5T)
39-
#define GPUCA_MIN_TRACK_PTB5_REJECT_DEFAULT 0.050f // Default setting for Pt (at B=0.5T) where tracks are rejected
4038

4139
#define GPUCA_MAX_SIN_PHI_LOW 0.99f // Limits for maximum sin phi during fit
4240
#define GPUCA_MAX_SIN_PHI 0.999f // Must be preprocessor define because c++ pre 11 cannot use static constexpr for initializes

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ BeginNamespace(gpu)
3939

4040
// Reconstruction parameters for TPC, no bool in here !!!
4141
BeginSubConfig(GPUSettingsRecTPC, tpc, configStandalone.rec, "RECTPC", 0, "Reconstruction settings", rec_tpc)
42-
AddOptionRTC(rejectQPtB5, float, 1.f / GPUCA_MIN_TRACK_PTB5_REJECT_DEFAULT, "", 0, "QPt threshold to reject clusters of TPC tracks (Inverse Pt, scaled to B=0.5T!!!)")
42+
AddOptionRTC(rejectQPtB5, float, 1.f / 0.050f, "", 0, "QPt threshold to reject clusters of TPC tracks (Inverse Pt, scaled to B=0.5T!!!)")
4343
AddOptionRTC(hitPickUpFactor, float, 1.f, "", 0, "multiplier for the combined cluster+track error during track following")
4444
AddOptionRTC(hitSearchArea2, float, 2.f, "", 0, "square of maximum search road of hits during seeding")
4545
AddOptionRTC(neighboursSearchArea, float, 3.f, "", 0, "area in cm for the search of neighbours, for z only used if searchWindowDZDR = 0")
@@ -195,7 +195,7 @@ EndConfig()
195195

196196
// Global reconstruction parameters, no bool in here !!!
197197
BeginSubConfig(GPUSettingsRec, rec, configStandalone, "REC", 0, "Reconstruction settings", rec)
198-
AddOptionRTC(maxTrackQPtB5, float, 1.f / GPUCA_MIN_TRACK_PTB5_DEFAULT, "", 0, "required max Q/Pt (==min Pt) of tracks")
198+
AddOptionRTC(maxTrackQPtB5, float, 1.f / 0.010f, "", 0, "required max Q/Pt (==min Pt) of tracks")
199199
AddOptionRTC(fwdTPCDigitsAsClusters, uint8_t, 0, "", 0, "Forward TPC digits as clusters (if they pass the ZS threshold)")
200200
AddOptionRTC(bz0Pt10MeV, uint8_t, 60, "", 0, "Nominal Pt to set when bz = 0 (in 10 MeV)")
201201
AddOptionRTC(fitInProjections, int8_t, -1, "", 0, "Fit in projection, -1 to enable full fit for all but passes but the first one")

GPU/GPUTracking/qa/GPUQA.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ static const constexpr float LOG_PT_MIN = -1.;
146146

147147
static constexpr float Y_MAX = 40;
148148
static constexpr float Z_MAX = 100;
149-
static constexpr float PT_MIN = GPUCA_MIN_TRACK_PTB5_DEFAULT;
149+
static constexpr float PT_MIN = 0.01; // TODO: Take from Param
150150
static constexpr float PT_MIN_PRIM = 0.1;
151-
static constexpr float PT_MIN_CLUST = GPUCA_MIN_TRACK_PTB5_DEFAULT;
151+
static constexpr float PT_MIN_CLUST = 0.01;
152152
static constexpr float PT_MAX = 20;
153153
static constexpr float ETA_MAX = 1.5;
154154
static constexpr float ETA_MAX2 = 0.9;
@@ -1495,7 +1495,7 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
14951495
int32_t hitId = mTracking->mIOPtrs.mergedTrackHits[track.FirstClusterRef() + k].num;
14961496
float totalWeight = 0.;
14971497
for (int32_t j = 0; j < GetMCLabelNID(hitId); j++) {
1498-
if (GetMCLabelID(hitId, j) >= 0 && GetMCTrackObj(mMCParam, GetMCLabel(hitId, j)).pt > GPUCA_MIN_TRACK_PTB5_DEFAULT) {
1498+
if (GetMCLabelID(hitId, j) >= 0 && GetMCTrackObj(mMCParam, GetMCLabel(hitId, j)).pt > 1.f / mTracking->GetParam().rec.maxTrackQPtB5) {
14991499
totalWeight += GetMCLabelWeight(hitId, j);
15001500
}
15011501
}
@@ -1505,7 +1505,7 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
15051505
float weight = 1.f / (totalWeight * (mClusterParam[hitId].attached + mClusterParam[hitId].fakeAttached));
15061506
for (int32_t j = 0; j < GetMCLabelNID(hitId); j++) {
15071507
mcLabelI_t label = GetMCLabel(hitId, j);
1508-
if (!label.isFake() && GetMCTrackObj(mMCParam, label).pt > GPUCA_MIN_TRACK_PTB5_DEFAULT) {
1508+
if (!label.isFake() && GetMCTrackObj(mMCParam, label).pt > 1.f / mTracking->GetParam().rec.maxTrackQPtB5) {
15091509
float pt = GetMCTrackObj(mMCParam, label).pt;
15101510
if (pt < PT_MIN_CLUST) {
15111511
pt = PT_MIN_CLUST;
@@ -1594,15 +1594,15 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
15941594
float totalWeight = 0.;
15951595
for (int32_t j = 0; j < GetMCLabelNID(i); j++) {
15961596
mcLabelI_t labelT = GetMCLabel(i, j);
1597-
if (!labelT.isFake() && GetMCTrackObj(mMCParam, labelT).pt > GPUCA_MIN_TRACK_PTB5_DEFAULT) {
1597+
if (!labelT.isFake() && GetMCTrackObj(mMCParam, labelT).pt > 1.f / mTracking->GetParam().rec.maxTrackQPtB5) {
15981598
totalWeight += GetMCLabelWeight(i, j);
15991599
}
16001600
}
16011601
float weight = 1.f / totalWeight;
16021602
if (totalWeight > 0) {
16031603
for (int32_t j = 0; j < GetMCLabelNID(i); j++) {
16041604
mcLabelI_t labelT = GetMCLabel(i, j);
1605-
if (!labelT.isFake() && GetMCTrackObj(mMCParam, labelT).pt > GPUCA_MIN_TRACK_PTB5_DEFAULT) {
1605+
if (!labelT.isFake() && GetMCTrackObj(mMCParam, labelT).pt > 1.f / mTracking->GetParam().rec.maxTrackQPtB5) {
16061606
float pt = GetMCTrackObj(mMCParam, labelT).pt;
16071607
if (pt < PT_MIN_CLUST) {
16081608
pt = PT_MIN_CLUST;
@@ -1652,14 +1652,14 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
16521652
float totalWeight = 0.;
16531653
for (int32_t j = 0; j < GetMCLabelNID(i); j++) {
16541654
mcLabelI_t labelT = GetMCLabel(i, j);
1655-
if (!labelT.isFake() && GetMCTrackObj(mMCParam, labelT).pt > GPUCA_MIN_TRACK_PTB5_DEFAULT) {
1655+
if (!labelT.isFake() && GetMCTrackObj(mMCParam, labelT).pt > 1.f / mTracking->GetParam().rec.maxTrackQPtB5) {
16561656
totalWeight += GetMCLabelWeight(i, j);
16571657
}
16581658
}
16591659
if (totalWeight > 0) {
16601660
for (int32_t j = 0; j < GetMCLabelNID(i); j++) {
16611661
mcLabelI_t label = GetMCLabel(i, j);
1662-
if (!label.isFake() && GetMCTrackObj(mMCParam, label).pt > GPUCA_MIN_TRACK_PTB5_DEFAULT) {
1662+
if (!label.isFake() && GetMCTrackObj(mMCParam, label).pt > 1.f / mTracking->GetParam().rec.maxTrackQPtB5) {
16631663
float pt = GetMCTrackObj(mMCParam, label).pt;
16641664
if (pt < PT_MIN_CLUST) {
16651665
pt = PT_MIN_CLUST;

0 commit comments

Comments
 (0)