Skip to content

Instantly share code, notes, and snippets.

@klieret
Last active October 17, 2017 14:16
Show Gist options
  • Save klieret/7509afe20d7f9ae90bcd3b41c4cb28ba to your computer and use it in GitHub Desktop.
Save klieret/7509afe20d7f9ae90bcd3b41c4cb28ba to your computer and use it in GitHub Desktop.

Use basf2 installation:

Set up basf2

cd /cvmfs/belle.cern.ch/ubuntu1604/
source tools/setup_belle2
cd releases/build-2017-10-16/
setuprel

Rerun those commands every time you start working agai!

Check that everything is working:

basf2 --info

Now copy the tutorial files to your home directory:

cd 
cp -r /cvmfs/belle.cern.ch/ubuntu1604/releases/build-2017-10-16/analysis/examples/tutorials/ .

Now run the first tutorial:

cd tutorials
python3 B2A101-Y4SEventGeneration.py

Inspecting root files

Open root:

root

This gives you a C++ console. You can start some "File browser" by typing

new TBrowser

navigate to the output files "*.root" that you just generated by running the tutorial and open them. More information about TBrowser here: https://root.cern.ch/meet-ttree

You can for example go to MCParticles/.... m_masses and see that for the first example there are exactly 5 peeks corresponding to the 5 particles that were generated (Why 5 particles? Check the corresponding pythia .dec file which you loaded in the python script).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment