ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileRecUtils
python
TileRawChannelBuilderWienerConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
"""Define method to construct configured Tile Wiener raw channel builder tool"""
4
5
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
from
TileConfiguration.TileConfigFlags
import
TileRunType
8
9
def
TileRawChannelBuilderWienerCfg
(flags, **kwargs):
10
"""Return component accumulator with configured private Tile Wiener raw channel builder tool
11
12
Arguments:
13
flags -- Athena configuration flags
14
"""
15
16
name = kwargs.pop(
'name'
,
'TileRawChannelBuilderWiener'
)
17
kwargs.setdefault(
'TileRawChannelContainer'
,
'TileRawChannelWiener'
)
18
19
from
LumiBlockComps.BunchCrossingCondAlgConfig
import
BunchCrossingCondAlgCfg
20
acc = BunchCrossingCondAlgCfg(flags)
21
22
if
'TileCondToolNoiseSample'
not
in
kwargs:
23
from
TileConditions.TileSampleNoiseConfig
import
TileCondToolNoiseSampleCfg
24
sampleNoiseTool = acc.popToolsAndMerge( TileCondToolNoiseSampleCfg(flags) )
25
kwargs[
'TileCondToolNoiseSample'
] = sampleNoiseTool
26
27
kwargs.setdefault(
'correctTime'
, flags.Tile.correctTime)
28
kwargs.setdefault(
'MC'
, flags.Input.isMC)
29
kwargs.setdefault(
'BestPhase'
,
False
)
30
kwargs.setdefault(
'MaxIterations'
, 5)
# iterative mode on
31
kwargs.setdefault(
'Minus1Iteration'
,
True
)
32
kwargs.setdefault(
'PedestalMode'
, 1)
33
kwargs.setdefault(
'AmplitudeCorrection'
,
False
)
# don't need correction after iterations
34
kwargs.setdefault(
'TimeCorrection'
,
False
)
# don't need correction after iterations
35
36
if
flags.Tile.correctTime
and
'TileCondToolTiming'
not
in
kwargs:
37
from
TileConditions.TileTimingConfig
import
TileCondToolTimingCfg
38
timingTool = acc.popToolsAndMerge( TileCondToolTimingCfg(flags) )
39
kwargs[
'TileCondToolTiming'
] = timingTool
40
41
TileRawChannelBuilderWiener=CompFactory.TileRawChannelBuilderWienerFilter
42
from
TileRecUtils.TileRawChannelBuilderConfig
import
TileRawChannelBuilderCfg
43
rawChanBuilder = acc.popToolsAndMerge( TileRawChannelBuilderCfg(flags, name, TileRawChannelBuilderWiener, **kwargs) )
44
acc.setPrivateTools(rawChanBuilder)
45
46
return
acc
47
48
49
if
__name__ ==
"__main__"
:
50
51
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
52
from
AthenaConfiguration.TestDefaults
import
defaultGeometryTags, defaultTestFiles
53
from
AthenaCommon.Logging
import
log
54
from
AthenaCommon.Constants
import
DEBUG
55
56
# Test setup
57
log.setLevel(DEBUG)
58
59
flags = initConfigFlags()
60
flags.Input.Files = defaultTestFiles.RAW_RUN2
61
flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
62
flags.Tile.RunType = TileRunType.PHY
63
flags.Tile.NoiseFilter = 1
64
flags.lock()
65
66
flags.dump()
67
68
acc = ComponentAccumulator()
69
70
#printing Configurables isn't reliable with GaudiConfig2
71
acc.popToolsAndMerge(
TileRawChannelBuilderWienerCfg
(flags) )
72
73
acc.printConfig(withDetails =
True
, summariseProps =
True
)
74
acc.store( open(
'TileRawChannelBuilderWiener.pkl'
,
'wb'
) )
Constants
TileRawChannelBuilderWienerConfig.TileRawChannelBuilderWienerCfg
TileRawChannelBuilderWienerCfg(flags, **kwargs)
Definition
TileRawChannelBuilderWienerConfig.py:9
Generated on
for ATLAS Offline Software by
1.17.0