Skip to content

Commit

Permalink
fix: fix scattering calculation in SeedFinderOrthogonal (#1248)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LuisFelipeCoelho committed May 10, 2022
1 parent 7ec504f commit bcd9e01
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp
Expand Up @@ -284,24 +284,19 @@ void SeedFinderOrthogonal<external_spacepoint_t>::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;
Expand Down Expand Up @@ -331,13 +326,12 @@ void SeedFinderOrthogonal<external_spacepoint_t>::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)
Expand Down

0 comments on commit bcd9e01

Please sign in to comment.