CMS 3D CMS Logo

MCTruth2.py
Go to the documentation of this file.
2 from ROOT import *
3 
4 # prepare the FWLite autoloading mechanism
5 gSystem.Load("libFWCoreFWLite.so")
6 FWLiteEnabler::enable()
7 
8 # access the event tree
9 events = EventTree("generatorOutput.root")
10 
11 # event loop
12 for event in events:
13  genEvent = event.VtxSmeared.GetEvent()
14  print genEvent