Skip to content

Instantly share code, notes, and snippets.

@mazurov
Created January 22, 2015 15:58
Show Gist options
  • Save mazurov/68ebc5b3af194ab032b6 to your computer and use it in GitHub Desktop.
Save mazurov/68ebc5b3af194ab032b6 to your computer and use it in GitHub Desktop.
xAOD Trigger Towers analysis example
import ROOT
ROOT.gROOT.Macro('$ROOTCOREDIR/scripts/load_packages.C')
fileName = "/afs/cern.ch/user/a/amazurov/public/jb/tilecis/TileCIS.root"
treeName = "CollectionTree"
f = ROOT.TFile.Open(fileName, "READ")
t = ROOT.xAOD.MakeTransientTree(f, treeName)
print("Number of input events: %s" % t.GetEntries())
for entry in xrange(2): # Process two events
t.GetEntry(entry)
for tt in t.xAODTriggerTowers:
# See
# http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/versions/TriggerTower_v2.h
adc = tt.adc()
if len(adc) > 2:
print("adc[2] = %s" % adc[2])
mkdir tilecis
cd tilecis
rcSetup rcSetup Base,2.2.1,gcc48 # take time
# Example of analyzing xaod objects in ~amazurov/public/jb/tilecis/TileCIS.root
# TileCIS.root was created for the following raw files
# "/afs/cern.ch/work/j/juraj/public/2015/TileCIS/data15_calib.00249297.calibration_L1CaloEnergyScan.daq.RAW._lb0000._SFO-1._0001.data",
# "/afs/cern.ch/work/j/juraj/public/2015/TileCIS/data15_calib.00249300.calibration_L1CaloEnergyScan.daq.RAW._lb0000._SFO-1._0001.data"
python ~amazurov/public/jb/tilecis/analyze.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment