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

Functions

 HIONHPODGlobalAugmentationToolCfg (flags)
 HIONHPODCentralityAugmentationToolCfg (flags)
 HIONHPODKernelCfg (flags, name='HIONHPODKernel', **kwargs)
 HIONHPODCfg (flags)

Function Documentation

◆ HIONHPODCentralityAugmentationToolCfg()

python.HIONHPOD.HIONHPODCentralityAugmentationToolCfg ( flags)
Centrality augmentation: attaches centrality percentile boundaries to each event based on the measured FCal energy

Definition at line 25 of file HIONHPOD.py.

25def HIONHPODCentralityAugmentationToolCfg(flags):
26 """Centrality augmentation: attaches centrality percentile boundaries to each event based on the measured FCal energy"""
27 acc = ComponentAccumulator()
28
29 # Configure centrality tool
30 HICentralityDecorator = CompFactory.DerivationFramework.HICentralityDecorationTool(name="HIONHPODCentralityTool")
31
32 # Add centrality tools to the ComponentAccumulator
33 acc.addPublicTool(HICentralityDecorator, primary=True)
34
35 return acc
36

◆ HIONHPODCfg()

python.HIONHPOD.HIONHPODCfg ( flags)

Definition at line 132 of file HIONHPOD.py.

132def HIONHPODCfg(flags):
133 acc = ComponentAccumulator()
134 acc.merge(HIONHPODKernelCfg(flags, name="HIONHPODKernel", StreamName="StreamDAOD_HIONHPOD"))
135
136 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
137 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
138
139
140 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
141
142 HIONHPODSlimmingHelper = SlimmingHelper("HIONHPODSlimmingHelper", NamesAndTypes=flags.Input.TypedCollections, flags=flags)
143
144 # ListSlimming details all variable slimming configurations
145 from DerivationFrameworkHI import ListSlimming
146
147 # Smart collections: Empty
148 HIONHPODSlimmingHelper.SmartCollections = ListSlimming.HIONHPODSmartCollections()
149
150 # All variables: CaloSums
151 HIONHPODSlimmingHelper.AllVariables += ListSlimming.HIONHPODAllVariables()
152
153 # Extra variables: The bulk of the derivation. See ListSlimming.py for branches
154 HIONHPODSlimmingHelper.ExtraVariables += ListSlimming.HIONHPODExtraVariablesAll()
155 HIONHPODSlimmingHelper.ExtraVariables += ListSlimming.HIONHPODExtraVariablesJets()
156
157 # Add truth information to Monte Carlo samples
158 if flags.Input.isMC:
159 HIONHPODSlimmingHelper.ExtraVariables += ListSlimming.HIONHPODExtraTruthVariables()
160 HIONHPODSlimmingHelper.ExtraVariables += ListSlimming.HIONHPODExtraTruthVariablesJets()
161 HIONHPODSlimmingHelper.AllVariables += ListSlimming.HIONHPODAllTruthVariables()
162
163 HIONHPODItemList = HIONHPODSlimmingHelper.GetItemList()
164
165 acc.merge(OutputStreamCfg(flags, "DAOD_HIONHPOD", ItemList=HIONHPODItemList, AcceptAlgs=["HIONHPODKernel"]))
166 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_HIONHPOD", AcceptAlgs=["HIONHPODKernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
167
168 return acc

◆ HIONHPODGlobalAugmentationToolCfg()

python.HIONHPOD.HIONHPODGlobalAugmentationToolCfg ( flags)
Global augmentation for track-based and calorimeter-based event-level information: Track multiplicity, 
calorimeter energy sums and flow vectors

Definition at line 13 of file HIONHPOD.py.

13def HIONHPODGlobalAugmentationToolCfg(flags):
14 """Global augmentation for track-based and calorimeter-based event-level information: Track multiplicity,
15 calorimeter energy sums and flow vectors"""
16 acc = ComponentAccumulator()
17
18 # Configure the augmentation tool
19 augmentation_tool = CompFactory.DerivationFramework.HIGlobalAugmentationTool(name = "HIONHPODAugmentationTool",
20 nHarmonic = 5) # to capture higher-order harmonics for anisotropic flow
21 acc.addPublicTool(augmentation_tool, primary=True)
22
23 return acc
24

◆ HIONHPODKernelCfg()

python.HIONHPOD.HIONHPODKernelCfg ( flags,
name = 'HIONHPODKernel',
** kwargs )
Configure the derivation framework driving algorithm (kernel)

Definition at line 37 of file HIONHPOD.py.

37def HIONHPODKernelCfg(flags, name='HIONHPODKernel', **kwargs):
38 """Configure the derivation framework driving algorithm (kernel)"""
39 acc = ComponentAccumulator()
40 GeV=1e3 # GeV -> MeV conversion factor
41
42 from DerivationFrameworkInDet.InDetToolsConfig import (
43 MuonTrackParticleThinningCfg,
44 EgammaTrackParticleThinningCfg
45 )
46 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig import (
47 InDetTrackSelectionTool_HITight_Cfg
48 )
49
50 # Initialize a list for all the different type of tools
51 thinningTool = []
52 augmentationTool = []
53
54 HITightTrackSelector = acc.popToolsAndMerge(InDetTrackSelectionTool_HITight_Cfg(
55 flags,
56 name = "HIONHPODTrackSelectionToolTight",
57 minPt = 10*GeV
58 ))
59 acc.addPublicTool(HITightTrackSelector)
60
61 HIONHPODTrackThinningTool = CompFactory.DerivationFramework.HITrackParticleThinningTool(
62 name = "HIONHPODTrackThinningTool",
63 PrimaryVertexKey = "PrimaryVertices",
64 PrimaryVertexSelection = "sumPt2",
65 TrackSelectionTool = HITightTrackSelector,
66 StreamName = kwargs["StreamName"]
67 )
68
69 acc.addPublicTool(HIONHPODTrackThinningTool)
70 thinningTool += [HIONHPODTrackThinningTool]
71
72 for jetKey in ("AntiKt2HIJets","AntiKt4HIJets"):
73 HIONHPODJetTrackThinningTool = CompFactory.DerivationFramework.HIJetTrackParticleThinningTool(
74 name = f"HIONHPOD{jetKey}TrackThinningTool",
75 PrimaryVertexKey = "PrimaryVertices",
76 PrimaryVertexSelection = "sumPt2",
77 JetKey = jetKey,
78 TrackSelectionTool = HITightTrackSelector,
79 StreamName = kwargs["StreamName"]
80 )
81
82 acc.addPublicTool(HIONHPODJetTrackThinningTool)
83 thinningTool += [HIONHPODJetTrackThinningTool]
84
85 # Muon thinning
86 muonThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
87 flags,
88 name = "HIONHPODMuonThinningTool",
89 StreamName = kwargs['StreamName'],
90 MuonKey = "Muons",
91 InDetTrackParticlesKey = "InDetTrackParticles"
92 ))
93
94 acc.addPublicTool(muonThinningTool)
95 thinningTool += [muonThinningTool]
96
97 # Electron/photon thinning
98 egamma_thinning_config = {
99 "Electrons": {
100 },
101 "Photons": {
102 "GSFConversionVerticesKey": "GSFConversionVertices"
103 }
104 }
105 for egammaKey in egamma_thinning_config:
106 egammaThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
107 flags,
108 name = f"HIONHPOD{egammaKey}ThinningTool",
109 StreamName = kwargs["StreamName"],
110 SGKey = egammaKey,
111 **egamma_thinning_config[egammaKey]
112 ))
113 acc.addPublicTool(egammaThinningTool)
114 thinningTool += [egammaThinningTool]
115
116 # Merge the augmentation tools to the ComponetAccumlator
117 globalAugmentationTool = acc.getPrimaryAndMerge(HIONHPODGlobalAugmentationToolCfg(flags))
118 augmentationTool += [globalAugmentationTool]
119
120 centralityAugmentationTool = acc.getPrimaryAndMerge(HIONHPODCentralityAugmentationToolCfg(flags))
121 augmentationTool += [centralityAugmentationTool]
122
123 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
124 acc.addEventAlgo(DerivationKernel(
125 name,
126 ThinningTools=thinningTool,
127 AugmentationTools=augmentationTool
128 ))
129
130 return acc
131