Skip to content
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

Make MCParticle momenta use doubles instead of floats #237

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

tmadlener
Copy link
Contributor

@tmadlener tmadlener commented Nov 6, 2023

BEGINRELEASENOTES

  • Switch the momentum and momentumAtEndpoint of the MCParticle from Vector3f to Vector3d.
  • Add a (deprecated from the beginning) constructor from Vector3f to Vector3d to ease the transition.

ENDRELEASENOTES

As (partially) discussed in #208

This breaks building (at least the following):

@Zehvogel
Copy link
Contributor

Zehvogel commented Nov 7, 2023

do we need real doubles here or should we consider something like ROOTs Double32_t which would have the same behaviour as it had in the lcio world i.e. 64 bit in memory 32 bit on disk?

@jmcarcell
Copy link
Contributor

But Double32_t is just a typedef to double so writing a different number of bytes has to be handled by the IO code

@Zehvogel
Copy link
Contributor

Zehvogel commented Nov 7, 2023

yes we would need to put the logic for that somewhere I guess

This direction should not suffer from narrowing
edm4hep.yaml Outdated Show resolved Hide resolved
@tmadlener tmadlener merged commit 46a594b into key4hep:main Jan 23, 2024
8 of 9 checks passed
@tmadlener tmadlener deleted the mcparticles-double-momentum branch January 23, 2024 19:19
jmcarcell added a commit that referenced this pull request Jan 29, 2024
tmadlener added a commit that referenced this pull request Feb 7, 2024
tmadlener added a commit that referenced this pull request Feb 7, 2024
tmadlener added a commit to tmadlener/EDM4hep that referenced this pull request Feb 8, 2024
* Make momentum use doubles instead of floats

* Fix python unittests

* Add a constructor from Vector3f for Vector3d

This direction should not suffer from narrowing
tmadlener added a commit that referenced this pull request Feb 8, 2024
* Make momentum use doubles instead of floats

* Fix python unittests

* Add a constructor from Vector3f for Vector3d

This direction should not suffer from narrowing
tmadlener added a commit that referenced this pull request Feb 13, 2024
* Make momentum use doubles instead of floats

* Fix python unittests

* Add a constructor from Vector3f for Vector3d

This direction should not suffer from narrowing
jmcarcell pushed a commit to tmadlener/EDM4hep that referenced this pull request Feb 22, 2024
* Make momentum use doubles instead of floats

* Fix python unittests

* Add a constructor from Vector3f for Vector3d

This direction should not suffer from narrowing
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.

3 participants