Vizualization on M1 Mac

I am installing on my M1 mac. I have installed with USE_QT_ON and USE_OPENGL_X11 and have successfully run B1 and one of my programs. When I run the program, I can see the geometery and tracks, but I cannot rotate the image, or send commands (I can see interact via the terminal). All I see is the image (This is using XQuartz).

On my previous intel mac, the visualization includes the ability to rotate, scale, translate, etc the geometry, and send commands via the application. Is there a way to get this on the M1?

There is nothing specific about M1 in this respect, as far as I’m aware. (I have an M2 Mac.)

It sounds like you have opened an OpenGLX11 window - it is not interactive. If you open an OpenGLQt window, it should be interactive.

It’s a little strange - /vis/open OGL should open the most highly featured window (Qt). But to use OPenGLQt you have to use a Qt session, i.e., not a dumb terminal session.

Get back to us with more information. In any case, rather than simply report some symptom, we need you to look at the output for messages. Maybe the messages will give you some clue as to what the problem is.

Hmm perhaps I don’t have QT installed as I thought. I will try to re install by turning off USE_OPENGL_X11 and see if I can open a visualization with qt.

So when I install without USE_X11 On, i get the following error when running my program:

parameter value (OGL) is not listed in the candidate list

and then a flurry of other errors.
Do I have to do something to enable OpenGL with QT other than having USE_QT_ON and having QT installed? (Via homebrew btw)

Hi Matthew

From memory (I’m away from my computer), yes, you have to specify something like OPENGLQT=ON too. See Installation Guide, Other cmake options.

I’ll check in the morning.


P.S. homebrew is fine (works for me) but if it’s Qt6, you have to specify yet another cmake option, something like USE _QT6=ON.

Best solution with Homebrew is to have brew install qt (which is Qt6) and then configure Geant4 with

cmake -DGEANT4_USE_QT=ON -DGEANT4_USE_QT_QT6=ON <otherargs>

Small update. I have run with just USE_QT=ON. I am getting an error, it looks like cmake is looking in at my anaconda build of QT. I have tried CMAKE_PREFIX_PATH pointed to my homebrew build, but it still looks in anaconda. I can solve this but just haven’t had the time to work on it

Just checking…when you say USE_QT=ON, you mean GEANT4_USE_QT=ON? And, if necessary, GEANT4_USE_QT_QT6=ON?

To point at the homebrew build, CMAKE_PREFIX_PATH=$(brew --prefix qt@5) (or qt@6).