Gammaray Telescope: an advanced example for the GEANT4 toolkitF.Longo (Ferrara), R.Giannitrapani (Udine) & G.Santin (Trieste) -- December 2000 |
![]() |
The main features of this example are
IMPORTANT: be sure that your Geant4 installation has been done with the proper visualization drivers; for details please see the file geant4/source/visualization/README.
To use the visualization drivers set the following variables in your local environment:
setenv G4VIS_USE_OPENGLX 1 # OpenGL visualization
setenv G4VIS_USE_DAWNFILE 1 # DAWN file
setenv G4VIS_USE_VRMLFILE 1 # VRML file
setenv G4VRMLFILE_VIEWER vrmlview # If installed
setenv G4UI_USE_XM 1
IMPORTANT: be sure that your G4 installation has been done properly; in particular be sure that the following environment variables are set prior to build the library (this is working only on Linux and Solaris platform)
setenv G4ANALYSIS_BUILD 1 # Build the analysis tools
setenv G4ANALYSIS_BUILD_LIZARD 1 # Build the Lizard interface
setenv LIZARDROOT /usr/local/freeLizard/3.2.0 #get correct path
For example at CERN the path is
setenv LIZARDROOT /afs/cern.ch/project/asddat/lhcxx/3.2.0/freeLizard/3.2.0
To compile the GammaRayTel example with the analysis tools activated, set the following variables
setenv G4ANALYSIS_USE 1 # Use the analysis tools
setenv G4ANALYSIS_USE_LIZARD 1 # Use the Lizard one
and be sure to have the right path to the Lizard library
#add to the LD_LIBRARY_PATH (get correct path)
setenv LD_LIBRARY_PATH /usr/local/freeLizard/3.2.0/Linux/lib
For example at CERN the path is
setenv LD_LIBRARY_PATH /afs/cern.ch/project/asddat/lhcxx/3.2.0/freeLizard/3.2.0/Linux/lib
$G4WORKDIR/bin/$G4SYSTEM/GammaRayTel
It is possible also to run three different configuration defined in macro1.mac, macro2.mac and macro3.mac for visualization (OpenGL, VRML and DAWN respectively) with the following command
$G4WORKDIR/bin/$G4SYSTEM/GammaRayTel macroX.mac
where X can be 1, 2 or 3. Be sure to have the right environment (see the preceding section) and the proper visualization driver enabled in your local G4 installation (see geant4/source/visualization/README for more information).
The standard configuration is made of a TKR of 15 Layers of Si detectors, with Lead converter, and a CAL of 8 layers of CsI. 4 lateral panels and a top layer of plastic scintillator (ACT and ACL) complete the configuration. The Si detectors are composed of two silicon planes subdivided in strips aligned along the X axis in one plane and along the Y axis for the other.
It is possible to modify in some way this configuration using the commands defined in GammaRayTelDetectorMessenger. This feature is available in the UI throught the commands subtree "/payload/" (see the help command in the UI for more information).
These histograms are filled and updated at every event and are initialized with each new run; the scale of the histograms is automatically derived from the detector geometry.
Throught a messenger it is possible to set some options with the UI subtree "/analysis/" (use the UI help for more info); in particular it is possible to enable or disable the drawing of the 1D and 2D histograms at every event and to enable or disable the saving of PostScript files at the end of each run. If you feel that the simulation is too slow with the histograms updated every event, you can disable the drawing and retain the saving. Please note that the updating of the histograms is triggered only when there is some hit in an event.
In this example we only show the use of very basic feature of this new simulation/analysis framework; histogramming and analysis in Geant4 are in an evolving phase, so expect some changes and/or improvements for next releases.