Skip to content

Commit

Permalink
reading TOF time from matchInfo instead of clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
noferini committed May 14, 2024
1 parent 6b1a12e commit 7ead73a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ void o2::globaltracking::RecoContainer::createTracksVariadic(T creator, GTrackID
const auto& match = matchesITSTPCTRDTOF[i];
auto gidx = match.getTrackRef(); // this should be corresponding ITS-TPC-TRD track
// no need to check isUsed: by construction this ITS-TPC-TRD was not used elsewhere
const auto& tofCl = tofClusters[match.getTOFClIndex()];
float timeTOFMUS = (tofCl.getTime() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
// const auto& tofCl = tofClusters[match.getTOFClIndex()];
float timeTOFMUS = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
const float timeErr = 0.010f; // assume 10 ns error FIXME
if (creator(tracksITSTPCTRD[gidx.getIndex()], {i, currentSource}, timeTOFMUS, timeErr)) {
flagUsed(gidx); // flag used ITS-TPC-TRD tracks
Expand All @@ -170,9 +170,9 @@ void o2::globaltracking::RecoContainer::createTracksVariadic(T creator, GTrackID
}
for (unsigned i = 0; i < matchesTPCTRDTOF.size(); i++) {
const auto& match = matchesTPCTRDTOF[i];
auto gidx = match.getTrackRef(); // this should be corresponding TPC-TRD track
const auto& tofCl = tofClusters[match.getTOFClIndex()];
float timeTOFMUS = (tofCl.getTime() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
auto gidx = match.getTrackRef(); // this should be corresponding TPC-TRD track
// const auto& tofCl = tofClusters[match.getTOFClIndex()];
float timeTOFMUS = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
const float timeErr = 0.010f; // assume 10 ns error FIXME
if (creator(tracksTPCTRD[gidx.getIndex()], {i, currentSource}, timeTOFMUS, timeErr)) {
flagUsed(gidx); // flag used TPC-TRD tracks
Expand Down Expand Up @@ -223,8 +223,8 @@ void o2::globaltracking::RecoContainer::createTracksVariadic(T creator, GTrackID
continue;
}
// no need to check isUsed: by construction this ITS-TPC was not used elsewhere
const auto& tofCl = tofClusters[match.getTOFClIndex()];
float timeTOFMUS = (tofCl.getTime() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
// const auto& tofCl = tofClusters[match.getTOFClIndex()];
float timeTOFMUS = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
const float timeErr = 0.010f; // assume 10 ns error FIXME
if (creator(tracksTPCITS[gidx.getIndex()], {i, currentSource}, timeTOFMUS, timeErr)) {
flagUsed(gidx); // flag used ITS-TPC tracks
Expand Down
12 changes: 6 additions & 6 deletions DataFormats/Detectors/GlobalTracking/src/RecoContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1491,8 +1491,8 @@ void RecoContainer::getTrackTimeITSTPCTRDTOF(GTrackID gid, float& t, float& tErr
{
const auto& match = getITSTPCTRDTOFMatches()[gid];
auto gidx = match.getTrackRef(); // this should be corresponding ITS-TPC-TRD track
const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
t = (tofCl.getTime() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
// const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
t = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
tErr = 0.010f;
}

Expand All @@ -1501,8 +1501,8 @@ void RecoContainer::getTrackTimeTPCTRDTOF(GTrackID gid, float& t, float& tErr) c
{
const auto& match = getTPCTRDTOFMatches()[gid];
auto gidx = match.getTrackRef(); // this should be corresponding ITS-TPC-TRD track
const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
t = (tofCl.getTime() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
// const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
t = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
tErr = 0.010f;
}

Expand All @@ -1511,8 +1511,8 @@ void RecoContainer::getTrackTimeITSTPCTOF(GTrackID gid, float& t, float& tErr) c
{
const auto& match = getITSTPCTOFMatches()[gid];
auto gidx = match.getTrackRef(); // this should be corresponding ITS-TPC track
const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
t = (tofCl.getTime() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
// const auto& tofCl = getTOFClusters()[match.getTOFClIndex()];
t = (match.getSignal() - match.getLTIntegralOut().getTOF(o2::track::PID::Pion)) * PS2MUS; // tof time in \mus, FIXME: account for time of flight to R TOF
tErr = 0.010f;
}

Expand Down

0 comments on commit 7ead73a

Please sign in to comment.