5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.Enums
import LHCPeriod
8 from LArCellRec.LArCellBuilderConfig
import LArCellBuilderCfg,LArCellCorrectorCfg
9 from TileRecUtils.TileCellBuilderConfig
import TileCellBuilderCfg
10 from CaloCellCorrection.CaloCellCorrectionConfig
import CaloCellPedestalCorrCfg, CaloCellNeighborsAverageCorrCfg, CaloCellTimeCorrCfg, CaloEnergyRescalerCfg
15 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
16 from TileGeoModel.TileGMConfig
import TileGMCfg
24 cellFinalizer = CompFactory.CaloCellContainerFinalizerTool()
26 cellMakerTools=[larCellBuilder,tileCellBuilder,cellFinalizer]+larCellCorrectors
29 if flags.Calo.Cell.doPileupOffsetBCIDCorr
or flags.Calo.Cell.doPedestalCorr:
31 cellMakerTools.append(result.popToolsAndMerge(theCaloCellPedestalCorr))
34 if flags.LAr.doHVCorr:
35 from LArCellRec.LArCellBuilderConfig
import LArHVCellContCorrCfg
37 cellMakerTools.append(result.popToolsAndMerge(theLArHVCellContCorr))
40 if flags.Calo.Cell.doDeadCellCorr:
42 cellMakerTools.append(result.popToolsAndMerge(theCaloCellNeighborAvg))
44 if flags.Calo.Cell.doEnergyCorr:
46 cellMakerTools.append(result.popToolsAndMerge(theCaloCellEnergyRescaler))
47 if flags.Calo.Cell.doTimeCorr:
49 cellMakerTools.append(result.popToolsAndMerge(theCaloTimeCorr))
51 if flags.LAr.doDeadOTxCorr:
52 from LArCellRec.LArCellBuilderConfig
import LArDeadOTXCorrCfg
54 cellMakerTools.append(result.popToolsAndMerge(theLArDeadOTXCorr))
56 cellAlgo = CompFactory.CaloCellMaker(CaloCellMakerToolNames=cellMakerTools,
57 CaloCellsOutputName=
"AllCalo",
58 EnableChronoStat=(flags.Concurrency.NumThreads == 0))
60 result.addEventAlgo(cellAlgo, primary=
True)
62 outputContainers = [
"CaloCellContainer#AllCalo"]
63 if flags.GeoModel.Run
in [LHCPeriod.Run1, LHCPeriod.Run2, LHCPeriod.Run3]:
64 outputContainers += [
"TileCellContainer#MBTSContainer"]
65 if flags.GeoModel.Run
is LHCPeriod.Run2:
66 outputContainers += [
"TileCellContainer#E4prContainer"]
67 from OutputStreamAthenaPool.OutputStreamConfig
import addToESD, addToAOD
68 result.merge(
addToESD(flags, outputContainers))
69 result.merge(
addToAOD(flags, outputContainers))
72 if flags.LAr.DT.storeET_ID
or flags.LAr.DT.storeET_additional:
73 from LArConfiguration.LArSuperCellConfig
import LArSuperCellCfg
80 if __name__==
"__main__":
81 from AthenaCommon.Logging
import log
85 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
86 from AthenaConfiguration.TestDefaults
import defaultTestFiles,defaultGeometryTags
88 flags.Input.Files = defaultTestFiles.RDO_RUN2
89 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
92 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
93 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
96 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
101 acc.getPrimary().CaloCellsOutputName=
"AllCaloNew"
104 from AthenaCommon.Utils.unixtools
import find_datafile
107 log.error(
"Reference file 'CaloRec/CaloCells.txt.ref' not found")
111 cfg.addEventAlgo(CompFactory.CaloCellDumper(InputContainer=
"AllCaloNew",EnergyCut=2*GeV,