@@ -1702,8 +1702,8 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
17021702 matchingPair.setT0true (TOFClusWork[matchingPair.getTOFClIndex ()].getT0true ());
17031703
17041704 // let's check if cluster has multiple-hits (noferini)
1705- if ( TOFClusWork[matchingPair.getTOFClIndex ()]. getNumOfContributingChannels () > 1 ) {
1706- const auto & tofcl = TOFClusWork[matchingPair. getTOFClIndex ()];
1705+ const auto & tofcl = TOFClusWork[matchingPair.getTOFClIndex ()];
1706+ if ( tofcl. getNumOfContributingChannels () > 1 ) {
17071707 // has an additional hit Up or Down (Z-dir)
17081708 matchingPair.setHitPatternUpDown (tofcl.isAdditionalChannelSet (o2::tof::Cluster::kUp ) ||
17091709 tofcl.isAdditionalChannelSet (o2::tof::Cluster::kUpLeft ) ||
@@ -1719,6 +1719,19 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
17191719 tofcl.isAdditionalChannelSet (o2::tof::Cluster::kDownRight ) ||
17201720 tofcl.isAdditionalChannelSet (o2::tof::Cluster::kUpRight ));
17211721 }
1722+
1723+ // estimate collision time using FT0 info if available
1724+ ULong64_t bclongtofCal = (matchingPair.getSignal () - 10000 ) * o2::tof::Geo::BC_TIME_INPS_INV;
1725+ double t0Best = bclongtofCal * o2::tof::Geo::BC_TIME_INPS; // here just BC
1726+ float t0BestRes = 200 ;
1727+ if (FITRecPoints.size () > 0 ) {
1728+ int index = findFITIndex (bclongtofCal, FITRecPoints, mFirstTForbit );
1729+ if (index > -1 && FITRecPoints[index].isValidTime (1 ) && FITRecPoints[index].isValidTime (2 )) { // require A and C
1730+ t0Best += FITRecPoints[index].getCollisionTime (0 );
1731+ t0BestRes = 15 ;
1732+ }
1733+ }
1734+ matchingPair.setFT0Best (t0Best, t0BestRes);
17221735 matchedTracks[trkTypeSplitted].push_back (matchingPair); // array of MatchInfoTOF
17231736
17241737 // get fit info
0 commit comments