1 """Configuration for the LAr Calo Cells Digits and RawChannels By Cluster Sampling Thinner algorithm for AODs
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 from AthenaCommon.Logging
import logging
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from LArCabling.LArCablingConfig
import LArOnOffIdMappingCfg
9 from LArConfiguration.LArConfigFlags
import RawChannelSource
10 from OutputStreamAthenaPool.OutputStreamConfig
import addToAOD
13 """Return ComponentAccumulator for CaloThinCellsInAODAlgCfg algorithm"""
18 kwargs.setdefault(
"ClusterPtCut", 1000)
19 kwargs.setdefault(
"ClusterEtaCut", 1.4)
20 kwargs.setdefault(
"isMC", flags.Input.isMC)
23 if not flags.Input.isMC
and not flags.Overlay.DataOverlay:
24 kwargs.setdefault(
"InputDigitsContainerName",
"FREE")
25 from LArByteStream.LArRawDataReadingConfig
import LArRawDataReadingCfg
30 if flags.LAr.RawChannelSource
is RawChannelSource.Calculated:
31 kwargs.setdefault(
"InputRawChannelContainerName",
"LArRawChannels_FromDigits")
33 kwargs.setdefault(
"InputCaloCellContainerName" ,
"AllCalo")
34 kwargs.setdefault(
"CaloClusterContainerKey" ,
"CaloCalTopoClusters")
37 outputHitCntName =
'LArHitEMB_ClusterThinned'
38 outputDigCntName =
"LArDigitContainer_ClusterThinned"
39 outputRawChCntName =
"LArRawChannels_ClusterThinned"
40 outputCaloCellCntName =
"AllCalo_ClusterThinned"
42 kwargs.setdefault(
"OutputHitsContainerName" ,outputHitCntName)
43 kwargs.setdefault(
"OutputDigitsContainerName" ,outputDigCntName)
44 kwargs.setdefault(
"OutputRawChannelContainerName",outputRawChCntName)
45 kwargs.setdefault(
"OutputCaloCellContainerName" ,outputCaloCellCntName)
47 acc.addEventAlgo(CompFactory.CaloThinCellsInAODAlg(**kwargs))
50 acc.merge(
addToAOD(flags,[f
"LArHitContainer#{outputHitCntName}"]))
51 acc.merge(
addToAOD(flags,[f
"LArDigitContainer#{outputDigCntName}"]))
52 acc.merge(
addToAOD(flags,[f
"LArRawChannelContainer#{outputRawChCntName}"]))
53 acc.merge(
addToAOD(flags,[f
"CaloCellContainer#{outputCaloCellCntName}"]))
57 if __name__ ==
"__main__":
58 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
59 from AthenaConfiguration.TestDefaults
import defaultTestFiles
60 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
62 mlog = logging.getLogger(
'CaloThinCellsInAODAlgCfg')
65 flags.Input.Files = defaultTestFiles.RAW_RUN2
66 flags.Output.doWriteAOD =
True
67 flags.Exec.MaxEvents = 10
74 acc.getService(
"MessageSvc").defaultLimit=999999