Getting Started

This section details how to start using Grasshopper to generate simulations that utilize Geant4.

Requirements

For MIT Nuclear Science Students

At a minimum you will need to login to nsecluster.mit.edu. From a terminal run ssh -Y yourusername@nsecluster.mit.edu the windows users can either use cygwin, PUTTY or some ssh client for additional (good, detailed, recommended) instructions, please see here and here. you will also need to have some minimum ability of working in linux environment. See here for a brief tutorial. Optional, but highly recommended – install paraview on your laptop. This will allow you to inspect the visualization VRML files generated by grasshopper (one picture’s worth a thousand words, a 3D rendering is worth a billion).

Installing Geant4 on your own machine

If you are not a MIT NSE student with access to the pre-existing Grasshopper cluster. You can install Grasshopper and the necessary dependencies on your own computational machine of choice.

Please start by installing the main dependency, Geant4 itself, at the following link.

http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/InstallationGuide/html/index.html

On Linux (Ubuntu)

In addition:

The Grasshopper program is offered through Launchpad as a personnel package archive (PPA).

On Mac

  1. Unpack the source and create a build directory next to it as suggested by the build instructions.
$ tar xzf geant4.10.00.tgz
$ mkdir geant4.10.00-build
$ cd geant4.10.00-build

Run cmake with appropriate flags to turn on GDML use.

The GDML is so it can read geometry converted from HDDS to GDML using the ROOT TGeoManager->Export() utility. Note that GDML requires xerces and that it be given explicitly.

> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/geant4.10.00.$BMS_OSNAME
-DGEANT4_USE_GDML=ON
-DXERCESC_ROOT_DIR=$XERCESCROOT
-DXERCESC_INCLUDE_DIR=/usr/local/include/
-DXERCESC_LIBRARY=/usr/local/lib/libxerces-c.so
-DGEANT4_BUILD_MULTITHREADED=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
/Users/"Fill in for your machine"/"Desktop"/"GEANT4"/geant4.xx.xx

Note the last line where you must specific your path to where Geant4 is downloaded and the version.

On PC

Coming later. The Geant4 website has details on installing Geant4 through PC, which can be done via Cygwin.