Skip to content

This tutorial will go step-by-step on how to setup pythia8 in python3. Pythia will be used to generate a ttbar and HardQCD dataset. A simple PyTorch model is then trained to distinguish particles coming from ttbar vs QCD.

Notifications You must be signed in to change notification settings

LukeV37/Pythia_PyTorch_Tutorial

Repository files navigation

Pythia8 + PyTorch2 Tutorial in Python3

This tutorial will go step-by-step on how to setup Pythia8 in Python3. Pythia will be used to generate a ttbar and HardQCD dataset. A simple PyTorch model is then trained to distinguish particles coming from ttbar vs QCD.

To automate the setup, run the code:

git clone https://github.com/LukeV37/Pythia_PyTorch_Tutorial.git
cd Pythia_PyTorch_Tutorial
source setup.sh

Alternatively, the setup process can be performed manually using:
./download.sh
./build.sh
source virt_env.sh
# Optional jupyter notebook
./notebook.sh

The setup script will ask you a few questions:
  1. Would you like to download pythia source code? (Required for first time install)
  2. Would you like to compile pythia? (Required for first time install)
  3. Would you like to setup python virtual env? (Required for first time install)
  4. Would you like to run a jupyter notebook? (Optional)

After the setup is completed, you should be able to run the code in juypter notebook if you requested so, or you can run directly in the terminal using:

python3 Pythia_Tutorial.py

Make sure you forward your graphics over ssh if you are connected to a remote server. Additionally, you must have python3 and g++ installed for the setup to work - but most computers already do.

About

This tutorial will go step-by-step on how to setup pythia8 in python3. Pythia will be used to generate a ttbar and HardQCD dataset. A simple PyTorch model is then trained to distinguish particles coming from ttbar vs QCD.

Resources

Stars

Watchers

Forks

Packages

No packages published