ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFrameworkToolsConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3#==============================================================================
4# Provides configs for the common derivation framework tools
5#==============================================================================
6
7from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8from AthenaConfiguration.ComponentFactory import CompFactory
9
10# Wrapper to allow ASG tools to decorste via the derivation framework
11def AsgSelectionToolWrapperCfg(ConfigFlags, name, **kwargs):
12 """Configure the ASG selection tool wrapper"""
13 acc = ComponentAccumulator()
14 AsgSelectionToolWrapper = CompFactory.DerivationFramework.AsgSelectionToolWrapper
15 acc.addPublicTool(AsgSelectionToolWrapper(name, **kwargs),
16 primary = True)
17 return acc
18
19# Generic thinning tool (via ExpressionEvaluation strings)
20def GenericObjectThinningCfg(ConfigFlags, name, **kwargs):
21 """Configure the generic object thinning tool"""
22 acc = ComponentAccumulator()
23 GenericObjectThinning = CompFactory.DerivationFramework.GenericObjectThinning
24 acc.addPublicTool(GenericObjectThinning(name, **kwargs),
25 primary = True)
26 return acc
27
28# Skimming via ExpressionEvaluation strings
29def xAODStringSkimmingToolCfg(ConfigFlags, name, **kwargs):
30 """Configure the generic skimming tool"""
31 acc = ComponentAccumulator()
32 xAODStringSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool
33 acc.addPublicTool(xAODStringSkimmingTool(name, **kwargs),
34 primary = True)
35 return acc
36
37### Trigger skimming list
38def TriggerSkimmingToolCfg(ConfigFlags, name, **kwargs):
39 acc = ComponentAccumulator()
40 the_tool = CompFactory.DerivationFramework.TriggerSkimmingTool(name,**kwargs)
41 acc.addPublicTool(the_tool, primary = True)
42 return acc
43### Invariant mass tool config
44def InvariantMassToolCfg(ConfigFlags, name , **kwargs):
45 acc= ComponentAccumulator()
46 the_tool = CompFactory.DerivationFramework.InvariantMassTool(name,**kwargs)
47 acc.addPublicTool(the_tool, primary = True)
48 return acc
49# Prescale tool
50def PrescaleToolCfg(ConfigFlags, name, **kwargs):
51 """Configure the DAOD prescale tool"""
52 acc = ComponentAccumulator()
53 PrescaleTool = CompFactory.DerivationFramework.PrescaleTool
54 acc.addPublicTool(PrescaleTool(name, **kwargs),
55 primary = True)
56 return acc
57
58# Tool for combining several filter tools with AND logic
59def FilterCombinationANDCfg(ConfigFlags, name, **kwargs):
60 """Configure the FilterCombinationAND tool"""
61 acc = ComponentAccumulator()
62 FilterCombinationAND = CompFactory.DerivationFramework.FilterCombinationAND
63 acc.addPublicTool(FilterCombinationAND(name, **kwargs),
64 primary = True)
65 return acc
66
67# Tool for combining several filter tools with OR logic
68def FilterCombinationORCfg(ConfigFlags, name, **kwargs):
69 """Configure the FilterCombinationOR tool"""
70 acc = ComponentAccumulator()
71 FilterCombinationOR = CompFactory.DerivationFramework.FilterCombinationOR
72 acc.addPublicTool(FilterCombinationOR(name, **kwargs),
73 primary = True)
74 return acc