No singles output if we use "opticaladder" mode to replace normal "adder"
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.
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.
Now the output flow is working well.
PS: My Geant4 version is 10.11.
Hi, thanks for reporting! @wrzof can you please have a look ? thanks !
Thank you @kochebina Done with https://github.com/OpenGATE/Gate/pull/576