ATLAS Offline Software
Functions | Variables
TrigTauRecConfig Namespace Reference

Functions

def trigTauRecMergedPrecisionMVACfg (flags, name='', inputRoIs='', tracks='')
 
def trigTauRecMergedCaloOnlyMVACfg (flags)
 

Variables

 flags
 
 Files
 
 acc
 
 withDetails
 
 True
 
 summariseProps
 

Function Documentation

◆ trigTauRecMergedCaloOnlyMVACfg()

def TrigTauRecConfig.trigTauRecMergedCaloOnlyMVACfg (   flags)

Definition at line 101 of file TrigTauRecConfig.py.

102  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
103 
104  acc = ComponentAccumulator()
105 
106  tools = []
107 
108  from AthenaConfiguration.ComponentFactory import CompFactory
109 
110  # Set seedcalo energy scale (Full RoI)
111  tools.append(CompFactory.JetSeedBuilder())
112 
113  # Set LC energy scale (0.2 cone) and intermediate axis (corrected for vertex: useless at trigger)
114  tools.append(CompFactory.TauAxisSetter(ClusterCone=0.2, VertexCorrection=False))
115 
116  # Decorate the clusters
117  tools.append(CompFactory.TauClusterFinder(UseOriginalCluster=False)) # TODO: use JetRec.doVertexCorrection once available
118  tools.append(CompFactory.TauVertexedClusterDecorator(SeedJet=''))
119 
120  # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies
121  from AthenaCommon.SystemOfUnits import GeV
122  tools.append(CompFactory.TauCellVariables(StripEthreshold=0.2*GeV, CellCone=0.2, VertexCorrection = False))
123 
124  # Compute MVA TES (ATR-17649), stores MVA TES as the default tau pt
125  tools.append(CompFactory.MvaTESVariableDecorator(Key_vertexInputContainer='', EventShapeKey='', VertexCorrection=False))
126  acc.addPublicTool(tools[-1])
127  tools.append(CompFactory.MvaTESEvaluator(WeightFileName=flags.Trigger.Offline.Tau.MvaTESConfig))
128  acc.addPublicTool(tools[-1])
129 
130  for tool in tools:
131  tool.inTrigger = True
132  tool.calibFolder = flags.Trigger.Offline.Tau.tauRecToolsCVMFSPath
133 
134 
135  from TrigEDMConfig.TriggerEDM import recordable
136  from TrigTauRec.TrigTauRecMonitoring import tauMonitoringCaloOnlyMVA
137 
138  alg = CompFactory.TrigTauRecMerged("TrigTauRecMerged_TauCaloOnlyMVA",
139  CommonTools = tools,
140  MonTool = tauMonitoringCaloOnlyMVA(flags),
141  InputRoIs = 'UpdatedCaloRoI',
142  InputCaloClusterContainer = 'HLT_TopoCaloClustersLC',
143  InputVertexContainer = '',
144  InputTauTrackContainer = '',
145  InputTauJetContainer = '',
146  OutputTauTrackContainer = 'HLT_tautrack_dummy',
147  OutputTauJetContainer = 'HLT_TrigTauRecMerged_CaloMVAOnly',
148  OutputJetSeed = recordable('HLT_jet_seed'),
149  )
150 
151  acc.addEventAlgo(alg)
152 
153  return acc
154 
155 
156 

◆ trigTauRecMergedPrecisionMVACfg()

def TrigTauRecConfig.trigTauRecMergedPrecisionMVACfg (   flags,
  name = '',
  inputRoIs = '',
  tracks = '' 
)

Definition at line 3 of file TrigTauRecConfig.py.

3 def trigTauRecMergedPrecisionMVACfg(flags, name='', inputRoIs='', tracks=''):
4  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 
7  from TrigEDMConfig.TriggerEDM import recordable
8  trigTauJetOutputContainer = recordable(f'HLT_TrigTauRecMerged_{name}')
9  trigTauTrackOutputContainer = recordable(f'HLT_tautrack_{name}')
10 
11  # The TauJet reconstruction handled by a set of tools, executed in the following order:
12  vftools = [] # Vertex Finder tools
13  tools_beforetf = [] # Common tools, ran before the Track Finder tools
14  tftools = [] # Track Finder tools
15  tools = [] # Common tools
16  vvtools = [] # Vertex Vars tools
17  idtools = [] # ID tools
18 
19 
20  from TrigTauRec.TrigTauToolsConfig import trigTauVertexFinderCfg, trigTauTrackFinderCfg, tauVertexVariablesCfg
21  from AthenaConfiguration.ComponentFactory import CompFactory
22 
23  # Associate RoI vertex or Beamspot to the tau - don't use TJVA
24  vftools.append(acc.popToolsAndMerge(trigTauVertexFinderCfg(flags, name='TrigTau_TauVertexFinder')))
25 
26  # Set LC energy scale (0.2 cone) and intermediate axis (corrected for vertex: useless at trigger)
27  tools_beforetf.append(CompFactory.TauAxisSetter(name='TrigTau_TauAxis', VertexCorrection=False))
28 
29  # Associate tracks to the tau
30  tftools.append(acc.popToolsAndMerge(trigTauTrackFinderCfg(flags, name='TrigTauTightDZ_TauTrackFinder', TrackParticlesContainer=tracks)))
31 
32  # Decorate the clusters
33  tools.append(CompFactory.TauClusterFinder(name='TrigTau_TauClusterFinder', UseOriginalCluster=False))
34  tools.append(CompFactory.TauVertexedClusterDecorator(name='TrigTau_TauVertexedClusterDecorator', SeedJet=''))
35 
36  # Calculate cell-based quantities: strip variables, EM and Had energies/radii, centFrac, isolFrac and ring energies
37  tools.append(CompFactory.TauCellVariables(name='TrigTau_CellVariables', VertexCorrection=False))
38 
39  # Compute MVA TES (ATR-17649), stores MVA TES as default tau pt
40  tools.append(CompFactory.MvaTESVariableDecorator(name='TrigTau_MvaTESVariableDecorator', Key_vertexInputContainer='', EventShapeKey='', VertexCorrection=False))
41  acc.addPublicTool(tools[-1])
42  tools.append(CompFactory.MvaTESEvaluator(name='TrigTau_MvaTESEvaluator', WeightFileName=flags.Trigger.Offline.Tau.MvaTESConfig))
43  acc.addPublicTool(tools[-1])
44 
45  # Vertex variables
46  vvtools.append(acc.popToolsAndMerge(tauVertexVariablesCfg(flags,name='TrigTau_TauVertexVariables')))
47 
48  # Variables combining tracking and calorimeter information
49  idtools.append(CompFactory.TauCommonCalcVars(name='TrigTau_TauCommonCalcVars'))
50 
51  # Cluster-based sub-structure, with dRMax
52  idtools.append(CompFactory.TauSubstructureVariables(name='TrigTau_TauSubstructure', VertexCorrection=False))
53 
54  # Tau ID and score flattenning
55  if name in ['MVA', 'LLP', 'LRT']:
56  # Use the LLP ID if we're running on a LLP or LRT chain
57  use_LLP_ID = name in ['LLP', 'LRT']
58 
59  from TrigTauRec.TrigTauToolsConfig import trigTauJetRNNEvaluatorCfg, trigTauWPDecoratorJetRNNCfg
60 
61  # RNN/DeepSet ID
62  idtools.append(acc.popToolsAndMerge(trigTauJetRNNEvaluatorCfg(flags, name='TrigTau_TauJetRNNEvaluator', LLP=use_LLP_ID)))
63  acc.addPublicTool(idtools[-1])
64 
65  # Flattened ID score and WP
66  idtools.append(acc.popToolsAndMerge(trigTauWPDecoratorJetRNNCfg(flags, name='TrigTau_TauWPDecoratorJetRNN', LLP=use_LLP_ID)))
67  acc.addPublicTool(idtools[-1])
68  else:
69  raise ValueError(f'Invalid configuration: {name}')
70 
71  for tool in vftools + tools_beforetf + tftools + tools + vvtools + idtools:
72  tool.inTrigger = True
73  tool.calibFolder = flags.Trigger.Offline.Tau.tauRecToolsCVMFSPath
74 
75 
76  from TrigTauRec.TrigTauRecMonitoring import tauMonitoringPrecisionMVA
77 
78  alg = CompFactory.TrigTauRecMerged(f'TrigTauRecMerged_TauPrecision_Precision{name}',
79  VertexFinderTools = vftools,
80  CommonToolsBeforeTF = tools_beforetf,
81  TrackFinderTools = tftools,
82  CommonTools = tools,
83  VertexVarsTools = vvtools,
84  IDTools = idtools,
85  MonTool = tauMonitoringPrecisionMVA(flags),
86  InputRoIs = inputRoIs,
87  InputCaloClusterContainer = '',
88  InputVertexContainer = flags.Tracking.ActiveConfig.vertex,
89  InputTauTrackContainer = 'HLT_tautrack_dummy',
90  InputTauJetContainer = 'HLT_TrigTauRecMerged_CaloMVAOnly',
91  OutputTauTrackContainer = trigTauTrackOutputContainer,
92  OutputTauJetContainer = trigTauJetOutputContainer,
93  OutputJetSeed = '',
94  )
95 
96  acc.addEventAlgo(alg)
97 
98  return acc
99 
100 

Variable Documentation

◆ acc

TrigTauRecConfig.acc

Definition at line 164 of file TrigTauRecConfig.py.

◆ Files

TrigTauRecConfig.Files

Definition at line 161 of file TrigTauRecConfig.py.

◆ flags

TrigTauRecConfig.flags

Definition at line 160 of file TrigTauRecConfig.py.

◆ summariseProps

TrigTauRecConfig.summariseProps

Definition at line 165 of file TrigTauRecConfig.py.

◆ True

TrigTauRecConfig.True

Definition at line 165 of file TrigTauRecConfig.py.

◆ withDetails

TrigTauRecConfig.withDetails

Definition at line 165 of file TrigTauRecConfig.py.

TrigTauRecMonitoring.tauMonitoringPrecisionMVA
def tauMonitoringPrecisionMVA(flags, str name='Precision', str RoI_name='tauIso')
Definition: TrigTauRecMonitoring.py:71
SystemOfUnits
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrigTauToolsConfig.trigTauJetRNNEvaluatorCfg
def trigTauJetRNNEvaluatorCfg(flags, name='', LLP=False)
Definition: TrigTauToolsConfig.py:81
TrigTauToolsConfig.trigTauWPDecoratorJetRNNCfg
def trigTauWPDecoratorJetRNNCfg(flags, name='', LLP=False)
Definition: TrigTauToolsConfig.py:112
TrigTauToolsConfig.trigTauTrackFinderCfg
def trigTauTrackFinderCfg(flags, name='', TrackParticlesContainer='')
Definition: TrigTauToolsConfig.py:23
TrigTauToolsConfig.tauVertexVariablesCfg
def tauVertexVariablesCfg(flags, name='')
Definition: TrigTauToolsConfig.py:63
TrigTauRecConfig.trigTauRecMergedPrecisionMVACfg
def trigTauRecMergedPrecisionMVACfg(flags, name='', inputRoIs='', tracks='')
Definition: TrigTauRecConfig.py:3
TrigTauRecMonitoring.tauMonitoringCaloOnlyMVA
def tauMonitoringCaloOnlyMVA(flags, str name='CaloMVA', str RoI_name='L1')
Definition: TrigTauRecMonitoring.py:5
TrigTauToolsConfig.trigTauVertexFinderCfg
def trigTauVertexFinderCfg(flags, name='')
Definition: TrigTauToolsConfig.py:7
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:34
TrigTauRecConfig.trigTauRecMergedCaloOnlyMVACfg
def trigTauRecMergedCaloOnlyMVACfg(flags)
Definition: TrigTauRecConfig.py:101