@@ -204,7 +204,7 @@ int32_t GPUQA::initColors()
204204static constexpr Color_t defaultColorNums[COLORCOUNT] = {kRed , kBlue , kGreen , kMagenta , kOrange , kAzure , kBlack , kYellow , kGray , kTeal , kSpring , kPink };
205205
206206#define TRACK_EXPECTED_REFERENCE_X_DEFAULT 81
207- #ifndef GPUCA_RUN2
207+ #ifndef GPUCA_RUN2 // Run 3 implementation
208208static inline int32_t GPUQA_O2_ConvertFakeLabel (int32_t label) { return label >= 0x7FFFFFFE ? -1 : label; }
209209inline uint32_t GPUQA::GetNMCCollissions () const { return mMCInfosCol .size (); }
210210inline uint32_t GPUQA::GetNMCTracks (int32_t iCol) const { return mMCInfosCol [iCol].num ; }
@@ -229,7 +229,7 @@ uint32_t GPUQA::GetMCLabelCol(const mcLabel_t& label) const { return !label.isVa
229229GPUQA::mcLabelI_t GPUQA::GetMCTrackLabel (uint32_t trackId) const { return trackId >= mTrackMCLabels .size () ? MCCompLabel () : mTrackMCLabels [trackId]; }
230230bool GPUQA::CompareIgnoreFake (const mcLabelI_t& l1, const mcLabelI_t& l2) { return l1.compare (l2) >= 0 ; }
231231#define TRACK_EXPECTED_REFERENCE_X 78
232- #else
232+ #else // Run 2 implementation
233233inline GPUQA::mcLabelI_t::mcLabelI_t (const GPUQA::mcLabel_t& l) : track(l.fMCID ) {}
234234inline bool GPUQA::mcLabelI_t::operator ==(const GPUQA::mcLabel_t& l) { return AbsLabelID (track) == l.fMCID ; }
235235inline uint32_t GPUQA::GetNMCCollissions () const { return 1 ; }
@@ -247,7 +247,6 @@ inline int32_t GPUQA::GetMCLabelID(uint32_t i, uint32_t j) { return mTracking->m
247247inline int32_t GPUQA::GetMCLabelID (const mcLabels_t& label, uint32_t j) { return label.fClusterID [j].fMCID ; }
248248inline int32_t GPUQA::GetMCLabelID (const mcLabel_t& label) { return label.fMCID ; }
249249inline uint32_t GPUQA::GetMCLabelCol (uint32_t i, uint32_t j) { return 0 ; }
250-
251250inline const auto & GPUQA::GetClusterLabels () { return mTracking ->mIOPtrs .mcLabelsTPC ; }
252251inline float GPUQA::GetMCLabelWeight (uint32_t i, uint32_t j) { return mTracking ->mIOPtrs .mcLabelsTPC [i].fClusterID [j].fWeight ; }
253252inline float GPUQA::GetMCLabelWeight (const mcLabels_t& label, uint32_t j) { return label.fClusterID [j].fWeight ; }
@@ -257,7 +256,7 @@ inline int32_t GPUQA::AbsLabelID(int32_t id) { return id >= 0 ? id : (-id - 2);
257256inline bool GPUQA::mcPresent () { return !mConfig .noMC && mTracking && GetNMCLabels () && GetNMCTracks (0 ); }
258257uint32_t GPUQA::GetMCLabelCol (const mcLabel_t& label) const { return 0 ; }
259258GPUQA::mcLabelI_t GPUQA::GetMCTrackLabel (uint32_t trackId) const { return trackId >= mTrackMCLabels .size () ? mcLabelI_t () : mTrackMCLabels [trackId]; }
260- bool GPUQA::CompareIgnoreFake (const mcLabelI_t& l1, const mcLabelI_t& l2) { return AbsLabelID (l1) == AbsLabelID (l2); }
259+ bool GPUQA::CompareIgnoreFake (const mcLabelI_t& l1, const mcLabelI_t& l2) { return AbsLabelID (l1. track ) == AbsLabelID (l2. track ); }
261260#define TRACK_EXPECTED_REFERENCE_X TRACK_EXPECTED_REFERENCE_X_DEFAULT
262261#endif
263262template <class T >
@@ -1367,9 +1366,11 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
13671366 if (mc1.pid < 0 ) {
13681367 continue ;
13691368 }
1369+ #ifndef GPUCA_RUN2
13701370 if (mc1.t0 == -100 .f ) {
13711371 continue ;
13721372 }
1373+ #endif
13731374 if (mConfig .filterCharge && mc1.charge * mConfig .filterCharge < 0 ) {
13741375 continue ;
13751376 }
@@ -1439,7 +1440,12 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
14391440 if (!mParam ->continuousMaxTimeBin ) {
14401441 return param.GetZ () - mc1.z ;
14411442 }
1442- float shift = side == 2 ? 0 : mTracking ->GetTPCTransform ()->convDeltaTimeToDeltaZinTimeFrame (side * GPUChainTracking::NSECTORS / 2 , param.GetTOffset () - mc1.t0 );
1443+ float shift = 0 ;
1444+ #ifndef GPUCA_RUN2
1445+ if (side != 2 ) {
1446+ shift = mTracking ->GetTPCTransform ()->convDeltaTimeToDeltaZinTimeFrame (side * GPUChainTracking::NSECTORS / 2 , param.GetTOffset () - mc1.t0 );
1447+ }
1448+ #endif
14431449 return param.GetZ () + shift - mc1.z ;
14441450 };
14451451
@@ -1784,12 +1790,14 @@ void GPUQA::RunQA(bool matchOnly, const std::vector<o2::tpc::TrackTPC>* tracksEx
17841790 mNCl [1 ]->Fill (nClCorrected);
17851791 }
17861792 mT0 [0 ]->Fill (track.GetParam ().GetTOffset ());
1793+ #ifndef GPUCA_RUN2
17871794 if (mTrackMCLabels .size () && !mTrackMCLabels [i].isFake () && !track.MergedLooper () && !track.CCE ()) {
17881795 const auto & info = GetMCTrack (mTrackMCLabels [i]);
17891796 if (info.t0 != -100 .f ) {
17901797 mT0 [1 ]->Fill (track.GetParam ().GetTOffset () - info.t0 );
17911798 }
17921799 }
1800+ #endif
17931801 }
17941802 if (mClNative && mTracking && mTracking ->GetTPCTransform ()) {
17951803 for (uint32_t i = 0 ; i < GPUChainTracking::NSECTORS; i++) {
0 commit comments