GEMC at UNH
Software Locations We have set-up a suite of software which will be necessary/useful to running GEMC in a shared directory. The top directory is
/net/data/pumpkin2/CLAS12
Under this we have directories with binaries for a handful of platforms. The most interesting one currently is RHEL5_x64, which contains binaries compiled for Red Hat Enterprise Linux 5, AMD64. It is the most interesting because it is the most complete, and it is suitable for use whilst SSHed to Pumpkin, the NPG's hardcore Opteron monster.
Speaking of which, do the following:
ssh to Pumpkin, forwarding the X protocol:
ssh -X you@pumkpin.unh.edu
Now you will want to set-up your environment. We have an example skeleton script at /net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh As Maurik pointed out, it does not do a lot of things it should. For example, it does not scrub your environment of things which could cause trouble, as the stock GEANT4 environment scrupulously does. In fact, you probably should copy it to your home directory and customize it. One thing you will almost certainly want to do is export a value for the GEMC environment variable before using it. Let's imagine that you don't need to customize it for the moment:
export GEMC=/net/data/pumpkin2/CLAS12/RHEL5_x64/GEMC source /net/data/pumpkin2/CLAS12/RHEL5_x64/env.sh
Great! Things should basically just work now, at least somewhat. Let's try running GEMC:
gemc
Now click in the File menu of the resulting G4UI Session and choose Quitter. This should bring up the main GUI of GEMC. Using what settings? Who knows! In a minute we will try specifying a few. First explore the interface. Note that you have some geometry in a viewer, plus a window with controls. Try zooming and panning around, blah blah blah.
Now the useful stuff. Try this:
$GEMC/gemc -USE_QT=0 -GT=BST -N=1000 -PRINT_EVENT=100 -OUTPUT="evio, 1000protons.ev" -BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg" -SPREAD_P="1.8*GeV, 180*deg, 360*deg" -SPREAD_V="(0.1, 0.1, 2.5)cm" -LUMI_P="e-, 11*GeV, 0, 0" -LUMI_V="(0, 0, -5)cm" -LUMI_EVENT="100, 124*ns, 2*ns" -USE_PHYSICSL=QGSP -HALL_MATERIAL=Vacuum
This will run GEMC with no GUI (-USE_QT=0), using the geometry table BST (-GT=BST), simulating 1000 events (-N=1000), printing the progress every 100 events (-PRINT_EVENT=100), storing the output in EVIO format in the file 1000protons.ev (-OUTPUT="evio, 1000protons.ev"), with a beam of protons of energy 2.0 GeV (-BEAM_P="proton, 2.0*GeV, 0*deg, 0*deg"), then there's something about the vertex I don't understand. Also, some other stuff.
Right. So we've got this file with data now. What do we do with it? Let's analyze it with ROOT! But first we need to convert it from the EVIO format to that used by ROOT:
$CLAS12ROOT/EVIO2ROOT/evio2root
Assuming you're still on pumpkin, and have your environment set-up reasonably, you should be able to just run ROOT by typing:
root
This should start ROOT's interactive interpreter. Start by running
TBrowser B;
Now navigate the directory structure to find your ROOT file, and open it.
Skipping to ROOT examples: