9from AthenaCommon.Logging
import logging
10logging.getLogger().info(f
'Importing {__name__}')
11log = logging.getLogger(__name__)
13from TriggerMenuMT.HLT.Config.ChainConfigurationBase
import ChainConfigurationBase
15from .TauMenuSequences
import (
16 tauCaloMVASequenceGenCfg,
17 tauCaloHitsSequenceGenCfg,
18 tauFTFCoreSequenceGenCfg,
19 tauFTFIsoSequenceGenCfg,
20 tauPrecTrackSequenceGenCfg,
21 tauPrecisionSequenceGenCfg,
24from .TauConfigurationTools
import (
25 getChainSequenceConfigName,
26 getChainCaloHitsSeqName, getHitZConfig,
27 getChainPrecisionSeqName,
38 ChainConfigurationBase.__init__(self, chainDict)
41 log.debug(f
'Assembling chain for {self.chainName}')
48 'ptonly' : [
'getCaloMVA',
'getCaloHitsEmpty',
'getFTFCoreEmpty',
'getFTFIsoEmpty',
'getPrecTrackEmpty',
'getPrecisionEmpty'],
51 'tracktwoMVA' : [
'getCaloMVA',
'getCaloHitsEmpty',
'getFTFCore' ,
'getFTFIso' ,
'getPrecTrackIso' ,
'getPrecision' ],
52 'tracktwoLLP' : [
'getCaloMVA',
'getCaloHitsEmpty',
'getFTFCore' ,
'getFTFIso' ,
'getPrecTrackIso' ,
'getPrecision' ],
55 'CaloHits_tracktwoMVA' : [
'getCaloMVA',
'getCaloHits' ,
'getFTFCore' ,
'getFTFIso' ,
'getPrecTrackIso' ,
'getPrecision' ],
58 'trackLRT' : [
'getCaloMVA',
'getCaloHitsEmpty',
'getFTFLRT' ,
'getFTFIsoEmpty',
'getPrecTrackLRT' ,
'getPrecision' ],
61 steps = step_dictionary[getChainSequenceConfigName(self.chainPart)]
64 chain_step = getattr(self, step)(flags)
66 is_probe_leg = self.chainPart[
'tnpInfo']==
'probe'
67 jet = self.chainPart[
'jet']
68 chain_step = getattr(self, step)(flags, is_probe_leg=is_probe_leg, jet=jet)
70 chain_steps.append(chain_step)
72 return self.buildChain(chain_steps)
78 def getCaloMVA(self, flags, is_probe_leg=False, jet='lc'):
79 stepName = f
'Calo{jet.upper()}MVA_tau'
80 return self.getStep(flags, stepName, [tauCaloMVASequenceGenCfg], is_probe_leg=is_probe_leg, jet=jet)
87 sequenceName = getChainCaloHitsSeqName(self.chainPart)
88 stepName = f
'CaloHits_{sequenceName}_tau'
92 [tauCaloHitsSequenceGenCfg],
93 seq_name=sequenceName,
94 precision_seq_name=getChainPrecisionSeqName(self.chainPart),
95 hitz_config=getHitZConfig(flags, self.chainPart),
96 is_probe_leg=is_probe_leg,
101 stepName =
'CaloHitsEmpty_tau'
102 return self.getEmptyStep(stepName)
109 stepName = f
'FTFCore_{jet.upper()}'
110 if calohits_seq_name := getChainCaloHitsSeqName(self.chainPart):
111 stepName += f
'_fromCaloHits_{calohits_seq_name}'
117 [tauFTFCoreSequenceGenCfg],
118 calohits_seq_name=calohits_seq_name,
119 is_probe_leg=is_probe_leg,
123 def getFTFLRT(self, flags, is_probe_leg=False, jet='lc'):
124 stepName = f
'FTFLRT_{jet.upper()}_tau'
128 [tauFTFCoreSequenceGenCfg],
130 is_probe_leg=is_probe_leg,
135 stepName =
'FTFCoreEmpty_tau'
136 return self.getEmptyStep(stepName)
142 def getFTFIso(self, flags, is_probe_leg=False, jet='lc'):
143 stepName = f
'FTFIso_{jet.upper()}'
144 if calohits_seq_name := getChainCaloHitsSeqName(self.chainPart):
145 stepName += f
'_fromCaloHits_{calohits_seq_name}'
151 [tauFTFIsoSequenceGenCfg],
152 calohits_seq_name=calohits_seq_name,
153 is_probe_leg=is_probe_leg,
158 stepName =
'FTFIsoEmpty_tau'
159 return self.getEmptyStep(stepName)
166 stepName = f
'PrecTrkIso_{jet.upper()}'
167 if calohits_seq_name := getChainCaloHitsSeqName(self.chainPart):
168 stepName += f
'_fromCaloHits_{calohits_seq_name}'
174 [tauPrecTrackSequenceGenCfg],
175 calohits_seq_name=calohits_seq_name,
176 is_probe_leg=is_probe_leg,
181 stepName = f
'PrecTrkLRT_{jet.upper()}_tau'
185 [tauPrecTrackSequenceGenCfg],
187 is_probe_leg=is_probe_leg,
192 stepName =
'PrecTrkEmpty_tau'
193 return self.getEmptyStep(stepName)
200 sequenceName = getChainPrecisionSeqName(self.chainPart)
201 stepName = f
'Precision_{sequenceName}_{jet.upper()}'
202 if calohits_seq_name := getChainCaloHitsSeqName(self.chainPart):
203 stepName += f
'_fromCaloHits_{calohits_seq_name}'
209 [tauPrecisionSequenceGenCfg],
210 seq_name=sequenceName,
211 calohits_seq_name=calohits_seq_name,
212 do_lrt=
'LRT' in sequenceName,
213 is_probe_leg=is_probe_leg,
218 stepName =
'PrecisionEmpty_tau'
219 return self.getEmptyStep(stepName)
Class to configure tau chains.
getPrecTrackLRT(self, flags, is_probe_leg=False, jet='lc')
getFTFCore(self, flags, is_probe_leg=False, jet='lc')
__init__(self, chainDict)
getFTFCoreEmpty(self, flags)
getPrecisionEmpty(self, flags)
getCaloMVA(self, flags, is_probe_leg=False, jet='lc')
getFTFLRT(self, flags, is_probe_leg=False, jet='lc')
assembleChainImpl(self, flags)
getPrecision(self, flags, is_probe_leg=False, jet='lc')
getFTFIso(self, flags, is_probe_leg=False, jet='lc')
getCaloHits(self, flags, is_probe_leg=False, jet='lc')
getPrecTrackEmpty(self, flags)
getCaloHitsEmpty(self, flags)
getFTFIsoEmpty(self, flags)
getPrecTrackIso(self, flags, is_probe_leg=False, jet='lc')