Skip to content

Commit efa0898

Browse files
authored
[ITS] Protect ultra low pt selections at the tracklet level (#15079)
Checked on Pb-Pb simulation that this does not change the number of reconstructed tracks
1 parent db8db2f commit efa0898

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Detectors/ITSMFT/ITS/tracking/src/TimeFrame.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,20 +344,21 @@ void TimeFrame<nLayers>::initialise(const int iteration, const TrackingParameter
344344

345345
mMSangles.resize(trkParam.NLayers);
346346
mPhiCuts.resize(mClusters.size() - 1, 0.f);
347-
348347
float oneOverR{0.001f * 0.3f * std::abs(mBz) / trkParam.TrackletMinPt};
349348
for (unsigned int iLayer{0}; iLayer < nLayers; ++iLayer) {
350349
mMSangles[iLayer] = math_utils::MSangle(0.14f, trkParam.TrackletMinPt, trkParam.LayerxX0[iLayer]);
351350
mPositionResolution[iLayer] = o2::gpu::CAMath::Sqrt(0.5f * (trkParam.SystErrorZ2[iLayer] + trkParam.SystErrorY2[iLayer]) + trkParam.LayerResolution[iLayer] * trkParam.LayerResolution[iLayer]);
352351
if (iLayer < mClusters.size() - 1) {
353352
const float& r1 = trkParam.LayerRadii[iLayer];
354353
const float& r2 = trkParam.LayerRadii[iLayer + 1];
354+
oneOverR = (0.5 * oneOverR >= 1.f / r2) ? 2.f / r2 - o2::constants::math::Almost0 : oneOverR;
355355
const float res1 = o2::gpu::CAMath::Hypot(trkParam.PVres, mPositionResolution[iLayer]);
356356
const float res2 = o2::gpu::CAMath::Hypot(trkParam.PVres, mPositionResolution[iLayer + 1]);
357357
const float cosTheta1half = o2::gpu::CAMath::Sqrt(1.f - math_utils::Sq(0.5f * r1 * oneOverR));
358358
const float cosTheta2half = o2::gpu::CAMath::Sqrt(1.f - math_utils::Sq(0.5f * r2 * oneOverR));
359359
float x = r2 * cosTheta1half - r1 * cosTheta2half;
360360
float delta = o2::gpu::CAMath::Sqrt(1.f / (1.f - 0.25f * math_utils::Sq(x * oneOverR)) * (math_utils::Sq(0.25f * r1 * r2 * math_utils::Sq(oneOverR) / cosTheta2half + cosTheta1half) * math_utils::Sq(res1) + math_utils::Sq(0.25f * r1 * r2 * math_utils::Sq(oneOverR) / cosTheta1half + cosTheta2half) * math_utils::Sq(res2)));
361+
/// the expression std::asin(0.5f * x * oneOverR) is equivalent to std::aCos(0.5f * r1 * oneOverR) - std::acos(0.5 * r2 * oneOverR)
361362
mPhiCuts[iLayer] = std::min(o2::gpu::CAMath::ASin(0.5f * x * oneOverR) + 2.f * mMSangles[iLayer] + delta, o2::constants::math::PI * 0.5f);
362363
}
363364
}

0 commit comments

Comments
 (0)