ATLAS Offline Software
Loading...
Searching...
No Matches
python.TauTruthCommonConfig Namespace Reference

Functions

 DFCommonTauTruthMatchingToolCfg (flags, name="DFCommonTauTruthMatchingTool", **kwargs)
 TauTruthMatchingWrapperCfg (flags, cont, **kwargs)
 TauTruthToolsCfg (flags)

Function Documentation

◆ DFCommonTauTruthMatchingToolCfg()

DFCommonTauTruthMatchingToolCfg ( flags,
name = "DFCommonTauTruthMatchingTool",
** kwargs )

Definition at line 13 of file TauTruthCommonConfig.py.

13def DFCommonTauTruthMatchingToolCfg(flags, name = "DFCommonTauTruthMatchingTool", **kwargs):
14 kwargs.setdefault("TruthJetContainerName", "AntiKt4TruthDressedWZJets")
15 from TauAnalysisTools.TauAnalysisToolsConfig import TauTruthMatchingToolCfg
16 return TauTruthMatchingToolCfg(flags, name, **kwargs)
17
18

◆ TauTruthMatchingWrapperCfg()

TauTruthMatchingWrapperCfg ( flags,
cont,
** kwargs )
Configure the tau truth matching wrapper

Definition at line 19 of file TauTruthCommonConfig.py.

19def TauTruthMatchingWrapperCfg(flags, cont, **kwargs):
20 """Configure the tau truth matching wrapper"""
21 acc = ComponentAccumulator()
22 acc.flagPerfmonDomain('Truth')
23 name = "DFCommon"+cont+"TruthMatchingWrapper"
24 DFCommonTauTruthMatchingTool = acc.addPublicTool(acc.popToolsAndMerge(
25 DFCommonTauTruthMatchingToolCfg(flags)))
26 kwargs.setdefault("TauTruthMatchingTool", DFCommonTauTruthMatchingTool)
27 kwargs.setdefault("TauContainerName", cont)
28 acc.setPrivateTools(
29 CompFactory.DerivationFramework.TauTruthMatchingWrapper(name = name, **kwargs))
30 return acc
31
32

◆ TauTruthToolsCfg()

TauTruthToolsCfg ( flags)
Configure tau truth making and matching

Definition at line 33 of file TauTruthCommonConfig.py.

33def TauTruthToolsCfg(flags):
34 """Configure tau truth making and matching"""
35
36 acc = ComponentAccumulator()
37 acc.flagPerfmonDomain('Truth')
38 # Ensure that we are running on MC
39 if not flags.Input.isMC and not flags.Overlay.DataOverlay:
40 # FIXME If this happens it indicates an issue with the configuration in the caller, so better to throw an exception?!
41 return acc
42
43 # truth tau building
44 from TauAnalysisTools.TauAnalysisToolsConfig import BuildTruthTausAlgCfg
45 acc.merge(BuildTruthTausAlgCfg(flags))
46
47 # tau truth matching, if reconstructed taus are present in the input
48 # this should be dropped from derivations and deferred to analysis level (the only use case in derivations is PHYSLITE)
49 TauTruthAugmentationTools2 = []
50 for cont in ["TauJets","TauJets_EleRM"]:
51 if "xAOD::TauJetContainer#"+cont in flags.Input.TypedCollections:
52 TauTruthAugmentationTools2.append(
53 acc.addPublicTool(acc.popToolsAndMerge(TauTruthMatchingWrapperCfg(flags, cont))))
54
55 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
56 acc.addEventAlgo(CommonAugmentation( "TauTruthCommonKernel2",
57 AugmentationTools = TauTruthAugmentationTools2,
58 ExtraInputs = {( 'xAOD::TruthParticleContainer' , 'StoreGateSvc+TruthTaus' )} ))
59
60 return acc