Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# 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
```