Skip to content

Commit 732e457

Browse files
committed
[ITS] Protect ultra low pt selections at the tracklet level
Checked on Pb-Pb simulation that this does not change the number of reconstructed tracks
1 parent 3e68768 commit 732e457

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

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

345345
mMSangles.resize(trkParam.NLayers);
346346
mPhiCuts.resize(mClusters.size() - 1, 0.f);
347-
348-
float oneOverR{0.001f * 0.3f * std::abs(mBz) / trkParam.TrackletMinPt};
347+
const float rho{trkParam.TrackletMinPt / (0.001f * 0.3f * std::abs(mBz))};
348+
float oneOverR{1.f / rho};
349349
for (unsigned int iLayer{0}; iLayer < nLayers; ++iLayer) {
350350
mMSangles[iLayer] = math_utils::MSangle(0.14f, trkParam.TrackletMinPt, trkParam.LayerxX0[iLayer]);
351351
mPositionResolution[iLayer] = o2::gpu::CAMath::Sqrt(0.5f * (trkParam.SystErrorZ2[iLayer] + trkParam.SystErrorY2[iLayer]) + trkParam.LayerResolution[iLayer] * trkParam.LayerResolution[iLayer]);
352352
if (iLayer < mClusters.size() - 1) {
353353
const float& r1 = trkParam.LayerRadii[iLayer];
354354
const float& r2 = trkParam.LayerRadii[iLayer + 1];
355+
oneOverR = (r2 >= 2.f * rho) ? 0.5f / r2 - o2::constants::math::Almost0 : 1.f / rho;
355356
const float res1 = o2::gpu::CAMath::Hypot(trkParam.PVres, mPositionResolution[iLayer]);
356357
const float res2 = o2::gpu::CAMath::Hypot(trkParam.PVres, mPositionResolution[iLayer + 1]);
357358
const float cosTheta1half = o2::gpu::CAMath::Sqrt(1.f - math_utils::Sq(0.5f * r1 * oneOverR));
358359
const float cosTheta2half = o2::gpu::CAMath::Sqrt(1.f - math_utils::Sq(0.5f * r2 * oneOverR));
359360
float x = r2 * cosTheta1half - r1 * cosTheta2half;
360361
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)));
362+
/// the expression std::asin(0.5f * x * oneOverR) is equivalent to std::aCos(0.5f * r1 * oneOverR) - std::acos(0.5 * r2 * oneOverR)
361363
mPhiCuts[iLayer] = std::min(o2::gpu::CAMath::ASin(0.5f * x * oneOverR) + 2.f * mMSangles[iLayer] + delta, o2::constants::math::PI * 0.5f);
362364
}
363365
}

0 commit comments

Comments
 (0)