slaclab / slic

Simulation for the Linear Collider (SLIC) Geant4 simulation application
Other
5 stars 7 forks source link

Add option to allow registration of OpenGL+QT graphics system. #98

Closed omar-moreno closed 1 year ago

omar-moreno commented 1 year ago

The following code will be added to SlicApplication:

#ifdef VIS
vis->RegisterGraphicsSystem(new G4OpenGLStoredQt);
#endif 

The VIS flag can be set during configuration as follows

cmake -DVIS=1 ..

This will allow us to visualize detectors using QT as shown below:

image

normangraf commented 1 year ago

QT visualization is already an option with slic.

omar-moreno commented 1 year ago

@normangraf How do you enable it? Even when I build with the visualization enabled, it doesn't add G4OpenGLStoredQt to the graphics system.

omar-moreno commented 1 year ago

Specifically, I set the following when issuing the cmake command and the above class doesn't get added to the graphics system

-DWITH_GEANT4_UIVIS=ON

I have verified that it enters the following loop in the Geant4.cmake macro

if(WITH_GEANT4_UIVIS)
  ¦ find_package(Geant4 QUIET COMPONENTS ui_all vis_all)

but it doesn't seem to make a difference.

I have also verified that using different versions of Geant4 doesn't make a difference. Also, if I run the stand alone Geant4 visualization examples, QT visualization works fine.