3 """Define method to construct configured Tile MF 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 MF raw channel builder tool
13 flags -- Athena configuration flags
16 name = kwargs.pop(
'name',
'TileRawChannelBuilderMF')
17 kwargs.setdefault(
'TileRawChannelContainer',
'TileRawChannelMF')
21 if 'TileCondToolOfcOnFly' not in kwargs:
22 from TileConditions.TileOFCConfig
import TileCondToolOfcCfg
24 kwargs[
'TileCondToolOfcOnFly'] = ofcTool
26 if flags.Tile.OfcFromCOOL
and 'TileCondToolOfc' not in kwargs:
27 from TileConditions.TileOFCConfig
import TileCondToolOfcCoolCfg
29 kwargs[
'TileCondToolOfc'] = ofcCoolTool
31 if 'TileCondToolNoiseSample' not in kwargs:
32 from TileConditions.TileSampleNoiseConfig
import TileCondToolNoiseSampleCfg
34 kwargs[
'TileCondToolNoiseSample'] = sampleNoiseTool
36 if flags.Tile.BestPhaseFromCOOL:
37 kwargs[
'correctTime'] =
False
39 kwargs.setdefault(
'correctTime', flags.Tile.correctTime)
41 kwargs.setdefault(
'BestPhase', flags.Tile.BestPhaseFromCOOL)
42 kwargs.setdefault(
'MaxIterations', 5)
43 kwargs.setdefault(
'AmplitudeCorrection',
False)
44 kwargs.setdefault(
'TimeFromCOF',
False)
46 if flags.Tile.correctTime
and 'TileCondToolTiming' not in kwargs:
47 from TileConditions.TileTimingConfig
import TileCondToolTimingCfg
49 kwargs[
'TileCondToolTiming'] = timingTool
51 TileRawChannelBuilderMF=CompFactory.TileRawChannelBuilderMF
52 from TileRecUtils.TileRawChannelBuilderConfig
import TileRawChannelBuilderCfg
54 acc.setPrivateTools(rawChanBuilder)
59 if __name__ ==
"__main__":
61 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
62 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
63 from AthenaCommon.Logging
import log
70 flags.Input.Files = defaultTestFiles.RAW_RUN2
71 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
72 flags.Tile.RunType = TileRunType.PHY
73 flags.Tile.NoiseFilter = 1
83 acc.printConfig(withDetails =
True, summariseProps =
True)
84 acc.store(
open(
'TileRawChannelBuilderMF.pkl',
'wb') )