Skip to content

Conversation

@m-fila
Copy link
Member

@m-fila m-fila commented Nov 16, 2025

The ptscheme and pt2scheme preprocessors already assign correct history indices to jet objects. The default escheme does not currently have its own preprocessor: it either copies the full vector of jets when they are already PseudoJet/EEJet (assuming their cluster indices are correct), or it converts to PseudoJet/EEJet and assigns new history indices during that conversion.

As described in #200, relying on the input jets for escheme to 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 for escheme that 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 specifying nothing as 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

@m-fila m-fila changed the title Cluster hsitory indices Add E-scheme preprocessor fixing cluster history indices Nov 16, 2025
@codecov
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.01%. Comparing base (ae0ac95) to head (abd1d67).

Files with missing lines Patch % Lines
src/EEJet.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #211      +/-   ##
==========================================
- Coverage   80.22%   80.01%   -0.22%     
==========================================
  Files          21       21              
  Lines        1315     1326      +11     
==========================================
+ Hits         1055     1061       +6     
- Misses        260      265       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@m-fila
Copy link
Member Author

m-fila commented Nov 16, 2025

Performance wise it seems calling the preprocess for fixing indices isn't more expensive than nothing preprocess just coping input jets without fixups:

  • preprocess_escheme
    pp 14TeV Tiled
    Processed 100 events 16 times
    Average time per event 177.05440187500005 ± 18.650765441555805 μs
    Lowest time per event 161.72569 μs
    pp 14 TeV Plain
    Processed 100 events 16 times
    Average time per event 504.513385625 ± 18.07148126798454 μs
    Lowest time per event 486.39413 μs
    ee H Durham
    Processed 100 events 16 times
    Average time per event 32.36774750000001 ± 3.0916310772200886 μs
    Lowest time per event 29.67452 μs
    
  • nothing
    pp 14TeV Tiled
    Processed 100 events 16 times
    Average time per event 176.36583312499997 ± 17.66222657424268 μs
    Lowest time per event 162.19935999999998 μs
    pp 14 TeV Plain
    Processed 100 events 16 times
    Average time per event 501.3887362499999 ± 16.77077525920156 μs
    Lowest time per event 485.47028 μs
    ee H Durham
    Processed 100 events 16 times
    Average time per event 35.764484375 ± 4.081166524662498 μs
    Lowest time per event 29.568640000000002 μs
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically fix-up jet cluster_hist_seq when (re)running reconstruction SoftKiller should return PseudoJets with the correct cluster_hist_index

1 participant