Visualization#
Geant4 macro commands related to geometry and particle track visualization.
Note
For visualization, the following dependencies have to be installed: Xming (for Windows) or XQuartz (for Mac)
Visualization macro example: examples/vis.mac
Visualization commands#
Macro command |
Type |
Description |
Syntax |
Options/Examples |
---|---|---|---|---|
|
string |
To open a driver |
|
|
|
bool |
If true, view is automatically refreshed after a change of view parameters |
|
|
|
string |
To turn off unwanted visualization messages on the console |
|
|
|
- |
Creates a scene containing defined geometry |
- |
- |
|
double[2] u |
Set direction from target to camera |
|
90. 0. deg |
|
double[2] u |
Set direction from target to lights |
|
60 45 deg |
|
double |
To zoom the view |
|
2 |
|
- |
Reset view point |
- |
- |
|
string |
Set drawing style |
|
|
|
string |
Adds trajectories |
|
|
|
double[4] u |
Adds axes to current scene |
|
0 0 0 1 m |
|
- |
Adds hits if application has hits defined |
- |
- |
|
double[3] |
Adds scale to current scene |
|
|
|
double[3] |
Adds eventID to current scene |
|
18 -0.95 0.9 |
|
- |
Adds the date to the view |
- |
- |
|
- |
Adds simple frame around the view |
- |
- |
|
- |
Create drawByCharge model |
- |
- |
|
- |
Create drawByParticleID model |
- |
- |
|
- |
Apply filter to draw only certain trajectories |
- |
- |
|
string |
To supress one drawing from the end of /run/beamOn |
|
|
|
string |
To get one drawing with all of the accumulated events from run |
|
|
|
double u |
To define maximum event queue size |
|
1000 |
|
string double[2] |
To set visibility of logical volume |
|
|
|
string double[5] |
To set colour of logical volume |
|
|
|
bool |
To temporarily turn off redrawing after every vis command that might change the view, than once everything is set up, turn on |
|
|
|
string double |
Exports output of visualization to relative directory in defined format |
|
|
|
- |
To force output of a new file, to see visualization at some other time |
- |
- |
More visualization commands and options can be found in Geant4 Application Developers’ Guide.