ATLAS Offline Software
D3PDMaker/TruthD3PDMaker/python/MCTruthClassifierConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 #
3 # @file TruthD3PDMaker/python/MCTruthClassifierConfig.py
4 # @author scott snyder <snyder@bnl.gov>
5 # @date Jan, 2010
6 # @brief Configure the MCTruthClassifier tool for D3PD making.
7 #
8 
9 # Create the classifier tool, and set the MC collection name to match
10 # what's in D3PDMakerFlags.
11 
12 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
13 from AthenaConfiguration.ComponentFactory import CompFactory
14 from D3PDMakerCoreComps.resolveSGKey import resolveSGKey
15 
16 
18  acc = ComponentAccumulator()
19 
20  from TrkConfig.AtlasExtrapolatorConfig import \
21  MCTruthClassifierExtrapolatorCfg
22  extrapolator = acc.popToolsAndMerge(MCTruthClassifierExtrapolatorCfg(flags))
23 
24  from TrackToCalo.TrackToCaloConfig import EMParticleCaloExtensionToolCfg
25  extension = EMParticleCaloExtensionToolCfg(flags, Extrapolator=extrapolator)
26  particleCaloExtensionTool = acc.popToolsAndMerge(extension)
27 
28  mckey = resolveSGKey (flags, flags.D3PD.TruthSGKey)
29 
30  acc.addPublicTool \
31  (CompFactory.D3PD.D3PDMCTruthClassifier
32  ('D3PDMCTruthClassifier',
33  CaloDetDescrManager = 'CaloDetDescrManager',
34  xAODTruthParticleContainerName = mckey,
35  ParticleCaloExtensionTool = particleCaloExtensionTool,
36  pTNeutralPartCut = 1e-3,
37  partExtrConePhi = 0.6, # 0.4
38  partExtrConeEta = 0.2, # 0.2
39  ROICone = True))
40 
41  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.AtlasExtrapolatorConfig.MCTruthClassifierExtrapolatorCfg
def MCTruthClassifierExtrapolatorCfg(flags, name='MCTruthClassifierExtrapolator')
Definition: AtlasExtrapolatorConfig.py:277
TrackToCaloConfig.EMParticleCaloExtensionToolCfg
def EMParticleCaloExtensionToolCfg(flags, name='EMParticleCaloExtensionTool', **kwargs)
Definition: TrackToCaloConfig.py:30
python.MCTruthClassifierConfig.D3PDMCTruthClassifierCfg
def D3PDMCTruthClassifierCfg(flags)
Definition: D3PDMaker/TruthD3PDMaker/python/MCTruthClassifierConfig.py:17