-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[MkFit] Consolidate nan checks and filtering, expose propagation fail flag to steering code #40681
Conversation
… flag to steering code. 1. Nan filtering In MkBuilder::filter_comb_cands() add a flag allowing other TrackCands to be tested, not just the best one. If a later one passes, copy it over the first one as that will be the one used for backward fit/search or for export. Properly handle not-best TrackCands in filtering after backward search. - After backward search representation of TrackCand hits is branching at the bottom and they need to be re-connected for scoring / filtering algorithms to process them correctly. - Call nan filters and other config specified filters at the same time through definition of a lambda when both of them need to be run. 2. Propagation fail flag *** At this stage physics changing changes are not active, they are marked with PROP-FAIL-ENABLE comments. *** Added MPlexQI MkBase::m_FailFlag (parent class of MkFinder). One has to manually clear it when desired (before propagation). Now only 0 and 1 are used ... could have differnt error codes, eg. failed to reach, step too large, etc. The fail-flag mplex is passed into all propagation and propaget+kalman_op functions (barrel and endcap - there was limited handling with forced restore for barrel propagation before, state was not visible outside). Are there some error states in KalmanOp? We could pass that in as well. Added WSR_Failed as member of enum WithinSensitiveRegion_e Handled in selectHitIndices() and findTracksCloneEngine() -> stop the candidate. With this we can now stop also endcap tracks when they are about to reach apex. Until now endcap tracks went on looping. Another check done is how large the helix angle along the step was attempted (pi/2 forces error). Other propToR/Z checks can be added / tried. fail codes, kamlnaOp fail In backward fit the endcap fails are somewhat accidental -- trying to fix them does not really help as hits are already chosen. So we only do rollback in barrel. We can probably remove "can-reach-radius" check in MkBuilder::fund_track_unroll_candidates() Note that Config::useTrigApprox = true -- reconsider. Retry backward-search with non-swapped first/second layers in the plan? b-tagging efficiency / resolution / number of hits 3. In propagateToR reduce the dot-product correction for ingoing tracks to prevent them from overshooting. 4. Consolidate debug printouts, introduce mkfit::g_debug for additional, top-level debug output control. 5. Changes in standalone/ Clarify --help and --all-seeds in usage, exit on --help. Implement mkFit::Shell to allow targeted, interactive debugging through ROOT prompt. Includes: - event navigation, iteration selection, processing flag setting; - options for processing of a single seed (or a sequence of seeds for seed indices) based on label or seed position before/after cleaning; - some track comparison functions.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40681/34031
|
A new Pull Request was created by @osschar (Matevž Tadel) for master. It involves the following packages:
@cmsbuild, @mandrenguyen, @clacaputo can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-477216/30372/summary.html Comparison SummarySummary:
|
@cms-sw/reconstruction-l2 |
Hi @slava77 , I'm not sure I'll be able to review all the new code by tomorrow |
Yes, there's quite a few of changes in there, let me break them up a little:
|
urgent
|
Hi @osschar , thanks a lot for the walkthrough. I've checked the code and I don't have any comments. |
+reconstruction
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1
|
PR description:
Changes introduced in this PR are mostly technical but they do include some bugfixes and improvements of corner cases that were potentially leading to failed propagations, Kalman updates and consequently to trashed/nan-ed output track parameters.
Further, there are some changes in standalone/ parts of the code, mostly introduction of interactive shell to be used for debugging.
1. Nan filtering
In MkBuilder::filter_comb_cands() add a flag allowing other TrackCands to be tested, not just the best one. If a later one passes, copy it over the first one as that will be the one used for backward fit/search or for export.
Properly handle not-best TrackCands in filtering after backward search.
After backward search representation of TrackCand hits is branching at the bottom and they need to be re-connected for scoring / filtering algorithms to process them correctly.
Call nan filters and other config specified filters at the same time through definition of a lambda when both of them need to be run.
2. Propagation fail flag & propagation changes
Added MPlexQI MkBase::m_FailFlag (parent class of MkFinder). One has to manually clear it when desired (before propagation). Now only 0 and 1 are used ... could have different error codes, eg., failed to reach, step too large, etc.
The fail-flag mplex is passed into all propagation and propaget+kalman_op functions (barrel and endcap - existing code had limited internal handling with forced restore for barrel propagation before, state was not visible outside).
Added WSR_Failed as member of enum WithinSensitiveRegion_e. Handled in selectHitIndices() and findTracksCloneEngine() -> stop the candidate.
In propagateToR reduce the dot-product correction for in-going tracks to prevent them from overshooting.
3. Changes in standalone/
Consolidate debug printouts, introduce mkfit::g_debug for additional, top-level debug output control.
Clarify --help and --all-seeds in usage, exit on --help.
Implement mkFit::Shell to allow targeted, interactive debugging through ROOT prompt. Includes:
PR validation:
MTV plots, compare blue (baseline) vs. black:
http://uaf-10.t2.ucsd.edu/~mmasciov/MIC/updatedPR111/MTV_ttbarPU_mkFit_5iter_updatedPR111_update_fixPropagation/