ATLAS Offline Software
Loading...
Searching...
No Matches
BJetCalibCAConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2# CA Configuration of BJetCalibrationAlg for CP CA-based frameworks
3
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from AthenaConfiguration.ComponentFactory import CompFactory
6
7
8def BJetCalibrationAlgCfg(flags, name="BJetCalibrationAlg", doPtCorr=True, **kwargs):
9 cfg = ComponentAccumulator()
10
11 kwargs.setdefault("jets", "AntiKt4EMPFlow")
12
13 if "muonInJetTool" not in kwargs:
14 kwargs.setdefault("muonInJetTool", CompFactory.MuonInJetCorrectionTool(
15 doLargeR = "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets" in kwargs["jets"]
16 ))
17
18 if "muonSelectionTool" not in kwargs:
19 # MuQuality=1, Medium muons, see Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h
20 from MuonSelectorTools.MuonSelectorToolsConfig import MuonSelectionToolCfg
21 kwargs.setdefault("muonSelectionTool", cfg.popToolsAndMerge(
22 MuonSelectionToolCfg(flags, MaxEta=2.5, MuQuality=1)))
23
24 if doPtCorr and "bJetTool" not in kwargs:
25 kwargs.setdefault("bJetTool", CompFactory.BJetCorrectionTool())
26
27 cfg.addEventAlgo(CompFactory.CP.BJetCalibrationAlg(name, **kwargs))
28 return cfg
BJetCalibrationAlgCfg(flags, name="BJetCalibrationAlg", doPtCorr=True, **kwargs)