@@ -59,11 +59,9 @@ o2::dataformats::GlobalFwdTrack propagateMuon(TFwdTrack const& muon, TCollision
5959
6060 if (endPoint == propagationPoint::kToVertex ) {
6161 o2::mch::TrackExtrap::extrapToVertex (mchTrack, collision.posX (), collision.posY (), collision.posZ (), collision.covXX (), collision.covYY ());
62- }
63- if (endPoint == propagationPoint::kToDCA ) {
62+ } else if (endPoint == propagationPoint::kToDCA ) {
6463 o2::mch::TrackExtrap::extrapToVertexWithoutBranson (mchTrack, collision.posZ ());
65- }
66- if (endPoint == propagationPoint::kToRabs ) {
64+ } else if (endPoint == propagationPoint::kToRabs ) {
6765 o2::mch::TrackExtrap::extrapToZ (mchTrack, -505 .);
6866 }
6967
@@ -77,7 +75,11 @@ o2::dataformats::GlobalFwdTrack propagateMuon(TFwdTrack const& muon, TCollision
7775 auto Bz = field->getBz (centerMFT); // Get field at centre of MFT
7876 auto geoMan = o2::base::GeometryManager::meanMaterialBudget (muon.x (), muon.y (), muon.z (), collision.posX (), collision.posY (), collision.posZ ());
7977 auto x2x0 = static_cast <float >(geoMan.meanX2X0 );
80- fwdtrack.propagateToVtxhelixWithMCS (collision.posZ (), {collision.posX (), collision.posY ()}, {collision.covXX (), collision.covYY ()}, Bz, x2x0);
78+ if (endPoint == propagationPoint::kToVertex ) {
79+ fwdtrack.propagateToVtxhelixWithMCS (collision.posZ (), {collision.posX (), collision.posY ()}, {collision.covXX (), collision.covYY ()}, Bz, x2x0);
80+ } else if (endPoint == propagationPoint::kToDCA ) {
81+ fwdtrack.propagateToZhelix (collision.posZ (), Bz);
82+ }
8183 propmuon.setParameters (fwdtrack.getParameters ());
8284 propmuon.setZ (fwdtrack.getZ ());
8385 propmuon.setCovariances (fwdtrack.getCovariances ());
0 commit comments