Run the same example with the advanced Qt dirver.
Example can be found under:
% cd ~/g4course2011 % cp -r $G4INSTALL/examples/novice/N03 . % cd N03 % less README
% gmake -j2
Type exit at G4 prompt to exit application:
.... Idle> # type your commands. example: Idle> /run/beamOn 1 .... Idle> exit
Current available graphics systems are: ASCIITree (ATree) .....
Check that OpenGL dirver is available. Check that OpenGL with Qt extensions has been build.
What are the corresponding driver names (short string between parenthesis)?
Which drivers are available in your application?
To use a specific driver, one can issue the command:
Idle> /vis/open DRIVERNAME
Look at vis.mac macro file, what is the driver that you are using?
UIs are controlled through environment variables: G4UI_BUILD_UIname_SESSION variables tell which UI have been built in Geant4, G4UI_USE_UIname tells you which UI your application will use.
Which UIs are available in your setup?
Hint: to see all environment variables related to Geant4 you can issue the shell command:
% env | grep G4
Which UI to use is decided at compilation time via the G4UI_USE_UIname variables; to change the UI you need to recompile your code.
Only one UI can be used each time. If more than one G4UI_USE_UIname is set the UI that is actually used is chosen as follows: G4UI_USE_TCSH has the highest preference, then G4UI_USE_XM followed by G4UI_USE_QT (if none is set a very basic text based UI will be used).
Which is the UI that you are using?
% $G4WORKDIR/bin/$G4SYSTEM/exampleN03 Idle> /vis/viewer/pan -5 0 cm Idle> /vis/viewer/zoom 1.3
What is the difference between pan/zoom and panTo/zoomTo commands?
Hint: at G4 prompt try:
Idle> ls /vis/viewer Idle> help /vis/viewer/PutHereTheCommandName
Do you notice any difference?
Hint: if you use /vis/open OGL in your vis.mac file, this will issue /vis/open OGLIX or /vis/open OGLIQt depending on the used UI.
Set the G4UI_USE_QT variable (if unset in Exercise 1.1). Hint: use shell command:
% export G4UI_USE_QT=1
% touch exampleN03.cc % gmake
Re-run example. Try the Help, Cout, and History tabs.
Interact with the detector window: you can use the mouse to zoom, rotate pan etc (Hint: use right click for more options).
Get familiar with the new interface.
Hint: We will use Qt driver and UI for the rest of the tutorial. If your OpenGL window seems not to be updated try