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 20 of file PFHLTConfig.py.

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

◆ getHLTPFMomentCalculatorTool()

PFHLTConfig.getHLTPFMomentCalculatorTool ( inputFlags)

Definition at line 206 of file PFHLTConfig.py.

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

◆ HLTPFTrackSelectorCfg()

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

Definition at line 148 of file PFHLTConfig.py.

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

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

◆ 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 112 of file PFHLTConfig.py.

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

◆ PFCfg()

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

Definition at line 248 of file PFHLTConfig.py.

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

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

◆ TrackingGeoCfg()

PFHLTConfig.TrackingGeoCfg ( inputFlags)

Definition at line 10 of file PFHLTConfig.py.

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

Variable Documentation

◆ addClusterMoments

PFHLTConfig.addClusterMoments

Definition at line 361 of file PFHLTConfig.py.

◆ cfg

PFHLTConfig.cfg = MainServicesCfg(cfgFlags)

Definition at line 371 of file PFHLTConfig.py.

◆ cfgFlags

PFHLTConfig.cfgFlags = initConfigFlags()

Definition at line 351 of file PFHLTConfig.py.

◆ ClustersOutputName

PFHLTConfig.ClustersOutputName

Definition at line 376 of file PFHLTConfig.py.

◆ Dump

PFHLTConfig.Dump

Definition at line 401 of file PFHLTConfig.py.

◆ Dynamic

PFHLTConfig.Dynamic

Definition at line 366 of file PFHLTConfig.py.

◆ Files

PFHLTConfig.Files

Definition at line 353 of file PFHLTConfig.py.

◆ histSvc

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

Definition at line 398 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 387 of file PFHLTConfig.py.

◆ sequenceName

PFHLTConfig.sequenceName

Definition at line 378 of file PFHLTConfig.py.

◆ tcalg

PFHLTConfig.tcalg = tccfg.getPrimary()

Definition at line 375 of file PFHLTConfig.py.

◆ tccfg

PFHLTConfig.tccfg = CaloTopoClusterCfg(cfgFlags)

Definition at line 374 of file PFHLTConfig.py.

◆ useClusterMoments

PFHLTConfig.useClusterMoments

Definition at line 362 of file PFHLTConfig.py.