diff --git a/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOF.h b/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOF.h index ea0ba1e1f94d9..f1222d179304a 100644 --- a/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOF.h +++ b/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOF.h @@ -29,7 +29,7 @@ class MatchInfoTOF using evIdx = o2::dataformats::EvIndex; public: - MatchInfoTOF(evIdx evIdxTOFCl, float chi2, o2::track::TrackLTIntegral trkIntLT, evGIdx evIdxTrack, float dt = 0, float z = 0) : mEvIdxTOFCl(evIdxTOFCl), mChi2(chi2), mIntLT(trkIntLT), mEvIdxTrack(evIdxTrack), mDeltaT(dt), mZatTOF(z){}; + MatchInfoTOF(evIdx evIdxTOFCl, double time, float chi2, o2::track::TrackLTIntegral trkIntLT, evGIdx evIdxTrack, float dt = 0, float z = 0) : mEvIdxTOFCl(evIdxTOFCl), mSignal(time), mChi2(chi2), mIntLT(trkIntLT), mEvIdxTrack(evIdxTrack), mDeltaT(dt), mZatTOF(z){}; MatchInfoTOF() = default; void setEvIdxTOFCl(evIdx index) { mEvIdxTOFCl = index; } void setEvIdxTrack(evGIdx index) { mEvIdxTrack = index; } @@ -51,6 +51,8 @@ class MatchInfoTOF float getDeltaT() const { return mDeltaT; } void setZatTOF(float val) { mZatTOF = val; } float getZatTOF() const { return mZatTOF; } + void setSignal(double time) { mSignal = time; } + double getSignal() const { return mSignal; } private: float mChi2; // chi2 of the pair track-TOFcluster @@ -59,8 +61,9 @@ class MatchInfoTOF evGIdx mEvIdxTrack; ///< EvIdx for track (first: ev index; second: track global index) float mZatTOF = 0.0; ///< Z position at TOF float mDeltaT = 0.0; ///< tTOF - TPC (microsec) + double mSignal = 0.0; ///< TOF time in ps - ClassDefNV(MatchInfoTOF, 2); + ClassDefNV(MatchInfoTOF, 3); }; } // namespace dataformats } // namespace o2 diff --git a/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOFReco.h b/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOFReco.h index 35ab341e46ee0..29b5067470b2a 100644 --- a/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOFReco.h +++ b/DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOFReco.h @@ -36,7 +36,7 @@ class MatchInfoTOFReco : public MatchInfoTOF ITSTPCTRD, SIZEALL }; - MatchInfoTOFReco(evIdx evIdxTOFCl, float chi2, o2::track::TrackLTIntegral trkIntLT, evGIdx evIdxTrack, TrackType trkType, float dt = 0, float z = 0) : MatchInfoTOF(evIdxTOFCl, chi2, trkIntLT, evIdxTrack, dt, z), mTrackType(trkType){}; + MatchInfoTOFReco(evIdx evIdxTOFCl, double time, float chi2, o2::track::TrackLTIntegral trkIntLT, evGIdx evIdxTrack, TrackType trkType, float dt = 0, float z = 0) : MatchInfoTOF(evIdxTOFCl, time, chi2, trkIntLT, evIdxTrack, dt, z), mTrackType(trkType){}; MatchInfoTOFReco() = default; @@ -45,7 +45,7 @@ class MatchInfoTOFReco : public MatchInfoTOF private: TrackType mTrackType; ///< track type (TPC, ITSTPC, TPCTRD, ITSTPCTRD) - ClassDefNV(MatchInfoTOFReco, 1); + ClassDefNV(MatchInfoTOFReco, 2); }; } // namespace dataformats } // namespace o2 diff --git a/Detectors/GlobalTracking/src/MatchTOF.cxx b/Detectors/GlobalTracking/src/MatchTOF.cxx index c3fe595cec87e..6bca22b92a799 100644 --- a/Detectors/GlobalTracking/src/MatchTOF.cxx +++ b/Detectors/GlobalTracking/src/MatchTOF.cxx @@ -626,7 +626,7 @@ void MatchTOF::doMatching(int sec) // set event indexes (to be checked) evIdx eventIndexTOFCluster(trefTOF.getEntryInTree(), mTOFClusSectIndexCache[indices[0]][itof]); evGIdx eventIndexTracks(mCurrTracksTreeEntry, {uint32_t(mTracksSectIndexCache[type][indices[0]][itrk]), o2::dataformats::GlobalTrackID::ITSTPC}); - mMatchedTracksPairs.emplace_back(eventIndexTOFCluster, chi2, trkLTInt[iPropagation], eventIndexTracks, type); // TODO: check if this is correct! + mMatchedTracksPairs.emplace_back(eventIndexTOFCluster, mTOFClusWork[cacheTOF[itof]].getTime(), chi2, trkLTInt[iPropagation], eventIndexTracks, type); // TODO: check if this is correct! } } } @@ -939,7 +939,7 @@ void MatchTOF::doMatchingForTPC(int sec) // set event indexes (to be checked) evIdx eventIndexTOFCluster(trefTOF.getEntryInTree(), mTOFClusSectIndexCache[indices[0]][itof]); evGIdx eventIndexTracks(mCurrTracksTreeEntry, {uint32_t(mTracksSectIndexCache[trkType::UNCONS][indices[0]][itrk]), o2::dataformats::GlobalTrackID::TPC}); - mMatchedTracksPairs.emplace_back(eventIndexTOFCluster, chi2, trkLTInt[ibc][iPropagation], eventIndexTracks, trkType::UNCONS, resZ / vdrift * side, trefTOF.getZ()); // TODO: check if this is correct! + mMatchedTracksPairs.emplace_back(eventIndexTOFCluster, mTOFClusWork[cacheTOF[itof]].getTime(), chi2, trkLTInt[ibc][iPropagation], eventIndexTracks, trkType::UNCONS, resZ / vdrift * side, trefTOF.getZ()); // TODO: check if this is correct! } } }