3 """Define method to construct configured base Tile 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 base Tile raw channel builder tool
13 flags -- Athena configuration flags
14 name -- name of Tile raw channel builder
15 TileRawChannelbuilder -- concrete Tile raw channel builder tool.
20 runType = flags.Tile.RunType
22 createContainer = ( kwargs.get(
'TileRawChannelContainer',
"") !=
"" )
25 from TileRecUtils.TileDQstatusConfig
import TileDQstatusAlgCfg
28 kwargs[
'TileDQstatus'] =
""
30 from TileConditions.TileInfoLoaderConfig
import TileInfoLoaderCfg
33 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
36 kwargs[
'RunType'] = runType.getIntValue()
37 kwargs[
'calibrateEnergy'] =
False
39 kwargs.setdefault(
'AmpMinForAmpCorrection', flags.Tile.AmpMinForAmpCorrection)
40 kwargs.setdefault(
'TimeMinForAmpCorrection', flags.Tile.TimeMinForAmpCorrection)
41 kwargs.setdefault(
'TimeMaxForAmpCorrection', flags.Tile.TimeMaxForAmpCorrection)
43 tileRawChannelContainerDSP =
""
45 if 'NoiseFilterTools' not in kwargs:
46 from TileRecUtils.TileRawChannelCorrectionConfig
import TileRawChannelCorrectionToolsCfg
48 kwargs[
'NoiseFilterTools'] = correctionTools
50 if not (flags.Input.isMC
or flags.Overlay.DataOverlay)
and len(kwargs[
'NoiseFilterTools']) > 0:
51 tileRawChannelContainerDSP =
'TileRawChannelCntCorrected'
52 from TileRecUtils.TileRawChannelCorrectionConfig
import TileRawChannelCorrectionAlgCfg
55 kwargs.setdefault(
'DSPContainer', tileRawChannelContainerDSP)
62 if __name__ ==
"__main__":
64 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
65 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
66 from AthenaCommon.Logging
import log
73 flags.Input.Files = defaultTestFiles.RAW_RUN2
74 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
75 flags.Tile.RunType = TileRunType.PHY
76 flags.Tile.NoiseFilter = 1
83 TileRawChannelBuilderFitFilter=CompFactory.TileRawChannelBuilderFitFilter
85 name =
'TileRawChannelBuilderFit',
86 TileRawChannelBuilder = TileRawChannelBuilderFitFilter)
87 print( acc.popToolsAndMerge(rchBuilderFitAcc) )
89 TileRawChannelBuilderOpt2Filter=CompFactory.TileRawChannelBuilderOpt2Filter
91 name =
'TileRawChannelBuilderOpt2',
92 TileRawChannelBuilder = TileRawChannelBuilderOpt2Filter)
93 print( acc.popToolsAndMerge(rchBuilderOpt2Acc) )
96 acc.printConfig(withDetails =
True, summariseProps =
True)
97 acc.store(
open(
'TileRawChannelBuilder.pkl',
'wb') )