ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCellRec
python
LArRAWtoSuperCellConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
from
LArCabling.LArCablingConfig
import
LArOnOffIdMappingSCCfg
6
from
LArBadChannelTool.LArBadChannelConfig
import
LArBadChannelCfg, LArMaskedSCCfg
7
8
def
LArRAWtoSuperCellCfg
(flags,name="LArRAWtoSuperCell",mask=True,SCellContainerOut="",SCIn="",doReco=False, bcidShift=0):
9
result=ComponentAccumulator()
10
from
AthenaCommon.Logging
import
logging
11
mlog = logging.getLogger(
'LArRAWtoSuperCellCfg:'
)
12
result.merge(LArOnOffIdMappingSCCfg(flags))
13
SCInput=
""
14
if
(SCIn !=
""
):
15
SCInput = SCIn
16
elif
flags.Input.RunNumbers:
17
from
LArConditionsCommon.LArRunFormat
import
getLArDTInfoForRun
18
runinfo=getLArDTInfoForRun(flags.Input.RunNumbers[0], connstring=
"COOLONL_LAR/CONDBR2"
)
19
for
i
in
range(0,len(runinfo.streamTypes())):
20
if
runinfo.streamTypes()[i] ==
"SelectedEnergy"
:
21
SCInput=
"SC_ET_ID"
22
else
:
23
SCInput=flags.LAr.LATOME.DTInfoForL1
24
if
mask :
25
LArBadChannelKey=
"LArBadChannelSC"
26
else
:
27
LArBadChannelKey=
""
28
result.merge(LArBadChannelCfg(flags,isSC=
True
) )
29
30
if
SCellContainerOut==
""
: SCellContainerOut=flags.LAr.DT.ET_IDKey
31
32
algo = CompFactory.LArRAWtoSuperCell(name,isReco=doReco,SCellContainerOut=SCellContainerOut,LArBadChannelKey=LArBadChannelKey,BCIDOffset=bcidShift)
33
34
if
mask
and
not
flags.Input.isMC:
35
# also setup to read OTF masked supercells if running on data
36
result.merge(LArMaskedSCCfg(flags))
37
algo.LArMaskedChannelKey=
"LArMaskedSC"
38
39
if
( SCInput ==
""
):
40
mlog.info(
"Not setting SCInput container name"
)
41
else
:
42
mlog.info(
"Setting SCInput container name to %s"
,SCInput)
43
algo.SCellContainerIn = SCInput
44
45
result.addEventAlgo(algo)
46
47
return
result
LArRunFormat
LArRAWtoSuperCellConfig.LArRAWtoSuperCellCfg
LArRAWtoSuperCellCfg(flags, name="LArRAWtoSuperCell", mask=True, SCellContainerOut="", SCIn="", doReco=False, bcidShift=0)
Definition
LArRAWtoSuperCellConfig.py:8
Generated on
for ATLAS Offline Software by
1.17.0