opengate
opengate copied to clipboard
EM calculator (for use in dose actor)
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:
multithreading for LET Actor / Dose 2 Water calculation does not work yet.
Problem with the G4EMcalculator;
I want to make a GateEMcalculator class that gives us also the possibility to load our own stopping power tables
(e.g. Janni tables, …)
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#L146
The 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.
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.