I figured out I can create particles and their trajectories when I simply hit the “beam on” button in the GUI. Now, I would like to overlay all shown particles when I do so. At the moment, there is always a new particle / trajectory shown in the GUI but I would like to see all that were created within one session.
I tried to follow the commands given in the GUI but it seems it doesn’t work. Here are the UI codes I’m using:
I would say the usual way of interacting with Geant4 is through commands issued in the input window (the one-line window at the bottom of the Qt GUI, labeled “Session”). Is there any particular reason you are programming the commands with the ApplyCommand method? There is an issue of where those ApplyCommand statements should go - you do not say where you have put them?
Have a look at examples/basic/B1. By default it executes a “macro” called vis.mac. vis.mac will give you an idea of what commands you could use. If you want to write your own main program and do things a different way, you may, of course. Let us say you have a main program that opens the Qt GUI, and halts, waiting for input in the Session window. You could simply type some commands:
thanks for your reply. Basically, as I’m rather fresh to Geant4, I’m using these commands because I’m following someone in a tutorial doing so. But meanwhile I figured it is the command "