Skip to content

Instantly share code, notes, and snippets.

@jpata
Created January 25, 2016 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpata/fa7806955bc0e5bea2d5 to your computer and use it in GitHub Desktop.
Save jpata/fa7806955bc0e5bea2d5 to your computer and use it in GitHub Desktop.
import ROOT
f = ROOT.TFile("/Users/joosep/Documents/tth/data/ntp/v16/Jan18_fixbdt/TT_TuneCUETP8M1_13TeV-powheg-pythia8.root")
t = f.Get("tree")
of = ROOT.TFile("x.root", "RECREATE")
of.cd()
t.CopyTree("is_sl==1")
of.Add(t)
of.Write()
of.Close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment