feat: Pass the detector construction options to the addGeant4 function#5296
Open
pbutti wants to merge 5 commits intoacts-project:mainfrom
Open
feat: Pass the detector construction options to the addGeant4 function#5296pbutti wants to merge 5 commits intoacts-project:mainfrom
pbutti wants to merge 5 commits intoacts-project:mainfrom
Conversation
Contributor
paulgessinger
previously approved these changes
Mar 27, 2026
Examples/Algorithms/Geant4/include/ActsExamples/Geant4/Geant4ConstructionOptions.hpp
Outdated
Show resolved
Hide resolved
…onstructionOptions.hpp Co-authored-by: Paul Gessinger <hello@paulgessinger.com>
|
Contributor
|
@pbutti can you have a look at the CI failures? https://github.com/acts-project/acts/actions/runs/23689828799/job/69015720896?pr=5296 |
andiwand
reviewed
Mar 30, 2026
| CsvVertexWriter, | ||
| ) | ||
| import acts.examples.hepmc3 | ||
| import acts.examples.geant4 |
Contributor
There was a problem hiding this comment.
Suggested change
| import acts.examples.geant4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add the possibility to pass the Geant4ConstructionOptions to the addGeant4 function and extend the options to toggle the gdml validation on/off.
Some experiments (ALICE) are using an older version of G4 where the validation of the gdml is still set to true by default, while in newer version is set to false. One might want to run the g4 simulation with or without validation for example, so I would propose to add an option (false by default to be in line with the newer g4 versions) to toggle the parser validation functionality. I've extended the addGeant4 function to take custom options in. It defaults to empty region list and false validation (which should be the nominal behaviour).
This also allow now to pass a region list to the constructor, which wasn't wired before.
--- END COMMIT MESSAGE ---
@altsybee