<< DAWNFILE driver >> Revised on November 02, 1999 Revised on November 26, 1999 (1) DAWNFILE driver generates a DAWN-format file and, by default, invoke a Fukui Renderer DAWN process, making it read the generated g4.prim file. DAWNFILE driver is platform dependent, and so compilable at NT, too. Fukui Renderer DAWN is also ported to NT. Source files and details of FukuiRenderer DAWN: http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html (2) Compilation with the GNUmakefile logic (2a) installing libraries % setenv G4VIS_BUILD_DAWNFILE_DRIVER 1 % cd geant4/source % gmake global (2b) building an executable % setenv G4VIS_USE_DAWNFILE 1 % gmake (3) Camera parameters are also passed to DAWN's GUI via the file .DAWN_1.history. Most of the camera parameters held by Geant4 are passed to the Fukui Renderer DAWN process. (4) A viewer of the generated g4.prim file is "customizable". The default viewer is Fukui Renderer DAWN with file name "dawn". You can change it to other Fukui Graphics Systems, say, DAVID, by setting an environmental variable: % setenv G4DAWNFILE_VIEWER david Another convenient setting is % setenv G4DAWNFILE_VIEWER "dawn -d" which skips invoking DAWN GUI panel. (5) Customization of destination directory Destination directiory of g4.prim and g4.eps is customizable with the environmental variable "G4DAWNFILE_DEST_DIR": % setenv G4DAWNFILE_DEST_DIR directory_name/ For example, % setenv G4DAWNFILE_DEST_DIR /tmp/ Do not forget to add "/" at the end of the directory name. (6) Automatic incremetaion of output file names: This function becomes active by setting an environmental variable as follows: % setenv G4DAWNFILE_MAX_FILE_NUM n where n is an integer greater than or equal to 1. Names of generated files are: DAWN-format files: g4.prim, g4_1.prim, g4_2.prim, ... , g4_(n-1).prim EPS files : g4.eps , g4_1.eps , g4_2.eps , ... , g4_(n-1).eps Note that the incrementation is done as follows (pseudo codes) filename = "g4.prim" // initialization while( filename already exists in the dest directory ) { increment filename } It means that if you delete file "g4.prim" in the destination directory, the file name in the next generation is still g4.prim. (7) Use of DAWNFILE driver with DAVID for visual intersection debugging DAVID is a "DAwn's Visual Intersection Debugger" for Geant4 shapes. DAVID is already installed into cernsp, hpplus, and arkoop. DAWN is the automatically invoked by DAVID "if" intersections are detected, in order to visualize the scene with intersected shapes highlighted. Summary of the intersections is displayed on your display. Details are described in a file "g4david.log" generated in the current directory. You can perform visual intersection checking directly from Geant4 as follows: // STEP 0: Set path to use DAVID and DAWN binaries ("david", "dawn"): cernsp.cern.ch : /afs/cern.ch/rd44/dev/DAWN/AIX-xlC hpplus.cern.ch : /afs/cern.ch/rd44/dev/DAWN/HP-aCC dxplus.cern.ch : /afs/cern.ch/rd44/dev/DAWN/ALPHA-cxx sungeant.cern.ch: /afs/cern.ch/rd44/dev/DAWN/SUN-CC arkoop.kek.jp : /home/tanaka/bin arksol1.kek.jp : /.../ccint.kek.jp/fs/group/geant4/gui+vis/bin Source files and details of DAVID: http://geant4.kek.jp/~tanaka/DAWN/About_DAVID.html // STEP 1: Compilation % setenv G4VIS_BUILD_DAWNFILE_DRIVER 1 % setenv G4VIS_USE_DAWNFILE 1 % gmake // STEP 2: Set DAVID to g4.prim-file viewer // instead of DAWN % setenv G4DAWNFILE_VIEWER david // STEP 3: Visualize with DAWNFILE driver // (Note that the visualization commands are revised very soon.) % mygeant4 % Idle> /vis/scene/create % Idle> /vis/scene/add/volume % Idle> /vis/sceneHandler/create DAWNFILE % Idle> /vis/viewer/create % Idle> /vis/scene/notifyHandlers % Idle> /vis/viewer/update # Required in Geant4.1.X // Result * Summary of the intersections is displayed on your console. * The scene is visualized with intersected volumes highlighted using DAWN, only if intersections are detected. The highlighted scene is saved in a file "g4david.prim". * Details of the intersections are output into a file "g4david.log". (8) Making the X-Window mode default #----- Boolean flag to invoke multi-window # If this variable is set and the value is non-zero, # GEANT4 opens DAWN with multi-window mode. # Otherwise it opens DAWN with EPS mode, # which generates EPS file and invoke PS viewer finally. # (Note: This variables is scanned at GEANT4 side.) # The default is "0". setenv G4DAWNFILE_MULTI_WINDOW "0" # setenv G4DAWNFILE_MULTI_WINDOW "1" (9) Geant4 visualization commands: See geant4/examples/novice/N03/exN03VisX.mac (X = 0,1,2,3).