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

Expand vertex file reader to parse particle type and momenta #156

Open
gipert opened this issue Nov 10, 2024 · 7 comments
Open

Expand vertex file reader to parse particle type and momenta #156

gipert opened this issue Nov 10, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request generators Event generators

Comments

@gipert
Copy link
Member

gipert commented Nov 10, 2024

This would make remage support a wide range of external event generators through RMGVertexFromFile. The implementation would need to be a bit more complex than what it is right now, since the input file structure is "jagged". I guess a lot of this is already implemented in RMGGrabmayrGCReader.

Actually, "vertex" in RMGVertexFromFile was originally intended to refer only to vertex position. We should maybe implement all of this as an additional generator.

@gipert gipert added enhancement New feature or request generators Event generators labels Nov 10, 2024
@tdixon97
Copy link
Collaborator

tdixon97 commented Nov 11, 2024

I dont think the table necessarily needs to be jagged, we just need to include the evtid (and time?).

I think the option to read kinematics as a table like:

xpos,ypos,zpos, px,py,pz, particle, time, evtid (all as Arrays)

would be useful and only a relatively small modification of the current code. It might be nice to read LH5 not h5 files however.

@gipert
Copy link
Member Author

gipert commented Nov 11, 2024

Yes, I meant that the number of particles originating at the vertex is not fixed.

@tdixon97
Copy link
Collaborator

Started prototyping a vertex generator here: pyvertexgen.
It should be easy to write to a HDF5 file and start testing this.

@ManuelHu
Copy link
Collaborator

yes, but you will need to write it in geant4's ugly HDF5 ntuple format (are there even docs for it?). An LH5 reader would be very hard to add to the geant4 "analysis framework".

@tdixon97
Copy link
Collaborator

I don't know much about it, maybe we can write a simple converter like is done for the output?

@tdixon97
Copy link
Collaborator

I had a look and I am not sure how to create the Geant4 Ntuple inputs. Maybe we should go for something like the RMGGrabmayrGCReader as @gipert suggested and forget the geant4 input format.

@gipert
Copy link
Member Author

gipert commented Dec 2, 2024

  • we want to use LH5
  • no support for positions and momenta in the same table
  • positions is simple flat table (x, y, z)
  • momenta is still a flat table. Columns: evtid, g4_pid, px, py, pz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request generators Event generators
Projects
None yet
Development

No branches or pull requests

3 participants