File indexing completed on 2024-04-06 12:24:07
0001 from __future__ import print_function
0002
0003
0004 from PhysicsTools.PythonAnalysis import *
0005 from ROOT import gSystem, TFile
0006
0007
0008 gSystem.Load("libFWCoreFWLite.so")
0009 ROOT.FWLiteEnabler.enable()
0010
0011
0012 gSystem.Load("libIOPoolTFileAdaptor")
0013 ui = TFileAdaptorUI()
0014
0015
0016
0017 theFile = TFile.Open("castor:/castor/cern.ch/cms/store/CSA06/CSA06-106-os-Jets-0/AOD/CMSSW_1_0_6-AODSIM-H15a59ba7b4c3d9e291172f60a399301f/1025/96C3197B-0264-DB11-9A9C-00304885AD72.root")
0018
0019
0020
0021 print("==============================")
0022 print("Loading event tree")
0023 events = EventTree(theFile)
0024
0025 print("Start looping over some events")
0026 for event in events:
0027 photons = event.photons
0028 print(" Number of photons in event %i: %i" % (event, len(photons)))
0029 if event > 2: break
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060