@@ -3367,7 +3367,6 @@ struct HfTrackIndexSkimCreatorLfCascades {
33673367 } config;
33683368
33693369 o2::vertexing::DCAFitterN<2 > df2; // 2-prong vertex fitter
3370- o2::vertexing::DCAFitterN<3 > df3; // 3-prong vertex fitter
33713370 Service<o2::ccdb::BasicCCDBManager> ccdb;
33723371 o2::base::MatLayerCylSet* lut;
33733372 o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
@@ -3428,14 +3427,6 @@ struct HfTrackIndexSkimCreatorLfCascades {
34283427 df2.setUseAbsDCA (config.useAbsDCA );
34293428 df2.setWeightedFinalPCA (config.useWeightedFinalPCA );
34303429
3431- df3.setPropagateToPCA (config.propagateToPCA );
3432- df3.setMaxR (config.maxR );
3433- df3.setMaxDZIni (config.maxDZIni );
3434- df3.setMinParamChange (config.minParamChange );
3435- df3.setMinRelChi2Change (config.minRelChi2Change );
3436- df3.setUseAbsDCA (config.useAbsDCA );
3437- df3.setWeightedFinalPCA (config.useWeightedFinalPCA );
3438-
34393430 ccdb->setURL (config.ccdbUrl );
34403431 ccdb->setCaching (true );
34413432 ccdb->setLocalObjectValidityChecking ();
@@ -3564,9 +3555,6 @@ struct HfTrackIndexSkimCreatorLfCascades {
35643555 df2.setBz (magneticField);
35653556 df2.setRefitWithMatCorr (config.refitWithMatCorr );
35663557
3567- df3.setBz (magneticField);
3568- df3.setRefitWithMatCorr (config.refitWithMatCorr );
3569-
35703558 // cascade loop
35713559 auto thisCollId = collision.globalIndex ();
35723560 auto groupedCascades = cascades.sliceBy (cascadesPerCollision, thisCollId);
@@ -3803,7 +3791,8 @@ struct HfTrackIndexSkimCreatorLfCascades {
38033791 // reconstruct Xic with DCAFitter
38043792 int nVtxFrom3ProngFitterXiHyp = 0 ;
38053793 try {
3806- nVtxFrom3ProngFitterXiHyp = df3.process (trackCascXi, trackParVarCharmBachelor1, trackParVarPion2);
3794+ // Use only bachelor tracks for vertex reconstruction because the Xi track has large uncertainties.
3795+ nVtxFrom3ProngFitterXiHyp = df2.process (trackParVarCharmBachelor1, trackParVarPion2);
38073796 } catch (...) {
38083797 if (config.fillHistograms ) {
38093798 registry.fill (HIST (" hFitterStatusXi3Prong" ), 1 );
@@ -3816,16 +3805,15 @@ struct HfTrackIndexSkimCreatorLfCascades {
38163805
38173806 if (nVtxFrom3ProngFitterXiHyp > 0 ) {
38183807
3819- df3 .propagateTracksToVertex ();
3808+ df2 .propagateTracksToVertex ();
38203809
3821- if (df3 .isPropagateTracksToVertexDone ()) {
3810+ if (df2 .isPropagateTracksToVertexDone ()) {
38223811
38233812 std::array<float , 3 > pVec1 = {0 .};
38243813 std::array<float , 3 > pVec2 = {0 .};
3825- std::array<float , 3 > pVec3 = {0 .};
3826- df3.getTrack (0 ).getPxPyPzGlo (pVec1); // take the momentum at the Xic vertex
3827- df3.getTrack (1 ).getPxPyPzGlo (pVec2);
3828- df3.getTrack (2 ).getPxPyPzGlo (pVec3);
3814+ std::array<float , 3 > pVec3 = pVecCasc;
3815+ df2.getTrack (0 ).getPxPyPzGlo (pVec1); // take the momentum at the Xic vertex
3816+ df2.getTrack (1 ).getPxPyPzGlo (pVec2);
38293817 float ptXic3Prong = RecoDecay::pt (pVec1, pVec2, pVec3);
38303818
38313819 std::array<std::array<float , 3 >, 3 > arr3Mom = {pVec1, pVec2, pVec3};
@@ -3844,7 +3832,7 @@ struct HfTrackIndexSkimCreatorLfCascades {
38443832 registry.fill (HIST (" hMassXicPlusToXiPiPi" ), mass3Prong);
38453833 registry.fill (HIST (" hPtCutsXicPlusToXiPiPi" ), ptXic3Prong);
38463834 }
3847- } else if (df3 .isPropagationFailure ()) {
3835+ } else if (df2 .isPropagationFailure ()) {
38483836 LOGF (info, " Exception caught: failed to propagate tracks (3prong) to charm baryon decay vtx" );
38493837 }
38503838 }
0 commit comments