Skip to content

Commit 8eed4c0

Browse files
author
miranov25
committed
O2-4592 - adding deltaT and vertex and TPC times
1 parent bce7955 commit 8eed4c0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Detectors/TPC/workflow/src/TPCTimeSeriesSpec.cxx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ class TPCTimeSeries : public Task
206206
indicesITSTPC[tracksITSTPC[i].getRefTPC().getIndex()] = {i, idxVtx};
207207
}
208208

209-
std::vector<std::tuple<int, float, float,o2::track::TrackLTIntegral,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,float,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) {
213213
// getLTIntegralOut(), ///< L,TOF integral calculated during the propagation
214214
// getSignal() mSignal = 0.0; ///< TOF time in ps
215215
o2::track::TrackLTIntegral defLT;
216-
idxTPCTrackToTOFCluster = std::vector<std::tuple<int, float, float,o2::track::TrackLTIntegral,float>>(tracksTPC.size(), {-1, -999, -999,defLT,0});
216+
idxTPCTrackToTOFCluster = std::vector<std::tuple<int, float, float,o2::track::TrackLTIntegral,float,float>>(tracksTPC.size(), {-1, -999, -999,defLT,0,0});
217217
const std::vector<gsl::span<const o2::dataformats::MatchInfoTOF>> tofMatches{recoData.getTPCTOFMatches(), recoData.getTPCTRDTOFMatches(), recoData.getITSTPCTOFMatches(), recoData.getITSTPCTRDTOFMatches()};
218218

219219
// loop over ITS-TPC-TRD-TOF and ITS-TPC-TOF tracks an store for each ITS-TPC track the TOF track index
@@ -223,7 +223,8 @@ class TPCTimeSeries : public Task
223223
if (refTPC.isIndexSet()) {
224224
o2::track::TrackLTIntegral ltIntegral=tpctofmatch.getLTIntegralOut();
225225
float signal=tpctofmatch.getSignal();
226-
idxTPCTrackToTOFCluster[refTPC] = {tpctofmatch.getIdxTOFCl(), tpctofmatch.getDXatTOF(), tpctofmatch.getDZatTOF(),ltIntegral,signal};
226+
float deltaT=tpctofmatch.getDeltaT();
227+
idxTPCTrackToTOFCluster[refTPC] = {tpctofmatch.getIdxTOFCl(), tpctofmatch.getDXatTOF(), tpctofmatch.getDZatTOF(),ltIntegral,signal,deltaT};
227228
}
228229
}
229230
}
@@ -1054,7 +1055,7 @@ class TPCTimeSeries : public Task
10541055
return isGoodTrack;
10551056
}
10561057

1057-
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,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,float,float>>& idxTPCTrackToTOFCluster, const gsl::span<const o2::tof::Cluster> tofClusters)
10581059
{
10591060
const auto& trackFull = tracksTPC[iTrk];
10601061
const bool isGoodTrack = checkTrack(trackFull);
@@ -1359,7 +1360,8 @@ class TPCTimeSeries : public Task
13591360
}
13601361
}
13611362
}
1362-
1363+
float vertexTime=vertex.getTimeStamp().getTimeStamp();
1364+
float trackTime0=trackFull.getTime0();
13631365
*mStreamer[iThread] << "treeTimeSeries"
13641366
// DCAs
13651367
<< "triggerMask=" << triggerMask
@@ -1439,6 +1441,9 @@ class TPCTimeSeries : public Task
14391441
<< "mDZatTOF=" << std::get<2>(idxTPCTrackToTOFCluster[iTrk])
14401442
<< "mTOFLength=" << std::get<3>(idxTPCTrackToTOFCluster[iTrk])
14411443
<< "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
14421447
// TPC delta param
14431448
<< "deltaTPCParamInOutTgl=" << deltaTPCParamInOutTgl
14441449
<< "deltaTPCParamInOutQPt=" << deltaTPCParamInOutQPt

0 commit comments

Comments
 (0)