Geant4 sensitive assignment action depending on regex rather than brute force Geant4VolumeManager #1288
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.
BEGINRELEASENOTES
Geant4VolumeManager
, if the number of sensitive pathes is very high like e.g. for straw detectors.Geant4VolumeManager
will not be populated. To still make Geant4 functioning, the sensitive volumes may be declared a posterior after conversion using regular expressions as implemented in the classGeant4RegexSensitivesConstruction
. This class is only an example how such functionality may be achieved: other solutions are possible as well. This functionality can be switched at the level of each subdetector participating in the experiment setup.BoxOfStraws
was constructed with a flag in the xml description:Change
<non_sensitive/>
to<sensitive/>
and the different behavor of memory allocation when starting Geant4 can be observed.The corresponding Geant4 python script can be found here:
The memory consumption differs then as follows (depending on the thickness of the straws, which determine the number of sensitive pathes):
Hence this is a possibility to significantly reduce memory consumption for highly granular subdetectors.
ENDRELEASENOTES