Skip to content

Commit

Permalink
Add tracks filtering on dedx to TPC tracking output
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Feb 2, 2024
1 parent 247cc29 commit a6618d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GPU/GPUTracking/Definitions/GPUSettingsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ AddOptionRTC(PID_EDrangeMax, float, 1.98f, "", 0, "max P of electron/d BB bands
AddOptionRTC(PID_ETrangeMin, float, 2.84f, "", 0, "min P of electron/t BB bands crossing")
AddOptionRTC(PID_ETrangeMax, float, 2.94f, "", 0, "max P of electron/t BB bands crossing")
AddOptionRTC(PID_sigma, float, 0.06f, "", 0, "relative sigma for PID in combination with PID_useNsigma")
AddOptionRTC(minTrackdEdxMax, float, 20.0f, "", 0, "min accepted dEdxMaxTPC of the track")
AddOptionRTC(minTrackdEdxMax2Tot, float, 0.67, "", 0, "min accepted dEdxMaxTPC/dEdxTotTPC of the track")
AddOptionRTC(extraClusterErrorEdgeY2, float, 0.35f, "", 0, "Additive extra cluster error for Y2 if edge flag set")
AddOptionRTC(extraClusterErrorEdgeZ2, float, 0.15f, "", 0, "Additive extra cluster error for Z2 if edge flag set")
AddOptionRTC(extraClusterErrorSingleY2, float, 0.2f, "", 0, "Additive extra cluster error for Y2 if edge single set")
Expand Down
8 changes: 8 additions & 0 deletions GPU/GPUTracking/Merger/GPUTPCGMO2Output.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ GPUdii() void GPUTPCGMO2Output::Thread<GPUTPCGMO2Output::prepare>(int nBlocks, i
const GPUTPCGMMergedTrack* tracks = merger.OutputTracks();
const unsigned int nTracks = merger.NOutputTracks();
const GPUTPCGMMergedTrackHit* trackClusters = merger.Clusters();
const GPUdEdxInfo* tracksdEdx = merger.OutputTracksdEdx();

constexpr unsigned char flagsReject = getFlagsReject();
const unsigned int flagsRequired = getFlagsRequired(merger.Param().rec);
const float minTrackdEdxMax = merger.Param().rec.tpc.minTrackdEdxMax;
const float minTrackdEdxMax2Tot = merger.Param().rec.tpc.minTrackdEdxMax2Tot;
bool cutOnTrackdEdx = merger.Param().par.dodEdx && merger.Param().rec.tpc.minTrackdEdxMax2Tot > 0.;

GPUTPCGMMerger::tmpSort* GPUrestrict() trackSort = merger.TrackSortO2();
uint2* GPUrestrict() tmpData = merger.ClusRefTmp();
Expand All @@ -68,6 +73,9 @@ GPUdii() void GPUTPCGMO2Output::Thread<GPUTPCGMO2Output::prepare>(int nBlocks, i
if (merger.Param().rec.tpc.minNClustersFinalTrack != -1 && nCl < (unsigned int)merger.Param().rec.tpc.minNClustersFinalTrack) {
continue;
}
if (cutOnTrackdEdx && (tracksdEdx[i].dEdxMaxTPC < merger.Param().rec.tpc.minTrackdEdxMax || tracksdEdx[i].dEdxMaxTPC < tracksdEdx[i].dEdxTotTPC * merger.Param().rec.tpc.minTrackdEdxMax2Tot) && !(tracksdEdx[i].dEdxMaxTPC == 0 && CAMath::Abs(tracks[i].GetParam().GetDzDs()) > 0.03f)) {
continue;
}
unsigned int myId = CAMath::AtomicAdd(&merger.Memory()->nO2Tracks, 1u);
tmpData[i] = {nCl, CAMath::AtomicAdd(&merger.Memory()->nO2ClusRefs, nCl + (nCl + 1) / 2)};
trackSort[myId] = {i, (merger.Param().par.earlyTpcTransform || tracks[i].CSide()) ? tracks[i].GetParam().GetTZOffset() : -tracks[i].GetParam().GetTZOffset()};
Expand Down

0 comments on commit a6618d5

Please sign in to comment.