8 def LArRAWtoSuperCellCfg(flags,name="LArRAWtoSuperCell",mask=True,SCellContainerOut="",SCIn="",doReco=False, bcidShift=0):
10 from AthenaCommon.Logging
import logging
11 mlog = logging.getLogger(
'LArRAWtoSuperCellCfg:' )
16 elif flags.Input.RunNumbers:
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":
23 SCInput=flags.LAr.LATOME.DTInfoForL1
25 LArBadChannelKey=
"LArBadChannelSC"
30 if SCellContainerOut==
"": SCellContainerOut=flags.LAr.DT.ET_IDKey
32 algo = CompFactory.LArRAWtoSuperCell(name,SCellContainerOut=SCellContainerOut,LArBadChannelKey=LArBadChannelKey,BCIDOffset=bcidShift)
34 if mask
and not flags.Input.isMC:
37 algo.LArMaskedChannelKey=
"LArMaskedSC"
39 algo = CompFactory.LArRAWtoSuperCell(name,isReco=doReco,SCellContainerOut=SCellContainerOut,LArBadChannelKey=LArBadChannelKey)
41 mlog.info(
"Not setting SCInput container name")
43 mlog.info(
"Setting SCInput container name to %s",SCInput)
44 algo.SCellContainerIn = SCInput
46 result.addEventAlgo(algo)