11 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from AthenaConfiguration.ComponentFactory
import CompFactory
13 from AthenaConfiguration.AccumulatorCache
import AccumulatorCache
14 from AthenaConfiguration.Enums
import ProductionStep
23 _name = flags.Tau.ActiveConfig.prefix +
'JetSeedBuilder'
25 JetSeedBuilder = CompFactory.getComp(
"JetSeedBuilder")
28 result.setPrivateTools(JetSeedBuilder)
34 _name = flags.Tau.ActiveConfig.prefix +
'TauVertexFinder'
36 from InDetConfig.InDetTrackSelectionToolConfig
import Tau_InDetTrackSelectionToolForTJVACfg
37 from TrackVertexAssociationTool.TrackVertexAssociationToolConfig
import TauTTVAToolCfg
41 TauVertexFinder = CompFactory.getComp(
"TauVertexFinder")
43 UseTJVA = flags.Tau.doTJVA,
44 AssociatedTracks=
"GhostTrack",
46 Key_trackPartInputContainer= flags.Tau.ActiveConfig.TrackCollection,
47 Key_vertexInputContainer = flags.Tau.ActiveConfig.VertexCollection,
49 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
52 result.setPrivateTools(TauVertexFinder)
59 _name = flags.Tau.ActiveConfig.prefix +
'TauAxis'
61 TauAxisSetter = CompFactory.getComp(
"TauAxisSetter")
64 VertexCorrection =
True )
66 result.setPrivateTools(TauAxisSetter)
73 if flags.Common.ProductionStep
is ProductionStep.Reconstruction:
74 ParticleCache =
"ParticleCaloExtension"
84 _name = flags.Tau.ActiveConfig.prefix +
'TauTrackFinder'
87 from BeamSpotConditions.BeamSpotConditionsConfig
import BeamSpotCondAlgCfg
90 from TrackToVertex.TrackToVertexConfig
import TrackToVertexCfg
91 from TrackToCalo.TrackToCaloConfig
import ParticleCaloExtensionToolCfg
92 from TrkConfig.TrkVertexFitterUtilsConfig
import AtlasTrackToVertexIPEstimatorCfg
93 from InDetConfig.InDetTrackSelectorToolConfig
import TauRecInDetTrackSelectorToolCfg
95 TauTrackFinder = CompFactory.getComp(
"TauTrackFinder")
103 removeDuplicateCoreTracks = flags.Tau.RemoveDupeCoreTracks,
104 useGhostTracks = flags.Tau.useGhostTracks,
105 ghostTrackDR = flags.Tau.ghostTrackDR,
106 Key_jetContainer = (flags.Tau.ActiveConfig.SeedJetCollection
if flags.Tau.useGhostTracks
else ""),
107 Key_trackPartInputContainer = flags.Tau.ActiveConfig.TrackCollection,
108 Key_LargeD0TrackInputContainer = (flags.Tau.ActiveConfig.LargeD0TrackCollection
if flags.Tau.associateLRT
else ""),
110 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
114 result.setPrivateTools(TauTrackFinder)
121 _name = flags.Tau.ActiveConfig.prefix +
'TauClusterFinder'
124 TauClusterFinder = CompFactory.getComp(
"TauClusterFinder")
127 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
131 result.setPrivateTools(TauClusterFinder)
137 _name = flags.Tau.ActiveConfig.prefix +
'TauVertexedClusterDecorator'
139 TauVertexedClusterDecorator = CompFactory.getComp(
"TauVertexedClusterDecorator")
141 SeedJet = flags.Tau.ActiveConfig.SeedJetCollection)
143 result.setPrivateTools(myTauVertexedClusterDecorator)
149 _name = flags.Tau.ActiveConfig.prefix +
'TauTrackRNNClassifier'
151 TrackRNN = CompFactory.tauRecTools.TrackRNN
152 _RNN = TrackRNN(name = _name +
"_TrackRNN",
153 InputWeightsPath = flags.Tau.tauRNNTrackClassConfig,
154 calibFolder = flags.Tau.tauRecToolsCVMFSPath )
156 result.setPrivateTools(_RNN)
162 _name = flags.Tau.ActiveConfig.prefix +
'TauTrackRNNClassifier'
165 TauTrackRNNClassifier = CompFactory.tauRecTools.TauTrackRNNClassifier
168 cppyy.load_library(
'libxAODTau_cDict')
171 if flags.Tau.associateLRT
and not flags.Tau.classifyLRT:
174 myTauTrackClassifier = TauTrackRNNClassifier( name = _name,
176 classifyLRT = _classifyLRT )
178 result.setPrivateTools(myTauTrackClassifier)
185 _name = flags.Tau.ActiveConfig.prefix +
'EnergyCalibrationLC'
187 TauCalibrateLC = CompFactory.getComp(
"TauCalibrateLC")
189 calibrationFile = flags.Tau.CalibrateLCConfig,
190 Key_vertexInputContainer = flags.Tau.ActiveConfig.VertexCollection)
192 result.setPrivateTools(TauCalibrateLC)
199 _name = flags.Tau.ActiveConfig.prefix +
'CellVariables'
201 TauCellVariables = CompFactory.getComp(
"TauCellVariables")
203 VertexCorrection =
True)
205 result.setPrivateTools(TauCellVariables)
212 _name = flags.Tau.ActiveConfig.prefix +
'TauElectronVetoVars'
214 from TrackToCalo.TrackToCaloConfig
import ParticleCaloExtensionToolCfg
216 TauElectronVetoVariables = CompFactory.getComp(
"TauElectronVetoVariables")
218 VertexCorrection =
True,
222 result.setPrivateTools(TauElectronVetoVariables)
231 H1WeightToolCSC12Generic = CompFactory.H1WeightToolCSC12Generic
232 isMC = flags.Input.isMC
237 onlyCellWeight =
False
238 from CaloClusterCorrection.StandardCellWeightCalib
import H1Calibration, editParm
239 (key,folder,tag) = H1Calibration.getCalibDBParams(flags, finder, mainparam, inputn, onlyCellWeight, isMC)
241 from IOVDbSvc.IOVDbSvcConfig
import addFolders
246 if (folder,tag)
not in H1Calibration.loaded_folder:
247 if H1Calibration.overrideFolder():
248 result.merge(
addFolders(flags, folder+
'<tag>'+tag+
'</tag>', detDb=dbString, className=
'CaloRec::ToolConstants') )
250 result.merge(
addFolders(flags, folder, detDb=dbString, className=
'CaloRec::ToolConstants') )
252 H1Calibration.loaded_folder.append( (folder,tag) )
255 toolName = finder +
editParm(mainparam) + inputn
257 cellcalibtool.DBHandleKey = key
258 result.setPrivateTools(cellcalibtool)
266 _name = flags.Tau.ActiveConfig.prefix +
'TauShotFinder'
268 shotPtCut_1Photon = flags.Tau.shotPtCut_1Photon
269 shotPtCut_2Photons = flags.Tau.shotPtCut_2Photons
272 from CaloClusterCorrection.StandardCellWeightCalib
import getCellWeightTool
276 TauShotFinder = CompFactory.getComp(
"TauShotFinder")
279 CaloWeightTool = result.popToolsAndMerge(CaloWeightTool),
281 MinPtCut = shotPtCut_1Photon,
282 AutoDoubleShotCut = shotPtCut_2Photons,
283 Key_RemovedClusterInputContainer = flags.Tau.ActiveConfig.RemovedElectronClusters,
284 RemoveElectronCells = flags.Tau.ActiveConfig.RemoveElectronCells,
285 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
288 result.setPrivateTools(TauShotFinder)
296 _name = flags.Tau.ActiveConfig.prefix +
'Pi0ClusterFinder'
298 TauPi0CreateROI = CompFactory.getComp(
"TauPi0CreateROI")
302 Key_caloCellInputContainer =
"AllCalo",
303 Key_RemovedClusterInputContainer = flags.Tau.ActiveConfig.RemovedElectronClusters,
304 inEleRM = flags.Tau.ActiveConfig.inTauEleRM,
305 RemoveElectronCells = flags.Tau.ActiveConfig.RemoveElectronCells,
308 result.setPrivateTools(myTauPi0CreateROI)
315 _name = flags.Tau.ActiveConfig.prefix +
'tauPi0CellContainerFinalizer'
317 CaloCellContainerFinalizerTool = CompFactory.getComp(
"CaloCellContainerFinalizerTool")
320 result.setPrivateTools(TauCellContainerFinalizer)
329 _name = flags.Tau.ActiveConfig.prefix +
'LCClassify'
331 CaloLCClassificationTool = CompFactory.getComp(
"CaloLCClassificationTool")
333 LCClassify.ClassificationKey =
"EMFracClassify"
334 LCClassify.UseSpread =
False
335 LCClassify.MaxProbability = 0.5
337 LCClassify.StoreClassificationProbabilityInAOD =
True
338 LCClassify.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
339 LCClassify.UseNormalizedEnergyDensity =
True
341 result.setPrivateTools(LCClassify)
346 _name = flags.Tau.ActiveConfig.prefix +
'CaloLCWeightTool'
349 from CaloTools.CaloNoiseCondAlgConfig
import CaloNoiseCondAlgCfg
354 CaloLCWeightTool = CompFactory.getComp(
"CaloLCWeightTool")
356 LCWeight.CorrectionKey =
"H1ClusterCellWeights"
357 LCWeight.SignalOverNoiseCut = 2.0
358 LCWeight.UseHadProbability =
True
360 result.setPrivateTools(LCWeight)
365 _name = flags.Tau.ActiveConfig.prefix +
'CaloLCOutOfClusterTool'
367 CaloLCOutOfClusterTool = CompFactory.getComp(
"CaloLCOutOfClusterTool")
369 LCOut.CorrectionKey =
"OOCCorrection"
370 LCOut.UseEmProbability =
False
371 LCOut.UseHadProbability =
True
373 result.setPrivateTools(LCOut)
378 _name = flags.Tau.ActiveConfig.prefix +
'LCOutPi0'
380 CaloLCOutOfClusterTool = CompFactory.getComp(
"CaloLCOutOfClusterTool")
382 LCOutPi0.CorrectionKey =
"OOCPi0Correction"
383 LCOutPi0.UseEmProbability =
True
384 LCOutPi0.UseHadProbability =
False
386 result.setPrivateTools(LCOutPi0)
391 _name = flags.Tau.ActiveConfig.prefix +
'CaloLCDeadMaterialTool'
393 CaloLCDeadMaterialTool = CompFactory.getComp(
"CaloLCDeadMaterialTool")
395 LCDeadMaterial.HadDMCoeffKey =
"HadDMCoeff2"
396 LCDeadMaterial.ClusterRecoStatus = 0
397 LCDeadMaterial.WeightModeDM = 2
398 LCDeadMaterial.UseHadProbability =
True
399 LCDeadMaterial.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
401 result.setPrivateTools(LCDeadMaterial)
406 _name = flags.Tau.ActiveConfig.prefix +
'CaloLocalCalib'
408 CaloClusterLocalCalib = CompFactory.getComp(
"CaloClusterLocalCalib")
411 LocalCalib.ClusterRecoStatus = [1,2]
413 LocalCalib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
415 result.setPrivateTools(LocalCalib)
420 _name = flags.Tau.ActiveConfig.prefix +
'OOCCalibTool'
422 CaloClusterLocalCalib = CompFactory.getComp(
"CaloClusterLocalCalib")
423 OOCCalib = CaloClusterLocalCalib (_name)
424 OOCCalib.ClusterRecoStatus = [1,2]
426 OOCCalib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
428 result.setPrivateTools(OOCCalib)
433 _name = flags.Tau.ActiveConfig.prefix +
'DMCalib'
435 CaloClusterLocalCalib = CompFactory.getComp(
"CaloClusterLocalCalib")
437 DMCalib.ClusterRecoStatus = [1,2]
439 DMCalib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
441 result.setPrivateTools(DMCalib)
446 _name = flags.Tau.ActiveConfig.prefix +
'OOCPi0CalibTool'
448 CaloClusterLocalCalib = CompFactory.getComp(
"CaloClusterLocalCalib")
449 OOCPi0Calib = CaloClusterLocalCalib (_name)
450 OOCPi0Calib.ClusterRecoStatus = [1,2]
452 OOCPi0Calib.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
454 result.setPrivateTools(OOCPi0Calib)
459 _name = flags.Tau.ActiveConfig.prefix +
'CellWeights'
461 CaloClusterCellWeightCalib = CompFactory.getComp(
"CaloClusterCellWeightCalib")
463 CellWeights.CellSignalWeightTool = result.popToolsAndMerge(
CellWeightToolCfg(flags))
464 CellWeights.Direction =
"AbsSignal"
465 CellWeights.BelowThresholdLikeAll =
True
466 CellWeights.BelowThresholdDirection =
"AbsSignal"
467 CellWeights.EnergyThreshold = 0.0*MeV
468 CellWeights.IgnoreGeoWeights =
False
470 result.setPrivateTools(CellWeights)
475 _name = flags.Tau.ActiveConfig.prefix +
'Pi0TopoClusterMaker'
478 from CaloTools.CaloNoiseCondAlgConfig
import CaloNoiseCondAlgCfg
483 CaloTopoClusterMaker = CompFactory.getComp(
"CaloTopoClusterMaker")
486 TopoClusterForTaus.CellsName = flags.Tau.ActiveConfig.TauCommonPi0Cells
487 TopoClusterForTaus.CalorimeterNames=[
"LAREM"]
488 TopoClusterForTaus.SeedSamplingNames = [
"PreSamplerB",
"EMB1",
"EMB2",
"PreSamplerE",
"EME1",
"EME2"]
489 TopoClusterForTaus.NeighborOption =
"super3D"
490 TopoClusterForTaus.RestrictHECIWandFCalNeighbors =
False
491 TopoClusterForTaus.RestrictPSNeighbors =
True
492 TopoClusterForTaus.CellThresholdOnEorAbsEinSigma = 0.0
493 TopoClusterForTaus.NeighborThresholdOnEorAbsEinSigma = 2.0
494 TopoClusterForTaus.SeedThresholdOnEorAbsEinSigma = 4.0
495 TopoClusterForTaus.SeedCutsInAbsE =
True
496 TopoClusterForTaus.ClusterCutsInAbsEt =
True
497 TopoClusterForTaus.ClusterEtorAbsEtCut = 0.5*GeV
498 TopoClusterForTaus.TwoGaussianNoise = flags.Calo.TopoCluster.doTwoGaussianNoise
500 TopoClusterForTaus.SeedCutsInT = flags.Calo.TopoCluster.doTimeCut
501 TopoClusterForTaus.CutOOTseed = flags.Calo.TopoCluster.extendTimeCut
and flags.Calo.TopoCluster.doTimeCut
502 TopoClusterForTaus.UseTimeCutUpperLimit = flags.Calo.TopoCluster.useUpperLimitForTimeCut
503 TopoClusterForTaus.TimeCutUpperLimit = flags.Calo.TopoCluster.timeCutUpperLimit
504 TopoClusterForTaus.XTalkEM2 = flags.Calo.TopoCluster.xtalkEM2
505 TopoClusterForTaus.XTalkEM2D = flags.Calo.TopoCluster.xtalkEM2D
506 TopoClusterForTaus.XTalkEM2n = flags.Calo.TopoCluster.xtalkEM2n
507 TopoClusterForTaus.XTalkEM3 = flags.Calo.TopoCluster.xtalkEM3
508 TopoClusterForTaus.XTalkEMEta = flags.Calo.TopoCluster.xtalkEMEta
509 TopoClusterForTaus.XTalkDeltaT = flags.Calo.TopoCluster.xtalkDeltaT
510 TopoClusterForTaus.XTalk2Eratio1 = flags.Calo.TopoCluster.xtalk2Eratio1
511 TopoClusterForTaus.XTalk2Eratio2 = flags.Calo.TopoCluster.xtalk2Eratio2
512 TopoClusterForTaus.XTalk3Eratio = flags.Calo.TopoCluster.xtalk3Eratio
513 TopoClusterForTaus.XTalkEtaEratio = flags.Calo.TopoCluster.xtalkEtaEratio
514 TopoClusterForTaus.XTalk2DEratio = flags.Calo.TopoCluster.xtalk2DEratio
516 result.setPrivateTools(TopoClusterForTaus)
522 _name = flags.Tau.ActiveConfig.prefix +
'Pi0TopoClusterSplitter'
524 CaloTopoClusterSplitter = CompFactory.getComp(
"CaloTopoClusterSplitter")
531 TopoSplitterForTaus.SamplingNames = [
"EMB2",
"EME2"]
535 TopoSplitterForTaus.SecondarySamplingNames = [
"EMB1",
"EME1"]
536 TopoSplitterForTaus.ShareBorderCells =
True
537 TopoSplitterForTaus.RestrictHECIWandFCalNeighbors =
False
538 TopoSplitterForTaus.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
540 result.setPrivateTools(TopoSplitterForTaus)
545 _name = flags.Tau.ActiveConfig.prefix +
'Pi0TopoMoments'
548 from CaloTools.CaloNoiseCondAlgConfig
import CaloNoiseCondAlgCfg
553 CaloClusterMomentsMaker = CompFactory.getComp(
"CaloClusterMomentsMaker")
555 TopoMomentsForTaus.WeightingOfNegClusters = flags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
556 TopoMomentsForTaus.MaxAxisAngle = 20*deg
557 TopoMomentsForTaus.TwoGaussianNoise = flags.Calo.TopoCluster.doTwoGaussianNoise
558 TopoMomentsForTaus.MinBadLArQuality = 4000
559 TopoMomentsForTaus.MomentsNames = [
"FIRST_PHI"
580 result.setPrivateTools(TopoMomentsForTaus)
585 _name = flags.Tau.ActiveConfig.prefix +
'CaloClusterBadChannelList'
587 CaloClusterBadChannelListCorr = CompFactory.getComp(
"CaloClusterBadChannelList")
590 result.setPrivateTools(BadChannelListCorrForTaus)
597 _name = flags.Tau.ActiveConfig.prefix +
'Pi0ClusterCreator'
599 TauPi0ClusterCreator = CompFactory.getComp(
"TauPi0ClusterCreator")
602 result.setPrivateTools(TauPi0ClusterCreator)
609 _name = flags.Tau.ActiveConfig.prefix +
'Pi0ClusterScaler'
611 TauPi0ClusterScaler = CompFactory.getComp(
"TauPi0ClusterScaler")
614 result.setPrivateTools(TauPi0ClusterScaler)
621 _name = flags.Tau.ActiveConfig.prefix +
'Pi0ScoreCalculator'
623 TauPi0ScoreCalculator = CompFactory.getComp(
"TauPi0ScoreCalculator")
625 BDTWeightFile = flags.Tau.Pi0ScoreConfig)
627 result.setPrivateTools(TauPi0ScoreCalculator)
634 _name = flags.Tau.ActiveConfig.prefix +
'Pi0Selector'
636 TauPi0Selector = CompFactory.getComp(
"TauPi0Selector")
638 ClusterEtCut = flags.Tau.pi0EtCuts,
639 ClusterBDTCut_1prong = flags.Tau.pi0MVACuts_1prong,
640 ClusterBDTCut_mprong = flags.Tau.pi0MVACuts_mprong)
642 result.setPrivateTools(TauPi0Selector)
649 _name = flags.Tau.ActiveConfig.prefix +
'TauVertexVariables'
651 from TrkConfig.TrkVertexFittersConfig
import TauAdaptiveVertexFitterCfg
652 from TrkConfig.TrkVertexSeedFinderToolsConfig
import (
653 CrossDistancesSeedFinderCfg)
655 TauVertexVariables = CompFactory.getComp(
"TauVertexVariables")
660 result.setPrivateTools(TauVertexVariables)
667 _name = flags.Tau.ActiveConfig.prefix +
'TauCommonCalcVars'
669 TauCommonCalcVars = CompFactory.getComp(
"TauCommonCalcVars")
672 result.setPrivateTools(TauCommonCalcVars)
679 _name = flags.Tau.ActiveConfig.prefix +
'TauSubstructure'
681 TauSubstructureVariables = CompFactory.getComp(
"TauSubstructureVariables")
684 result.setPrivateTools(TauSubstructureVariables)
691 _name = flags.Tau.ActiveConfig.prefix +
'MvaTESVariableDecorator'
693 MvaTESVariableDecorator = CompFactory.getComp(
"MvaTESVariableDecorator")
695 Key_vertexInputContainer = flags.Tau.ActiveConfig.VertexCollection,
696 EventShapeKey = flags.Tau.ActiveConfig.EventShapeCollection,
697 VertexCorrection =
True)
698 result.setPrivateTools(MvaTESVariableDecorator)
705 _name = flags.Tau.ActiveConfig.prefix +
'MvaTESEvaluator'
707 MvaTESEvaluator = CompFactory.getComp(
"MvaTESEvaluator")
709 WeightFileName = flags.Tau.MvaTESConfig,
710 WeightFileName0p = flags.Tau.MvaTESConfig0p )
712 result.setPrivateTools(MvaTESEvaluator)
717 _name = flags.Tau.ActiveConfig.prefix +
'TauIDVarCalculator'
719 TauIDVarCalculator = CompFactory.getComp(
"TauIDVarCalculator")
721 VertexCorrection =
True)
723 result.setPrivateTools(myTauIDVarCalculator)
728 _name = flags.Tau.ActiveConfig.prefix +
'TauJetRNN'
730 TauJetRNNEvaluator = CompFactory.getComp(
"TauJetRNNEvaluator")
731 RNNConf = flags.Tau.TauJetRNNConfig
734 NetworkFile1P = RNNConf[0],
735 NetworkFile2P = RNNConf[1],
736 NetworkFile3P = RNNConf[2],
737 OutputVarname =
"RNNJetScore",
741 VertexCorrection =
True,
742 InputLayerScalar =
"scalar",
743 InputLayerTracks =
"tracks",
744 InputLayerClusters =
"clusters",
745 OutputLayer =
"rnnid_output",
746 OutputNode =
"sig_prob")
748 result.setPrivateTools(myTauJetRNNEvaluator)
752 import PyUtils.RootUtils
as ru
753 ROOT = ru.import_root()
755 cppyy.load_library(
'libxAODTau_cDict')
758 _name = flags.Tau.ActiveConfig.prefix +
'TauWPDecoratorJetRNN'
760 TauWPDecorator = CompFactory.getComp(
"TauWPDecorator")
761 WPConf = flags.Tau.TauJetRNNWPConfig
763 flatteningFile1Prong = WPConf[0],
764 flatteningFile2Prong = WPConf[1],
765 flatteningFile3Prong = WPConf[2],
767 [ ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigVeryLoose,
768 ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigLoose,
769 ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigMedium,
770 ROOT.xAOD.TauJetParameters.IsTauFlag.JetRNNSigTight ],
771 SigEff1P = [0.95, 0.85, 0.75, 0.60],
772 SigEff2P = [0.95, 0.75, 0.60, 0.45],
773 SigEff3P = [0.95, 0.75, 0.60, 0.45],
774 ScoreName =
"RNNJetScore",
775 NewScoreName =
"RNNJetScoreSigTrans",
778 result.setPrivateTools(myTauWPDecorator)
783 _name = flags.Tau.ActiveConfig.prefix +
'TauGNN_v' +
str(version)
785 TauGNNEvaluator = CompFactory.getComp(
"TauGNNEvaluator")
786 GNNConf = flags.Tau.TauGNNConfig[version]
788 NetworkFile = GNNConf,
789 OutputVarname = flags.Tau.GNTauScoreName[version],
790 OutputPTau =
"GNTauProbTau",
791 OutputPJet =
"GNTauProbJet",
792 MaxTracks = flags.Tau.GNTauMaxTracks[version],
793 MaxClusters = flags.Tau.GNTauMaxClusters[version],
795 MinTauPt = flags.Tau.MinPtDAOD,
796 VertexCorrection =
True,
797 DecorateTracks =
False,
798 InputLayerScalar =
"tau_vars",
799 InputLayerTracks =
"track_vars",
800 InputLayerClusters =
"cluster_vars",
801 NodeNameTau=flags.Tau.GNTauNodeNameTau,
802 NodeNameJet=flags.Tau.GNTauNodeNameJet)
804 result.setPrivateTools(myTauGNNEvaluator)
809 _name = flags.Tau.ActiveConfig.prefix +
'TauWPDecoratorGNN_v' +
str(version)
811 TauWPDecorator = CompFactory.getComp(
"TauWPDecorator")
812 WPConf = flags.Tau.TauGNNWP[version]
814 flatteningFile1Prong = WPConf[0],
815 flatteningFile2Prong = WPConf[1],
816 flatteningFile3Prong = WPConf[2],
817 DecorWPNames = flags.Tau.GNTauDecorWPNames[version],
818 DecorWPCutEffs1P = [0.95, 0.85, 0.75, 0.60],
819 DecorWPCutEffs2P = [0.95, 0.75, 0.60, 0.45],
820 DecorWPCutEffs3P = [0.95, 0.75, 0.60, 0.45],
821 ScoreName = flags.Tau.GNTauScoreName[version],
822 NewScoreName = flags.Tau.GNTauTransScoreName[version],
824 result.setPrivateTools(myTauWPDecorator)
829 _name = flags.Tau.ActiveConfig.prefix +
'TauEleRNN'
831 TauJetRNNEvaluator = CompFactory.getComp(
"TauJetRNNEvaluator")
832 RNNConf = flags.Tau.TauEleRNNConfig
834 NetworkFile1P = RNNConf[0],
835 NetworkFile3P = RNNConf[1],
836 OutputVarname =
"RNNEleScore",
840 VertexCorrection =
True,
841 InputLayerScalar =
"scalar",
842 InputLayerTracks =
"tracks",
843 InputLayerClusters =
"clusters",
844 OutputLayer =
"rnneveto_output",
845 OutputNode =
"sig_prob")
847 result.setPrivateTools(myTauEleRNNEvaluator)
851 import PyUtils.RootUtils
as ru
852 ROOT = ru.import_root()
854 cppyy.load_library(
'libxAODTau_cDict')
857 _name = flags.Tau.ActiveConfig.prefix +
'TauWPDecoratorEleRNN'
859 TauWPDecorator = CompFactory.getComp(
"TauWPDecorator")
860 WPConf = flags.Tau.TauEleRNNWPConfig
862 flatteningFile1Prong = WPConf[0],
863 flatteningFile3Prong = WPConf[1],
865 [ ROOT.xAOD.TauJetParameters.IsTauFlag.EleRNNLoose,
866 ROOT.xAOD.TauJetParameters.IsTauFlag.EleRNNMedium,
867 ROOT.xAOD.TauJetParameters.IsTauFlag.EleRNNTight ],
868 SigEff1P = [0.95, 0.90, 0.85],
869 SigEff3P = [0.98, 0.95, 0.90],
871 ScoreName =
"RNNEleScore",
872 NewScoreName =
"RNNEleScoreSigTrans",
875 result.setPrivateTools(myTauEleWPDecorator)
880 _name = flags.Tau.ActiveConfig.prefix +
'TauWPDecoratorEleRNNFix_v1'
882 TauWPDecorator = CompFactory.getComp(
"TauWPDecorator")
883 WPConf = flags.Tau.TauEleRNNWPfix
885 flatteningFile1Prong = WPConf[0],
886 flatteningFile3Prong = WPConf[1],
887 DecorWPNames = [
"EleRNNLoose_v1",
"EleRNNMedium_v1",
"EleRNNTight_v1" ],
888 DecorWPCutEffs1P = [0.95, 0.90, 0.85],
889 DecorWPCutEffs3P = [0.98, 0.95, 0.90],
891 ScoreName =
"RNNEleScore",
892 NewScoreName =
"RNNEleScoreSigTrans_v1",
895 result.setPrivateTools(myTauEleWPDecorator)
900 _name = flags.Tau.ActiveConfig.prefix +
'TauDecayModeNNClassifier'
902 TauDecayModeNNClassifier = CompFactory.getComp(
"TauDecayModeNNClassifier")
904 WeightFile=flags.Tau.DecayModeNNClassifierConfig)
906 result.setPrivateTools(myTauDecayModeNNClassifier)
911 _name = flags.Tau.ActiveConfig.prefix +
'TauAODSelector'
913 TauAODSelector = CompFactory.getComp(
"TauAODSelector")
915 Min0pTauPt = flags.Tau.MinPt0p,
916 MinTauPt = flags.Tau.MinPt,
917 doEarlyStopping = flags.Tau.doEarlyStopping
and not flags.Output.doWriteESD)
919 result.setPrivateTools(myTauAODSelector)
926 _name = flags.Tau.ActiveConfig.prefix +
'TauCombinedTES'
928 TauCombinedTES = CompFactory.getComp(
"TauCombinedTES")
930 WeightFileName = flags.Tau.CombinedTESConfig)
932 result.setPrivateTools(myTauCombinedTES)
939 _name = flags.Tau.ActiveConfig.prefix +
'MuonRemoval'
940 TauAODLeptonRemovalTool = CompFactory.getComp(
"TauAODLeptonRemovalTool")
942 Key_MuonInputContainer =
'Muons',
947 result.setPrivateTools(myMuonRemoval)
953 _name = flags.Tau.ActiveConfig.prefix +
'TauEleOverlapChecker'
954 TauEleOverlapChecker = CompFactory.getComp(
"TauEleOverlapChecker")
957 Key_RemovedClustersContainer = flags.Tau.ActiveConfig.RemovedElectronClusters,
958 Key_RemovedTracksContainer = flags.Tau.ActiveConfig.RemovedElectronTracks,
959 CheckingCone = flags.Tau.ActiveConfig.EleRM_CheckingConeSize,
961 result.setPrivateTools(myTauEleOverlapChecker)