ATLAS Offline Software
DiTauBuilderConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from DiTauRec.DiTauToolsConfig import SeedJetBuilderCfg, SubjetBuilderCfg, JetAlgCfg, VertexFinderCfg, DiTauTrackFinderCfg, CellFinderCfg, ClusterFinderCfg, IDVarCalculatorCfg
5 
6 def DiTauBuilderCfg(flags, name="DiTauBuilder", **kwargs):
8 
9  tools = [
10  acc.popToolsAndMerge(SeedJetBuilderCfg(flags, JetCollection=flags.DiTau.SeedJetCollection[0])),
11  acc.popToolsAndMerge(SubjetBuilderCfg(flags))
12  ]
13 
14  if flags.Tracking.doVertexFinding: # Simplified wrt old config
15  acc.merge(JetAlgCfg(flags)) # To run TVA tool for VertexFinder
16  tools.append(acc.popToolsAndMerge(VertexFinderCfg(flags)))
17 
18  tools.append(acc.popToolsAndMerge(DiTauTrackFinderCfg(flags)))
19  tools.append(acc.popToolsAndMerge(CellFinderCfg(flags)))
20  tools.append(acc.popToolsAndMerge(IDVarCalculatorCfg(flags)))
21 
22  kwargs.setdefault("DiTauContainer", flags.DiTau.DiTauContainer[0])
23  kwargs.setdefault("Tools", tools)
24  kwargs.setdefault("SeedJetName", flags.DiTau.SeedJetCollection[0])
25  kwargs.setdefault("minPt", flags.DiTau.JetSeedPt[0])
26  kwargs.setdefault("maxEta", flags.DiTau.MaxEta)
27  kwargs.setdefault("Rjet", flags.DiTau.Rjet)
28  kwargs.setdefault("Rsubjet", flags.DiTau.Rsubjet)
29  kwargs.setdefault("Rcore", flags.DiTau.Rcore)
30 
31  acc.addEventAlgo(CompFactory.DiTauBuilder(name, **kwargs))
32  return acc
33 
34 
35 def DiTauBuilderLowPtCfg(flags, name="DiTauLowPtBuilder", **kwargs):
36 
37  acc = ComponentAccumulator()
38 
39  tools = [
40  acc.popToolsAndMerge(SeedJetBuilderCfg(flags, JetCollection=flags.DiTau.SeedJetCollection[0])),
41  acc.popToolsAndMerge(SubjetBuilderCfg(flags))
42  ]
43 
44  if flags.Tracking.doVertexFinding: # Simplified wrt old config
45  acc.merge(JetAlgCfg(flags)) # To run TVA tool for VertexFinder
46  tools.append(acc.popToolsAndMerge(VertexFinderCfg(flags)))
47 
48  tools.append(acc.popToolsAndMerge(DiTauTrackFinderCfg(flags)))
49  # No CellFinder as run in derivation
50  tools.append(acc.popToolsAndMerge(ClusterFinderCfg(flags)))
51  tools.append(acc.popToolsAndMerge(IDVarCalculatorCfg(flags)))
52 
53  kwargs.setdefault("DiTauContainer", flags.DiTau.DiTauContainer[1])
54  kwargs.setdefault("Tools", tools)
55  kwargs.setdefault("SeedJetName", flags.DiTau.SeedJetCollection[0])
56  kwargs.setdefault("minPt", flags.DiTau.JetSeedPt[1])
57 
58  acc.merge(DiTauBuilderCfg(flags, name, **kwargs))
59  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
DiTauToolsConfig.IDVarCalculatorCfg
def IDVarCalculatorCfg(flags, name="DiTauRec_IDVarCalculator", **kwargs)
Definition: DiTauToolsConfig.py:100
DiTauBuilderConfig.DiTauBuilderLowPtCfg
def DiTauBuilderLowPtCfg(flags, name="DiTauLowPtBuilder", **kwargs)
Definition: DiTauBuilderConfig.py:35
DiTauToolsConfig.DiTauTrackFinderCfg
def DiTauTrackFinderCfg(flags, name="DiTauRec_DiTauTrackFinder", **kwargs)
Definition: DiTauToolsConfig.py:58
DiTauToolsConfig.ClusterFinderCfg
def ClusterFinderCfg(flags, name="DiTauRec_ClusterFinder", **kwargs)
Definition: DiTauToolsConfig.py:76
DiTauToolsConfig.SeedJetBuilderCfg
def SeedJetBuilderCfg(flags, name="DiTauRec_SeedJetBuilder", **kwargs)
Definition: DiTauToolsConfig.py:6
DiTauToolsConfig.CellFinderCfg
def CellFinderCfg(flags, name="DiTauRec_CellFinder", **kwargs)
Definition: DiTauToolsConfig.py:87
DiTauToolsConfig.JetAlgCfg
def JetAlgCfg(flags, name="DiTauRec_JetAlgorithm", **kwargs)
Definition: DiTauToolsConfig.py:36
DiTauToolsConfig.SubjetBuilderCfg
def SubjetBuilderCfg(flags, name="DiTauRec_SubjetBuilder", **kwargs)
Definition: DiTauToolsConfig.py:13
DiTauToolsConfig.VertexFinderCfg
def VertexFinderCfg(flags, name="DiTauRec_VertexFinder", **kwargs)
Definition: DiTauToolsConfig.py:47
DiTauBuilderConfig.DiTauBuilderCfg
def DiTauBuilderCfg(flags, name="DiTauBuilder", **kwargs)
Definition: DiTauBuilderConfig.py:6