@@ -412,7 +412,6 @@ struct HfTreeCreatorLcToPKPi {
412412
413413 constexpr static float UndefValueFloat = -999 .f;
414414 constexpr static int UndefValueInt = -999 ;
415- constexpr static float NanoToPico = 1000 .f;
416415
417416 using TracksWPid = soa::Join<aod::Tracks, aod::TracksPidPi, aod::PidTpcTofFullPi, aod::TracksPidKa, aod::PidTpcTofFullKa, aod::TracksPidPr, aod::PidTpcTofFullPr>;
418417 using Cents = soa::Join<aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs>;
@@ -1002,16 +1001,14 @@ struct HfTreeCreatorLcToPKPi {
10021001 const auto mcCollision = particleMother.template mcCollision_as <aod::McCollisions>();
10031002 p = particleMother.p ();
10041003 pt = particleMother.pt ();
1005- const float p2m = p / static_cast <float >(MassLambdaCPlus);
1006- const float gamma = std::sqrt (1 + p2m * p2m); // mother's particle Lorentz factor
10071004 pvX = mcCollision.posX ();
10081005 pvY = mcCollision.posY ();
10091006 pvZ = mcCollision.posZ ();
10101007 svX = mcParticleProng0.vx ();
10111008 svY = mcParticleProng0.vy ();
10121009 svZ = mcParticleProng0.vz ();
10131010 decayLength = static_cast <float >(RecoDecay::distance (std::array<float , 3 >{svX, svY, svZ}, std::array<float , 3 >{pvX, pvY, pvZ}));
1014- decayTime = mcParticleProng0. vt () * NanoToPico / gamma; // from ns to ps * from lab time to proper time
1011+ decayTime = decayLength * static_cast < float >(MassLambdaCPlus) / LightSpeedCm2PS / p;
10151012 }
10161013 rowCandidateMC (
10171014 p, pt,
@@ -1032,16 +1029,14 @@ struct HfTreeCreatorLcToPKPi {
10321029 const auto mcDaughter0 = particle.template daughters_as <soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>>().begin ();
10331030 const auto mcCollision = particle.template mcCollision_as <aod::McCollisions>();
10341031 const auto p = particle.p ();
1035- const float p2m = p / static_cast <float >(MassLambdaCPlus);
1036- const float gamma = std::sqrt (1 + p2m * p2m); // mother's particle Lorentz factor
10371032 const float pvX = mcCollision.posX ();
10381033 const float pvY = mcCollision.posY ();
10391034 const float pvZ = mcCollision.posZ ();
10401035 const float svX = mcDaughter0.vx ();
10411036 const float svY = mcDaughter0.vy ();
10421037 const float svZ = mcDaughter0.vz ();
10431038 const float l = static_cast <float >(RecoDecay::distance (std::array<float , 3 >{svX, svY, svZ}, std::array<float , 3 >{pvX, pvY, pvZ}));
1044- const float t = mcDaughter0. vt () * NanoToPico / gamma; // from ns to ps * from lab time to proper time
1039+ const float t = l * static_cast < float >(MassLambdaCPlus) / LightSpeedCm2PS / p;
10451040 rowCandidateFullParticles (
10461041 particle.pt (),
10471042 particle.eta (),
0 commit comments