-
Notifications
You must be signed in to change notification settings - Fork 1
Generator-level info in event output tree #21
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
Conversation
|
Hi @mvicenzi, thanks for this! I'll try and review this as soon as I get a chance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mvicenzi, thanks for this really nice PR - I like how this is implemented! I still need to look into how to add metadata to the hepmc inputs from FORESEE - but that can be for a future PR. Before merging please can you check that the genie macros still work? I tried running nue_genie.mac and it either crashes for me with a munmap error or throws a memory related warning Warning in <THnSparseT<TArrayF>::GetSparseFractionMem>: Cannot determine type of elements! - my guess is some kind of memory problem in PixelMap3D?
I see the same behaviour -- thanks for pointing this out! |
|
@benw22022 I believe I fixed it -- it was a combination of the map not being filled correctly due to a bad |
benw22022
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mvicenzi! I think the fix is working, I don't see the memory errors anymore - feel free to merge this 🚀
This PR closes #17 .
Summary of changes:
GeneratorVertexMetadatastructto hold generator-level information. Astd::vectorofGeneratorVertexMetadatais owned by theGeneratorBaseclass (one metadata object per vertex in the event). Each specific generator implementation fills the metadata with available information.EventInformation, derived fromG4UserEventInformation. This is set immediately after the generation of the primaries inPrimaryGeneratorAction.AnalysisManager, this information is recovered from the event and saved in theeventoutput tree.geniegenerator was carried to theAnalysisManagerby setting a customPrimaryParticleInformationobject (derived byG4UserPrimaryParticleInformation) for each primary particle. This is no longer needed, so that class has been removed.FPFClassesdictionary has been removed from theCMakeListsfile.Open questions:
hepmcfiles do not seem to offer much metadata. There is a possibility to save custom attributes in the event header, but the current files do not show any. The metadata being propagated is therefore lacking. We should investigate whether the parameters of the model(s) used can be saved into the file (instead of just the file name) so that we can encode them properly.primariesandtrajectoriesinto a single "particles" tree #18 , we might decide to add to the event tree a vector of primaries for each vertex.