-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ITK SeedFinder integration #1084
feat: ITK SeedFinder integration #1084
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1084 +/- ##
==========================================
- Coverage 48.40% 48.18% -0.23%
==========================================
Files 341 341
Lines 17563 17644 +81
Branches 8296 8323 +27
==========================================
Hits 8502 8502
- Misses 3286 3367 +81
Partials 5775 5775
Continue to review full report at Codecov.
|
Hi @LuisFelipeCoelho, that's an impressive list of changes :) I have a couple of clarification questions: Could you explain these two points in a bit more detail? I'm not sure what you mean.
For efficiency I tried to exclude space points which can be cut by looking only at a single space point already during the grid building step, but middle sp being in the outermost loop it probably doesn't matter all that much. The check for zMin and zMax is one such example, which is already applied during the grid creation (so there shouldn't be any sp with z > zMax. 3 ) seems very ATLAS specific, isn't this something that could be implemented in the experiment specific cuts? 4 ) did you measure the performance change from this? 6 ) I don't exaclty understand the cut, but it also sounds like it would be more efficient to exclude these in the grid building step. The Grid is separate from the Seedfinder exactly for this reason, to be able to more intelligently select space points than what the SPGrid offers, i.e. replacing the SPGrid with something else. Using cut 1) and 5) e.g. it sounds like it would be reasonable to have three grids: one with all SP in the middle range, one with SP in the bottom range and one with SP in the top range, which could reduce the number of iterations significantly. 9 ) and 10 ) Please check to factor this out as discussed. also we should find out if it is (significantly) faster and how much and under which conditions this deviates from the accurate scattering? |
Regarding point 3) In the SeedFilter, the experimentCuts are applied in two locations. The "minimum number of top SP for confirmation, depending on the detector region" introduced in this PR is very specific. The Seedfinder itself is unaware of any layers (though of course you could define a forward region for any detector). Instead of putting this functionality into the Seedfinder algorithm itself, I think this is so ATLAS-specific that it would make sense to move it to such an experiment-specific cut which would be ATLAS-only and not necessarily implemented in Acts. after a chat we decided to put this in the algorithm directly as it allows rejecting middle SP for which only few compatible top SP exist at an early stage (before even looking at bottom SP), such that this could save time. |
Regarding the other comments:
What I meant is that I am filling an extent with (x, y, z) information of the SP in the SeedingAlgorithm.cpp. Then, in the SeedFinder, I get the maximum and minimum R values from that extent and use them to calculate rMinMiddleSP and rMaxMiddleSP. In Athena 21.9 they do an approximation to an even number, which I believe is the same as
|
…into itk-seeding
I think the only thing that remains are the root file hash failures. This means that the output of the following root files changes:
However, that doesn't mean that there's something wrong with this PR necessarily. I assume some change in output is expected, because the hash will change if the outputs are not exactly identical (event ordering is ignored). If the seeding algorithms are changed, the output might change as well. Can you
If you conclude the root file changes are expected and acceptable, we can just update the reference hash, which should make the CI go green this PR ready to go. |
We have studied the performance and we saw a degradation in tracking efficiency both for seeds and tracks when sorting the SP in cotangent of theta and applying cuts based on the sorting. However, since we want to have this code in for emulating the ITk behaviour, I added a new boolean in the SeedFinderConfig called The performance should also be tested once the code is integrated in Athena for proper testing with ITk. |
I think the reduction in coverage is acceptable. |
This PR adds the `ITkSeedingExample.cpp` to run the ITk seeding. It shows how to configure the non-equidistant binning in z (#1005), the seed confirmation cuts (#1084), the radial range for middle SP cut (#1084) and the vector containing the map of z neighbours (#1052 and #1038). It contains all the parameters to run the seeding for ITk **pixel** space points (I intend to extend this to ITk strip SPs soon). @noemina @paulgessinger
In PR #1084 I mentioned that we were seeing a degradation in tracking efficiency when sorting the SP in cotangent of theta in the `SeedFinder`. However I realised that I was sorting only the `linCircleVec` vector in `SeedFinder` and the `compatBottomSP` and `compatTopSP` vectors should also be sorted. This PR solves the bug and now the efficiency and the output should be the same as without the sorting. @paulgessinger @robertlangenberg @noemina
A cut on the compatibility between the SP and the interaction point was added to the seedFinder in PR #1084 The cut may not always be necessary or wanted so this PR makes the cut optional by introducing a boolean `interactionPointCut` This is also useful for the ITk implementation because this cut is used for the pixel SPs but not for the strip SPs
This was included in the orthodox seeding in #1084
This was included in the orthodox seeding in acts-project#1084
This PR introduces several changes to the
SeedFinder
algorithm:rMinMiddleSP
,rMaxMiddleSP
) for the middle SP:deltaRMiddleSPRange
) defined by the userrRangeSPExtent
is used to get the min and max valuesuseVariableMiddleSPRange
defined by the user is trueuseVariableMiddleSPRange
is set to false, the vectorrRangeMiddleSP
can be used to define a fixed r range. If the vector is empty the cuts won't be applied.Check if middle SP is on the first or last disk with
zMax
andzMin
Introduced
seedConfirmation
step that requires a minimum number of top SP depending on whether the middle SP is in the central or forward region:seedConfirmation
is set to true the cut will be appliednTopSeedConf
whenseedConfirmation
is set to truedeltaRMinBottomSP
,deltaRMaxBottomSP
,deltaRMinTopSP
anddeltaRMaxTopSP
:During SP comparison:
linCircleBottom
andlinCircleTop
are sorted bycotTheta
of the bottom and top space points insidetransformCoordinates
Added the
t0
indexIn the cut on the compatibility between the r-z slope of the two seed segments,
deltaCotTheta2 - error2 > 0
was changed todeltaCotTheta2 - error2 > sigmaSquaredScatteringMinPt
, wheresigmaSquaredScatteringMinPt
is an approximate worst case multiple scattering term assuming the lowest pT we allow and the estimated theta angledCotThetaMinusError2 > scatteringInRegion2
cut removeddeltaCotTheta < 0
→ breakt0=t+1
and continue(deltaCotTheta2 - error2) * S2 > B2 * iSinTheta2 * m_config.kConstant * std::pow(2 / m_config.pTPerHelixRadius, 2)
deltaCotTheta < 0
→ breakt0=t
and continue(deltaCotTheta2-error2 > 0) && (dCotThetaMinusError2 > p2scatter * m_config.sigmaScattering * m_config.sigmaScattering
cut removedAdded the evaluation of eta of the seed
@noemina @asalzburger @paulgessinger @robertlangenberg