Open djboersma opened 1 year ago
We finally understand with @andiresch what the issue was: the instance of the G4EMcalculator
in the actor must be thread local. PR in progress ;)
I keep the issue for the second goal: make it possible to load your own SP table.
This issue serves to document and organize actions around EM actor during the 2023-04-24 hackathon in Cracow.
From @andiresch I got the following problem description:
Currently the
G4EMcalculator
is only used in the LET actor, namely here: https://github.com/OpenGATE/opengate/blob/master/core/opengate_core/opengate_lib/GateLETActor.cpp#L136 and here: https://github.com/OpenGATE/opengate/blob/master/core/opengate_core/opengate_lib/GateLETActor.cpp#L146The code shows some attempts to make it thread safe (
SetPixelMutex
), which are commented out with "TODO" promises, there should be some backstory to that. What went wrong when you tried to uncomment and run this?There is no EM calculator usage in the regular dose actor yet, it does not seem to offer "dose to water" functionality in any other way either. It does use the
G4AutoLock
mechanism, so I guess that it can run in MT mode.