@@ -967,6 +967,9 @@ void MatchTOF::doMatching(int sec)
967967 }
968968 }
969969
970+ // adjust accordingly to DeltaY
971+ updateTL (trkLTInt[nStripsCrossedInPropagation - 1 ], -deltaPosTemp[1 ]);
972+
970973 detId[nStripsCrossedInPropagation - 1 ][0 ] = detIdTemp[0 ];
971974 detId[nStripsCrossedInPropagation - 1 ][1 ] = detIdTemp[1 ];
972975 detId[nStripsCrossedInPropagation - 1 ][2 ] = detIdTemp[2 ];
@@ -1340,11 +1343,14 @@ void MatchTOF::doMatchingForTPC(int sec)
13401343 for (int ii = 0 ; ii < 3 ; ii++) { // we need to change the type...
13411344 posFloat[ii] = pos[ii];
13421345 }
1346+
13431347 while (deltaPosTemp2[1 ] < -0.05 && detIdTemp2[2 ] != -1 && nstep < maxnstep) { // continuing propagation if dy is negative and we are still inside the strip volume
13441348 nstep++;
13451349 xStop += 0.1 ;
13461350 propagateToRefXWithoutCov (trefTrk, xStop, 0.1 , mBz , posFloat);
13471351
1352+ posFloat[2 ] += ZshiftCurrent;
1353+
13481354 Geo::getPadDxDyDz (posFloat, detIdTemp2, deltaPosTemp2, sec);
13491355 if (detIdTemp2[2 ] != -1 ) { // if propation was succesful -> update params
13501356 float dx = deltaPosTemp2[0 ] - deltaPosTemp[0 ];
@@ -1356,9 +1362,15 @@ void MatchTOF::doMatchingForTPC(int sec)
13561362 detIdTemp[2 ] = detIdTemp2[2 ];
13571363 detIdTemp[3 ] = detIdTemp2[3 ];
13581364 detIdTemp[4 ] = detIdTemp2[4 ];
1365+ deltaPosTemp[0 ] = deltaPosTemp2[0 ];
1366+ deltaPosTemp[1 ] = deltaPosTemp2[1 ];
1367+ deltaPosTemp[2 ] = deltaPosTemp2[2 ];
13591368 }
13601369 }
13611370
1371+ // adjust accordingly to DeltaY
1372+ updateTL (trkLTInt[ibc][nStripsCrossedInPropagation[ibc] - 1 ], -deltaPosTemp[1 ]);
1373+
13621374 detId[ibc][nStripsCrossedInPropagation[ibc] - 1 ][0 ] = detIdTemp[0 ];
13631375 detId[ibc][nStripsCrossedInPropagation[ibc] - 1 ][1 ] = detIdTemp[1 ];
13641376 detId[ibc][nStripsCrossedInPropagation[ibc] - 1 ][2 ] = detIdTemp[2 ];
@@ -1671,6 +1683,10 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
16711683 if (std::abs (timeNew - timeOld) < 200 ) {
16721684 // update time information averaging the two (the second one corrected for the difference in the track length)
16731685 prevMatching.setSignal ((timeNew + timeOld) * 0.5 );
1686+ float geanttime = (TOFClusWork[matchingPair.getTOFClIndex ()].getTgeant () + TOFClusWork[prevMatching.getTOFClIndex ()].getTgeant () - deltaT * 1E-3 ) * 0.5 ;
1687+ double t0 = (TOFClusWork[matchingPair.getTOFClIndex ()].getT0true () + TOFClusWork[prevMatching.getTOFClIndex ()].getT0true ()) * 0.5 ;
1688+ prevMatching.setTgeant (geanttime);
1689+ prevMatching.setT0true (t0);
16741690 prevMatching.setChi2 (0 ); // flag such cases with chi2 equal to zero
16751691 matchedClustersIndex[matchingPair.getTOFClIndex ()] = matchedTracksIndex[trkType][itrk]; // flag also the second cluster as already used
16761692 }
@@ -1682,6 +1698,9 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
16821698 matchedTracksIndex[trkType][itrk] = matchedTracks[trkTypeSplitted].size (); // index of the MatchInfoTOF correspoding to this track
16831699 matchedClustersIndex[matchingPair.getTOFClIndex ()] = matchedTracksIndex[trkType][itrk]; // index of the track that was matched to this cluster
16841700
1701+ matchingPair.setTgeant (TOFClusWork[matchingPair.getTOFClIndex ()].getTgeant ());
1702+ matchingPair.setT0true (TOFClusWork[matchingPair.getTOFClIndex ()].getT0true ());
1703+
16851704 // let's check if cluster has multiple-hits (noferini)
16861705 if (TOFClusWork[matchingPair.getTOFClIndex ()].getNumOfContributingChannels () > 1 ) {
16871706 const auto & tofcl = TOFClusWork[matchingPair.getTOFClIndex ()];
0 commit comments