Verified Commit a3888050 authored by Tadej Novak's avatar Tadej Novak
Browse files

Calo tweaks for data overlay reco

parent 6f7f1606
Pipeline #3428847 passed with stage
in 0 seconds
......@@ -51,7 +51,7 @@ def CaloRecoCfg(configFlags, clustersname=None):
from LArCellRec.LArNoisyROSummaryConfig import LArNoisyROSummaryCfg
result.merge(LArNoisyROSummaryCfg(configFlags))
if not configFlags.Input.isMC:
if not configFlags.Input.isMC and not configFlags.Overlay.DataOverlay:
from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
result.merge(LArFebErrorSummaryMakerCfg(configFlags))
......@@ -59,12 +59,11 @@ def CaloRecoCfg(configFlags, clustersname=None):
from TileMuId.TileMuIdConfig import TileLookForMuAlgCfg
result.merge(TileLookForMuAlgCfg(configFlags))
if not configFlags.Input.isMC:
if not configFlags.Input.isMC and not configFlags.Overlay.DataOverlay:
#Configure LArDigitsThinner:
from LArROD.LArDigitThinnerConfig import LArDigitThinnerCfg
result.merge(LArDigitThinnerCfg(configFlags))
#Configure MBTSTimeDiff
#Clients are BackgroundWordFiller and (deprecated?) DQTBackgroundMonTool
#Consider moving to BackgroundWordFiller config
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
LArCellBuilderFromLArRawChannelTool, LArCellMerger, LArCellNoiseMaskingTool=CompFactory.getComps("LArCellBuilderFromLArRawChannelTool","LArCellMerger","LArCellNoiseMaskingTool",)
from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg, LArBadFebCfg
from LArCalibUtils.LArHVScaleConfig import LArHVScaleCfg
......@@ -25,13 +25,13 @@ def LArCellBuilderCfg(configFlags):
def LArCellCorrectorCfg(configFlags):
result=ComponentAccumulator()
correctionTools=[]
if configFlags.LAr.RawChannelSource in ("both","input") and not configFlags.Input.isMC:
if configFlags.LAr.RawChannelSource in ("both","input") and not configFlags.Input.isMC and not configFlags.Overlay.DataOverlay:
theMerger=LArCellMerger(RawChannelsName="LArRawChannels_FromDigits")
correctionTools.append(theMerger)
if configFlags.LAr.doCellNoiseMasking or configFlags.LAr.doCellSporadicNoiseMasking:
result.merge(LArBadChannelCfg(configFlags))
theNoiseMasker=LArCellNoiseMaskingTool(qualityCut = 4000)
......@@ -44,7 +44,7 @@ def LArCellCorrectorCfg(configFlags):
correctionTools.append(theNoiseMasker)
result.setPrivateTools(correctionTools)
return result
return result
def LArHVCellContCorrCfg(configFlags):
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
from AthenaConfiguration.AthConfigFlags import AthConfigFlags
def createLArConfigFlags():
def createLArConfigFlags():
lcf=AthConfigFlags()
lcf.addFlag("LAr.doAlign",lambda prevFlags : prevFlags.GeoModel.Layout=="atlas")
lcf.addFlag("LAr.doHVCorr",lambda prevFlags : not prevFlags.Input.isMC)
lcf.addFlag("LAr.doCellEmMisCalib",lambda prevFlags : prevFlags.Input.isMC)
......@@ -14,11 +14,11 @@ def createLArConfigFlags():
lcf.addFlag("LAr.RawChannelSource",_determineRawChannelSource)
#sensible value are "input": read from the input-file, bytestream or RDO)
# "calculated": re-computed by the offline LArRawChannelBuilder
# "both": overwrite the digits computed
# "both": overwrite the digits computed
lcf.addFlag("LAr.doCellNoiseMasking",True)
lcf.addFlag("LAr.doCellSporadicNoiseMasking",True)
# Include MC shape folder
lcf.addFlag("LAr.UseMCShape", True)
# Name of sqlite file containing Electronic Calibration values
......@@ -53,7 +53,7 @@ def createLArConfigFlags():
lcf.addFlag("LAr.ROD.UseDelta", 0)
# Force using the iterative OFC procedure
lcf.addFlag("LAr.ROD.forceIter",False)
##NoisyRO flags
# cell quality cut
lcf.addFlag("LAr.NoisyRO.CellQuality", 4000)
......@@ -61,7 +61,7 @@ def createLArConfigFlags():
lcf.addFlag("LAr.NoisyRO.BadChanPerFEB", 30)
# Number of Bad FEBs per partition cut
lcf.addFlag("LAr.NoisyRO.BadFEBCut", 5)
# Number of channels to declare MNB-Loose
# Number of channels to declare MNB-Loose
lcf.addFlag("LAr.NoisyRO.MNBLooseCut", 5)
# Number of channels to declare MNB-Tight
lcf.addFlag("LAr.NoisyRO.MNBTightCut", 17)
......@@ -82,12 +82,12 @@ def _getLArRunInfo(prevFlags):
_lArRunInfo=getLArFormatForRun(run=runnbr,connstring=dbStr)
print ("Got LArRunInfo for run ",runnbr)
return _lArRunInfo
def _determineRawChannelSource(prevFlags):
if (prevFlags.Input.isMC):
if prevFlags.Input.isMC or prevFlags.Overlay.DataOverlay:
return "input"
lri=_getLArRunInfo(prevFlags)
#runType: 0=RawData, 1=RawDataResult, 2=Result
if lri is None or lri.runType is None:
......@@ -102,5 +102,4 @@ def _determineRawChannelSource(prevFlags):
return "input" #Have only raw-channels in bytestream
else:
print("WARNING unknown LAr run type !")
return "both"
return "both"
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
"""Define method to construct configured Tile DQ status tool and algorithm"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.Enums import ProductionStep
def TileDQstatusToolCfg(flags, **kwargs):
"""Return component accumulator with configured private Tile DQ status tool
......@@ -62,7 +64,7 @@ def TileDQstatusAlgCfg(flags, **kwargs):
rawChannelContainer = 'TileRawChannelCnt'
elif flags.Overlay.DataOverlay:
elif flags.Common.ProductionStep == ProductionStep.Overlay and flags.Overlay.DataOverlay:
beamElemContainer = ''
digitsContainer = flags.Overlay.BkgPrefix + 'TileDigitsCnt'
rawChannelContainer = flags.Overlay.BkgPrefix + 'TileRawChannelCnt'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment