Simulation of the PrimEx Experiment
by David Lawrence

This page tries to give a brief description of how to obtain the simulation source code for the PrimEx experiment.

Check out the GEANT4 Gallery for some nice visualizations of the experimental setup.


First, for anyone who doesn't want to mess with CVS or maybe doesn't have an account on the JLab computer system, you can get a tar-gzipped file containing the source here (2.74 MB TGZ file). I don't anticipate keeping this file up to date since it is a really inefficient way of distributing the source when people can get it directly from the CVS system where it lives.

Below you'll find step by step instructions for obtaining the source via CVS whether you're on site or not. The advantages of CVS are that 1.) you get the latest copy of the code and can make sure your copy is up to date at any time by simply issuing a "cvs update" command and 2.) You can easily submit changes/additions to the code to the repository which keeps a history of all versions of the code as it is developed.

Note that if you are attempting to do this from a remote computer, you'll need a couple of things:


1. Setup your environment.

The "official" CVS repository for the PrimEx code is on the JLab Unix cluster in the /group/primex/CVS directory. Whether you are onsite or off, you can do this via a script located in /group/primex/scripts/ called primex.cshrc . This script will set up your CVS_RSH environment variable and an alias for cvs called pcvs. It is advised that this script be included in your .cshrc file. Download the file to your home computer or just put

source /group/primex/scripts/primex.cshrc

in your .cshrc file if you're working on a JLab machine.


2. Check out the code.

Assuming your environment is setup, you should just need to do a

pcvs co primsim

You'll notice I used pcvs instead of cvs. The reason is the following: Many of our collaborators (including myself) are involved in CLAS which sets our CVSROOT environment to point to their repository. To allow for easy access to both repositories without having to change my environment or give long arguments to every cvs command, an alias is defined in primex.cshrc like ths:

alias pcvs 'cvs -d ${USER}@jlabs1.jlab.org:/group/primex/CVS'



If you have problems, contact me via email or by phone at (757) 269-5567.