How to get information from CPM towers
# jobo.py
from ByteStreamCnvSvc import ReadByteStream
svcMgr.ByteStreamInputSvc.FullFileName=["/afs/cern.ch/work/j/juraj/public/2014/M5/239728/data14_cos.00239728.physics_Jet.merge.RAW._lb0035._SFO-ALL._0001.1"]
from AthenaCommon.GlobalFlags import globalflags
globalflags.DetGeo = 'atlas'
globalflags.DataSource = 'data'
from AthenaCommon.DetFlags import DetFlags
DetFlags.detdescr.all_setOff()
DetFlags.detdescr.Calo_setOn()
globalflags.DetDescrVersion ="ATLAS-GEO-20-00-02"
include("RecExCond/AllDet_detDescr.py")
svcMgr.IOVDbSvc.GlobalTag = "COMCOND-BLKPA-006-07"
svcMgr.IOVDbSvc.forceRunNumber=239728
svcMgr.IOVDbSvc.forceLumiblockNumber=126
include("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py")
theApp.initialize()
sg = PyAthena.py_svc('StoreGateSvc')
# ============================================================================
# la event loop
# ============================================================================
nevents = 0
MAX_EVENTS = 100
while theApp.nextEvent() and (nevents < MAX_EVENTS):
cpm = sg['CPMTowers']
# Loop throw towers
for n, c in enumerate(cpm):
print "#" * 80
print "CPMTower #%d" % n
print c.eta()
print c.phi()
print c.emEnergy()
print c.hadEnergy()
nevents += 1
# Setup environment and recompile TrigT1CaloEvent from the SVN (soon it will be in nigthly build and you can skip the recompilation) phase
$> cd /some/directory
$> asetup 19.1.3,here
# You don't need the following four commands if you already have compiled it before
$> cmt -r trunk $SVNROOT/Trigger/TrigT1/TrigT1CaloEvent
$> cd TrigT1CaloEvent/cmt
$> cmt config
$> cmt make
$> cd /your/joboptions
# cpmtowers - the same as for TriggerTowers, but use cpms = sg["CPMTowers"]
$> athena -i jobo.py