Skip to content
Snippets Groups Projects
Commit cee36bb5 authored by Thomas Strebler's avatar Thomas Strebler Committed by Tadej Novak
Browse files

Explicitly configure MuonCalibTool in MetAnalysisConfig with calibMode

Explicitly configure MuonCalibTool in MetAnalysisConfig with calibMode
parent 9717a3ea
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
import AnaAlgorithm.DualUseConfig as DualUseConfig
from AthenaConfiguration.Enums import LHCPeriod, FlagEnum
......@@ -169,6 +169,7 @@ class ConfigAccumulator :
self._selectionNameExpr = re.compile ('[A-Za-z_][A-Za-z_0-9]+')
self.setSourceName ('EventInfo', 'EventInfo')
self._eventcutflow = {}
self._muonCalibMode = -1
# If we are in an Athena environment with ComponentAccumulator configuration
# then the AlgSequence, which is Gaudi.AthSequencer, does not support '+=',
......@@ -637,4 +638,4 @@ class ConfigAccumulator :
# skip flags which should be disabled in output
if selection.writeToOutput:
selectionNames.add(selection.name)
return selectionNames
\ No newline at end of file
return selectionNames
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# AnaAlgorithm import(s):
from AnalysisAlgorithmsConfig.ConfigBlock import ConfigBlock
......@@ -90,6 +90,10 @@ class MetAnalysisConfig (ConfigBlock):
# Set up the met significance algorithm:
alg = config.createAlgorithm( 'CP::MetSignificanceAlg', 'MetSignificanceAlg' + postfix )
config.addPrivateTool( 'significanceTool', 'met::METSignificance' )
if self.muons != "" :
config.addPrivateTool( 'significanceTool.MuonCalibTool', 'CP::MuonCalibTool' )
alg.significanceTool.MuonCalibTool.calibMode = config._muonCalibMode
alg.significanceTool.SoftTermParam = 0
alg.significanceTool.TreatPUJets = self.treatPUJets
alg.significanceTool.IsAFII = config.dataType() is DataType.FastSim
......
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# AnaAlgorithm import(s):
from AnalysisAlgorithmsConfig.ConfigBlock import ConfigBlock
......@@ -61,6 +61,8 @@ class MuonCalibrationConfig (ConfigBlock):
'CP::MuonCalibTool' )
alg.calibrationAndSmearingTool.IsRun3Geo = config.geometry() >= LHCPeriod.Run3
alg.calibrationAndSmearingTool.calibMode = 2 # choose ID+MS with no sagitta bias
# To be used in MetAnalysisConfig
config._muonCalibMode = alg.calibrationAndSmearingTool.calibMode
alg.calibrationAndSmearingTool.ExcludeNSWFromPrecisionLayers = self.excludeNSWFromPrecisionLayers and (config.geometry() >= LHCPeriod.Run3)
alg.muons = config.readName (self.containerName)
alg.muonsOut = config.copyName (self.containerName)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment