-
Notifications
You must be signed in to change notification settings - Fork 50
feat: tighten up the world to a more minimal geometry #896
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
base: main
Are you sure you want to change the base?
Conversation
Hmm, "Unknown Shape TGeoCompositeShape" in convert-to-step... |
Looks very useful, do you have any metrics which show the performance improvements? It would be nice to be able to control the world volume more precisely for different configurations. Could the parameters be moved into a separate e.g. worlddefinition_default.xml file. |
Not really benchmarked in a way that works with eic-shell. The way single-threaded Geant4 works, the only speed-up is what we gain from long-running tracks. There is an npsim plugin at eic/npsim#35 that prints the longest running tracks. Those go up to 100ms for neutrons that reach end of world, and there are typically a few of those per event (the other long duration tracks are optical photons bouncing in the DIRC). The effect of the speed-up is potentially different for multi-threaded running. In that case the longest running track becomes a minimum duration for the event since it's the minimum unit of parallelism. So, while other short-running tracks can be parallelized, that doesn't work for the long-running tracks. I don't think the speed-up is above the percent level, though, so I don't think there is too much benefit in tweaking this much. We could make it a compact file that is listed in the yml configs, but I would also want to be mindful of the potential for errors there when stuff extends outside the world. |
I would expected more significant gains in the tracking only geometries where there aren't many secondaries produced in the detector but lots might come from the air. When I was looking at this for the specific case of beamline tracking, killing the single electron track in the beampipe vacuum rather than allowing it to continue through 50m of air resulted in a 200x speed up. It won't be quite the same for this but might still be significant. |
Good point! Maybe sharpening up the world for those is useful then. |
Briefly, what does this PR introduce?
This PR shrinks the world volume from 60 m x 60 m x 200 m to something that is just sufficient to enclose the relevant volumes. This way we won't be tracking slow neutrons on their way to death in air.
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
No.
Does this PR change default behavior?
No.