ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileCalib
TileCalibAlgs
python
TileRawChNoiseCalibAlgConfig.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
#
4
'''
5
@file TileRawChNoiseCalibAlgConfig.py
6
@brief Python configuration of TileRawChNoiseCalibAlg algorithm for the Run III
7
'''
8
def
TileRawChNoiseCalibAlgCfg
(flags, **kwargs):
9
10
''' Function to configure TileRawChNoiseCalibAlg algorithm'''
11
12
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
13
acc = ComponentAccumulator()
14
15
from
TileConditions.TileCablingSvcConfig
import
TileCablingSvcCfg
16
acc.merge( TileCablingSvcCfg(flags) )
17
18
from
TileGeoModel.TileGMConfig
import
TileGMCfg
19
acc.merge(TileGMCfg( flags ))
20
21
from
TileRecUtils.TileDQstatusConfig
import
TileDQstatusAlgCfg
22
acc.merge( TileDQstatusAlgCfg(flags) )
23
24
if
'TileBadChanTool'
not
in
kwargs:
25
from
TileConditions.TileBadChannelsConfig
import
TileBadChanToolCfg
26
badChanTool = acc.popToolsAndMerge( TileBadChanToolCfg(flags) )
27
kwargs[
'TileBadChanTool'
] = badChanTool
28
29
if
'TileCondToolEmscale'
not
in
kwargs:
30
from
TileConditions.TileEMScaleConfig
import
TileCondToolEmscaleCfg
31
emScaleTool = acc.popToolsAndMerge( TileCondToolEmscaleCfg(flags) )
32
kwargs[
'TileCondToolEmscale'
] = emScaleTool
33
34
kwargs.setdefault(
'name'
,
'TileRawChNoiseCalibAlg'
)
35
kwargs.setdefault(
'doDsp'
,
True
)
36
kwargs.setdefault(
'doFit'
, flags.Tile.doFit)
37
kwargs.setdefault(
'doOpt'
, flags.Tile.doOpt2)
38
kwargs.setdefault(
'doFixed'
, flags.Tile.doOptATLAS)
39
kwargs.setdefault(
'doMF'
, flags.Tile.doMF)
40
kwargs.setdefault(
'doOF1'
, flags.Tile.doOF1)
41
42
from
AthenaConfiguration.ComponentFactory
import
CompFactory
43
TileRawChNoiseCalibAlg = CompFactory.TileRawChNoiseCalibAlg
44
45
acc.addEventAlgo(
TileRawChNoiseCalibAlg
(**kwargs), primary=
True
)
46
47
return
acc
48
49
if
__name__==
'__main__'
:
50
51
# Setup logs
52
from
AthenaCommon.Logging
import
log
53
from
AthenaCommon.Constants
import
INFO
54
log.setLevel(INFO)
55
56
# Set the Athena configuration flags
57
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
58
from
AthenaConfiguration.TestDefaults
import
defaultConditionsTags, defaultGeometryTags, defaultTestFiles
59
flags = initConfigFlags()
60
flags.Input.Files = defaultTestFiles.RAW_RUN2
61
flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
62
flags.IOVDb.GlobalTag = defaultConditionsTags.RUN2_DATA
63
flags.Exec.MaxEvents = 3
64
flags.fillFromArgs()
65
flags.lock()
66
67
# Initialize configuration object, add accumulator, merge, and run.
68
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
69
cfg = MainServicesCfg(flags)
70
71
from
TileByteStream.TileByteStreamConfig
import
TileRawDataReadingCfg
72
cfg.merge( TileRawDataReadingCfg(flags, readMuRcv=
False
, readBeamElem=
True
) )
73
74
from
TileRecUtils.TileRawChannelMakerConfig
import
TileRawChannelMakerCfg
75
cfg.merge( TileRawChannelMakerCfg(flags) )
76
77
cfg.merge(
TileRawChNoiseCalibAlgCfg
(flags, ) )
78
79
cfg.printConfig(withDetails =
True
, summariseProps =
True
)
80
flags.dump()
81
82
cfg.store( open(
'TileRawChNoiseCalibAlg.pkl'
,
'wb'
) )
83
84
sc = cfg.run()
85
86
import
sys
87
# Success should be 0
88
sys.exit(
not
sc.isSuccess())
TileRawChNoiseCalibAlg
Definition
TileRawChNoiseCalibAlg.h:47
Constants
TileRawChNoiseCalibAlgConfig.TileRawChNoiseCalibAlgCfg
TileRawChNoiseCalibAlgCfg(flags, **kwargs)
Definition
TileRawChNoiseCalibAlgConfig.py:8
Generated on
for ATLAS Offline Software by
1.17.0