ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCellRec
python
LArCellBuilderConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
4
from
AthenaConfiguration.ComponentFactory
import
CompFactory
5
LArCellBuilderFromLArRawChannelTool, LArCellMerger, LArCellNoiseMaskingTool=CompFactory.getComps(
"LArCellBuilderFromLArRawChannelTool"
,
"LArCellMerger"
,
"LArCellNoiseMaskingTool"
,)
6
from
LArCabling.LArCablingConfig
import
LArOnOffIdMappingCfg
7
from
LArBadChannelTool.LArBadChannelConfig
import
LArBadChannelCfg, LArBadFebCfg
8
from
LArCalibUtils.LArHVScaleConfig
import
LArHVScaleCfg
9
from
LArConfiguration.LArConfigFlags
import
RawChannelSource
10
11
def
LArCellBuilderCfg
(configFlags, doDigiHSTruth=False):
12
result=ComponentAccumulator()
13
result.merge(LArOnOffIdMappingCfg(configFlags))
14
result.merge(LArBadFebCfg(configFlags))
15
name =
"LArCellBuilderFromLArRawChannelTool"
16
if
doDigiHSTruth:
17
name =
"LArCellBuilderFromLArRawChannelTool_DigiHSTruth"
18
theLArCellBuilder =
LArCellBuilderFromLArRawChannelTool
(name)
19
theLArCellBuilder.LArCablingKey =
"ConditionStore+LArOnOffIdMap"
20
theLArCellBuilder.MissingFebKey =
"ConditionStore+LArBadFeb"
21
if
doDigiHSTruth:
22
theLArCellBuilder.RawChannelsName=
"LArRawChannels_DigiHSTruth"
23
elif
configFlags.LAr.RawChannelSource
is
RawChannelSource.Calculated:
24
theLArCellBuilder.RawChannelsName=
"LArRawChannels_FromDigits"
25
else
:
26
theLArCellBuilder.RawChannelsName =
"LArRawChannels"
27
theLArCellBuilder.addDeadOTX =
True
#Create flag? Requires bad-feb DB access
28
result.setPrivateTools(theLArCellBuilder)
29
return
result
30
31
32
def
LArCellCorrectorCfg
(configFlags):
33
result=ComponentAccumulator()
34
35
correctionTools=[]
36
37
if
configFlags.LAr.RawChannelSource
in
(RawChannelSource.Both, RawChannelSource.Input)
and
not
configFlags.Input.isMC
and
not
configFlags.Overlay.DataOverlay:
38
theMerger=
LArCellMerger
(RawChannelsName=
"LArRawChannels_FromDigits"
)
39
correctionTools.append(theMerger)
40
41
if
configFlags.LAr.doCellNoiseMasking
or
configFlags.LAr.doCellSporadicNoiseMasking:
42
result.merge(LArBadChannelCfg(configFlags))
43
theNoiseMasker=
LArCellNoiseMaskingTool
(qualityCut = 4000)
44
if
configFlags.LAr.doCellNoiseMasking:
45
theNoiseMasker.ProblemsToMask=[
"highNoiseHG"
,
"highNoiseMG"
,
"highNoiseLG"
,
"deadReadout"
,
"deadPhys"
]
46
pass
47
if
configFlags.LAr.doCellSporadicNoiseMasking:
48
theNoiseMasker.SporadicProblemsToMask=[
"sporadicBurstNoise"
,]
49
pass
50
correctionTools.append(theNoiseMasker)
51
52
if
configFlags.LAr.doBadFebMasking:
53
if
not
configFlags.Input.isMC:
54
from
LArROD.LArFebErrorSummaryMakerConfig
import
LArFebErrorSummaryMakerCfg
55
result.merge(LArFebErrorSummaryMakerCfg(configFlags))
56
badFebMask=CompFactory.LArBadFebMaskingTool(noFebErrors=configFlags.Input.isMC)
57
58
correctionTools.append(badFebMask)
59
60
61
result.setPrivateTools(correctionTools)
62
return
result
63
64
65
def
LArHVCellContCorrCfg
(configFlags):
66
acc=ComponentAccumulator()
67
acc.merge(LArHVScaleCfg(configFlags))
#CondAlgo & co for HVScale Corr
68
LArCellContHVCorrTool=CompFactory.LArCellContHVCorrTool
69
theLArCellHVCorrTool =
LArCellContHVCorrTool
()
70
acc.setPrivateTools(theLArCellHVCorrTool)
71
return
acc
72
73
def
LArDeadOTXCorrCfg
(configFlags):
74
acc=ComponentAccumulator()
75
acc.merge(LArBadFebCfg(configFlags))
76
from
LArCabling.LArCablingConfig
import
LArOnOffIdMappingSCCfg
77
acc.merge(LArOnOffIdMappingSCCfg(configFlags))
78
from
LArBadChannelTool.LArBadChannelConfig
import
LArBadChannelCfg
79
acc.merge(LArBadChannelCfg(configFlags,isSC=
True
))
80
from
LArConditionsCommon.LArRunFormat
import
getLArDTInfoForRun
81
runinfo=getLArDTInfoForRun(configFlags.Input.RunNumbers[0], connstring=
"COOLONL_LAR/CONDBR2"
)
82
SCInput=
"SC_ET"
83
for
i
in
range(0,len(runinfo.streamTypes())):
84
if
runinfo.streamTypes()[i] ==
"SelectedEnergy"
:
85
SCInput=
"SC_ET_ID"
86
87
#Schedule reading of Super-Cell info from ByteStream
88
from
LArByteStream.LArRawSCDataReadingConfig
import
LArRawSCDataReadingCfg
89
acc.merge(LArRawSCDataReadingCfg(configFlags))
90
91
acc.addCondAlgo(CompFactory.LArDeadOTXCondAlg())
92
93
deadOTXTool=CompFactory.LArCelldeadOTXTool(
"LArCelldeadOTXTool"
, keySC=SCInput)
94
acc.setPrivateTools(deadOTXTool)
95
return
acc
96
97
98
def
LArDeadOTXAlgCfg
(configFlags,keySC="SC_ET_ID_RoI"):
99
acc=ComponentAccumulator()
100
acc.merge(LArBadFebCfg(configFlags))
101
from
LArCabling.LArCablingConfig
import
LArOnOffIdMappingSCCfg
102
acc.merge(LArOnOffIdMappingSCCfg(configFlags))
103
from
LArBadChannelTool.LArBadChannelConfig
import
LArBadChannelCfg
104
acc.merge(LArBadChannelCfg(configFlags,isSC=
True
))
105
106
deadOTXAlg=CompFactory.LArCelldeadOTXAlg(name=
"LArCelldeadOTXAlg"
,keyMF=
"LArBadFeb"
,
107
keyCabling=
"LArOnOffIdMap"
, keySCCabling=
"LArOnOffIdMapSC"
,
108
keySC=keySC,SCEneCut=0)
109
acc.addEventAlgo(deadOTXAlg)
110
return
acc
LArCellBuilderFromLArRawChannelTool
Building LArCell objects from LArRawChannel.
Definition
LArCellBuilderFromLArRawChannelTool.h:54
LArCellContHVCorrTool
Definition
LArCellContHVCorrTool.h:18
LArCellMerger
Replace cells in calo cell container with cells from alternate raw channel container.
Definition
LArCellMerger.h:36
LArCellNoiseMaskingTool
Definition
LArCellNoiseMaskingTool.h:16
LArCellBuilderConfig.LArDeadOTXAlgCfg
LArDeadOTXAlgCfg(configFlags, keySC="SC_ET_ID_RoI")
Definition
LArCellBuilderConfig.py:98
LArCellBuilderConfig.LArCellCorrectorCfg
LArCellCorrectorCfg(configFlags)
Definition
LArCellBuilderConfig.py:32
LArCellBuilderConfig.LArDeadOTXCorrCfg
LArDeadOTXCorrCfg(configFlags)
Definition
LArCellBuilderConfig.py:73
LArCellBuilderConfig.LArHVCellContCorrCfg
LArHVCellContCorrCfg(configFlags)
Definition
LArCellBuilderConfig.py:65
LArCellBuilderConfig.LArCellBuilderCfg
LArCellBuilderCfg(configFlags, doDigiHSTruth=False)
Definition
LArCellBuilderConfig.py:11
LArRunFormat
Generated on
for ATLAS Offline Software by
1.17.0