OpenGATE / Gate

Official public repository of Gate
http://www.opengatecollaboration.org
GNU Lesser General Public License v3.0
236 stars 263 forks source link

Optical simulation is not working with vGATE v9.1 #509

Closed hangyookang closed 1 year ago

hangyookang commented 2 years ago

Describe the bug The optical simulation is NOT working with vGATE v9.1. Error message is as following [G4- 0 cerr] COMMAND NOT FOUND </gate/crystal/surfaces/name Detetion1>

It seems like that optical surface or boundary cannot be defined for some reason. image

Desktop (please complete the following information):

Minimal example GateContrib/imagingOpticsl/Optical_System.mac

Expected behavior Optical simulation is working well with root output

hangyookang commented 2 years ago
I found the cause of the error for the optical simulation In virtual GATE v9.1. The "GATE_USE_OPTICAL" option was OFF from the beginning. That's why I faced the error when running the optical simulation. To solve this issue, I turned on the "GATE_USE_OPTICAL" option as ON, then re-compile the GATE. ================================================================================ (1) libxml2-dev was installed to enable the compilation of the GATE >sudo apt-get install libxml2-dev (2) Go to the GATE source folder >cd /home/vgate/Software/Gate/src (3) Turn the "GATE_USE_OPTICAL" option as ON in the ccmake. >ccmake . ![2022_05_05_vGATEv9p1_GATE_USE_OPTICAL_ON](https://user-images.githubusercontent.com/56337313/166910125-e9829c4a-2c9b-4e92-802f-aeaeb5ecb546.png) (4) Set the EXECUTABLE_OUTPUT_PATH -> /home/vgate/Software/Gate/bin (5) Re-compiled the GATE. >make ![2022_05_05_vGATEv9p1_ReCompiled_make](https://user-images.githubusercontent.com/56337313/166910148-f855c49d-d9be-4a3d-b379-211c08ce36f4.png) >sudo make install ![2022_05_05_vGATEv9p1_ReCompiled_sudo_make_install](https://user-images.githubusercontent.com/56337313/166910162-a0d84a4a-211a-4e92-b9cc-6b2443ca3809.png) ================================================================================ Now optical simulation is working well without any problem. Below is an example of LUTDavisModel during the optical simulation. ![2022_05_05_vGATEv9p1_Optical_Simulation_ScreenCapture](https://user-images.githubusercontent.com/56337313/166910177-7f08d321-74f0-4d55-bb90-82ec4a889d81.png) In my case, I don't use vGATE so much since I installed GATE on Linux. But for beginners, vGATE is the most simplest way to use GATE. For the release of the next vGATE, it is better to set the GATE_USE_OPTICAL option as ON status, so that everyone can run optical simulation easily.
dsarrut commented 2 years ago

great thanks ! Indeed, I think we should try to set OPTICAL to ON by default. The only potential drawback is, that, in previous version, there were some warnings ... we will investigate to see what is feasible.

tbaudier commented 1 year ago

Done with this PR: https://github.com/OpenGATE/Gate/pull/566

For the vGate, it will be done in the next release. Thank you