Skip to content

Conversation

@wdconinc
Copy link
Contributor

@wdconinc wdconinc commented Oct 29, 2025

Briefly, what does this PR introduce?

This PR aims to remove the non-deterministic behavior between single- and multi-threading observed in e.g. _EcalBarrelScFiPPulses_calorimeterHits and brethren. Compared to unordered_map, we get

  • slower insertion with map (O(log n) instead of O(1)),
  • technically* slower lookup (O(log n) instead of O(1)), and
  • the same iteration complexity (O(n)).

At this point (and maybe always), deterministic output outweighs performance consideration.

(*Technically since we don't do random lookups.)

What kind of change does this PR introduce?

  • Bug fix (issue: non-deterministic behavior)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

Yes, we might have slightly slower performance and better determinism.

@github-actions github-actions bot added the topic: calorimetry relates to calorimetry label Oct 29, 2025
…tProcessor (fix: iwyu) (#2162)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/18892744942.
Please merge this PR into the branch `SimCalorimeterHitProcessor-map`
to resolve failures in PR #2161.

Auto-generated by [create-pull-request][1]

[1]: https://github.com/peter-evans/create-pull-request

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@wdconinc
Copy link
Contributor Author

Doesn't actually fix the lack of deterministic behavior...

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

Labels

topic: calorimetry relates to calorimetry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants