Skip to content
Snippets Groups Projects
Commit 4499ee8a authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'TMMT_ATR22206_Merging' into 'master'

ATR-22206, adding functionality for multi-leg merging

See merge request atlas/athena!39109
parents 296e1e34 359f13a4
No related branches found
No related tags found
No related merge requests found
......@@ -1350,6 +1350,16 @@ HLT_g35_loose_mu18_L1EM24VHI:
7: 2
HLT_g35_medium_g25_medium_L12EM20VH:
eventCount: 0
HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI:
eventCount: 0
stepCounts:
0: 5
1: 5
2: 5
stepFeatures:
0: 10
1: 10
2: 11
HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI:
eventCount: 0
stepCounts:
......
......@@ -318,12 +318,6 @@ HLT_cscmon_CSCPEB_L1All:
0: 20
HLT_e12_lhloose_2mu10_L12MU10:
eventCount: 0
stepCounts:
0: 1
1: 1
stepFeatures:
0: 2
1: 5
HLT_e140_lhloose_L1EM22VHI:
eventCount: 0
HLT_e140_lhloose_nod0_L1EM22VHI:
......@@ -614,6 +608,8 @@ HLT_g35_loose_mu18_L1EM24VHI:
eventCount: 0
HLT_g35_medium_g25_medium_L12EM20VH:
eventCount: 0
HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI:
eventCount: 0
HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI:
eventCount: 0
HLT_g3_loose_LArPEB_L1EM3:
......
......@@ -307,7 +307,7 @@ class GenerateMenuMT(object, metaclass=Singleton):
alignedChainConfig = menuAlignment.single_align(chainDict, chainConfig)
TriggerConfigHLT.registerChain( chainDict, alignedChainConfig )
elif len(alignmentGroups) == 2:
elif len(alignmentGroups) >= 2:
alignedChainConfig = menuAlignment.multi_align(chainDict, chainConfig, lengthOfChainConfigs)
TriggerConfigHLT.registerChain( chainDict, alignedChainConfig )
......
......@@ -425,7 +425,7 @@ def setupMenu():
# ChainProp(name='HLT_e9_lhvloose_mu20_mu8noL1_L1MU20', l1SeedThresholds=['EM3','MU20','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
# ChainProp(name='HLT_g35_loose_mu15_mu2noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','MU6','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
ChainProp(name='HLT_g35_tight_icalotight_mu18noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
# ChainProp(name='HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
ChainProp(name='HLT_g35_tight_icalotight_mu15noL1_mu2noL1_L1EM22VHI', l1SeedThresholds=['EM22VHI','FSNOSEED','FSNOSEED'], stream=[PhysicsStream], groups=EgammaMuonGroup),
]
TriggerFlags.HeavyIonSlice.signatures = TriggerFlags.HeavyIonSlice.signatures() + []
......
......@@ -355,10 +355,11 @@ class EmptyMenuSequence(object):
""" Class to emulate reco sequences with no Hypo"""
""" By construction it has no Hypo;"""
def __init__(self, the_name):
def __init__(self, the_name, mergeUsingFeature = False):
self._name = the_name
Maker = CompFactory.InputMakerForRoI("IM"+the_name)
Maker.RoITool = CompFactory.ViewCreatorInitialROITool()
Maker.mergeUsingFeature = mergeUsingFeature
self._maker = InputMakerNode( Alg = Maker )
self._seed=''
self._sequence = Node( Alg = seqAND(the_name, [Maker]))
......@@ -740,6 +741,9 @@ class CFSequence(object):
the filter is connected only once (to avoid multiple DH links)
"""
log.debug("CFSequence: connect Filter %s with %d menuSequences of step %s, using %d connections", compName(self.filter.Alg), len(self.step.sequences), self.step.name, len(connections))
log.debug(" --- sequences: ")
for seq in self.step.sequences:
log.debug(seq)
if len(connections) == 0:
log.error("ERROR, no filter outputs are set!")
......@@ -789,19 +793,24 @@ class StepComponent(object):
# next: can we remove multiplicity array, if it can be retrieved from the ChainDict?
class ChainStep(object):
"""Class to describe one step of a chain; if multiplicity is greater than 1, the step is combo/combined. Set one multiplicity value per sequence"""
def __init__(self, name, Sequences=[], multiplicity=[1], chainDicts=[], comboHypoCfg=ComboHypoCfg, comboToolConfs=[]):
def __init__(self, name, Sequences=[], multiplicity=[1], chainDicts=[], comboHypoCfg=ComboHypoCfg, comboToolConfs=[], isEmpty = False):
# include cases of emtpy steps with multiplicity = [] or multiplicity=[0,0,0///]
if sum(multiplicity)==0:
multiplicity=[]
else:
# sanity check on inputs, excluding empty steps
if len(chainDicts) != len(multiplicity):
log.error("[ChainStep] Sequences: %s",Sequences)
log.error("[ChainStep] chainDicts: %s",chainDicts)
log.error("[ChainStep] multiplicity: %s",multiplicity)
raise RuntimeError("[ChainStep] Tried to configure a ChainStep %s with %i multiplicity and %i dictionaries. These lists must have the same size" % (name, len(multiplicity), len(chainDicts)) )
if len(Sequences) != len(multiplicity):
log.error("[ChainStep] Sequences: %s",Sequences)
log.error("[ChainStep] multiplicities: %s",multiplicity)
raise RuntimeError("Tried to configure a ChainStep %s with %i Sequences and %i multiplicities. These lists must have the same size" % (name, len(Sequences), len(multiplicity)) )
if len(Sequences) != len(chainDicts):
raise RuntimeError("Tried to configure a ChainStep %s with %i Sequences and %i dictionaries. These lists must have the same size" % (name, len(Sequences), len(chainDicts)) )
self.name = name
self.sequences=Sequences
self.multiplicity = multiplicity
......@@ -809,7 +818,7 @@ class ChainStep(object):
self.comboToolConfs=comboToolConfs
self.stepDicts = chainDicts # one dict per leg
self.isCombo=sum(multiplicity)>1
self.isEmpty=sum(multiplicity)==0
self.isEmpty=(sum(multiplicity)==0 or isEmpty)
self.combo=None
if self.isCombo:
self.makeCombo()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment