ATLAS Offline Software
Loading...
Searching...
No Matches
PFHLTConfig Namespace Reference

Functions

 TrackingGeoCfg (inputFlags)
 CaloGeoAndNoiseCfg (inputFlags)
 PFTrackExtensionCfg (flags, tracktype, tracksin)
 MuonCaloTagCfg (flags, tracktype, tracksin, extcache, cellsin)
 MuonIsoTagCfg (flags, tracktype, tracksin, verticesin, extcache, clustersin)
 HLTPFTrackSelectorCfg (inputFlags, tracktype, tracksin, verticesin, clustersin, cellsin=None)
 getHLTPFMomentCalculatorTool (inputFlags)
 PFCfg (inputFlags, tracktype="", clustersin=None, calclustersin=None, tracksin=None, verticesin=None, cellsin=None)

Variables

 cfgFlags = initConfigFlags()
 Files
 addClusterMoments
 useClusterMoments
 Dynamic
 cfg = MainServicesCfg(cfgFlags)
 tccfg = CaloTopoClusterCfg(cfgFlags)
 tcalg = tccfg.getPrimary()
 ClustersOutputName
 sequenceName
list outputlist
 histSvc = CompFactory.THistSvc(Output = ["EXPERT DATAFILE='expert-monitoring.root', OPT='RECREATE'"])
 Dump

Function Documentation

◆ CaloGeoAndNoiseCfg()

PFHLTConfig.CaloGeoAndNoiseCfg ( inputFlags)

Definition at line 21 of file PFHLTConfig.py.

21def CaloGeoAndNoiseCfg(inputFlags):
22 result = ComponentAccumulator()
23 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
24 from TileGeoModel.TileGMConfig import TileGMCfg
25
26 result.merge(LArGMCfg(inputFlags))
27 result.merge(TileGMCfg(inputFlags))
28
29 from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
30 # Schedule total noise cond alg
31 result.merge(CaloNoiseCondAlgCfg(inputFlags,"totalNoise"))
32
33 return result
34

◆ getHLTPFMomentCalculatorTool()

PFHLTConfig.getHLTPFMomentCalculatorTool ( inputFlags)

Definition at line 207 of file PFHLTConfig.py.

207def getHLTPFMomentCalculatorTool(inputFlags):
208 result = ComponentAccumulator()
209 from eflowRec.PFCfg import getPFMomentCalculatorTool
210
211 if inputFlags.PF.useClusterMoments:
212 MomentsNames = [
213 "FIRST_PHI"
214 ,"FIRST_ETA"
215 ,"SECOND_R"
216 ,"SECOND_LAMBDA"
217 ,"DELTA_PHI"
218 ,"DELTA_THETA"
219 ,"DELTA_ALPHA"
220 ,"CENTER_X"
221 ,"CENTER_Y"
222 ,"CENTER_Z"
223 ,"CENTER_MAG"
224 ,"CENTER_LAMBDA"
225 ,"LATERAL"
226 ,"LONGITUDINAL"
227 ,"FIRST_ENG_DENS"
228 ,"ENG_FRAC_EM"
229 ,"ENG_FRAC_MAX"
230 ,"ENG_FRAC_CORE"
231 ,"FIRST_ENG_DENS"
232 ,"SECOND_ENG_DENS"
233 ,"ISOLATION"
234 ,"EM_PROBABILITY"
235 ,"ENG_POS"
236 ,"ENG_BAD_CELLS"
237 ,"N_BAD_CELLS"
238 ,"BADLARQ_FRAC"
239 ,"AVG_LAR_Q"
240 ,"AVG_TILE_Q"
241 ,"SIGNIFICANCE"
242 ]
243 else:
244 MomentsNames = ["CENTER_MAG"]
245 PFMomentCalculatorTool = result.popToolsAndMerge(getPFMomentCalculatorTool(inputFlags,MomentsNames))
246 result.setPrivateTools(PFMomentCalculatorTool)
247 return result
248

◆ HLTPFTrackSelectorCfg()

PFHLTConfig.HLTPFTrackSelectorCfg ( inputFlags,
tracktype,
tracksin,
verticesin,
clustersin,
cellsin = None )

Definition at line 149 of file PFHLTConfig.py.

149def HLTPFTrackSelectorCfg(inputFlags,tracktype,tracksin,verticesin,clustersin,cellsin=None):
150 result = ComponentAccumulator()
151
152 muon_mode = inputFlags.Trigger.FSHad.PFOMuonRemoval
153 if muon_mode == "None":
154 tracks = tracksin
155 extension_cache=""
156 else:
157 ext_acc, pretracks, extension_cache = PFTrackExtensionCfg(
158 inputFlags, tracktype, tracksin
159 )
160 result.merge(ext_acc)
161 if muon_mode == "Calo":
162 if cellsin is None:
163 raise ValueError("Cells must be provided for the 'Calo' muon mode!")
164 tag_acc, tracks = MuonCaloTagCfg(
165 inputFlags, tracktype, pretracks, extension_cache, cellsin
166 )
167 elif muon_mode == "Iso":
168 tag_acc, tracks = MuonIsoTagCfg(
169 inputFlags, tracktype, pretracks, verticesin, extension_cache, clustersin
170 )
171 else:
172 raise ValueError(f"Invalid muon removal mode '{muon_mode}'")
173 result.merge(tag_acc)
174
175 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig import (
176 PFTrackSelectionToolCfg)
177 from TrackToCalo.TrackToCaloConfig import HLTPF_ParticleCaloExtensionToolCfg
178
179
180 from eflowRec import PFOnlineMon
181 monTool_extrapolator = PFOnlineMon.getMonTool_eflowTrackCaloExtensionTool(inputFlags)
182 monTool_extrapolator.HistPath = 'TrackExtrapolator'
183
184 result.addEventAlgo(
185 CompFactory.PFTrackSelector(
186 f"PFTrackSelector_{tracktype}",
187 trackExtrapolatorTool = CompFactory.eflowTrackCaloExtensionTool(
188 "HLTPF_eflowTrkCaloExt",
189 TrackCaloExtensionTool=result.popToolsAndMerge(
190 HLTPF_ParticleCaloExtensionToolCfg(inputFlags)),
191 PFParticleCache = extension_cache,
192 MonTool_TrackCaloExtension = monTool_extrapolator
193 ),
194 trackSelectionTool = result.popToolsAndMerge(PFTrackSelectionToolCfg(inputFlags)),
195 electronsName="",
196 muonsName="",
197 tracksName=tracks,
198 VertexContainer=verticesin,
199 eflowRecTracksOutputName=f"eflowRecTracks_{tracktype}",
200 MonTool = PFOnlineMon.getMonTool_PFTrackSelector(inputFlags),
201 ),
202 primary=True,
203 )
204
205 return result
206
getMonTool_PFTrackSelector(flags)
getMonTool_eflowTrackCaloExtensionTool(flags)
Definition PFOnlineMon.py:3

◆ MuonCaloTagCfg()

PFHLTConfig.MuonCaloTagCfg ( flags,
tracktype,
tracksin,
extcache,
cellsin )
 Create the muon calo tagging configuration

Return the component accumulator and the tracks with muons removed

Definition at line 68 of file PFHLTConfig.py.

68def MuonCaloTagCfg(flags, tracktype, tracksin, extcache, cellsin):
69 """ Create the muon calo tagging configuration
70
71 Return the component accumulator and the tracks with muons removed
72 """
73 from TrkConfig.AtlasExtrapolatorConfig import TrigPFlowExtrapolatorCfg
74 result = ComponentAccumulator()
75 extrapolator = result.popToolsAndMerge(TrigPFlowExtrapolatorCfg(flags))
76 output_tracks = f"PFMuonCaloTagTracks_{tracktype}"
77
78 from TrackToCalo.TrackToCaloConfig import (
79 HLTPF_ParticleCaloExtensionToolCfg,
80 HLTPF_ParticleCaloCellAssociationToolCfg)
81
82 caloext = result.popToolsAndMerge(HLTPF_ParticleCaloExtensionToolCfg(flags))
83 calocellassoc = result.popToolsAndMerge(HLTPF_ParticleCaloCellAssociationToolCfg(
84 flags,
85 ParticleCaloExtensionTool=caloext,
86 CaloCellContainer="",
87 ))
88
89 result.addEventAlgo(
90 CompFactory.PFTrackMuonCaloTaggingAlg(
91 f"PFTrackMuonCaloTaggingAlg_{tracktype}",
92 InputTracks = tracksin,
93 InputCaloExtension = extcache,
94 InputCells = cellsin,
95 OutputTracks = output_tracks,
96 MinPt = flags.Trigger.FSHad.PFOMuonRemovalMinPt,
97 MuonScoreTool = CompFactory.CaloMuonScoreTool(
98 CaloMuonEtaCut=3,
99 ParticleCaloCellAssociationTool = calocellassoc
100 ),
101 LooseTagTool=CompFactory.CaloMuonTag("LooseCaloMuonTag", TagMode="Loose"),
102 TightTagTool=CompFactory.CaloMuonTag("TightCaloMuonTag", TagMode="Tight"),
103 DepositInCaloTool=CompFactory.TrackDepositInCaloTool(
104 ExtrapolatorHandle=extrapolator,
105 ParticleCaloCellAssociationTool = calocellassoc,
106 ParticleCaloExtensionTool = caloext
107 )
108 ),
109 primary=True,
110 )
111 return result, output_tracks
112

◆ MuonIsoTagCfg()

PFHLTConfig.MuonIsoTagCfg ( flags,
tracktype,
tracksin,
verticesin,
extcache,
clustersin )
 Create the muon iso tagging configuration

Return the component accumulator and the tracks with muons removed

Definition at line 113 of file PFHLTConfig.py.

113def MuonIsoTagCfg(flags, tracktype, tracksin, verticesin, extcache, clustersin):
114 """ Create the muon iso tagging configuration
115
116 Return the component accumulator and the tracks with muons removed
117 """
118 result = ComponentAccumulator()
119 output_tracks = f"PFMuonIsoTagTracks_{tracktype}"
120
121 from TrackToCalo.TrackToCaloConfig import HLTPF_ParticleCaloExtensionToolCfg
122
123 result.addEventAlgo(
124 CompFactory.PFTrackMuonIsoTaggingAlg(
125 f"PFTrackMuonIsoTaggingalg_{tracktype}",
126 InputTracks = tracksin,
127 InputClusters = clustersin,
128 InputVertices = verticesin,
129 OutputTracks = output_tracks,
130 MinPt = flags.Trigger.FSHad.PFOMuonRemovalMinPt,
131 TrackIsoTool = CompFactory.xAOD.TrackIsolationTool(
132 TrackParticleLocation=tracksin,
133 VertexLocation="",
134 ),
135 CaloIsoTool = CompFactory.xAOD.CaloIsolationTool(
136 ParticleCaloExtensionTool=result.popToolsAndMerge(
137 HLTPF_ParticleCaloExtensionToolCfg(flags)),
138 InputCaloExtension=extcache,
139 ParticleCaloCellAssociationTool="",
140 saveOnlyRequestedCorrections=True,
141 )
142 ),
143 primary=True,
144 )
145 return result, output_tracks
146
147#---------------------------------------------------------------------------------#
148# PFlow track selection

◆ PFCfg()

PFHLTConfig.PFCfg ( inputFlags,
tracktype = "",
clustersin = None,
calclustersin = None,
tracksin = None,
verticesin = None,
cellsin = None )

Definition at line 249 of file PFHLTConfig.py.

249def PFCfg(inputFlags, tracktype="", clustersin=None, calclustersin=None, tracksin=None, verticesin=None, cellsin=None):
250
251 result=ComponentAccumulator()
252 seqname = f'HLTPFlow_{tracktype}'
253 result.addSequence(parOR(seqname))
254
255 # Set defaults for the inputs
256 if clustersin is None:
257 clustersin=inputFlags.eflowRec.RawClusterColl
258 if calclustersin is None:
259 calclustersin=inputFlags.eflowRec.CalClusterColl
260 if tracksin is None:
261 tracksin = inputFlags.eflowRec.TrackColl
262 if verticesin is None:
263 verticesin = inputFlags.eflowRec.VertexColl
264
265 result.merge(TrackingGeoCfg(inputFlags))
266 calogeocfg = CaloGeoAndNoiseCfg(inputFlags)
267 result.merge(calogeocfg)
268
269 selcfg = HLTPFTrackSelectorCfg(inputFlags, tracktype, tracksin, verticesin, clustersin, cellsin)
270 PFTrackSelector = selcfg.getPrimary()
271
272 # Add monitoring tool
273 monTool = PFOnlineMon.getMonTool_PFTrackSelector(inputFlags)
274 PFTrackSelector.MonTool = monTool
275
276 result.merge( selcfg, seqname )
277
278 #---------------------------------------------------------------------------------#
279 # PFlowAlgorithm -- subtraction steps
280
281
282 from eflowRec.PFCfg import getPFClusterSelectorTool
283 from eflowRec.PFCfg import getPFCellLevelSubtractionTool,getPFRecoverSplitShowersTool
284
285 PFTrackClusterMatchingTool_1 = CompFactory.PFTrackClusterMatchingTool("CalObjBldMatchingTool")
286 monTool_matching = PFOnlineMon.getMonTool_PFTrackClusterMatching(inputFlags)
287 monTool_matching.HistPath = 'PFTrackClusterMatchingTool_1'
288 PFTrackClusterMatchingTool_1.MonTool_ClusterMatching = monTool_matching
289
290 cellSubtractionTool = getPFCellLevelSubtractionTool(
291 inputFlags,
292 "PFCellLevelSubtractionTool",
293 )
294 cellSubtractionTool.PFTrackClusterMatchingTool=PFTrackClusterMatchingTool_1
295
296 recoverSplitShowersTool = getPFRecoverSplitShowersTool(
297 inputFlags,
298 "PFRecoverSplitShowersTool",
299 )
300 recoverSplitShowersTool.PFTrackClusterMatchingTool = PFTrackClusterMatchingTool_1
301
302 result.addEventAlgo(
303 CompFactory.PFAlgorithm(
304 f"PFAlgorithm_{tracktype}",
305 PFClusterSelectorTool = getPFClusterSelectorTool(
306 inputFlags,
307 clustersin,
308 calclustersin,
309 "PFClusterSelectorTool",
310 ),
311 SubtractionToolList = [
312 cellSubtractionTool,
313 recoverSplitShowersTool,
314 ],
315 BaseToolList = [
316 result.popToolsAndMerge(getHLTPFMomentCalculatorTool(inputFlags)),
317 ],
318 MonTool = PFOnlineMon.getMonTool_PFAlgorithm(inputFlags),
319 eflowRecTracksInputName = PFTrackSelector.eflowRecTracksOutputName,
320 eflowRecClustersOutputName = f"eflowRecClusters_{tracktype}",
321 PFCaloClustersOutputName = f"PFCaloCluster_{tracktype}",
322 eflowCaloObjectsOutputName = f"eflowCaloObjects_{tracktype}",
323 ),
324 seqname
325 )
326
327 #---------------------------------------------------------------------------------#
328 # PFO creators here
329
330 chargedPFOArgs = dict(
331 inputFlags=inputFlags,
332 nameSuffix=f"_{tracktype}",
333 chargedFlowElementOutputName=recordable(f"HLT_{tracktype}ChargedParticleFlowObjects"),
334 eflowCaloObjectContainerName=f"eflowCaloObjects_{tracktype}"
335 )
336 neutralPFOArgs = dict(
337 inputFlags=inputFlags,
338 nameSuffix=f"_{tracktype}",
339 neutralFlowElementOutputName=recordable(f"HLT_{tracktype}NeutralParticleFlowObjects"),
340 eflowCaloObjectContainerName=f"eflowCaloObjects_{tracktype}"
341 )
342 from eflowRec.PFCfg import getChargedFlowElementCreatorAlgorithm,getNeutralFlowElementCreatorAlgorithm
343 result.addEventAlgo(getNeutralFlowElementCreatorAlgorithm(**neutralPFOArgs), seqname)
344 result.addEventAlgo(getChargedFlowElementCreatorAlgorithm(**chargedPFOArgs), seqname)
345
346
347 return result
348
Definition PFCfg.py:1
getMonTool_PFAlgorithm(flags)
getMonTool_PFTrackClusterMatching(flags)

◆ PFTrackExtensionCfg()

PFHLTConfig.PFTrackExtensionCfg ( flags,
tracktype,
tracksin )
 Get the track-to-calo extension after a preselection

Returns the component accumulator, the preselected track collection and the extension cache

Definition at line 35 of file PFHLTConfig.py.

35def PFTrackExtensionCfg(flags, tracktype, tracksin):
36 """ Get the track-to-calo extension after a preselection
37
38 Returns the component accumulator, the preselected track collection and the extension cache
39 """
40 result = ComponentAccumulator()
41 pretracks_name = f"HLTPFPreselTracks_{tracktype}"
42 cache_name = f"HLTPFTrackExtensionCache_{tracktype}"
43
44 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig import (
45 PFTrackSelectionToolCfg)
46 result.addEventAlgo(CompFactory.PFTrackPreselAlg(
47 f"HLTPFTrackPresel_{tracktype}",
48 InputTracks=tracksin,
49 OutputTracks=pretracks_name,
50 TrackSelTool=result.popToolsAndMerge(PFTrackSelectionToolCfg(flags))
51 ))
52
53
54 monTool_trackExtrap = PFOnlineMon.getMonTool_ParticleCaloExtensionTool(flags)
55 monTool_trackExtrap.HistPath = 'TrackCaloExtrapolation_general'
56
57 from TrackToCalo.TrackToCaloConfig import HLTPF_ParticleCaloExtensionToolCfg
58 result.addEventAlgo(CompFactory.Trk.PreselCaloExtensionBuilderAlg(
59 f"HLTPFTrackExtension_{tracktype}",
60 ParticleCaloExtensionTool=result.popToolsAndMerge(
61 HLTPF_ParticleCaloExtensionToolCfg(flags, MonTool=monTool_trackExtrap)),
62 InputTracks=pretracks_name,
63 OutputCache=cache_name,
64 ))
65
66 return result, pretracks_name, cache_name
67
getMonTool_ParticleCaloExtensionTool(flags)

◆ TrackingGeoCfg()

PFHLTConfig.TrackingGeoCfg ( inputFlags)

Definition at line 11 of file PFHLTConfig.py.

11def TrackingGeoCfg(inputFlags):
12 result = ComponentAccumulator()
13
14 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
15 result.merge(AtlasFieldCacheCondAlgCfg(inputFlags))
16
17 return result
18
19#---------------------------------------------------------------------------------#
20# Calo geometry & conditions

Variable Documentation

◆ addClusterMoments

PFHLTConfig.addClusterMoments

Definition at line 362 of file PFHLTConfig.py.

◆ cfg

PFHLTConfig.cfg = MainServicesCfg(cfgFlags)

Definition at line 372 of file PFHLTConfig.py.

◆ cfgFlags

PFHLTConfig.cfgFlags = initConfigFlags()

Definition at line 352 of file PFHLTConfig.py.

◆ ClustersOutputName

PFHLTConfig.ClustersOutputName

Definition at line 377 of file PFHLTConfig.py.

◆ Dump

PFHLTConfig.Dump

Definition at line 402 of file PFHLTConfig.py.

◆ Dynamic

PFHLTConfig.Dynamic

Definition at line 367 of file PFHLTConfig.py.

◆ Files

PFHLTConfig.Files

Definition at line 354 of file PFHLTConfig.py.

◆ histSvc

PFHLTConfig.histSvc = CompFactory.THistSvc(Output = ["EXPERT DATAFILE='expert-monitoring.root', OPT='RECREATE'"])

Definition at line 399 of file PFHLTConfig.py.

◆ outputlist

list PFHLTConfig.outputlist
Initial value:
1= [
2 "xAOD::CaloClusterContainer#CaloCalTopoClusters*",
3 "xAOD::CaloClusterAuxContainer#*CaloCalTopoClusters*Aux.",
4 "xAOD::PFOContainer#*ParticleFlowObjects",
5 "xAOD::PFOAuxContainer#*ParticleFlowObjectsAux."
6 ]

Definition at line 388 of file PFHLTConfig.py.

◆ sequenceName

PFHLTConfig.sequenceName

Definition at line 379 of file PFHLTConfig.py.

◆ tcalg

PFHLTConfig.tcalg = tccfg.getPrimary()

Definition at line 376 of file PFHLTConfig.py.

◆ tccfg

PFHLTConfig.tccfg = CaloTopoClusterCfg(cfgFlags)

Definition at line 375 of file PFHLTConfig.py.

◆ useClusterMoments

PFHLTConfig.useClusterMoments

Definition at line 363 of file PFHLTConfig.py.