4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 from AthenaConfiguration.Enums
import Format
12 Basic setup of tower maker cfg for new JO
13 WARNING: need to add dependencies on digi flags (as above) that are missing as of now
22 from CaloConditions.CaloConditionsConfig
import CaloTTIdMapCfg
23 from TileConditions.TileInfoLoaderConfig
import TileInfoLoaderCfg
27 from TrigT1CaloCondSvc.L1CaloCondConfig
import L1CaloCondAlgCfg
32 if flags.Input.Format
is Format.POOL:
34 (
'LArTTL1Container',
'LArTTL1EM'),
35 (
'LArTTL1Container',
'LArTTL1HAD'),
36 (
'TileTTL1Container',
'TileTTL1Cnt'),
38 from SGComps.SGInputLoaderConfig
import SGInputLoaderCfg
42 from TrigConfigSvc.TrigConfigSvcCfg
import L1ConfigSvcCfg
46 from LumiBlockComps.LumiBlockMuWriterConfig
import LumiBlockMuWriterCfg
49 condalgo = acc.getCondAlgo(
"L1CaloCondAlg")
50 alg = CompFactory.LVL1.Run2TriggerTowerMaker(name,
51 DigiEngine =
"{}_Digitization".
format(name),
54 inputTTLocation =
'unused',
55 TriggerTowerLocationRerun =
'also_unused',
57 ChanCalibFolderKey = condalgo.OutputKeyPPr,
58 ChanDefaultsFolderKey = condalgo.OutputKeyDef,
59 DisabledTowersFolderKey = condalgo.OutputKeyDisTowers,
60 DeadChannelsFolderKey = condalgo.OutputKeyPpmDeadChannels,
61 TTTool = CompFactory.LVL1.L1TriggerTowerTool(
"L1TriggerTowerTool",
62 InputKeyRunParameters=condalgo.OutputKeyRunParameters,
63 InputKeyPprConditionsRun2=condalgo.OutputKeyPprConditionsRun2,
64 InputKeyDisabledChannelRun2=condalgo.OutputKeyDisabledChannelRun2,
65 InputKeyTimeRefs=condalgo.OutputKeyTimeRefs)
76 Configures Legacy 1 calo in new JO style
79 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
80 acc.merge (GeoModelCfg (flags))
82 from CaloConditions.CaloConditionsConfig
import CaloTriggerTowerCfg,LArTTCellMapCfg,CaloTTIdMapCfg
87 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
88 from TileGeoModel.TileGMConfig
import TileGMCfg
94 from LArBadChannelTool.LArBadChannelConfig
import LArBadChannelCfg, LArBadFebCfg
98 from TileConditions.TileInfoLoaderConfig
import TileInfoLoaderCfg
101 from TileGeoModel.TileGMConfig
import TileGMCfg
104 from TileConditions.TileEMScaleConfig
import TileEMScaleCondAlgCfg
107 from TrigConfigSvc.TrigConfigSvcCfg
import L1ConfigSvcCfg
110 if not flags.Input.isMC:
111 from TrigT1CaloByteStream.LVL1CaloRun2ByteStreamConfig
import LVL1CaloRun2ReadBSCfg
116 acc.addEventAlgo(CompFactory.LVL1.Run2CPMTowerMaker(
'CPMTowerMaker'))
117 acc.addEventAlgo(CompFactory.LVL1.Run2JetElementMaker(
'JetElementMaker'))
119 acc.addEventAlgo(CompFactory.LVL1.CPMSim(
'CPMSim'))
120 acc.addEventAlgo(CompFactory.LVL1.JEMJetSim(
'JEMJetSim'))
121 acc.addEventAlgo(CompFactory.LVL1.JEMEnergySim(
'JEMEnergySim'))
122 acc.addEventAlgo(CompFactory.LVL1.CPCMX(
'CPCMX'))
123 acc.addEventAlgo(CompFactory.LVL1.JetCMX(
'JetCMX'))
124 acc.addEventAlgo(CompFactory.LVL1.EnergyCMX(
'EnergyCMX'))
125 acc.addEventAlgo(CompFactory.LVL1.RoIROD(
'RoIROD'))
127 acc.addEventAlgo(CompFactory.LVL1.TrigT1MBTS())
130 if __name__ ==
'__main__':
133 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
134 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
137 flags.Input.Files = [
'/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.RDO.e4993_s3214_r11315/RDO.17533168._000001.pool.root.1']
138 flags.Common.isOnline=
False
139 flags.Exec.MaxEvents=25
140 flags.Concurrency.NumThreads = 1
141 flags.Concurrency.NumConcurrentEvents=1
146 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
149 from TrigConfigSvc.TrigConfigSvcCfg
import generateL1Menu
152 from AthenaCommon.CFElements
import seqAND
153 acc.addSequence(
seqAND(
'L1CaloLegacySimSeq'), parentName=
'AthAlgSeq')
156 acc.printConfig(withDetails=
True, summariseProps=
True, printDefaults=
True)
157 with open(
"L1CaloSim.pkl",
"wb")
as p:
161 sys.exit(acc.run().isFailure())