Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addOptical command not found, cannot generate optical photons #24

Open
elpacificador732 opened this issue Dec 19, 2024 · 2 comments
Open

Comments

@elpacificador732
Copy link

I am trying to run optical photon problems with Gears, but can’t get them to work because the UI command /physics_lists/factory/addOptical is not found, no matter which physics list I select (code below). Everything else works fine, just no optical photon generation. Same goes for all examples in the tutorial/optical folder.

I am new to Geant4 and first trained with a tutorial where I was able to generate optical photons in a scintillator by coding in C++ and using G4EmStandardPhysics and G4OpticalPhysics but I would really like to use Gears. I have been having the same issue with the pre-compiled version and by compiling from source code.

Can someone help? Thanks.

image

Geant4 Version: 11.3.0
Operating System: Win10
Compiler/Version: Microsoft Visual Studio Community 2022 (64 bits) Version 17.12.3
CMake Version: 3.29.0-rc1

@jintonic
Copy link
Owner

The macro command has been removed from new Geant4 versions. I think you can simply remove that command and everything should be fine. As for scintillation simulation, please refer to https://github.com/jintonic/gears/tree/master/tutorials/detector/optical. I am in vacation and cannot reply in time. But I'll try scintillation simulation by myself with the newest Geant4 to check if there is anything in the gears documentation that needs to be updated after Christmas.

@elpacificador732
Copy link
Author

I could not find any way to activate scintillation with UI commands only, so as a workaround I forced the physics list selection in the main function of gears.cc and activated optical physics there. Otherwise, the /process/optical/ commands are simply not present.

image

Then in macros I removed the physics list selection and activated the optical processes as follows. It did the job.

image

Merry Christmas and enjoy your holiday!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants