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

Save the beam conditions to a metadata tree #433

Open
simonge opened this issue May 19, 2023 · 5 comments
Open

Save the beam conditions to a metadata tree #433

simonge opened this issue May 19, 2023 · 5 comments

Comments

@simonge
Copy link
Contributor

simonge commented May 19, 2023

The beam energies and divergence settings used in the simulation should be stored so they can be read back by EICrecon. This is essential for correct reconstruction of the FF/FB particles.

Currently there are metadata trees written by podio to the edm4hep file but it's not clear to me if DD4hep has an interface to those or whether this needs to be implemented there before we can add it into the epic workflow.

@veprbl
Copy link
Member

veprbl commented May 19, 2023

I don't see how one can pass divergence settings from afterburner to DD4hep. The beam energies can be fished out from the MCParticles collection right now.

@veprbl
Copy link
Member

veprbl commented May 19, 2023

Maybe, we should upstream functionality of afterburner into DD4hep. Then the configuration options can be saved uniformly.

@simonge
Copy link
Contributor Author

simonge commented May 24, 2023

Do you know how to go about saving to the podio metadata trees from DD4hep? It seems quite wasteful to infer a constant from the MCParticles tree every event.

The afterburner already adds a bunch of comment lines to the output hepmc file, if we can add these (and maybe a few more) into the epic edm4hep file metadata.

Whatever implementation narrows down the legitimate workflows currently available to collaborators. Either everyone will have to pass their events through the afterburner, or if the afterburner is added, presumably into npsim, this moves away from having a simple ddsim interface.

@veprbl
Copy link
Member

veprbl commented May 24, 2023

The afterburner already adds a bunch of comment lines to the output hepmc file, if we can add these (and maybe a few more) into the epic edm4hep file metadata.

I see in HepMC3 there is a support for storing arbitrary attributes in GenRunInfo: https://gitlab.cern.ch/hepmc/HepMC3/-/blob/master/include/HepMC3/GenRunInfo.h
Perhaps, that's what afterburner may be using to write those.
I think, DD4hep can be relatively easily made to copy those over into the PODIO metadata.

Do you know how to go about saving to the podio metadata trees from DD4hep? It seems quite wasteful to infer a constant from the MCParticles tree every event.

It shouldn't be too hard, since HepMC and EDM4hep logic are both part of DDG4 module. It's pretty much the same as AIDASoft/DD4hep#1059

Whatever implementation narrows down the legitimate workflows currently available to collaborators. Either everyone will have to pass their events through the afterburner, or if the afterburner is added, presumably into npsim, this moves away from having a simple ddsim interface.

If the values are not present we could just assume some sensible defaults or completely disable some functionality.

@simonge
Copy link
Contributor Author

simonge commented May 24, 2023

Will this be something to address in DDG4 rather than epic then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants