Add E-scheme preprocessor fixing cluster history indices#211
Add E-scheme preprocessor fixing cluster history indices#211graeme-a-stewart merged 7 commits intoJuliaHEP:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #211 +/- ##
==========================================
+ Coverage 80.22% 80.34% +0.11%
==========================================
Files 21 21
Lines 1315 1338 +23
==========================================
+ Hits 1055 1075 +20
- Misses 260 263 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Performance wise it seems calling the preprocess for fixing indices isn't more expensive than
|
abd1d67 to
5ade4fc
Compare
Some clarity improvements to the recombination documentation. Add a constructor for EEJet that takes (pt, y, phi, m) meaning that PtScheme and Pt2Scheme now work for EEJet (they are not really favoured, but should not crash!). Add a --recombine option to jetreco.jl as for completeness.
8bd2f9a to
ad3e659
Compare
graeme-a-stewart
left a comment
There was a problem hiding this comment.
Great patch @m-fila - this is indeed a better way of tacking the consistency for the history index.
I tweaked the docs a bit, and also fixed some issues with using recombination that needs EEJet (which was broken...).
|
I also measured the performance here and couldn't see any measurable performance downsides with setting the history index as a default in EScheme, so this is good to go. |
The
ptschemeandpt2schemepreprocessors already assign correct history indices to jet objects. The defaulteschemedoes not currently have its own preprocessor: it either copies the full vector of jets when they are alreadyPseudoJet/EEJet(assuming their cluster indices are correct), or it converts toPseudoJet/EEJetand assigns new history indices during that conversion.As described in #200, relying on the input jets for
eschemeto already have correct cluster indices can be easy to overlook. Instead of performing checks and index fix-ups as suggested there, this proposal introduces a dedicated preprocessor foreschemethat always copies jets and assigns correct history indices. This would become the default behavior for e-scheme (other scheme preprocessors already include fixing indices). Users who know their input jets already have valid history indices can opt out by specifyingnothingas the preprocessor to avoid unnecessary work.I also noticed that two forms of preprocessor functions exist: one that accepts an output type and performs conversion, and one that does not. The docs describes user-provided preprocessors as the non-converting type, but the implementation only uses the converting form. I fix the docs and remove the unused methods.
Finally, this PR includes fixes for history-index in SoftKiller (#191), as it is related and there has been no recent activity on that issue.
Closes #200 #191