11def TileInfoLoaderCfg(flags, **kwargs):
12 """Return component accumulator with configured Tile info loader service
13
14 Arguments:
15 flags -- Athena configuration flags
16 """
17
18 from AthenaCommon.Logging import logging
19 msg = logging.getLogger('TileInfoLoaderCfg')
20
21 from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
22 acc = ComponentAccumulator()
23 acc.merge (TileCablingSvcCfg(flags))
24
25 kwargs.setdefault('LoadWienerFilterWeights', flags.Tile.doWiener)
26
27 if 'NoiseScaleIndex' not in kwargs:
28 if flags.Tile.doOpt2 and not flags.Tile.doOptATLAS:
29 msg.info("Adjusting TileInfo to return cell noise for Opt.Filter with iterations")
30 kwargs['NoiseScaleIndex'] = 2
31 else:
32 msg.info("Adjusting TileInfo to return cell noise for Opt.Filter without iterations")
33 kwargs['NoiseScaleIndex'] = 1
34
35 kwargs.setdefault('TileNoise', flags.Digitization.DoCaloNoise)
36 if kwargs['TileNoise']:
37 msg.info("Switching ON noise in Tile Digitization" )
38 else:
39 msg.info("Switching OFF noise in Tile Digitization" )
40
41
42 TileInfoLoader=CompFactory.TileInfoLoader
43 acc.addService(
TileInfoLoader(**kwargs), primary =
True, create=
True)
44
45 return acc
46
47