G4beamline on Mac OS X (Intel) Note: PowerPC binaries are not available. It is expected that installing G4beamline from source should work on older Macs running Darwin or later, but has not been tested. Before installing G4beamline, you should first install: Root - http://root.cern.ch Select "Download Binaries, and download their production version. Any recent version of Root should work; 5.12 and 5.14 have been tested. Be sure the ROOTSYS variable is set in the environment (best done in your .profile or .bash_profile). Really only needed to run historoot, G4beamline itself does not need Root installed. tcl - available as part of Mac OS X. Required by most of the tests, but g4beamline itself will run without it. java - http://java.sun.com Required only for g4blgui. Select "Java SE", and all you need is the Java Runtime Environment (JRE); get the latest. If you have installed the development kit (JDK) that includes the JRE. To install G4beamline, download the tarball and un-tar it in your HOME directory: tar -xzf g4beamline-1.09-Darwin-g++.tgz this will create a directory $HOME/g4beamline-1.09-Darwin-g++. You need to put the G4beamline programs into your PATH. The simplest way to do this is: cd g4beamline-1.14-Linux-g++ ./setup The setup script will guide you through the process. You can also do it manually. Once g4beamline has been put into your PATH, to run G4beamline simply do: g4bl input.file [name=value [...]] The default format for NTuples is now Root. To create histograms from NTuples you can use Root in the usual way. That is rather complicated and un-obvious, so a new root-based program is included to assist you: historoot. With g4beamline in your PATH, just type: historoot [file.root] [...] this will permit you to open Root files, select an NTuple, and create plots using expressions involving the NTuple variables and C functions and operators. Four sliders are available to impose cuts on arbitrary expressions. Plots can be saved in many formats, including PS, PDF, GIF, and JPEG. For visualization, the OpenInventor viewer works fine, use viewer=best or viewer=OIX. Other viewers are available and work quite similar to Linux. Note that all viewers use X11, so you must run G4beamline from an X11 xterm window, or must have X11 running and supply the DISPLAY manually. This is also true of historoot. TROUBLESHOOTING --------------- Here is the reult of "otool -L" on Mac OS X 10.4.10 (Intel). This shows what shared libraries are used. Note the first 3 libs (Root libraries) are supplied in the G4beamline distribution, but otool does not display where they are found. Libraries in /usr are from the OS; those in /sw are from Fink. $ pwd /Users/tjrob/g4beamline-1.13-Darwin-g++/bin/Darwin-g++ $ otool -L g4beamline g4beamline: /Users/brun/root/lib/libTree.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/brun/root/lib/libCint.dylib (compatibility version 0.0.0, current version 0.0.0) /Users/brun/root/lib/libCore.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/X11R6/lib/libGLU.1.dylib (compatibility version 1.3.0, current version 1.3.0) /usr/X11R6/lib/libGL.1.dylib (compatibility version 1.2.0, current version 1.2.0) /sw/lib/libXm.2.dylib (compatibility version 3.0.0, current version 3.1.0) /usr/X11R6/lib/libXpm.4.dylib (compatibility version 4.11.0, current version 4.11.0) /usr/X11R6/lib/libXmu.6.dylib (compatibility version 6.2.0, current version 6.2.0) /usr/X11R6/lib/libXt.6.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0, current version 6.4.0) /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0) /usr/X11R6/lib/libXi.6.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0, current version 6.3.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)