ATLAS Offline Software
Loading...
Searching...
No Matches
TauToolHolder.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3
10
11from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12from AthenaConfiguration.ComponentFactory import CompFactory
13from AthenaConfiguration.AccumulatorCache import AccumulatorCache
14from AthenaConfiguration.Enums import ProductionStep, LHCPeriod
15from AthenaCommon.SystemOfUnits import GeV, deg
16
17
19@AccumulatorCache
21 result = ComponentAccumulator()
22 _name = flags.Tau.ActiveConfig.prefix + 'JetSeedBuilder'
23
24 JetSeedBuilder = CompFactory.getComp("JetSeedBuilder")
25 JetSeedBuilder = JetSeedBuilder(name = _name)
26
27 result.setPrivateTools(JetSeedBuilder)
28 return result
29
30
32 result = ComponentAccumulator()
33 _name = flags.Tau.ActiveConfig.prefix + 'TauVertexFinder'
34
35 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig import (
36 Tau_InDetTrackSelectionToolForTJVACfg)
37 from TrackVertexAssociationTool.TrackVertexAssociationToolConfig import TauTTVAToolCfg
38
39 # Algorithm that overwrites numTrack() and charge() of tauJets in container
40 # from tauRecTools.tauRecToolsConf import TauVertexFinder
41 TauVertexFinder = CompFactory.getComp("TauVertexFinder")
42 TauVertexFinder = TauVertexFinder(name = _name,
43 UseTJVA = flags.Tau.doTJVA,
44 AssociatedTracks="GhostTrack", # OK??
45 InDetTrackSelectionToolForTJVA = result.popToolsAndMerge(Tau_InDetTrackSelectionToolForTJVACfg(flags)),
46 Key_vertexInputContainer = flags.Tau.ActiveConfig.VertexCollection,
47 TVATool = result.popToolsAndMerge(TauTTVAToolCfg(flags)),
48 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
49 )
50
51 result.setPrivateTools(TauVertexFinder)
52 return result
53
54
56def TauAxisCfg(flags):
57 result = ComponentAccumulator()
58 _name = flags.Tau.ActiveConfig.prefix + 'TauAxis'
59
60 TauAxisSetter = CompFactory.getComp("TauAxisSetter")
61 TauAxisSetter = TauAxisSetter( name = _name,
62 ClusterCone = 0.2,
63 VertexCorrection = flags.Tau.doVertexCorrection )
64
65 result.setPrivateTools(TauAxisSetter)
66 return result
67
68
69
71 #If reading from ESD we not create a cache of extrapolations to the calorimeter, so we should signify this by setting the cache key to a null string
72 if flags.Common.ProductionStep is ProductionStep.Reconstruction:
73 ParticleCache = "ParticleCaloExtension"
74 else:
75 ParticleCache = ""
76
77 return ParticleCache
78
79
82 result = ComponentAccumulator()
83 _name = flags.Tau.ActiveConfig.prefix + 'TauTrackFinder'
84
85 # BeamSpot Conditions
86 from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
87 result.merge(BeamSpotCondAlgCfg(flags))
88
89 from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
90 from TrkConfig.TrkVertexFitterUtilsConfig import AtlasTrackToVertexIPEstimatorCfg
91 from InDetConfig.InDetTrackSelectorToolConfig import TauRecInDetTrackSelectorToolCfg
92
93 _LargeD0TrackInputContainer = (flags.Tau.ActiveConfig.LargeD0TrackCollection if flags.Tau.associateLRT else "")
94
95 # Manually setting for TauLRT reco
96 if flags.Tau.ActiveConfig.inTauLRT:
97 _LargeD0TrackInputContainer = flags.Tau.ActiveConfig.LargeD0TrackCollection
98
99 TauTrackFinder = CompFactory.getComp("TauTrackFinder")
100 TauTrackFinder = TauTrackFinder(name = _name,
101 MaxJetDrTau = 0.2,
102 MaxJetDrWide = 0.4,
103 TrackSelectorToolTau = result.popToolsAndMerge(TauRecInDetTrackSelectorToolCfg(flags)),
104 TrackToVertexTool = "",
105 ParticleCaloExtensionTool = result.popToolsAndMerge(ParticleCaloExtensionToolCfg(flags)),
106 tauParticleCache = getParticleCache(flags), # only returns a string
107 removeDuplicateCoreTracks = flags.Tau.RemoveDupeCoreTracks,
108 useGhostTracks = flags.Tau.useGhostTracks,
109 ghostTrackDR = flags.Tau.ghostTrackDR,
110 Key_jetContainer = (flags.Tau.ActiveConfig.SeedJetCollection if flags.Tau.useGhostTracks else ""),
111 Key_trackPartInputContainer = flags.Tau.ActiveConfig.TrackCollection,
112 Key_LargeD0TrackInputContainer = _LargeD0TrackInputContainer,
113 TrackToVertexIPEstimator = result.popToolsAndMerge(AtlasTrackToVertexIPEstimatorCfg(flags)),
114 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
115 )
116 result.setPrivateTools(TauTrackFinder)
117 return result
118
119
122 result = ComponentAccumulator()
123 _name = flags.Tau.ActiveConfig.prefix + 'TauClusterFinder'
124
125
126 TauClusterFinder = CompFactory.getComp("TauClusterFinder")
127 TauClusterFinder = TauClusterFinder(
128 name = _name,
129 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
130 )
131
132
133 result.setPrivateTools(TauClusterFinder)
134 return result
135
136
138 result = ComponentAccumulator()
139 _name = flags.Tau.ActiveConfig.prefix + 'TauVertexedClusterDecorator'
140
141 TauVertexedClusterDecorator = CompFactory.getComp("TauVertexedClusterDecorator")
142 myTauVertexedClusterDecorator = TauVertexedClusterDecorator(name = _name,
143 SeedJet = flags.Tau.ActiveConfig.SeedJetCollection)
144
145 result.setPrivateTools(myTauVertexedClusterDecorator)
146 return result
147
148
149def TauTrackRNNCfg(flags):
150 result = ComponentAccumulator()
151 _name = flags.Tau.ActiveConfig.prefix + 'TauTrackRNNClassifier'
152
153 TrackRNN = CompFactory.tauRecTools.TrackRNN
154 _RNN = TrackRNN(name = _name + "_TrackRNN",
155 InputWeightsPath = flags.Tau.tauRNNTrackClassConfig,
156 calibFolder = flags.Tau.tauRecToolsCVMFSPath )
157
158 result.setPrivateTools(_RNN)
159 return result
160
161
163 result = ComponentAccumulator()
164 _name = flags.Tau.ActiveConfig.prefix + 'TauTrackRNNClassifier'
165
166 # create tool alg
167 TauTrackRNNClassifier = CompFactory.tauRecTools.TauTrackRNNClassifier
168
169 import cppyy
170 cppyy.load_library('libxAODTau_cDict')
171
172 _classifyLRT = True
173 _classifyLRTWithDedicated = flags.Tau.classifyLRTWithDedicated
174 if flags.Tau.associateLRT and not flags.Tau.classifyLRT:
175 _classifyLRT = False
176
177 # Manually setting for TauLRT reco
178 if flags.Tau.ActiveConfig.inTauLRT:
179 _classifyLRT = True
180 _classifyLRTWithDedicated = True
181
182
183 myTauTrackClassifier = TauTrackRNNClassifier( name = _name,
184 Classifiers = [ result.popToolsAndMerge(TauTrackRNNCfg(flags)) ],
185 classifyLRT = _classifyLRT,
186 classifyLRTWithDedicated = _classifyLRTWithDedicated)
187
188 result.setPrivateTools(myTauTrackClassifier)
189 return result
190
191
193def EnergyCalibrationLCCfg(flags, force_zero_mass=False):
194 result = ComponentAccumulator()
195 _name = flags.Tau.ActiveConfig.prefix +'EnergyCalibrationLC'
196
197 TauCalibrateLC = CompFactory.getComp("TauCalibrateLC")
198 TauCalibrateLC = TauCalibrateLC(name = _name,
199 calibrationFile = flags.Tau.CalibrateLCConfig,
200 ForceZeroMass = force_zero_mass,
201 Key_vertexInputContainer = flags.Tau.ActiveConfig.VertexCollection)
202
203 result.setPrivateTools(TauCalibrateLC)
204 return result
205
206
209 result = ComponentAccumulator()
210 _name = flags.Tau.ActiveConfig.prefix + 'CellVariables'
211
212 TauCellVariables = CompFactory.getComp("TauCellVariables")
213 TauCellVariables = TauCellVariables(name = _name,
214 VertexCorrection = flags.Tau.doVertexCorrection)
215
216 result.setPrivateTools(TauCellVariables)
217 return result
218
219
222 result = ComponentAccumulator()
223 _name = flags.Tau.ActiveConfig.prefix + 'TauElectronVetoVars'
224
225 from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg
226
227 TauElectronVetoVariables = CompFactory.getComp("TauElectronVetoVariables")
228 TauElectronVetoVariables = TauElectronVetoVariables(name = _name,
229 VertexCorrection = flags.Tau.doVertexCorrection,
230 ParticleCaloExtensionTool = result.popToolsAndMerge(ParticleCaloExtensionToolCfg(flags)),
231 tauEVParticleCache = getParticleCache(flags))
232
233 result.setPrivateTools(TauElectronVetoVariables)
234 return result
235
236
239 result = ComponentAccumulator()
240 _name = flags.Tau.ActiveConfig.prefix + 'TauShotFinder'
241
242 shotPtCut_1Photon = flags.Tau.shotPtCut_1Photon
243 shotPtCut_2Photons = flags.Tau.shotPtCut_2Photons
244
245
246 from CaloClusterCorrection.StandardCellWeightCalib import getCellWeightTool
247 CaloWeightTool = getCellWeightTool(flags=flags)
248
249
250 TauShotFinder = CompFactory.getComp("TauShotFinder")
251 TauShotFinder = TauShotFinder(
252 name = _name,
253 CaloWeightTool = result.popToolsAndMerge(CaloWeightTool),
254 NCellsInEta = 5,
255 MinPtCut = shotPtCut_1Photon,
256 AutoDoubleShotCut = shotPtCut_2Photons,
257 Key_RemovedClusterInputContainer = flags.Tau.ActiveConfig.RemovedElectronClusters,
258 RemoveElectronCells = flags.Tau.ActiveConfig.RemoveElectronCells,
259 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
260 )
261
262 result.setPrivateTools(TauShotFinder)
263 return result
264
265
269 result = ComponentAccumulator()
270 _name = flags.Tau.ActiveConfig.prefix + 'Pi0ClusterFinder'
271
272 TauPi0CreateROI = CompFactory.getComp("TauPi0CreateROI")
273
274 myTauPi0CreateROI = TauPi0CreateROI(
275 name = _name,
276 Key_caloCellInputContainer = "AllCalo",
277 Key_RemovedClusterInputContainer = flags.Tau.ActiveConfig.RemovedElectronClusters,
278 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
279 RemoveElectronCells = flags.Tau.ActiveConfig.RemoveElectronCells,
280 )
281
282 result.setPrivateTools(myTauPi0CreateROI)
283 return result
284
285
288 result = ComponentAccumulator()
289 _name = flags.Tau.ActiveConfig.prefix + 'tauPi0CellContainerFinalizer'
290
291 CaloCellContainerFinalizerTool = CompFactory.getComp("CaloCellContainerFinalizerTool")
292 TauCellContainerFinalizer = CaloCellContainerFinalizerTool(name=_name)
293
294 result.setPrivateTools(TauCellContainerFinalizer)
295 return result
296
297
300
302 result = ComponentAccumulator()
303 _name = flags.Tau.ActiveConfig.prefix + 'LCClassify'
304
305 CaloLCClassificationTool = CompFactory.getComp("CaloLCClassificationTool")
306 LCClassify = CaloLCClassificationTool(_name)
307 LCClassify.ClassificationKey = "EMFracClassify"
308 LCClassify.UseSpread = False
309 LCClassify.MaxProbability = 0.5
310 # add the moments EM_PROBABILITY, HAD_WEIGHT, OOC_WEIGHT, DM_WEIGHT to the AOD:
311 LCClassify.StoreClassificationProbabilityInAOD = True
312 LCClassify.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
313 LCClassify.UseNormalizedEnergyDensity = True
314
315 result.setPrivateTools(LCClassify)
316 return result
317
319 result = ComponentAccumulator()
320 _name = flags.Tau.ActiveConfig.prefix + 'CaloLCWeightTool'
321
322 # Schedule total noise cond alg
323 from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
324 result.merge(CaloNoiseCondAlgCfg(flags,"totalNoise"))
325 # Schedule electronic noise cond alg (needed for LC weights)
326 result.merge(CaloNoiseCondAlgCfg(flags,"electronicNoise"))
327
328 CaloLCWeightTool = CompFactory.getComp("CaloLCWeightTool")
329 LCWeight = CaloLCWeightTool(_name)
330 LCWeight.CorrectionKey = "H1ClusterCellWeights"
331 LCWeight.SignalOverNoiseCut = 2.0
332 LCWeight.UseHadProbability = True
333
334 result.setPrivateTools(LCWeight)
335 return result
336
338 result = ComponentAccumulator()
339 _name = flags.Tau.ActiveConfig.prefix + 'CaloLCOutOfClusterTool'
340
341 CaloLCOutOfClusterTool = CompFactory.getComp("CaloLCOutOfClusterTool")
342 LCOut = CaloLCOutOfClusterTool(_name)
343 LCOut.CorrectionKey = "OOCCorrection"
344 LCOut.UseEmProbability = False
345 LCOut.UseHadProbability = True
346
347 result.setPrivateTools(LCOut)
348 return result
349
351 result = ComponentAccumulator()
352 _name = flags.Tau.ActiveConfig.prefix + 'LCOutPi0'
353
354 CaloLCOutOfClusterTool = CompFactory.getComp("CaloLCOutOfClusterTool")
355 LCOutPi0 = CaloLCOutOfClusterTool(_name)
356 LCOutPi0.CorrectionKey = "OOCPi0Correction"
357 LCOutPi0.UseEmProbability = True
358 LCOutPi0.UseHadProbability = False
359
360 result.setPrivateTools(LCOutPi0)
361 return result
362
364 result = ComponentAccumulator()
365 _name = flags.Tau.ActiveConfig.prefix + 'CaloLCDeadMaterialTool'
366
367 CaloLCDeadMaterialTool = CompFactory.getComp("CaloLCDeadMaterialTool")
368 LCDeadMaterial = CaloLCDeadMaterialTool(_name)
369 LCDeadMaterial.HadDMCoeffKey = "HadDMCoeff2"
370 LCDeadMaterial.ClusterRecoStatus = 0
371 LCDeadMaterial.WeightModeDM = 2
372 LCDeadMaterial.UseHadProbability = True
373 LCDeadMaterial.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
374
375 result.setPrivateTools(LCDeadMaterial)
376 return result
377
379 result = ComponentAccumulator()
380 _name = flags.Tau.ActiveConfig.prefix + 'CaloLocalCalib'
381
382 CaloClusterLocalCalib = CompFactory.getComp("CaloClusterLocalCalib")
383 LocalCalib = CaloClusterLocalCalib(_name)
384 LocalCalib.ClusterClassificationTool = [result.popToolsAndMerge(TauCaloLCClassificationCfg(flags))]
385 LocalCalib.ClusterRecoStatus = [1,2]
386 LocalCalib.LocalCalibTools = [result.popToolsAndMerge(TauCaloLCWeightCfg(flags))]
387 LocalCalib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
388
389 result.setPrivateTools(LocalCalib)
390 return result
391
393 result = ComponentAccumulator()
394 _name = flags.Tau.ActiveConfig.prefix + 'OOCCalibTool'
395
396 CaloClusterLocalCalib = CompFactory.getComp("CaloClusterLocalCalib")
397 OOCCalib = CaloClusterLocalCalib (_name)
398 OOCCalib.ClusterRecoStatus = [1,2]
399 OOCCalib.LocalCalibTools = [result.popToolsAndMerge(TauCaloLCOutOfClusterCfg(flags))]
400 OOCCalib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
401
402 result.setPrivateTools(OOCCalib)
403 return result
404
406 result = ComponentAccumulator()
407 _name = flags.Tau.ActiveConfig.prefix + 'DMCalib'
408
409 CaloClusterLocalCalib = CompFactory.getComp("CaloClusterLocalCalib")
410 DMCalib = CaloClusterLocalCalib(_name)
411 DMCalib.ClusterRecoStatus = [1,2]
412 DMCalib.LocalCalibTools = [result.popToolsAndMerge(TauCaloLCDeadMaterialCfg(flags))]
413 DMCalib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
414
415 result.setPrivateTools(DMCalib)
416 return result
417
419 result = ComponentAccumulator()
420 _name = flags.Tau.ActiveConfig.prefix + 'OOCPi0CalibTool'
421
422 CaloClusterLocalCalib = CompFactory.getComp("CaloClusterLocalCalib")
423 OOCPi0Calib = CaloClusterLocalCalib (_name)
424 OOCPi0Calib.ClusterRecoStatus = [1,2]
425 OOCPi0Calib.LocalCalibTools = [result.popToolsAndMerge(TauCaloLCOutPi0Cfg(flags))]
426 OOCPi0Calib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
427
428 result.setPrivateTools(OOCPi0Calib)
429 return result
430
432 result = ComponentAccumulator()
433 _name = flags.Tau.ActiveConfig.prefix + 'Pi0TopoClusterMaker'
434
435 # Schedule total noise cond alg
436 from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
437 result.merge(CaloNoiseCondAlgCfg(flags,"totalNoise"))
438 # Schedule electronic noise cond alg (needed for LC weights)
439 result.merge(CaloNoiseCondAlgCfg(flags,"electronicNoise"))
440
441 CaloTopoClusterMaker = CompFactory.getComp("CaloTopoClusterMaker")
442 TopoClusterForTaus = CaloTopoClusterMaker(_name)
443
444 TopoClusterForTaus.CellsName = flags.Tau.ActiveConfig.TauCommonPi0Cells
445 TopoClusterForTaus.CalorimeterNames=["LAREM"]
446 TopoClusterForTaus.SeedSamplingNames = ["PreSamplerB", "EMB1", "EMB2", "PreSamplerE", "EME1", "EME2"]
447 TopoClusterForTaus.NeighborOption = "super3D"
448 TopoClusterForTaus.RestrictHECIWandFCalNeighbors = False
449 TopoClusterForTaus.RestrictPSNeighbors = True
450 TopoClusterForTaus.CellThresholdOnEorAbsEinSigma = 0.0
451 TopoClusterForTaus.NeighborThresholdOnEorAbsEinSigma = 2.0
452 TopoClusterForTaus.SeedThresholdOnEorAbsEinSigma = 4.0
453 TopoClusterForTaus.SeedCutsInAbsE = True
454 TopoClusterForTaus.ClusterCutsInAbsEt = True
455 TopoClusterForTaus.ClusterEtorAbsEtCut = 0.5*GeV # 0.0*MeV in standard CaloCalTopoCluster JobOptions!
456 TopoClusterForTaus.TwoGaussianNoise = flags.Calo.TopoCluster.doTwoGaussianNoise
457 # timing cut on seed cell to suppress out-of-time pileup
458 TopoClusterForTaus.SeedCutsInT = flags.Calo.TopoCluster.doTimeCut
459 TopoClusterForTaus.CutOOTseed = flags.Calo.TopoCluster.extendTimeCut and flags.Calo.TopoCluster.doTimeCut
460 TopoClusterForTaus.UseTimeCutUpperLimit = flags.Calo.TopoCluster.useUpperLimitForTimeCut
461 TopoClusterForTaus.TimeCutUpperLimit = flags.Calo.TopoCluster.timeCutUpperLimit
462 TopoClusterForTaus.XTalkEM2 = flags.Calo.TopoCluster.xtalkEM2
463 TopoClusterForTaus.XTalkEM2D = flags.Calo.TopoCluster.xtalkEM2D
464 TopoClusterForTaus.XTalkEM2n = flags.Calo.TopoCluster.xtalkEM2n
465 TopoClusterForTaus.XTalkEM3 = flags.Calo.TopoCluster.xtalkEM3
466 TopoClusterForTaus.XTalkEMEta = flags.Calo.TopoCluster.xtalkEMEta
467 TopoClusterForTaus.XTalkDeltaT = flags.Calo.TopoCluster.xtalkDeltaT
468 TopoClusterForTaus.XTalk2Eratio1 = flags.Calo.TopoCluster.xtalk2Eratio1
469 TopoClusterForTaus.XTalk2Eratio2 = flags.Calo.TopoCluster.xtalk2Eratio2
470 TopoClusterForTaus.XTalk3Eratio = flags.Calo.TopoCluster.xtalk3Eratio
471 TopoClusterForTaus.XTalkEtaEratio = flags.Calo.TopoCluster.xtalkEtaEratio
472 TopoClusterForTaus.XTalk2DEratio = flags.Calo.TopoCluster.xtalk2DEratio
473
474 result.setPrivateTools(TopoClusterForTaus)
475 return result
476
478
479 result = ComponentAccumulator()
480 _name = flags.Tau.ActiveConfig.prefix + 'Pi0TopoClusterSplitter'
481
482 CaloTopoClusterSplitter = CompFactory.getComp("CaloTopoClusterSplitter")
483 TopoSplitterForTaus = CaloTopoClusterSplitter(_name)
484
485 # cells from the following samplings will be able to form local
486 # maxima. The excluded samplings are PreSamplerB, EMB1,
487 # PreSamplerE, EME1, all Tile samplings, all HEC samplings and the
488 # two rear FCal samplings.
489 TopoSplitterForTaus.SamplingNames = ["EMB2","EME2"] # Do we want to use EMB3 and EME3?
490 # cells from the following samplings will also be able to form
491 # local maxima but only if they are not overlapping in eta and phi
492 # with local maxima in previous samplings from the primary list.
493 TopoSplitterForTaus.SecondarySamplingNames = ["EMB1","EME1"]
494 TopoSplitterForTaus.ShareBorderCells = True
495 TopoSplitterForTaus.RestrictHECIWandFCalNeighbors = False
496 TopoSplitterForTaus.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
497
498 result.setPrivateTools(TopoSplitterForTaus)
499 return result
500
502 result = ComponentAccumulator()
503 _name = flags.Tau.ActiveConfig.prefix + 'Pi0TopoMoments'
504
505 # Schedule total noise cond alg
506 from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
507 result.merge(CaloNoiseCondAlgCfg(flags,"totalNoise"))
508 # Schedule electronic noise cond alg (needed for LC weights)
509 result.merge(CaloNoiseCondAlgCfg(flags,"electronicNoise"))
510
511 CaloClusterMomentsMaker = CompFactory.getComp("CaloClusterMomentsMaker")
512 TopoMomentsForTaus = CaloClusterMomentsMaker(_name)
513 TopoMomentsForTaus.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
514 TopoMomentsForTaus.MaxAxisAngle = 20*deg
515 TopoMomentsForTaus.TwoGaussianNoise = flags.Calo.TopoCluster.doTwoGaussianNoise
516 TopoMomentsForTaus.MinBadLArQuality = 4000
517 TopoMomentsForTaus.MomentsNames = ["FIRST_PHI"
518 ,"FIRST_ETA"
519 ,"SECOND_R"
520 ,"SECOND_LAMBDA"
521 ,"DELTA_PHI"
522 ,"DELTA_THETA"
523 ,"DELTA_ALPHA"
524 ,"CENTER_X"
525 ,"CENTER_Y"
526 ,"CENTER_Z"
527 ,"CENTER_MAG"
528 ,"CENTER_LAMBDA"
529 ,"LATERAL"
530 ,"LONGITUDINAL"
531 ,"ENG_FRAC_EM"
532 ,"ENG_FRAC_MAX"
533 ,"ENG_FRAC_CORE"
534 ,"FIRST_ENG_DENS"
535 ,"SECOND_ENG_DENS"
536 ,"ISOLATION"]
537
538 result.setPrivateTools(TopoMomentsForTaus)
539 return result
540
542 result = ComponentAccumulator()
543 _name = flags.Tau.ActiveConfig.prefix + 'CaloClusterBadChannelList'
544
545 CaloClusterBadChannelListCorr = CompFactory.getComp("CaloClusterBadChannelList")
546 BadChannelListCorrForTaus = CaloClusterBadChannelListCorr(_name)
547
548 result.setPrivateTools(BadChannelListCorrForTaus)
549 return result
550
551
554 result = ComponentAccumulator()
555 _name = flags.Tau.ActiveConfig.prefix + 'Pi0ClusterCreator'
556
557 # TauPi0ClusterCreator accesses cells via links only, which doesn't
558 # make a scheduler dependency. So make additional explicit dependencies
559 # on cells in the input file.
560 extraInputs = []
561 for typ, nam in [i.split('#') for i in flags.Input.TypedCollections]:
562 if typ == 'CaloCellContainer':
563 extraInputs += [('CaloCellContainer', nam)]
564
565 TauPi0ClusterCreator = CompFactory.getComp("TauPi0ClusterCreator")
566 TauPi0ClusterCreator = TauPi0ClusterCreator(name = _name,
567 ExtraInputs = extraInputs,
568 RecoFromAOD = flags.Common.ProductionStep is ProductionStep.Derivation)
569
570 result.setPrivateTools(TauPi0ClusterCreator)
571 return result
572
573
576 result = ComponentAccumulator()
577 _name = flags.Tau.ActiveConfig.prefix + 'Pi0ClusterScaler'
578
579 TauPi0ClusterScaler = CompFactory.getComp("TauPi0ClusterScaler")
580 TauPi0ClusterScaler = TauPi0ClusterScaler(name = _name,
581 MinNeutralPFOPt = flags.Tau.MinNeutralPFOPt)
582
583 result.setPrivateTools(TauPi0ClusterScaler)
584 return result
585
586
589 result = ComponentAccumulator()
590 _name = flags.Tau.ActiveConfig.prefix + 'Pi0ScoreCalculator'
591
592 TauPi0ScoreCalculator = CompFactory.getComp("TauPi0ScoreCalculator")
593 TauPi0ScoreCalculator = TauPi0ScoreCalculator(name = _name,
594 BDTWeightFile = flags.Tau.Pi0ScoreConfig)
595
596 result.setPrivateTools(TauPi0ScoreCalculator)
597 return result
598
599
601def Pi0SelectorCfg(flags):
602 result = ComponentAccumulator()
603 _name = flags.Tau.ActiveConfig.prefix + 'Pi0Selector'
604
605 TauPi0Selector = CompFactory.getComp("TauPi0Selector")
606 TauPi0Selector = TauPi0Selector(name = _name,
607 Pi0EtCut = flags.Tau.pi0EtCuts,
608 Pi0BDTCut_1prong = flags.Tau.pi0MVACuts_1prong,
609 Pi0BDTCut_mprong = flags.Tau.pi0MVACuts_mprong)
610
611 result.setPrivateTools(TauPi0Selector)
612 return result
613
614
617 result = ComponentAccumulator()
618 _name = flags.Tau.ActiveConfig.prefix + 'TauVertexVariables'
619
620 from TrkConfig.TrkVertexFittersConfig import TauAdaptiveVertexFitterCfg
621 from TrkConfig.TrkVertexSeedFinderToolsConfig import (
622 CrossDistancesSeedFinderCfg)
623
624 TauVertexVariables = CompFactory.getComp("TauVertexVariables")
625 TauVertexVariables = TauVertexVariables( name = _name,
626 VertexFitter = result.popToolsAndMerge(TauAdaptiveVertexFitterCfg(flags)),
627 SeedFinder = result.popToolsAndMerge(CrossDistancesSeedFinderCfg(flags)) )
628
629 result.setPrivateTools(TauVertexVariables)
630 return result
631
632
635 result = ComponentAccumulator()
636 _name = flags.Tau.ActiveConfig.prefix + 'TauCommonCalcVars'
637
638 TauCommonCalcVars = CompFactory.getComp("TauCommonCalcVars")
639 TauCommonCalcVars = TauCommonCalcVars(name = _name,
640 doRun4 = flags.GeoModel.Run > LHCPeriod.Run3)
641
642 result.setPrivateTools(TauCommonCalcVars)
643 return result
644
645
648 result = ComponentAccumulator()
649 _name = flags.Tau.ActiveConfig.prefix + 'TauSubstructure'
650
651 TauSubstructureVariables = CompFactory.getComp("TauSubstructureVariables")
652 TauSubstructureVariables = TauSubstructureVariables( name = _name,
653 doRun4 = flags.GeoModel.Run > LHCPeriod.Run3)
654
655 result.setPrivateTools(TauSubstructureVariables)
656 return result
657
658
661 result = ComponentAccumulator()
662 _name = flags.Tau.ActiveConfig.prefix + 'MvaTESVariableDecorator'
663
664 eventShapeCollection = flags.Tau.ActiveConfig.EventShapeCollection
665 if 'EMPFlow' in flags.Tau.ActiveConfig.SeedJetCollection:
666 eventShapeCollection = "Kt4EMPFlowEventShape"
667 elif 'EMTopo' in flags.Tau.ActiveConfig.SeedJetCollection:
668 eventShapeCollection ="Kt4EMTopoOriginEventShape"
669
670 MvaTESVariableDecorator = CompFactory.getComp("MvaTESVariableDecorator")
671 MvaTESVariableDecorator = MvaTESVariableDecorator(name = _name,
672 Key_vertexInputContainer = flags.Tau.ActiveConfig.VertexCollection,
673 EventShapeKey = eventShapeCollection,
674 VertexCorrection = flags.Tau.doVertexCorrection,
675 SeedJet = flags.Tau.ActiveConfig.SeedJetCollection)
676 result.setPrivateTools(MvaTESVariableDecorator)
677 return result
678
679
682 result = ComponentAccumulator()
683 _name = flags.Tau.ActiveConfig.prefix + 'MvaTESEvaluator'
684
685 MvaTESEvaluator = CompFactory.getComp("MvaTESEvaluator")
686 MvaTESEvaluator = MvaTESEvaluator(name = _name,
687 WeightFileName = flags.Tau.MvaTESConfig,
688 WeightFileName0p = flags.Tau.MvaTESConfig0p )
689
690 result.setPrivateTools(MvaTESEvaluator)
691 return result
692
694 result = ComponentAccumulator()
695 _name = flags.Tau.ActiveConfig.prefix + 'TauIDVarCalculator'
696
697 TauIDVarCalculator = CompFactory.getComp("TauIDVarCalculator")
698 myTauIDVarCalculator = TauIDVarCalculator(name=_name,
699 VertexCorrection = flags.Tau.doVertexCorrection,
700 doRun4 = flags.GeoModel.Run > LHCPeriod.Run3)
701
702 result.setPrivateTools(myTauIDVarCalculator)
703 return result
704
705def TauJetRNNEvaluatorCfg(flags, applyLooseTrackSel=False):
706 result = ComponentAccumulator()
707 _name = flags.Tau.ActiveConfig.prefix + 'TauJetRNN'
708
709 TauJetRNNEvaluator = CompFactory.getComp("TauJetRNNEvaluator")
710 RNNConf = flags.Tau.TauJetRNNConfig
711 myTauJetRNNEvaluator = TauJetRNNEvaluator(name = _name,
712 NetworkFile0P = "",
713 NetworkFile1P = RNNConf[0],
714 NetworkFile2P = RNNConf[1],
715 NetworkFile3P = RNNConf[2],
716 OutputVarname = "RNNJetScore",
717 MaxTracks = 10,
718 MaxClusters = 6,
719 MaxClusterDR = 1.0,
720 ApplyLooseTrackSel = applyLooseTrackSel,
721 VertexCorrection = flags.Tau.doVertexCorrection,
722 InputLayerScalar = "scalar",
723 InputLayerTracks = "tracks",
724 InputLayerClusters = "clusters",
725 OutputLayer = "rnnid_output",
726 OutputNode = "sig_prob")
727
728 result.setPrivateTools(myTauJetRNNEvaluator)
729 return result
730
732 import PyUtils.RootUtils as ru
733 ROOT = ru.import_root()
734 import cppyy
735 cppyy.load_library('libxAODTau_cDict')
736
737 result = ComponentAccumulator()
738 _name = flags.Tau.ActiveConfig.prefix + 'TauWPDecoratorJetRNN'
739
740 TauWPDecorator = CompFactory.getComp("TauWPDecorator")
741 WPConf = flags.Tau.TauJetRNNWPConfig
742 myTauWPDecorator = TauWPDecorator( name=_name,
743 flatteningFile1Prong = WPConf[0],
744 flatteningFile2Prong = WPConf[1],
745 flatteningFile3Prong = WPConf[2],
746 CutEnumVals =
747 [ ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigVeryLoose,
748 ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigLoose,
749 ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigMedium,
750 ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigTight ],
751 SigEff1P = [0.95, 0.85, 0.75, 0.60],
752 SigEff2P = [0.95, 0.75, 0.60, 0.45],
753 SigEff3P = [0.95, 0.75, 0.60, 0.45],
754 ScoreName = "RNNJetScore",
755 NewScoreName = "RNNJetScoreSigTrans",
756 DefineWPs = True )
757
758 result.setPrivateTools(myTauWPDecorator)
759 return result
760
761def TauGNNEvaluatorCfg(flags, version=0, applyLooseTrackSel=False, applyTightTrackSel=False, tauContainerName=""):
762 result = ComponentAccumulator()
763 _name = flags.Tau.ActiveConfig.prefix + 'TauGNN_v' + str(version)
764
765 TauGNNEvaluator = CompFactory.getComp("TauGNNEvaluator")
766 GNNConf = flags.Tau.TauGNNConfig[version]
767 myTauGNNEvaluator = TauGNNEvaluator(name = _name,
768 useTRT = flags.Detector.EnableTRT,
769 NetworkFileInclusive = GNNConf,
770 OutputVarname = flags.Tau.GNTauScoreName[version],
771 OutputPTau = "GNTauProbTau",
772 OutputPJet = "GNTauProbJet",
773 MaxTracks = flags.Tau.GNTauMaxTracks[version],
774 MaxClusters = flags.Tau.GNTauMaxClusters[version],
775 MaxClusterDR = 15.0,
776 MinTauPt = flags.Tau.MinPtDAOD,
777 ApplyLooseTrackSel = applyLooseTrackSel,
778 ApplyTightTrackSel = applyTightTrackSel,
779 VertexCorrection = flags.Tau.doVertexCorrection,
780 InputLayerScalar = 'tau_vars',
781 InputLayerTracks = 'track_vars',
782 InputLayerClusters = 'cluster_vars',
783 NodeNameTau=flags.Tau.GNTauNodeNameTau,
784 NodeNameJet=flags.Tau.GNTauNodeNameJet,
785 TauContainerName = tauContainerName,
786 )
787
788 result.setPrivateTools(myTauGNNEvaluator)
789 return result
790
792 """Names of the decorations TausRUs writes on the tau, all of them floats."""
793 names = [
794 "TausRUsTauIDScore",
795 "TausRUsEleRejScore",
796 "TausRUsDecayMode",
797 "TausRUsTauCharge",
798 ]
799 # The class counts must match 'num_classes' in the model metadata
800 names += [f"TausRUsDecayModeScore{i}" for i in range(5)]
801 names += [f"TausRUs{particle}P4_{component}"
802 for particle in ("Tau", "ChargedPion", "NeutralPion")
803 for component in ("pt", "eta", "phi", "m")]
804 names += [f"TausRUsVertex_{coordinate}" for coordinate in ("x", "y", "z")]
805 return names
806
808 """Decorations TausRUs writes on each of the tau's xAOD::TauTrack."""
809 return ["TausRUsTrackClass"] + [f"TausRUsTrackScore{i}" for i in range(4)]
810
811def TausRUsEvaluatorCfg(flags, name="", tauContainerName="", tauTrackContainerName=""):
812 """TausRUs multi-output tau network."""
813
814 result = ComponentAccumulator()
815 _name = name or flags.Tau.ActiveConfig.prefix + 'TausRUs'
816
817 if flags.Tau.TausRUsUseTriton:
818 from AthTritonComps.TritonToolConfig import TritonToolCfg
819 inferenceTool = result.popToolsAndMerge(TritonToolCfg(
820 flags,
821 model_name = flags.Tau.TausRUsTritonModel,
822 url = flags.Tau.TausRUsTritonUrl,
823 port = flags.Tau.TausRUsTritonPort,
824 name = _name + '_TritonTool'))
825 else:
826 from AthOnnxComps.OnnxRuntimeInferenceConfig import OnnxRuntimeInferenceToolCfg
827 inferenceTool = result.popToolsAndMerge(OnnxRuntimeInferenceToolCfg(
828 flags,
829 flags.Tau.TausRUsModelFile,
830 name = _name + '_ORTTool'))
831
832 TausRUsEvaluator = CompFactory.getComp("TausRUsEvaluator")
833 result.setPrivateTools(TausRUsEvaluator(
834 name = _name,
835 InferenceTool = inferenceTool,
836 ModelFile = flags.Tau.TausRUsModelFile,
837 MinTauPt = flags.Tau.TausRUsMinPt,
838 TauContainerName = tauContainerName,
839 TauTrackContainerName = tauTrackContainerName))
840 return result
841
842def TauWPDecoratorGNNCfg(flags, version, tauContainerName=""):
843 result = ComponentAccumulator()
844 _name = flags.Tau.ActiveConfig.prefix + 'TauWPDecoratorGNN_v' + str(version)
845
846 TauWPDecorator = CompFactory.getComp("TauWPDecorator")
847 WPConf = flags.Tau.TauGNNWP[version]
848 myTauWPDecorator = TauWPDecorator(name=_name,
849 flatteningFile1Prong = WPConf[0],
850 flatteningFile2Prong = WPConf[1],
851 flatteningFile3Prong = WPConf[2],
852 TauContainerName = tauContainerName,
853 DecorWPNames = flags.Tau.GNTauDecorWPNames[version],
854 DecorWPCutEffs1P = [0.95, 0.85, 0.75, 0.60],
855 DecorWPCutEffs2P = [0.95, 0.75, 0.60, 0.45],
856 DecorWPCutEffs3P = [0.95, 0.75, 0.60, 0.45],
857 ScoreName = flags.Tau.GNTauScoreName[version],
858 NewScoreName = flags.Tau.GNTauTransScoreName[version],
859 DefineWPs = True)
860 result.setPrivateTools(myTauWPDecorator)
861 return result
862
863def TauGNNeVetoEvaluatorCfg(flags, applyLooseTrackSel=False, applyTightTrackSel=False, tauContainerName=""):
864 result = ComponentAccumulator()
865 _name = flags.Tau.ActiveConfig.prefix + 'TauGNNeVeto'
866
867 TauGNNEvaluator = CompFactory.getComp("TauGNNEvaluator")
868 myTauGNNeVetoEvaluator = TauGNNEvaluator(name = _name,
869 useTRT = flags.Detector.EnableTRT,
870 NetworkFileInclusive = flags.Tau.TauGNNeVetoConfig[0],
871 OutputDiscriminant = flags.Tau.TauGNNeVetoOutputDiscriminant_NeglogPJet_True,
872 OutputVarname = flags.Tau.TauGNNeVetoScoreName,
873 OutputPTau = "GNNeVetoProbTau",
874 OutputPJet = "GNNeVetoProbJet",
875 MaxTracks = flags.Tau.TauGNNeVetoMaxTracks[0],
876 MaxClusters = flags.Tau.TauGNNeVetoMaxClusters[0],
877 MaxClusterDR = 15.0,
878 MinTauPt = flags.Tau.MinPtDAOD,
879 ApplyLooseTrackSel = applyLooseTrackSel,
880 ApplyTightTrackSel = applyTightTrackSel,
881 VertexCorrection = flags.Tau.doVertexCorrection,
882 InputLayerScalar = 'jet_var',
883 InputLayerTracks = 'tracks_r22default_sd0sort',
884 InputLayerClusters = 'cells_var',
885 NodeNameTau=flags.Tau.TauGNNeVetoNodeNameTau,
886 NodeNameJet=flags.Tau.TauGNNeVetoNodeNameJet,
887 TauContainerName = tauContainerName,
888 )
889
890 result.setPrivateTools(myTauGNNeVetoEvaluator)
891 return result
892
893
894def TauGNNeVetoWPDecoratorCfg(flags, tauContainerName=""):
895 result = ComponentAccumulator()
896 _name = flags.Tau.ActiveConfig.prefix + 'TauWPDecoratorGNNeVeto'
897
898 TauWPDecorator = CompFactory.getComp("TauWPDecorator")
899 WPConf = flags.Tau.TauGNNeVetoWP
900 myTauWPDecorator = TauWPDecorator(name=_name,
901 flatteningFile1Prong = WPConf[0],
902 flatteningFile2Prong = WPConf[1],
903 flatteningFile3Prong = WPConf[2],
904 TauContainerName = tauContainerName,
905 DecorWPNames = flags.Tau.TauGNNeVetoDecorWPNames,
906 DecorWPCutEffs1P = [0.95, 0.90, 0.85],
907 DecorWPCutEffs2P = [0.95, 0.90, 0.85],
908 DecorWPCutEffs3P = [0.98, 0.95, 0.90],
909 UseAbsEta = False, # Now for the eVeto algorithm we derive a flattening with respect to mu.
910 ScoreBounds = [-0.01, 14.01],
911 ScoreName = flags.Tau.TauGNNeVetoScoreName,
912 NewScoreName = flags.Tau.TauGNNeVetoTransScoreName,
913 DefineWPs = True)
914 result.setPrivateTools(myTauWPDecorator)
915 return result
916
917def TauGNNDisplacedEvaluatorCfg(flags, tauContainerName=""):
918 # Displaced TauGNNEvaluator tool setup
919 result = ComponentAccumulator()
920
921 TauGNNEvaluator = CompFactory.TauGNNEvaluator(
922 name = flags.Tau.ActiveConfig.prefix + 'TauDisplacedGNN',
923 NetworkFileInclusive = flags.Tau.TauDisplacedGNNConfig[0],
924 OutputVarname = "GNdTauScore",
925 OutputPTau = "GNdTauProbTau",
926 OutputPJet = "GNdTauProbJet",
927 MaxClusterDR = 15.0,
928 MinTauPt = flags.Tau.MinPtDAOD,
929 VertexCorrection = flags.Tau.doVertexCorrection,
930 NodeNameTau="GNdTauv3_pb",
931 NodeNameJet="GNdTauv3_pu",
932 TauContainerName = tauContainerName,
933 )
934 result.setPrivateTools(TauGNNEvaluator)
935 return result
936
937def TauEleRNNEvaluatorCfg(flags, applyLooseTrackSel=False):
938 result = ComponentAccumulator()
939 _name = flags.Tau.ActiveConfig.prefix + 'TauEleRNN'
940
941 TauJetRNNEvaluator = CompFactory.getComp("TauJetRNNEvaluator")
942 RNNConf = flags.Tau.TauEleRNNConfig
943 myTauEleRNNEvaluator = TauJetRNNEvaluator(name = _name,
944 useTRT = flags.Detector.EnableTRT,
945 NetworkFile1P = RNNConf[0],
946 NetworkFile3P = RNNConf[1],
947 OutputVarname = "RNNEleScore",
948 MaxTracks = 10,
949 MaxClusters = 6,
950 MaxClusterDR = 1.0,
951 ApplyLooseTrackSel = applyLooseTrackSel,
952 VertexCorrection = flags.Tau.doVertexCorrection,
953 InputLayerScalar = "scalar",
954 InputLayerTracks = "tracks",
955 InputLayerClusters = "clusters",
956 OutputLayer = "rnneveto_output",
957 OutputNode = "sig_prob")
958
959 result.setPrivateTools(myTauEleRNNEvaluator)
960 return result
961
963
964 result = ComponentAccumulator()
965
966 WPConf = flags.Tau.TauEleRNNWPConfig
967
968 from AthenaConfiguration.Enums import ProductionStep
969 # set the instance to run at derivation level
970 if flags.Common.ProductionStep is ProductionStep.Derivation:
971 _name = flags.Tau.ActiveConfig.prefix + 'TauWPDecoratorEleRNNFix_v1'
972 NewScoreName = "RNNEleScoreSigTrans_v1"
973 CutEnumVals = []
974 SigEff1P = []
975 SigEff3P = []
976 DecorWPNames = [ "EleRNNLoose_v1", "EleRNNMedium_v1", "EleRNNTight_v1" ]
977 DecorWPCutEffs1P = [0.95, 0.90, 0.85]
978 DecorWPCutEffs3P = [0.98, 0.95, 0.90]
979 else:
980 #this is the instance running in reconstruction level
981 import PyUtils.RootUtils as ru
982 ROOT = ru.import_root()
983 import cppyy
984 cppyy.load_library('libxAODTau_cDict')
985
986 _name = flags.Tau.ActiveConfig.prefix + 'TauWPDecoratorEleRNN'
987 NewScoreName = "RNNEleScoreSigTrans"
988 SigEff1P = [0.95, 0.90, 0.85]
989 SigEff3P = [0.98, 0.95, 0.90]
990 CutEnumVals = [ ROOT.xAOD.TauJetParameters.IsTauFlag.EleRNNLoose,
991 ROOT.xAOD.TauJetParameters.IsTauFlag.EleRNNMedium,
992 ROOT.xAOD.TauJetParameters.IsTauFlag.EleRNNTight ]
993 DecorWPNames = []
994 DecorWPCutEffs1P = []
995 DecorWPCutEffs3P = []
996
997 TauWPDecorator = CompFactory.getComp("TauWPDecorator")
998 myTauEleWPDecorator = TauWPDecorator( name=_name,
999 flatteningFile1Prong = WPConf[0],
1000 flatteningFile3Prong = WPConf[1],
1001 CutEnumVals = CutEnumVals,
1002 DecorWPNames = DecorWPNames,
1003 SigEff1P = SigEff1P,
1004 SigEff3P = SigEff3P,
1005 DecorWPCutEffs1P = DecorWPCutEffs1P,
1006 DecorWPCutEffs3P = DecorWPCutEffs3P,
1007 UseAbsEta = True ,
1008 ScoreName = "RNNEleScore",
1009 NewScoreName = NewScoreName,
1010 DefineWPs = True)
1011
1012 result.setPrivateTools(myTauEleWPDecorator)
1013 return result
1014
1016 result = ComponentAccumulator()
1017 _name = flags.Tau.ActiveConfig.prefix + 'TauDecayModeNNClassifier'
1018
1019 TauDecayModeNNClassifier = CompFactory.getComp("TauDecayModeNNClassifier")
1020 myTauDecayModeNNClassifier = TauDecayModeNNClassifier(name=_name,
1021 WeightFile=flags.Tau.DecayModeNNClassifierConfig)
1022
1023 result.setPrivateTools(myTauDecayModeNNClassifier)
1024 return result
1025
1027 result = ComponentAccumulator()
1028 _name = flags.Tau.ActiveConfig.prefix + 'TauAODSelector'
1029
1030 TauAODSelector = CompFactory.getComp("TauAODSelector")
1031 myTauAODSelector = TauAODSelector(name=_name,
1032 Min0pTauPt = flags.Tau.MinPt0p,
1033 MinTauPt = flags.Tau.MinPt,
1034 doEarlyStopping = flags.Tau.doEarlyStopping and not flags.Output.doWriteESD)
1035
1036 result.setPrivateTools(myTauAODSelector)
1037 return result
1038
1039
1041def TauCombinedTESCfg(flags, **kwargs):
1042 result = ComponentAccumulator()
1043 _name = flags.Tau.ActiveConfig.prefix + 'TauCombinedTES'
1044 kwargs.setdefault("WeightFileName", flags.Tau.CombinedTESConfig)
1045
1046 TauCombinedTES = CompFactory.getComp("TauCombinedTES")
1047 myTauCombinedTES = TauCombinedTES(name = _name, **kwargs)
1048
1049 result.setPrivateTools(myTauCombinedTES)
1050 return result
1051
1052
1055 result = ComponentAccumulator()
1056 _name = flags.Tau.ActiveConfig.prefix + 'MuonRemoval'
1057 TauAODMuonRemovalTool = CompFactory.getComp("TauAODMuonRemovalTool")
1058 myMuonRemoval = TauAODMuonRemovalTool( name = _name,
1059 Key_MuonInputContainer = 'Muons',
1060 doMuonTrkRm = True,
1061 doMuonClsRm = True,
1062 muonIDWP = 'Medium'
1063 )
1064 result.setPrivateTools(myMuonRemoval)
1065 return result
1066
1067# electron excluder tool
1069 result = ComponentAccumulator()
1070 _name = flags.Tau.ActiveConfig.prefix + 'TauEleOverlapChecker'
1071 TauEleOverlapChecker = CompFactory.getComp("TauEleOverlapChecker")
1072 myTauEleOverlapChecker = TauEleOverlapChecker(
1073 name = _name,
1074 Key_RemovedClustersContainer = flags.Tau.ActiveConfig.RemovedElectronClusters,
1075 Key_RemovedTracksContainer = flags.Tau.ActiveConfig.RemovedElectronTracks,
1076 CheckingCone = flags.Tau.ActiveConfig.EleRM_CheckingConeSize,
1077 )
1078 result.setPrivateTools(myTauEleOverlapChecker)
1079 return result
Cluster correction tool which applies local hadronic calibration w eights to the cells.
Calculate moments for CaloCluster objects.
classify clusters according to their probability to stem from an em object
dead material correction tool for local hadronic calibration
calculates out-of-cluster corrections based on cluster quantities
calculates hadronic cell weights based on cluster and cell quantities
topological cluster maker.
topological cluster splitter.
Class to build tau jet seed.
the tool meant to run at AOD level, to remove the muon found inside the TauJet.
Set Tau "Detector Axis" and "Intermediate Axis".
Implementation of tau energy scale (TES) with eta and pile-up correction.
Calculate tau calorimeter variables from cell information.
Associate the clusters used in the seed jet to the tau candidate.
Calculate variables which rely on tracks and precalculated cell/cluster information.
Tau decay mode classifier using a neural network.
Select only the tau within the removal direction.
Calculate variables sensitive on electrons.
Tool to calculate tau identification score from .onnx inputs.
This class implements a tool to calculate ID input variables and add them to the tau aux store.
Tool to calculate a tau identification score based on neural networks.
Creates Pi0 clusters (Pi0 Finder).
scale cluster energy to take care of charged pion energy
Find the cells used to create pi0 cluster.
Selectes pi0Candidates (Pi0 Finder).
Apply Et and BDT score cut to pi0s.
Calculate variables from the tau substructure.
Associate tracks to the tau candidate.
Associate a vertex (origin) to the tau candidate.
Class for calculating vertex variables.
Decorate CaloVertexedTopoCluster to the tau candidate.
Implementation of tool to decorate flattened BDT score and working points.
Evaluates the TausRUs network and decorates its predictions on the tau and on its tracks.
TauCaloTopoClusterSplitterCfg(flags)
TauCaloTopoClusterMakerCfg(flags)
TauSubstructureCfg(flags)
Tau Variables.
Pi0ScoreCalculatorCfg(flags)
calculate MVA scores of pi0 clusters
Pi0SelectorCfg(flags)
select pi0 clusters
TausRUsEvaluatorCfg(flags, name="", tauContainerName="", tauTrackContainerName="")
TauGNNeVetoWPDecoratorCfg(flags, tauContainerName="")
TauDecayModeNNClassifierCfg(flags)
TauEleRNNEvaluatorCfg(flags, applyLooseTrackSel=False)
TauCaloOOCCalibCfg(flags)
TauTrackFinderCfg(flags)
Tau-Track Association.
TauGNNDisplacedEvaluatorCfg(flags, tauContainerName="")
TauEleOverlapChecker(flags)
TauCaloLCDeadMaterialCfg(flags)
TauVertexFinderCfg(flags)
TauCommonCalcVarsCfg(flags)
Tau Variables.
JetSeedBuilderCfg(flags)
JetSeedBuilder.
TauCaloOOCPi0CalibCfg(flags)
TauCaloDMCalibCfg(flags)
TauCaloClusterLocalCalibCfg(flags)
TauClusterFinderCfg(flags)
Associate the cluster in jet constituents to the tau candidate.
CellVariablesCfg(flags)
Tau cell variables calculation.
MvaTESVariableDecoratorCfg(flags)
MvaTESVariableDecorator.
TauWPDecoratorGNNCfg(flags, version, tauContainerName="")
TauShotFinderCfg(flags)
Photon Shot Finder.
ElectronVetoVarsCfg(flags)
ele veto variables
TauCaloLCWeightCfg(flags)
TauVertexedClusterDecoratorCfg(flags)
TauAODMuonRemovalCfg(flags)
muon removal tool
TauWPDecoratorEleRNNCfg(flags)
TauCaloLCOutOfClusterCfg(flags)
TauVertexVariablesCfg(flags)
Tau Vertex Variables.
Pi0ClusterFinderCfg(flags)
Pi0 algo Cluster finder for Pi0 algo.
TauCombinedTESCfg(flags, **kwargs)
TauCombinedTES.
Pi0ClusterScalerCfg(flags)
Set energy of cluster to take care of charged pion energy deposited in the ECAL.
TauCaloLCOutPi0Cfg(flags)
TauTrackRNNCfg(flags)
getParticleCache(flags)
TauWPDecoratorJetRNNCfg(flags)
Pi0ClusterCreatorCfg(flags)
create Pi0 clusters
TauCaloClusterBadChannelCfg(flags)
TauTrackRNNClassifierCfg(flags)
TauIDVarCalculatorCfg(flags)
TauAxisCfg(flags)
Tau energy calibration and tau axis direction.
MvaTESEvaluatorCfg(flags)
MvaTESEvaluator.
TauJetRNNEvaluatorCfg(flags, applyLooseTrackSel=False)
TauCaloClusterMomentsMakerCfg(flags)
TauGNNEvaluatorCfg(flags, version=0, applyLooseTrackSel=False, applyTightTrackSel=False, tauContainerName="")
TauGNNeVetoEvaluatorCfg(flags, applyLooseTrackSel=False, applyTightTrackSel=False, tauContainerName="")
TauAODSelectorCfg(flags)
TauCellFinalizerCfg(flags)
Cell finalizer tool for BuildAlg.
EnergyCalibrationLCCfg(flags, force_zero_mass=False)
Tau energy calibration.
TauCaloLCClassificationCfg(flags)
Calo Tools.