ATLAS Offline Software
TauDQATools.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 
7 
8 def TauDQAPrimitiveTauSelectionToolCfg(flags, **kwargs):
10 
11  kwargs.setdefault("ConfigPath", "")
12  from ROOT import TauAnalysisTools
13  selectioncuts = TauAnalysisTools.SelectionCuts
14  kwargs.setdefault("SelectionCuts", int(selectioncuts.CutAbsEta | selectioncuts.CutAbsCharge | selectioncuts.CutNTrack))
15  kwargs.setdefault("PtMin", 0.0)
16  kwargs.setdefault("JetIDWP", TauAnalysisTools.JETIDNONE)
17  kwargs.setdefault("NTracks", (0, 1, 2, 3, 4, 5))
18  kwargs.setdefault("AbsCharges", (0, 1, 2, 3))
19  kwargs.setdefault("AbsEtaRegion", (0.0, 10.0))
20  from TauAnalysisTools.TauAnalysisToolsConfig import TauSelectionToolCfg
21  primaryseltool = acc.popToolsAndMerge(TauSelectionToolCfg(flags, "PrimativeTauSelectionTool", **kwargs))
22 
23  return primaryseltool
24 
25 def TauDQANominalTauSelectionToolCfg(flags, **kwargs):
26  acc = ComponentAccumulator()
27 
28  kwargs.setdefault("ConfigPath", "")
29  from ROOT import TauAnalysisTools
30  selectioncuts = TauAnalysisTools.SelectionCuts
31  kwargs.setdefault("SelectionCuts", int(selectioncuts.CutPt | selectioncuts.CutAbsEta | selectioncuts.CutAbsCharge | selectioncuts.CutNTrack))
32  kwargs.setdefault("PtMin", 20.0)
33  kwargs.setdefault("JetIDWP", TauAnalysisTools.JETIDNONE)
34  kwargs.setdefault("NTracks", (0, 1, 2, 3, 4, 5))
35  kwargs.setdefault("AbsCharges", (0, 1, 2, 3))
36  kwargs.setdefault("AbsEtaRegion", (0.0, 1.37, 1.52, flags.Tau.SeedMaxEta))
37  from TauAnalysisTools.TauAnalysisToolsConfig import TauSelectionToolCfg
38  nominalseltool = acc.popToolsAndMerge(TauSelectionToolCfg(flags, "NominalTauSelectionTool", **kwargs))
39 
40  return nominalseltool
41 
42 def TauDQATauTruthMatchingToolCfg(flags, **kwargs):
43  acc = ComponentAccumulator()
44 
45  kwargs.setdefault("TruthElectronContainerName", "TruthElectrons")
46  kwargs.setdefault("TruthMuonContainerName", "MuonTruthParticles")
47  from TauAnalysisTools.TauAnalysisToolsConfig import TauTruthMatchingToolCfg
48  matchingtool = acc.popToolsAndMerge(TauTruthMatchingToolCfg(flags, "TauTruthMatchingTool", **kwargs))
49 
50  return matchingtool
51 
52 
TauDQATools.TauDQATauTruthMatchingToolCfg
def TauDQATauTruthMatchingToolCfg(flags, **kwargs)
Definition: TauDQATools.py:42
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TauAnalysisToolsConfig.TauSelectionToolCfg
def TauSelectionToolCfg(flags, name, **kwargs)
Definition: TauAnalysisToolsConfig.py:6
TauDQATools.TauDQAPrimitiveTauSelectionToolCfg
def TauDQAPrimitiveTauSelectionToolCfg(flags, **kwargs)
Definition: TauDQATools.py:8
TauDQATools.TauDQANominalTauSelectionToolCfg
def TauDQANominalTauSelectionToolCfg(flags, **kwargs)
Definition: TauDQATools.py:25
python.TauTruthCommonConfig.TauTruthMatchingToolCfg
def TauTruthMatchingToolCfg(flags, name="DFCommonTauTruthMatchingTool", **kwargs)
Definition: TauTruthCommonConfig.py:29