ATLAS Offline Software
Loading...
Searching...
No Matches
TauChainConfiguration.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
8
9from AthenaCommon.Logging import logging
10logging.getLogger().info(f'Importing {__name__}')
11log = logging.getLogger(__name__)
12
13from TriggerMenuMT.HLT.Config.ChainConfigurationBase import ChainConfigurationBase
14
15from .TauMenuSequences import (
16 tauCaloMVAMenuSequenceGenCfg,
17 tauFTFTauCoreSequenceGenCfg, tauFTFTauLRTSequenceGenCfg,
18 tauFTFTauIsoSequenceGenCfg,
19 tauPrecTrackIsoSequenceGenCfg, tauPrecTrackLRTSequenceGenCfg,
20 tauPrecisionSequenceGenCfg, tauPrecisionLRTSequenceGenCfg)
21
22from .TauConfigurationTools import getChainSequenceConfigName, getChainPrecisionSeqName
23
24
25
28
29class TauChainConfiguration(ChainConfigurationBase):
30 def __init__(self, chainDict):
31 ChainConfigurationBase.__init__(self, chainDict)
32
33 def assembleChainImpl(self, flags):
34 log.debug(f'Assembling chain for {self.chainName}')
35
36 chain_steps = []
37
38 # Overall Tau Trigger sequences steps:
39 step_dictionary = {
40 # BRT calibration chains
41 'ptonly' : ['getCaloMVA', 'getFTFCoreEmpty', 'getFTFIsoEmpty', 'getPrecTrackEmpty', 'getPrecisionEmpty'],
42
43 # 2-step tracking + ID chains
44 'tracktwoMVA' : ['getCaloMVA', 'getFTFCore' , 'getFTFIso' , 'getPrecTrackIso' , 'getPrecision' ],
45 'tracktwoLLP' : ['getCaloMVA', 'getFTFCore' , 'getFTFIso' , 'getPrecTrackIso' , 'getPrecision' ],
46
47 # LRT chains
48 'trackLRT' : ['getCaloMVA', 'getFTFLRT' , 'getFTFIsoEmpty', 'getPrecTrackLRT' , 'getPrecisionLRT' ],
49 }
50
51 steps = step_dictionary[getChainSequenceConfigName(self.chainPart)]
52 for step in steps:
53 if 'Empty' in step:
54 chain_step = getattr(self, step)(flags)
55 else:
56 is_probe_leg = self.chainPart['tnpInfo']=='probe'
57 chain_step = getattr(self, step)(flags, is_probe_leg=is_probe_leg)
58
59 chain_steps.append(chain_step)
60
61 return self.buildChain(chain_steps)
62
63
64 #--------------------------------------------------
65 # Step 1: CaloMVA reconstruction
66 #--------------------------------------------------
67 def getCaloMVA(self, flags, is_probe_leg=False):
68 stepName = 'CaloMVA_tau'
69 return self.getStep(flags, stepName, [tauCaloMVAMenuSequenceGenCfg], is_probe_leg=is_probe_leg)
70
71
72 #--------------------------------------------------
73 # Step 2: 1st FTF stage (FTFCore/LRT)
74 #--------------------------------------------------
75 def getFTFCore(self, flags, is_probe_leg=False):
76 stepName = 'FTFCore_tau'
77 return self.getStep(flags, stepName, [tauFTFTauCoreSequenceGenCfg], is_probe_leg=is_probe_leg)
78
79 def getFTFLRT(self, flags, is_probe_leg=False):
80 stepName = 'FTFLRT_tau'
81 return self.getStep(flags, stepName, [tauFTFTauLRTSequenceGenCfg], is_probe_leg=is_probe_leg)
82
83 def getFTFCoreEmpty(self, flags):
84 stepName = 'FTFCoreEmpty_tau'
85 return self.getEmptyStep(stepName)
86
87
88 #--------------------------------------------------
89 # Step 3: 2nd FTF stage (FTFIso)
90 #--------------------------------------------------
91 def getFTFIso(self, flags, is_probe_leg=False):
92 stepName = 'FTFIso_tau'
93 return self.getStep(flags, stepName, [tauFTFTauIsoSequenceGenCfg], is_probe_leg=is_probe_leg)
94
95 def getFTFIsoEmpty(self, flags):
96 stepName = 'FTFIsoEmpty_tau'
97 return self.getEmptyStep(stepName)
98
99
100 #--------------------------------------------------
101 # Step 4: Precision tracking
102 #--------------------------------------------------
103 def getPrecTrackIso(self, flags, is_probe_leg=False):
104 stepName = 'PrecTrkIso_tau'
105 return self.getStep(flags, stepName, [tauPrecTrackIsoSequenceGenCfg], is_probe_leg=is_probe_leg)
106
107 def getPrecTrackLRT(self, flags, is_probe_leg=False):
108 stepName = 'PrecTrkLRT_tau'
109 return self.getStep(flags, stepName, [tauPrecTrackLRTSequenceGenCfg], is_probe_leg=is_probe_leg)
110
111 def getPrecTrackEmpty(self, flags):
112 stepName = 'PrecTrkEmpty_tau'
113 return self.getEmptyStep(stepName)
114
115
116 #--------------------------------------------------
117 # Step 5: Precision reconstruction + ID
118 #--------------------------------------------------
119 def getPrecision(self, flags, is_probe_leg=False):
120 sequenceName = getChainPrecisionSeqName(self.chainPart)
121 stepName = f'Precision_{sequenceName}_tau'
122 return self.getStep(
123 flags,
124 stepName,
125 [tauPrecisionSequenceGenCfg],
126 seq_name=sequenceName,
127 is_probe_leg=is_probe_leg,
128 )
129
130 def getPrecisionLRT(self, flags, is_probe_leg=False):
131 sequenceName = getChainPrecisionSeqName(self.chainPart)
132 stepName = f'Precision_{sequenceName}_tau'
133 return self.getStep(
134 flags,
135 stepName,
136 [tauPrecisionLRTSequenceGenCfg],
137 seq_name=sequenceName,
138 is_probe_leg=is_probe_leg,
139 )
140
141 def getPrecisionEmpty(self, flags):
142 stepName = 'PrecisionEmpty_tau'
143 return self.getEmptyStep(stepName)