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

Fixed buggy geant4 vertex time from HepMC #1085

Closed
wants to merge 1 commit into from

Conversation

kkauder
Copy link
Contributor

@kkauder kkauder commented Mar 29, 2023

#1082

BEGINRELEASENOTES

  • Vertices read from HepMC files did not get their time assigned properly.
    ENDRELEASENOTES

@andresailer
Copy link
Member

Thanks for opening the PR, this is much easier to browse than a patch file.

@@ -146,7 +147,7 @@ HEPMC3EventReader::readParticles(int event_number, Vertices& vertices, Particles
vtx->x = p->vex;
vtx->y = p->vey;
vtx->z = p->vez;
vtx->time = p->time;
vtx->time = p->vet;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vtx->time = p->vet;
vtx->time = vex.get_component(3) * len_unit / CLHEP::c_light;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the comment above to change vertex from three-vector to four-vector (0,0,0,0)

@andresailer
Copy link
Member

This breaks the "normal" root output: ddsim -O out.root ....

@kkauder
Copy link
Contributor Author

kkauder commented Mar 30, 2023

Oh, makes sense. Probably the extra serialized member. Yours looks like a good even more minimal version.

@andresailer
Copy link
Member

Ok, I'll close this one then.

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.

2 participants