-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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] Tools supporting better layer-related computations -- technical changes to support further development #43145
Conversation
There are no significant physics changes. Several changes only affect mkFit in standalone mode. Main goals: - Make it easier to express vectorized code. - Be able to do simple propagations, parameters only, no errors. - Explore more precise hit preselection in each layer (see MkFinder.selectHitIndicesV2()). - Make it easier to export low-level algorithm / tracking state for further analysis directly in ROOT format. - Allow further development of Phase2 mkFit tracking, together with the new propagate-to-plane functionality (in another PR). Add half_length member to ModuleInfo, fill it in MkFitGeometryESProducer.cc Extend HitInfo with half-strip-length, add qbar (the other of r/z variables), Store fast-access arrays as std::vector<HitInfo>. Move propToR/Z() can/maxReachRadius() from Track to TrackBase. Implement LayerOfHits::reset() to make sure containers are empty before re-filling. Call this from both methods (beginHitRegistration() and suckInHits()). Miscellaneous changes to better support dump-hit-window case. * RecoTracker/MkFitCore/interface/Track.h Add function mcHitIDofFirstHit() to simplify dump-hit-window code. * RecoTracker/MkFitCore/src/MkBuilder.cc Add missing MkFinder setup in dump-hit-window case. * RecoTracker/MkFitCore/standalone/Makefile.config Clarify usage of Ofast (by Steve). * RecoTracker/MkFitCMS/standalone/Makefile Use GNU make &: syntax (grouped targets) for dictionary targets. * RecoTracker/MkFitCore/src/MiniPropagators.h/cc: Implementations of propagators of track parameters only (no errors/covariances), with various levels of approximation and also supporting vectorization. Use VDT for fast transcendentals in MiniPropagators. Add scalar and element-wise arithemtic operators and transcendentals to Matriplex. This makes writing vectorized loops using Matriplex variables much clearer. Prepare infrastructure for deep-dump comparisons in selectHitIndicesV2 (and elsewhere). * MkFitCore/interface/Config.h Fix typo. * MkFitCore/interface/MkBuilder.h * MkFitCore/interface/Track.h * MkFitCore/interface/TrackStructures.h * MkFitCore/src/TrackStructures.cc * MkFitCore/src/MkBuilder.cc * MkFitCore/standalone/Event.cc * MkFitCore/standalone/Event.h Pass seed-index in the current seed-vector along. In Event, provide a means of determining sim-track from hits of each seed track. * MkFitCore/src/MkBuilder.cc Add handling of WSR_Failed. * MkFitCore/src/Matrix.h Add short-int Matriplex typedefs * MkFitCore/src/MiniPropagators.cc * MkFitCore/src/MiniPropagators.h Fail-flag consistency, rename State dphi to dalpha. * MkFitCore/src/MkBase.h Add radius() function. * MkFitCore/src/MkFinder.cc * MkFitCore/src/MkFinder.h Modularization of new/old hit-selection. Reimplemented bin-search for edge positions and determined global scaling of bin-search windows to reproduce current behavior. * MkFitCore/standalone/Makefile * MkFitCore/standalone/Makefile.config Add rules for building RntDumper stuff. * MkFitCore/standalone/RntDumper/ New sub-directory: Implementation of classes and structures for dumping ROOT TTrees or RNTuples. * MkFitCMS/standalone/Makefile Add linking agains libMicRntDump.so * MkFitCMS/standalone/MkStandaloneSeqs.cc Make it easier to find out why standalone tracks are not matched to sim tracks. * MkFitCMS/standalone/Shell.cc * MkFitCMS/standalone/buildtestMPlex.cc Setup Event current-seed-vector pointers as needed during event processing. * MkFitCMS/standalone/mkFit.cc Finalize all RntDumpers on exit. Standalone consolidation plus cleanup of parameters, remove unused ones. * MkFitCMS/standalone/buildtestMPlex.cc When validation is on make sure seeds are restored after BH, STD, CE runs. * MkFitCMS/standalone/mkFit.cc Rename run-all to run default -- make it run std, and ce. * MkFitCore/src/MkBuilder.cc Missing MkFinder setup in backwardFitBH(). * MkFitCore/standalone/Geoms/CylCowWLids.cc Array of eta extents too short. * MkFitCore/standalone/Makefile.config Consolidate CMSSW and other occurences of Ofast, msse2, std=c++17/1z. Cleanup unused -D defines / settings. * MkFitCore/standalone/ConfigStandalone.h Remove unused simulation multiple scattering parameters.
A new Pull Request was created by @osschar (Matevž Tadel) for master. It involves the following packages:
@mandrenguyen, @cmsbuild, @jfernan2 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-981bbc/35491/summary.html Comparison SummarySummary:
|
There is a minimal conflic between this pr and PR # #43146. |
I was having a look at the comparisons. They mostly look fine but I'm scratching my head about this pair: Am i just reading too much into some fluctuations? |
All the differences should come from this section: This blocks adding of hits for further processing (for a given candidate, at the current layer) when the desired radius has not been reached. This can happen close to helix apogee and for very low-pt tracks (I think it was < 0.2 GeV but more likely 0.1GeV). The propagation can also fail rather spectacularly resulting in nans and nonsencical values for hit-search windows (which I noticed in the new version of hit pre-processing function). As there were no significant changes in the low-level MTV I decided to keep it in. |
Thanks @osschar |
Also, would it make sense to factorize the purely technical changes from the one you refer to? That might help to be sure that there are no unintended consequences from the former. |
How sensible this is -- I don't know :) Is the plot from particle-flow? The change could lead to some low-pt tracks missing the last hit (likely a bogus one) and then failing the track-quality cuts because of this. But if this is really number of hcal hits, there should be zero effect from a tracking change :) Other than that, sure, I can take this out ... should I go ahead? |
Pull request #43145 was updated. @mandrenguyen, @jfernan2, @cmsbuild can you please check and sign again. |
@cmsbuild please test let's see if vdt_headers gives fewer differences |
OK @slava77, I tried building vdt with some debug print outs and yes
So one either needs to explicitly link |
@smuzaffar This is very tangential to this PR, but should we drop the |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-981bbc/35579/summary.html Comparison SummarySummary:
|
this looks essentially the same as in the previous iteration. So, the So, having taken off a remote possibility of long range library use effects, I think what remains is just the small changes in tracks propagating to less numerically stable gsfTracks and further on. |
+1 |
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. @sextonkennedy, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
There are no significant physics changes.
Several changes only affect mkFit in standalone mode.
Main goals:
Make it easier to express vectorized code.
Be able to do simple propagations, parameters only, no errors.
Explore more precise hit preselection in each layer (see MkFinder.selectHitIndicesV2()).
Make it easier to export low-level algorithm / tracking state for further analysis directly in ROOT format.
Allow further development of Phase2 mkFit tracking, together with the new propagate-to-plane functionality (in another PR).
Detailed changes
Add half_length member to ModuleInfo, fill it in MkFitGeometryESProducer.cc
Extend HitInfo with half-strip-length, add qbar (the other of r/z variables), Store fast-access arrays as std::vector.
Move propToR/Z() can/maxReachRadius() from Track to TrackBase.
Implement LayerOfHits::reset() to make sure containers are empty before re-filling. Call this from both methods (beginHitRegistration() and suckInHits()).
Miscellaneous changes to better support dump-hit-window case.
RecoTracker/MkFitCore/interface/Track.h Add function mcHitIDofFirstHit() to simplify dump-hit-window code.
RecoTracker/MkFitCore/src/MkBuilder.cc Add missing MkFinder setup in dump-hit-window case.
RecoTracker/MkFitCore/standalone/Makefile.config Clarify usage of Ofast (by Steve).
RecoTracker/MkFitCMS/standalone/Makefile Use GNU make &: syntax (grouped targets) for dictionary targets.
RecoTracker/MkFitCore/src/MiniPropagators.h/cc: Implementations of propagators of track parameters only (no errors/covariances), with various levels of approximation and also supporting vectorization.
Use VDT for fast transcendentals in MiniPropagators.
Add scalar and element-wise arithemtic operators and transcendentals to Matriplex. This makes writing vectorized loops using Matriplex variables much clearer.
Prepare infrastructure for deep-dump comparisons in selectHitIndicesV2 (and elsewhere).
MkFitCore/interface/Config.h
Fix typo.
MkFitCore/interface/MkBuilder.h MkFitCore/interface/Track.h MkFitCore/interface/TrackStructures.h MkFitCore/src/TrackStructures.cc MkFitCore/src/MkBuilder.cc MkFitCore/standalone/Event.cc MkFitCore/standalone/Event.h
Pass seed-index in the current seed-vector along. In Event, provide a means of determining sim-track from hits of each seed track.
MkFitCore/src/MkBuilder.cc
Add handling of WSR_Failed.
MkFitCore/src/Matrix.h
Add short-int Matriplex typedefs
MkFitCore/src/MiniPropagators.cc MkFitCore/src/MiniPropagators.h
Fail-flag consistency, rename State dphi to dalpha.
MkFitCore/src/MkBase.h
Add radius() function.
MkFitCore/src/MkFinder.cc MkFitCore/src/MkFinder.h
Modularization of new/old hit-selection. Reimplemented bin-search for edge positions and determined global scaling of bin-search windows to reproduce current behavior.
MkFitCore/standalone/Makefile MkFitCore/standalone/Makefile.config
Add rules for building RntDumper stuff.
MkFitCore/standalone/RntDumper/
New sub-directory: Implementation of classes and structures for dumping ROOT TTrees or RNTuples.
MkFitCMS/standalone/Makefile
Add linking agains libMicRntDump.so
MkFitCMS/standalone/MkStandaloneSeqs.cc
Make it easier to find out why standalone tracks are not matched to sim tracks.
MkFitCMS/standalone/Shell.cc MkFitCMS/standalone/buildtestMPlex.cc
Setup Event current-seed-vector pointers as needed during event processing.
MkFitCMS/standalone/mkFit.cc
Finalize all RntDumpers on exit.
Standalone consolidation plus cleanup of parameters, remove unused ones.
MkFitCMS/standalone/buildtestMPlex.cc
When validation is on make sure seeds are restored after BH, STD, CE runs.
MkFitCMS/standalone/mkFit.cc
Rename run-all to run default -- make it run std, and ce.
MkFitCore/src/MkBuilder.cc
Missing MkFinder setup in backwardFitBH().
MkFitCore/standalone/Geoms/CylCowWLids.cc
Array of eta extents too short.
MkFitCore/standalone/Makefile.config
Consolidate CMSSW and other occurences of Ofast, msse2, std=c++17/1z. Cleanup unused -D defines / settings.
MkFitCore/standalone/ConfigStandalone.h
Remove unused simulation multiple scattering parameters.
PR validation:
No significant physics changes: MTV plots