Skip to content

Instantly share code, notes, and snippets.

@AlexWilkinsonnn
AlexWilkinsonnn / make_tree.py
Created April 7, 2022 09:47
Make a simple TTree using PyROOT
#!/usr/bin/env python
import ROOT
from array import array
import random
ROOT.PyConfig.IgnoreCommandLineOptions = True
ROOT.gROOT.SetBatch(1)
f = ROOT.TFile("my_tree.root", "RECREATE")