From bcd9e01fd5c8c3a319cf7ad9de91b938a0a29aeb Mon Sep 17 00:00:00 2001 From: Luis Falda Coelho <56648068+LuisFelipeCoelho@users.noreply.github.com> Date: Tue, 10 May 2022 11:34:24 +0200 Subject: [PATCH] fix: fix scattering calculation in SeedFinderOrthogonal (#1248) In the seedFinder we check the compatibility between the (r,z) slope of the two seed segments with a scattering term calculated assuming the minimum pT particle expected to be reconstructed and a second check using a scattering term scaled by the actual measured pT. As discussed here in PR #1213, there was an error in these cuts. This PR fixes that same error in SeedFinderOrthogonal. --- .../Acts/Seeding/SeedFinderOrthogonal.ipp | 42 ++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp b/Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp index 6e84a3795a1..2a639f5e30c 100644 --- a/Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp +++ b/Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp @@ -284,24 +284,19 @@ void SeedFinderOrthogonal::filterCandidates( float deltaCotTheta = cotThetaB - lt.cotTheta; float deltaCotTheta2 = deltaCotTheta * deltaCotTheta; - float error; - float dCotThetaMinusError2 = 0; - // if the error is larger than the difference in theta, no need to - // compare with scattering - if (deltaCotTheta2 - error2 > 0) { - deltaCotTheta = std::abs(deltaCotTheta); - // if deltaTheta larger than the scattering for the lower pT cut, skip - error = std::sqrt(error2); - dCotThetaMinusError2 = - deltaCotTheta2 + error2 - 2 * deltaCotTheta * error; - // avoid taking root of scatteringInRegion - // if left side of ">" is positive, both sides of unequality can be - // squared - // (scattering is always positive) - - if (dCotThetaMinusError2 > scatteringInRegion2) { - continue; - } + + // Apply a cut on the compatibility between the r-z slope of the two + // seed segments. This is done by comparing the squared difference + // between slopes, and comparing to the squared uncertainty in this + // difference - we keep a seed if the difference is compatible within + // the assumed uncertainties. The uncertainties get contribution from + // the space-point-related squared error (error2) and a scattering term + // calculated assuming the minimum pt we expect to reconstruct + // (scatteringInRegion2). This assumes gaussian error propagation which + // allows just adding the two errors if they are uncorrelated (which is + // fair for scattering and measurement uncertainties) + if (deltaCotTheta2 > (error2 + scatteringInRegion2)) { + continue; } float dU = lt.U - Ub; @@ -331,13 +326,12 @@ void SeedFinderOrthogonal::filterCandidates( // convert p(T) to p scaling by sin^2(theta) AND scale by 1/sin^4(theta) // from rad to deltaCotTheta // if deltaTheta larger than allowed scattering for calculated pT, skip - if (deltaCotTheta2 - error2 > 0) { - if (dCotThetaMinusError2 > pT2scatter * iSinTheta2 * - m_config.sigmaScattering * - m_config.sigmaScattering) { - continue; - } + if (deltaCotTheta2 > + (error2 + (pT2scatter * iSinTheta2 * m_config.sigmaScattering * + m_config.sigmaScattering))) { + continue; } + // A and B allow calculation of impact params in U/V plane with linear // function // (in contrast to having to solve a quadratic function in x/y plane)