# Instructions on building the athena detector geometry Instructions on how to setup your environment and run the full simulation. ## Step 1: Setup a sandbox directory Create a local directory that you want to work in, e.g., `~/eic` ```bash mkdir ~/eic cd ~/eic ``` ## Step 2: Deploy the containerized environment and launc a shell Execute the following line in your temrinal to setup your environment in your sandbox directory. This will install the latest stable container and place a script called `eic-shell` in the top-level directory. This script will load the environment for you. ```bash curl https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.sh | bash ``` Now you can launch a shell in our development environment: ```bash ./eic-shell ``` Note that this will also set the `$ATHENA_PREFIX` environment variable, and the related environment variables. You should install all local software to this `$ATHENA_PREFIX` (which is the `./local` subdirectory of your sandbox working directory). ## Step 3: Clone the repos Right now there are 2 repos you need: * IP6 (IP-specific components) * Athena detector ```bash git clone https://eicweb.phy.anl.gov/EIC/detectors/athena.git git clone https://eicweb.phy.anl.gov/EIC/detectors/ip6.git ``` ## Step 4: Build/install the detector plugins We need to build detector plugins for both the Athena and for the IP. ### Building IP6 ```bash cd ip6 mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=$ATHENA_PREFIX .. make install cd ../.. ``` ### Building the athena detector ```bash cd athena mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=$ATHENA_PREFIX .. make install -j8 cd ../.. ``` ## Step 5: Link the compact files for IP6 ```bash cd athena ln -s ../ip6/ip6 ``` ## Final Step That's all, you are now fully setup. Let's try a simple geometry overlap check to make sure everything works properly. ```bash checkOverlaps -c athena.xml ``` In order to run the simulation with our datamodel, you should use the `npsim` executable. You can exectute ```bash npsim -h ``` to get help on how to do this. Here is an example command for npsim with from a Hepmc3 file: ```bash npsim --runType batch \ --part.minimalKineticEnergy 100 \ -v WARNING \ --numberOfEvents 100 \ --compactFile athena.xml \ --inputFiles YOUR_FILES.hepmc \ --outputFile YOUR_FILENAME.root ```