Skip to content

Commit

Permalink
04: fixes from final reading
Browse files Browse the repository at this point in the history
  • Loading branch information
katilp committed Jun 25, 2024
1 parent a9ca462 commit 7c04b94
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions episodes/04-docker-for-mc-generators-rivet.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,17 @@ List your local Docker images and containers and see that you have the `hepstore

```bash
docker image ls
docker ps -a
docker container ls -a
```

## Start the Sherpa container

Move back from the pythia working area with

```bash
cd ..
```

Create the shared directory in your working area:

```bash
Expand Down Expand Up @@ -158,10 +164,9 @@ If you are not already in the container, start it with
docker run -v $PWD:/host -w /host -it --rm hepstore/rivet-pythia
```

Move to the `/host` directory and write some output to a file
Write some output to a file

```bash
cd /host
echo "This is from the container" > output.txt
```

Expand Down Expand Up @@ -196,6 +201,12 @@ In the container prompt, check the Rivet version with
rivet --version
```

You should get

```output
rivet v3.1.7
```

:::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::

Expand All @@ -207,7 +218,7 @@ In the Pythia container, copy a Pythia example code `main01.cc`, and `Makefile`

:::::::::::::::: solution

Start the Pythia container with
Start the Pythia container in your shared `pythia_work` directory:

```bash
docker run -v $PWD:/host -w /host -it --rm hepstore/rivet-pythia
Expand All @@ -223,9 +234,11 @@ cp /usr/local/share/Pythia8/examples/Makefile* .
Compile and run

```bash
make main01 & ./main01
make main01
./main01
```

You will get a particle listing and a lovely ASCII histogram of charged multiplicity.

:::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::
Expand Down

0 comments on commit 7c04b94

Please sign in to comment.