@@ -61,7 +61,7 @@ class TPCTimeSeries : public Task
6161{
6262 public:
6363 // / \constructor
64- TPCTimeSeries (std::shared_ptr<o2::base::GRPGeomRequest> req, const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, const bool tpcOnly, std::shared_ptr<o2::globaltracking::DataRequest> dr) : mCCDBRequest (req), mDisableWriter (disableWriter), mMatType (matType), mUnbinnedWriter (enableUnbinnedWriter), mTPCOnly (tpcOnly), mDataRequest (dr){};
64+ TPCTimeSeries (std::shared_ptr<o2::base::GRPGeomRequest> req, const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, const bool tpcOnly, std::shared_ptr<o2::globaltracking::DataRequest> dr) : mCCDBRequest (req), mDisableWriter (disableWriter), mMatType (matType), mUnbinnedWriter (enableUnbinnedWriter), mTPCOnly (tpcOnly), mDataRequest (dr) {};
6565
6666 void init (framework::InitContext& ic) final
6767 {
@@ -206,19 +206,25 @@ class TPCTimeSeries : public Task
206206 indicesITSTPC[tracksITSTPC[i].getRefTPC ().getIndex ()] = {i, idxVtx};
207207 }
208208
209- std::vector<std::tuple<int , float , float >> idxTPCTrackToTOFCluster; // store for each tpc track index the index to the TOF cluster
209+ std::vector<std::tuple<int , float , float , o2::track::TrackLTIntegral, double , float >> idxTPCTrackToTOFCluster; // store for each tpc track index the index to the TOF cluster
210210
211211 // get matches to TOF in case skimmed data is produced
212212 if (mUnbinnedWriter ) {
213- idxTPCTrackToTOFCluster = std::vector<std::tuple<int , float , float >>(tracksTPC.size (), {-1 , -999 , -999 });
213+ // getLTIntegralOut(), ///< L,TOF integral calculated during the propagation
214+ // getSignal() mSignal = 0.0; ///< TOF time in ps
215+ o2::track::TrackLTIntegral defLT;
216+ idxTPCTrackToTOFCluster = std::vector<std::tuple<int , float , float , o2::track::TrackLTIntegral, double , float >>(tracksTPC.size (), {-1 , -999 , -999 , defLT, 0 , 0 });
214217 const std::vector<gsl::span<const o2::dataformats::MatchInfoTOF>> tofMatches{recoData.getTPCTOFMatches (), recoData.getTPCTRDTOFMatches (), recoData.getITSTPCTOFMatches (), recoData.getITSTPCTRDTOFMatches ()};
215218
216219 // loop over ITS-TPC-TRD-TOF and ITS-TPC-TOF tracks an store for each ITS-TPC track the TOF track index
217220 for (const auto & tofMatch : tofMatches) {
218221 for (const auto & tpctofmatch : tofMatch) {
219222 auto refTPC = recoData.getTPCContributorGID (tpctofmatch.getTrackRef ());
220223 if (refTPC.isIndexSet ()) {
221- idxTPCTrackToTOFCluster[refTPC] = {tpctofmatch.getIdxTOFCl (), tpctofmatch.getDXatTOF (), tpctofmatch.getDZatTOF ()};
224+ o2::track::TrackLTIntegral ltIntegral = tpctofmatch.getLTIntegralOut ();
225+ double signal = tpctofmatch.getSignal ();
226+ float deltaT = tpctofmatch.getDeltaT ();
227+ idxTPCTrackToTOFCluster[refTPC] = {tpctofmatch.getIdxTOFCl (), tpctofmatch.getDXatTOF (), tpctofmatch.getDZatTOF (), ltIntegral, signal, deltaT};
222228 }
223229 }
224230 }
@@ -1049,7 +1055,7 @@ class TPCTimeSeries : public Task
10491055 return isGoodTrack;
10501056 }
10511057
1052- void fillDCA (const gsl::span<const TrackTPC> tracksTPC, const gsl::span<const o2::dataformats::TrackTPCITS> tracksITSTPC, const gsl::span<const o2::dataformats::PrimaryVertex> vertices, const int iTrk, const int iThread, const std::unordered_map<unsigned int , std::array<int , 2 >>& indicesITSTPC, const gsl::span<const o2::its::TrackITS> tracksITS, const std::vector<std::tuple<int , float , float >>& idxTPCTrackToTOFCluster, const gsl::span<const o2::tof::Cluster> tofClusters)
1058+ void fillDCA (const gsl::span<const TrackTPC> tracksTPC, const gsl::span<const o2::dataformats::TrackTPCITS> tracksITSTPC, const gsl::span<const o2::dataformats::PrimaryVertex> vertices, const int iTrk, const int iThread, const std::unordered_map<unsigned int , std::array<int , 2 >>& indicesITSTPC, const gsl::span<const o2::its::TrackITS> tracksITS, const std::vector<std::tuple<int , float , float , o2::track::TrackLTIntegral, double , float >>& idxTPCTrackToTOFCluster, const gsl::span<const o2::tof::Cluster> tofClusters)
10531059 {
10541060 const auto & trackFull = tracksTPC[iTrk];
10551061 const bool isGoodTrack = checkTrack (trackFull);
@@ -1354,7 +1360,8 @@ class TPCTimeSeries : public Task
13541360 }
13551361 }
13561362 }
1357-
1363+ double vertexTime = vertex.getTimeStamp ().getTimeStamp ();
1364+ double trackTime0 = trackFull.getTime0 ();
13581365 *mStreamer [iThread] << " treeTimeSeries"
13591366 // DCAs
13601367 << " triggerMask=" << triggerMask
@@ -1432,6 +1439,11 @@ class TPCTimeSeries : public Task
14321439 << " tpcZDeltaAtTOF=" << tpcZDeltaAtTOF
14331440 << " mDXatTOF=" << std::get<1 >(idxTPCTrackToTOFCluster[iTrk])
14341441 << " mDZatTOF=" << std::get<2 >(idxTPCTrackToTOFCluster[iTrk])
1442+ << " mTOFLength=" << std::get<3 >(idxTPCTrackToTOFCluster[iTrk])
1443+ << " mTOFSignal=" << std::get<4 >(idxTPCTrackToTOFCluster[iTrk])
1444+ << " mDeltaTTOFTPC=" << std::get<5 >(idxTPCTrackToTOFCluster[iTrk]) // / delta T- TPC TOF
1445+ << " vertexTime=" << vertexTime // / time stamp assigned to the vertex
1446+ << " trackTime0=" << trackTime0 // / time stamp assigned to the track
14351447 // TPC delta param
14361448 << " deltaTPCParamInOutTgl=" << deltaTPCParamInOutTgl
14371449 << " deltaTPCParamInOutQPt=" << deltaTPCParamInOutQPt
0 commit comments