ATLAS Offline Software
JetBTaggingAlgConfig.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 from BTagging.BTagToolConfig import BTagToolCfg
6 from BTagging.BTagLightSecVertexingConfig import BTagLightSecVtxToolCfg
7 
8 
9 def JetBTaggingAlgCfg(flags,
10  BTaggingCollection,
11  JetCollection,
12  JetColNoJetsSuffix,
13  PrimaryVertexCollectionName,
14  TaggerList,
15  Tracks,
16  Muons,
17  VxSecVertexInfoNameList,
18  secVtxFinderxAODBaseNameList,
19  secVtxFinderTrackNameList,
20  OutgoingTracks="BTagTrackToJetAssociator",
21  OutgoingMuons="Muons"):
22 
23  SetupScheme = flags.BTagging.databaseScheme
24 
25  acc = ComponentAccumulator()
26 
27  options = {}
28  options['BTagTool'] = acc.popToolsAndMerge(BTagToolCfg(
29  flags, TaggerList, PrimaryVertexCollectionName, SetupScheme))
30 
31  # setup the secondary vertexing tool
32  options['BTagSecVertexing'] = acc.popToolsAndMerge(
34  'LightSecVx'+flags.BTagging.GeneralToolSuffix,
35  JetCollection,
36  VxSecVertexInfoNameList,
37  secVtxFinderxAODBaseNameList,
38  secVtxFinderTrackNameList,
39  PrimaryVertexCollectionName))
40 
41  # Set remaining options
42  options['JetCollectionName'] = JetCollection
43  options['IncomingTracks'] = Tracks
44  options['OutgoingTracks'] = OutgoingTracks
45  options['IncomingMuons'] = Muons
46  options['OutgoingMuons'] = OutgoingMuons
47  options['JetCalibrationName'] = (
48  flags.BTagging.forcedCalibrationChannel or JetColNoJetsSuffix
49  )
50 
51  options['BTaggingLinkName'] = options['JetCollectionName'] + '.btaggingLink'
52  options['BTaggingCollectionName'] = BTaggingCollection
53  options['JetLinkName'] = options['BTaggingCollectionName'] + '.jetLink'
54  options['name'] = (options['BTaggingCollectionName'] + "_" + options['JetCollectionName'] + flags.BTagging.GeneralToolSuffix).lower()
55 
56  # -- create main BTagging algorithm
57  acc.addEventAlgo(CompFactory.Analysis.JetBTaggingAlg(**options))
58 
59  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.JetBTaggingAlgConfig.JetBTaggingAlgCfg
def JetBTaggingAlgCfg(flags, BTaggingCollection, JetCollection, JetColNoJetsSuffix, PrimaryVertexCollectionName, TaggerList, Tracks, Muons, VxSecVertexInfoNameList, secVtxFinderxAODBaseNameList, secVtxFinderTrackNameList, OutgoingTracks="BTagTrackToJetAssociator", OutgoingMuons="Muons")
Definition: JetBTaggingAlgConfig.py:9
python.BTagToolConfig.BTagToolCfg
def BTagToolCfg(flags, TaggerList, PrimaryVertexCollectionName="", scheme='', useBTagFlagsDefaults=True)
Definition: BTagToolConfig.py:6
python.BTagLightSecVertexingConfig.BTagLightSecVtxToolCfg
def BTagLightSecVtxToolCfg(flags, Name, JetCollection, VxSecVertexInfoNameList, secVtxFinderxAODBaseNameList, secVtxFinderTrackNameList, PrimaryVertexCollectionName="", TimeStamp="", **options)
Definition: BTagLightSecVertexingConfig.py:8