ATLAS Offline Software
Loading...
Searching...
No Matches
LArCalibBaseConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4
5def LArCalibBaseCfg(flags):
6 result=ComponentAccumulator()
7
8 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
9 result.merge(LArGMCfg(flags))
10
11 if flags.LArCalib.isSC:
12 #Setup SuperCell cabling
13 from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg, LArCalibIdMappingSCCfg, LArLATOMEMappingCfg
14 result.merge(LArOnOffIdMappingSCCfg(flags))
15 result.merge(LArCalibIdMappingSCCfg(flags))
16 result.merge(LArLATOMEMappingCfg(flags))
17 else:
18 #Setup regular cabling
19 from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg, LArCalibIdMappingCfg
20 result.merge(LArOnOffIdMappingCfg(flags))
21 result.merge(LArCalibIdMappingCfg(flags))
22
23 #Set up bad-channel config
24 from LArCalibProcessing.LArCalib_BadChannelConfig import LArCalibBadChannelCfg
25
26 result.merge(LArCalibBadChannelCfg(flags))
27 return result
28
29
30
31
32#Helper method to maipulate channel selection string
33def chanSelStr(flags):
34 inp=flags.LArCalib.Input.ChannelSelection
35 if inp=="": return ""
36 if inp.startswith("<channelSelection>"): return inp
37
38 return "<channelSelection>"+inp+"</channelSelection>"