ATLAS Offline Software
LArCellBuilderConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 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):
12  result=ComponentAccumulator()
13  result.merge(LArOnOffIdMappingCfg(configFlags))
14  result.merge(LArBadFebCfg(configFlags))
15  theLArCellBuilder = LArCellBuilderFromLArRawChannelTool()
16  theLArCellBuilder.LArCablingKey = "ConditionStore+LArOnOffIdMap"
17  theLArCellBuilder.MissingFebKey = "ConditionStore+LArBadFeb"
18  if configFlags.LAr.RawChannelSource is RawChannelSource.Calculated:
19  theLArCellBuilder.RawChannelsName="LArRawChannels_FromDigits"
20  else:
21  theLArCellBuilder.RawChannelsName = "LArRawChannels"
22  theLArCellBuilder.addDeadOTX = True #Create flag? Requires bad-feb DB access
23  result.setPrivateTools(theLArCellBuilder)
24  return result
25 
26 
27 def LArCellCorrectorCfg(configFlags):
28  result=ComponentAccumulator()
29 
30  correctionTools=[]
31 
32  if configFlags.LAr.RawChannelSource in (RawChannelSource.Both, RawChannelSource.Input) and not configFlags.Input.isMC and not configFlags.Overlay.DataOverlay:
33  theMerger=LArCellMerger(RawChannelsName="LArRawChannels_FromDigits")
34  correctionTools.append(theMerger)
35 
36  if configFlags.LAr.doCellNoiseMasking or configFlags.LAr.doCellSporadicNoiseMasking:
37  result.merge(LArBadChannelCfg(configFlags))
38  theNoiseMasker=LArCellNoiseMaskingTool(qualityCut = 4000)
39  if configFlags.LAr.doCellNoiseMasking:
40  theNoiseMasker.ProblemsToMask=["highNoiseHG","highNoiseMG","highNoiseLG","deadReadout","deadPhys"]
41  pass
42  if configFlags.LAr.doCellSporadicNoiseMasking:
43  theNoiseMasker.SporadicProblemsToMask=["sporadicBurstNoise",]
44  pass
45  correctionTools.append(theNoiseMasker)
46 
47  if configFlags.LAr.doBadFebMasking:
48  from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
49  result.merge(LArFebErrorSummaryMakerCfg(configFlags))
50  badFebMask=CompFactory.LArBadFebMaskingTool()
51 
52  correctionTools.append(badFebMask)
53 
54 
55  result.setPrivateTools(correctionTools)
56  return result
57 
58 
59 def LArHVCellContCorrCfg(configFlags):
61  acc.merge(LArHVScaleCfg(configFlags)) #CondAlgo & co for HVScale Corr
62  LArCellContHVCorrTool=CompFactory.LArCellContHVCorrTool
63  theLArCellHVCorrTool = LArCellContHVCorrTool()
64  acc.setPrivateTools(theLArCellHVCorrTool)
65  return acc
66 
67 
LArCellBuilderFromLArRawChannelTool
Building LArCell objects from LArRawChannel.
Definition: LArCellBuilderFromLArRawChannelTool.h:54
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArCellNoiseMaskingTool
Definition: LArCellNoiseMaskingTool.h:16
python.LArBadChannelConfig.LArBadChannelCfg
def LArBadChannelCfg(configFlags, tag=None, isSC=False)
Definition: LArBadChannelConfig.py:8
python.LArBadChannelConfig.LArBadFebCfg
def LArBadFebCfg(configFlags, tag=None)
Definition: LArBadChannelConfig.py:45
python.LArFebErrorSummaryMakerConfig.LArFebErrorSummaryMakerCfg
def LArFebErrorSummaryMakerCfg(flags)
Definition: LArFebErrorSummaryMakerConfig.py:7
LArCellContHVCorrTool
Definition: LArCellContHVCorrTool.h:18
LArCablingConfig.LArOnOffIdMappingCfg
def LArOnOffIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:62
LArCellBuilderConfig.LArHVCellContCorrCfg
def LArHVCellContCorrCfg(configFlags)
Definition: LArCellBuilderConfig.py:59
LArCellBuilderConfig.LArCellBuilderCfg
def LArCellBuilderCfg(configFlags)
Definition: LArCellBuilderConfig.py:11
LArCellMerger
Replace cells in calo cell container with cells from alternate raw channel container.
Definition: LArCellMerger.h:36
python.LArHVScaleConfig.LArHVScaleCfg
def LArHVScaleCfg(configFlags)
Definition: LArHVScaleConfig.py:8
LArCellBuilderConfig.LArCellCorrectorCfg
def LArCellCorrectorCfg(configFlags)
Definition: LArCellBuilderConfig.py:27