4 Example L1TNtuple analysis program
14 ROOT.PyConfig.IgnoreCommandLineOptions =
True
15 ROOT.gROOT.SetBatch(1)
16 ROOT.TH1.SetDefaultSumw2(
True)
17 ROOT.gStyle.SetOptStat(0)
21 f = ROOT.TFile(filename)
23 treeL1 = f.Get(
"l1NtupleProducer/L1Tree")
24 treeTow = f.Get(
"l1CaloTowerTreeProducer/L1CaloTowerTree")
26 treeL1up = f.Get(
"l1UpgradeTreeProducer/L1UpgradeTree")
28 treeJet = f.Get(
"l1JetRecoTreeProducer/JetRecoTree")
33 treeL1.AddFriend(treeTow)
35 treeL1.AddFriend(treeL1up)
36 treeL1.AddFriend(treeJet)
39 for jentry, event
in enumerate(tree):
44 eventSim = treeL1.Simulation
47 eventDTTF = treeL1.DTTF
48 eventCSCTF = treeL1.CSCTF
52 eventCaloTP = treeTow.CaloTP
53 eventTower = treeTow.L1CaloTower
55 eventL1Up = treeL1up.L1Upgrade
57 eventJet = treeJet.Jet
71 h.SetTitleOffset(0.55,
'Z')
77 if __name__ ==
"__main__":