3 """Define method to construct configured Tile Fit raw channel builder tool"""
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from TileConfiguration.TileConfigFlags
import TileRunType
10 """Return component accumulator with configured private Tile Fit raw channel builder tool
13 flags -- Athena configuration flags
16 name = kwargs.pop(
'name',
'TileRawChannelBuilderFitFilter')
17 kwargs.setdefault(
'TileRawChannelContainer',
'TileRawChannelFit')
18 kwargs.setdefault(
'correctTime', flags.Tile.correctTime)
19 kwargs.setdefault(
'FrameLength', 7)
23 if 'TileCondToolNoiseSample' not in kwargs:
24 from TileConditions.TileSampleNoiseConfig
import TileCondToolNoiseSampleCfg
26 kwargs[
'TileCondToolNoiseSample'] = sampleNoiseTool
28 if flags.Tile.correctTime
and 'TileCondToolTiming' not in kwargs:
29 from TileConditions.TileTimingConfig
import TileCondToolTimingCfg
31 kwargs[
'TileCondToolTiming'] = timingTool
33 TileRawChannelBuilderFitFilter=CompFactory.TileRawChannelBuilderFitFilter
34 from TileRecUtils.TileRawChannelBuilderConfig
import TileRawChannelBuilderCfg
35 rawChanBuilder = acc.popToolsAndMerge(
TileRawChannelBuilderCfg(flags, name, TileRawChannelBuilderFitFilter, **kwargs))
36 acc.setPrivateTools(rawChanBuilder)
43 name =
'TileRawChannelBuilderFitOverflow',
44 TileRawChannelContainer =
"")
47 if __name__ ==
"__main__":
49 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
50 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
51 from AthenaCommon.Logging
import log
58 flags.Input.Files = defaultTestFiles.RAW_RUN2
59 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
60 flags.Tile.RunType = TileRunType.PHY
61 flags.Tile.NoiseFilter = 1
72 acc.printConfig(withDetails =
True, summariseProps =
True)
73 acc.store(
open(
'TileRawChannelBuilderFit.pkl',
'wb') )