Gate icon indicating copy to clipboard operation
Gate copied to clipboard

No singles output if we use "opticaladder" mode to replace normal "adder"

Open woolaman opened this issue 3 years ago • 2 comments

I'm trying optical simulation using Gate V9.2 compiled with option GATE_USE_OPTICAL=ON. I found a good example "LUTDavisModel" in "GateContrib/imaging" which use opticaladder mode. Running the example, we got a root file, but I found Singles tree is empty. After adding the command "/gate/digitizer/Singles/readout/verbose 2" to debug, I found the new line "[digitizer/Singles/readout::ProcessPulseList]: processing input list with 0 entries" in output log file.

So is it a bug for "opticaladder" mode, or I do something wrong?

Expected behavior There is singles tree in root file when we use "opticaladder" mode in optical simulation.

woolaman avatar Jun 02 '22 04:06 woolaman

I found the cause of the error for optical simulation. "If you compile GATE with Geant4 10.7 or newer, PDG code for optical photon has changed from 0 (zero) to -22." But the statement "hit->GetPDGEncoding() == 0" is still adopted to look for optical photon in multiple places of Gate 9.2. I fixed the bug as shown below and re-compiled the GATE. image Now the output flow is working well. PS: My Geant4 version is 10.11.

woolaman avatar Jun 06 '22 02:06 woolaman

Hi, thanks for reporting! @wrzof can you please have a look ? thanks !

dsarrut avatar Jun 07 '22 16:06 dsarrut

Thank you @kochebina Done with https://github.com/OpenGATE/Gate/pull/576

tbaudier avatar Feb 27 '23 14:02 tbaudier