Closed atolosadelgado closed 2 months ago
Is it sufficient to only instantiate this manager? It should be simple to steer this instantiation with an option of the Geant4Kernel object. This I could easily implement.
I think it is enough to instantiate once after the run manager. I like the idea of making it optional, since it may affect the overall performance.
@MarkusFrankATcernch once you create a working branch, may I have some time to test it before merging it? Just in case I overlooked something...
@atolosadelgado Please see here in the HEAD: https://github.com/MarkusFrankATcernch/DD4hep You have to set:
import DDG4
g4 = DDG4.Geant4()
g4.kernel().HaveScoringManager = True
...
it works, thank you @MarkusFrankATcernch !
And thanks @andresailer for the piece of code to be added in the steering file!
def enable_score_mesh(kernel):
kernel.HaveScoringManager = 1
return None
SIM.physics.setupUserPhysics(enable_score_mesh)
Dear experts,
The Geant4 Scoring mesh is a feature that can be very useful for quick checks, such as background studies. To enable it, one has to access to the G4ScoringManager pointer after the instantiation of G4(MT)RunManager, as shown here or as follows:
Then new UI commands will appear, allowing to create and use meshes.
Question: would it be possible to add this feature to ddsim?
Thank you for your time.
Alvaro