ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArROD
python
LArDigitThinnerConfig.py
Go to the documentation of this file.
1
"""Configuration for the LAr Digit Thinner algorithm
2
3
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4
"""
5
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
from
AthenaConfiguration.Enums
import
BeamType, Format
8
from
LArCabling.LArCablingConfig
import
LArOnOffIdMappingCfg
9
from
LArConfiguration.LArConfigFlags
import
RawChannelSource
10
from
OutputStreamAthenaPool.OutputStreamConfig
import
addToESD
11
12
def
LArDigitThinnerCfg
(flags, **kwargs):
13
"""Return ComponentAccumulator for LArDigitThinner algorithm"""
14
# based on DefaultLArDigitThinner
15
acc = ComponentAccumulator()
16
17
if
not
flags.Input.isMC
and
not
flags.Overlay.DataOverlay:
18
kwargs.setdefault(
"InputContainerName"
,
"FREE"
)
19
if
flags.Input.Format
is
Format.BS:
20
from
LArByteStream.LArRawDataReadingConfig
import
LArRawDataReadingCfg
21
acc.merge(LArRawDataReadingCfg(flags,LArDigitKey=
"FREE"
))
22
23
24
acc.merge(LArOnOffIdMappingCfg(flags))
25
26
if
flags.Beam.Type
is
BeamType.Cosmics:
27
kwargs.setdefault(
"EnergyCuts_Barrel"
, [1000, 500, 1000, 1000])
28
kwargs.setdefault(
"EnergyCuts_Endcap"
, [1000, 500, 1000, 1000])
29
kwargs.setdefault(
"EnergyCut_HEC"
, 2000)
30
kwargs.setdefault(
"EnergyCut_FCAL"
, 3000)
31
else
:
32
kwargs.setdefault(
"EnergyCuts_Barrel"
, [1000, 1000, 1000, 1000])
33
kwargs.setdefault(
"EnergyCuts_Endcap"
, [2000, 2000, 2000, 2000])
34
kwargs.setdefault(
"EnergyCut_HEC"
, 5000)
35
kwargs.setdefault(
"EnergyCut_FCAL"
, 20000)
36
37
if
flags.LAr.RawChannelSource
is
RawChannelSource.Calculated:
38
kwargs.setdefault(
"RawChannelContainerName"
,
"LArRawChannels_FromDigits"
)
39
40
acc.addEventAlgo(CompFactory.LArDigitThinner(**kwargs))
41
acc.merge(addToESD(flags,[
"LArDigitContainer#LArDigitContainer_Thinned"
,]))
42
return
acc
python.LArDigitThinnerConfig.LArDigitThinnerCfg
LArDigitThinnerCfg(flags, **kwargs)
Definition
LArDigitThinnerConfig.py:12
Generated on
for ATLAS Offline Software by
1.17.0