3 """Define method to construct configured Tile Wiener 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 Wiener raw channel builder tool
13 flags -- Athena configuration flags
16 name = kwargs.pop(
'name',
'TileRawChannelBuilderWiener')
17 kwargs.setdefault(
'TileRawChannelContainer',
'TileRawChannelWiener')
19 from LumiBlockComps.BunchCrossingCondAlgConfig
import BunchCrossingCondAlgCfg
22 if 'TileCondToolNoiseSample' not in kwargs:
23 from TileConditions.TileSampleNoiseConfig
import TileCondToolNoiseSampleCfg
25 kwargs[
'TileCondToolNoiseSample'] = sampleNoiseTool
27 kwargs.setdefault(
'correctTime', flags.Tile.correctTime)
28 kwargs.setdefault(
'MC', flags.Input.isMC)
29 kwargs.setdefault(
'BestPhase',
False)
30 kwargs.setdefault(
'MaxIterations', 5)
31 kwargs.setdefault(
'Minus1Iteration',
True)
32 kwargs.setdefault(
'PedestalMode', 1)
33 kwargs.setdefault(
'AmplitudeCorrection',
False)
34 kwargs.setdefault(
'TimeCorrection',
False)
36 if flags.Tile.correctTime
and 'TileCondToolTiming' not in kwargs:
37 from TileConditions.TileTimingConfig
import TileCondToolTimingCfg
39 kwargs[
'TileCondToolTiming'] = timingTool
41 TileRawChannelBuilderWiener=CompFactory.TileRawChannelBuilderWienerFilter
42 from TileRecUtils.TileRawChannelBuilderConfig
import TileRawChannelBuilderCfg
43 rawChanBuilder = acc.popToolsAndMerge(
TileRawChannelBuilderCfg(flags, name, TileRawChannelBuilderWiener, **kwargs) )
44 acc.setPrivateTools(rawChanBuilder)
49 if __name__ ==
"__main__":
51 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
52 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
53 from AthenaCommon.Logging
import log
60 flags.Input.Files = defaultTestFiles.RAW_RUN2
61 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
62 flags.Tile.RunType = TileRunType.PHY
63 flags.Tile.NoiseFilter = 1
73 acc.printConfig(withDetails =
True, summariseProps =
True)
74 acc.store(
open(
'TileRawChannelBuilderWiener.pkl',
'wb') )