11def TileCellBuilderCfg(flags, mergeChannels=True, **kwargs):
12 """Return component accumulator with configured private Tile Cell builder tool
13
14 Arguments:
15 flags -- Athena configuration flags
16 SkipGain - skip given gain. Defaults to -1 [use all gains]. Possible values: 0 [LG], 1 [HG].
17 mergeChannels -- merge DSP results with offline reco results. Defaults to True.
18 """
19
20 acc = ComponentAccumulator()
21 kwargs.setdefault('CheckDCS', flags.Tile.useDCS)
22 kwargs.setdefault('TileRawChannelContainer', flags.Tile.RawChannelContainer)
23 kwargs.setdefault('SkipGain', -1)
24
25 testBeam = flags.Beam.Type is BeamType.TestBeam
26 kwargs.setdefault('MBTSContainer', 'MBTSContainer' if not testBeam and flags.GeoModel.Run in [LHCPeriod.Run1, LHCPeriod.Run2, LHCPeriod.Run3] else "")
27 kwargs.setdefault('E4prContainer', 'E4prContainer' if not testBeam and flags.GeoModel.Run is LHCPeriod.Run2 else "")
28
29 kwargs['mergeChannels'] = mergeChannels
30 if flags.Common.ProductionStep is ProductionStep.PileUpPretracking:
31 kwargs.setdefault('EventInfo', flags.Overlay.BkgPrefix + "EventInfo")
32
33 if kwargs['SkipGain'] not in [-1, 0, 1]:
34 raise(Exception("Invalid Tile gain requsted to be skipped: %s" % kwargs['SkipGain']))
35
36 from TileRecUtils.TileDQstatusConfig import TileDQstatusAlgCfg
37 acc.merge( TileDQstatusAlgCfg(flags) )
38
39 if not testBeam:
40 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
41 acc.merge(LArGMCfg(flags))
42
43 from TileGeoModel.TileGMConfig import TileGMCfg
44 acc.merge(TileGMCfg(flags))
45
46 from TileConditions.TileInfoLoaderConfig import TileInfoLoaderCfg
47 acc.merge( TileInfoLoaderCfg(flags) )
48
49 from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
50 acc.merge(TileCablingSvcCfg(flags))
51
52 from TileConditions.TileBadChannelsConfig import TileBadChannelsCondAlgCfg
53 acc.merge( TileBadChannelsCondAlgCfg(flags) )
54
55 from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
56 acc.merge( TileEMScaleCondAlgCfg(flags) )
57
58 if 'TileCondToolTiming' not in kwargs:
59 from TileConditions.TileTimingConfig import TileCondToolTimingCfg
60 kwargs['TileCondToolTiming'] = acc.popToolsAndMerge( TileCondToolTimingCfg(flags) )
61
62 if kwargs['CheckDCS']:
63 from TileConditions.TileDCSConfig import TileDCSCondAlgCfg
64 acc.merge( TileDCSCondAlgCfg(flags) )
65
66 if not (flags.Input.isMC or flags.Overlay.DataOverlay) and mergeChannels and 'TileDSPRawChannelContainer' not in kwargs:
67 from TileRecUtils.TileRawChannelCorrectionConfig import TileRawChannelCorrectionAlgCfg
68 corrAlgAcc = TileRawChannelCorrectionAlgCfg(flags)
69 tileRawChannelCorrectionAlg = corrAlgAcc.getPrimary()
70 tileRawChannelContainerDSP = tileRawChannelCorrectionAlg.OutputRawChannelContainer
71 kwargs['TileDSPRawChannelContainer'] = tileRawChannelContainerDSP
72 acc.merge( corrAlgAcc )
73
74 TileCellBuilder=CompFactory.TileCellBuilder
76
77 return acc
78
79
This class creates Cells from RawChannels and stores them in a container.