File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
GPU/GPUTracking/Standalone/qa Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 4646#include " GPUO2DataTypes.h"
4747#include " GPUParam.inc"
4848#include " GPUTPCClusterRejection.h"
49+ #include " TPCFastTransform.h"
4950#ifdef HAVE_O2HEADERS
5051#include " SimulationDataFormat/ConstMCTruthContainer.h"
5152#include " SimulationDataFormat/MCCompLabel.h"
52- #include " TPCFastTransform.h"
5353#endif
5454#ifdef GPUCA_O2_LIB
5555#include " DetectorsRaw/HBFUtils.h"
@@ -875,7 +875,18 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
875875 GetMCTrackObj (mRecTracks , label)++;
876876 if (mMCTrackMin == -1 || (label.getTrackID () >= mMCTrackMin && label.getTrackID () < mMCTrackMax )) {
877877 int & revLabel = GetMCTrackObj (mTrackMCLabelsReverse , label);
878- if (revLabel == -1 || !mTracking ->mIOPtrs .mergedTracks [revLabel].OK () || (mTracking ->mIOPtrs .mergedTracks [i].OK () && fabsf (mTracking ->mIOPtrs .mergedTracks [i].GetParam ().GetZ ()) < fabsf (mTracking ->mIOPtrs .mergedTracks [revLabel].GetParam ().GetZ ()))) {
878+ const auto * trks = mTracking ->mIOPtrs .mergedTracks ;
879+ bool comp;
880+ if (revLabel == -1 ) {
881+ comp = true ;
882+ } else if (mTracking ->GetParam ().par .earlyTpcTransform ) {
883+ comp = fabsf (trks[i].GetParam ().GetZ () + trks[i].GetParam ().GetTZOffset ()) < fabsf (trks[revLabel].GetParam ().GetZ () + trks[revLabel].GetParam ().GetTZOffset ());
884+ } else {
885+ float shift1 = mTracking ->GetTPCTransform ()->convDeltaTimeToDeltaZinTimeFrame (trks[i].CSide () * GPUChainTracking::NSLICES / 2 , trks[i].GetParam ().GetTZOffset ());
886+ float shift2 = mTracking ->GetTPCTransform ()->convDeltaTimeToDeltaZinTimeFrame (trks[revLabel].CSide () * GPUChainTracking::NSLICES / 2 , trks[revLabel].GetParam ().GetTZOffset ());
887+ comp = fabsf (trks[i].GetParam ().GetZ () + shift1) < fabsf (trks[revLabel].GetParam ().GetZ () + shift2);
888+ }
889+ if (revLabel == -1 || !trks[revLabel].OK () || (trks[i].OK () && comp)) {
879890 revLabel = i;
880891 }
881892 }
You can’t perform that action at this time.
0 commit comments