Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
292c5449
Commit
292c5449
authored
Aug 07, 2020
by
Frank Winklmeier
Browse files
DecisionHandling: Delete broken emu_step test
Delete the broken emu_step tests (
ATR-21840
) and associated files.
parent
5683b312
Changes
9
Hide whitespace changes
Inline
Side-by-side
Trigger/TrigSteer/DecisionHandling/CMakeLists.txt
View file @
292c5449
...
...
@@ -29,20 +29,3 @@ atlas_add_component( DecisionHandling
LINK_LIBRARIES DecisionHandlingLib xAODTrigCalo AthViews xAODTracking xAODJet
)
atlas_install_python_modules
(
python/*.py POST_BUILD_CMD
${
ATLAS_FLAKE8
}
)
atlas_install_joboptions
(
share/*.py
)
atlas_install_data
(
share/*.ref
)
foreach
(
test emu_step_processing emu_step_menu_processing
)
set
(
rundir
${
CMAKE_CURRENT_BINARY_DIR
}
/unitTestRun_
${
test
}
)
file
(
REMOVE_RECURSE
${
rundir
}
)
file
(
MAKE_DIRECTORY
${
rundir
}
)
atlas_add_test
(
${
test
}
SCRIPT test/test_
${
test
}
.sh
LOG_SELECT_PATTERN
"TrigSignatureMoniMT.*INFO HLT_.*|TrigSignatureMoniMT.*-- #[0-9]+ (Events|Features).*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*|TriggerSummaryStep.*+++ leg.*"
PROPERTIES WORKING_DIRECTORY
${
rundir
}
)
endforeach
()
Trigger/TrigSteer/DecisionHandling/python/EmuStepProcessingConfig.py
deleted
100644 → 0
View file @
5683b312
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from
AthenaCommon.AlgScheduler
import
AlgScheduler
from
AthenaCommon.CFElements
import
parOR
from
AthenaCommon.Logging
import
logging
from
L1Decoder.L1DecoderConf
import
CTPUnpackingEmulationTool
,
RoIsUnpackingEmulationTool
,
L1Decoder
from
TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents
import
EmptyMenuSequence
log
=
logging
.
getLogger
(
'EmuStepProcessingConfig'
)
###########################################################################
def
thresholdToChains
(
chains
):
"""
Produces list "threshod : chain" for all chains passed. Uses the L1Thresholds/vseeds Chain property
"""
ret
=
[]
for
c
in
chains
:
for
t
in
c
.
vseeds
:
ret
.
append
(
t
+
" : "
+
c
.
name
)
return
ret
###########################################################################
def
generateL1DecoderAndChainsManually
(
topSequence
):
generateEmuEvents
()
from
AthenaCommon.CFElements
import
seqOR
,
parOR
hltTop
=
seqOR
(
"HLTTop"
)
hltBeginSeq
=
parOR
(
"HLTBeginSeq"
)
hltTop
+=
hltBeginSeq
topSequence
+=
hltTop
l1Decoder
=
generateL1Decoder
()
hltBeginSeq
+=
l1Decoder
generateChainsManually
()
from
TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig
import
makeHLTTree
from
TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT
import
TriggerConfigHLT
makeHLTTree
(
triggerConfigHLT
=
TriggerConfigHLT
)
###########################################################################
def
generateL1DecoderAndChainsByMenu
(
topSequence
):
generateEmuEvents
()
from
AthenaCommon.CFElements
import
seqOR
,
parOR
hltTop
=
seqOR
(
"HLTTop"
)
hltBeginSeq
=
parOR
(
"HLTBeginSeq"
)
hltTop
+=
hltBeginSeq
topSequence
+=
hltTop
l1Decoder
=
generateL1Decoder
()
hltBeginSeq
+=
l1Decoder
l1Decoder
=
generateL1Decoder
()
generateEmuMenu
()
###########################################################################
def
generateEmuMenu
():
from
TriggerMenuMT.HLTMenuConfig.Menu
import
LS2_v1
from
TriggerMenuMT.HLTMenuConfig.Menu
import
LS2_emu_v1
from
TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT
import
GenerateMenuMT
from
TriggerJobOpts.TriggerFlags
import
TriggerFlags
from
AthenaCommon.Logging
import
logging
log
=
logging
.
getLogger
(
'EmuMenuTest'
)
log
.
debug
(
"generateEmuMenu"
)
# overwrite LS2_v1 menu
TriggerFlags
.
triggerMenuSetup
=
'LS2_v1'
LS2_v1
.
setupMenu
=
LS2_emu_v1
.
setupMenu
# switch on only TestSlice
def
signaturesToGenerate
():
TriggerFlags
.
Slices_all_setOff
()
TriggerFlags
.
TestSlice
.
setAll
()
#TriggerFlags.EgammaSlice.setAll()
# Generate the menu
menu
=
GenerateMenuMT
()
menu
.
overwriteSignaturesWith
(
signaturesToGenerate
)
menu
.
generateMT
()
###########################################################################
def
generateEmuEvents
():
AlgScheduler
.
ShowControlFlow
(
True
)
AlgScheduler
.
ShowDataFlow
(
True
)
# 4 events
data
=
{
'noreco'
:
[
';'
,
';'
,
';'
,
';'
],
'emclusters'
:
[
';'
,
';'
,
';'
,
';'
],
'msmu'
:
[
';'
,
';'
,
';'
,
';'
],
'ctp'
:
[
';'
,
';'
,
';'
,
';'
],
'l1emroi'
:
[
';'
,
';'
,
';'
,
';'
],
'l1muroi'
:
[
';'
,
';'
,
';'
,
';'
]
}
# in the lists there are the events
# event 0: empty
data
[
'ctp'
]
[
0
]
=
'HLT_TestChain5_ev1_L1EM3
\
HLT_TestChain8_ev1_L1EM5
\
HLT_g5_EM7'
data
[
'l1emroi'
][
0
]
=
';'
data
[
'emclusters'
][
0
]
=
';'
data
[
'l1muroi'
][
0
]
=
';'
data
[
'msmu'
][
0
]
=
';'
#event 1: 3e (1 not passing at L1, 1 not passing at step1) + 2mu (2 not passing) - HLT_e5_e8_L12EM3 HLT_2TestChain6_muv1_L12MU6
data
[
'ctp'
]
[
1
]
=
'HLT_TestChain5_ev1_L1EM3
\
HLT_TestChain8_ev1_L1EM5
\
HLT_TestChain5_gv1_L1EM7
\
HLT_TestChain5_ev3_L1EM7
\
HLT_2TestChain6_muv1_L12MU6
\
HLT_TestChain10_muv2_L1MU10
\
HLT_TestChain6_muv1_TestChain10_muv1_L12MU6
\
HLT_2TestChain4_muv1_dr_L12MU6'
data
[
'l1emroi'
][
1
]
=
'1,1,0,EM3,EM5,EM7,EM20,EM50,EM100; 2.,-1.2,0,EM3,EM5,EM7; 3.,0.2,0,EM3;'
data
[
'emclusters'
][
1
]
=
'eta:1,phi:1,et:180000; eta:1,phi:-1.2,et:6000; eta:0.5,phi:-1.2,et:3000;'
data
[
'l1muroi'
][
1
]
=
'2,0.5,0,MU6; 3,0.5,0,MU6;'
data
[
'msmu'
][
1
]
=
'eta:-1.2,phi:0.7,pt:1500,pt2:1500; eta:-1.1,phi:0.6,pt:1500,pt2:1500;'
# event 2: 2e+ 3mu : HLT_TestChain5_ev1_TestChain8_ev1_2TestChain6_muv1_L1EM3_EM5_L12MU6, HLT_TestChain6_muv1_TestChain10_ev1_L1MU6_EM5
data
[
'ctp'
]
[
2
]
=
'HLT_TestChain6_muv1_L1MU6
\
HLT_TestChain8_muv1_L1MU10
\
HLT_TestChain10_muv2_L1MU10
\
HLT_TestChain8_muv1step_L1MU6
\
HLT_TestChain5_ev1_L1EM3
\
HLT_TestChain8_ev1_L1EM5
\
HLT_TestChain6_muEmpty2_L1MU6
\
HLT_TestChain6_muv1_TestChain10_ev1_L1MU6_EM5
\
HLT_TestChain6_muv2_TestChain8_ev2_L1MU6_EM5
\
HLT_2TestChain6_muv1_L12MU6
\
HLT_2TestChain6_muEmpty1_L12MU6
\
HLT_TestChain6_muv1_TestChain10_muv1_L12MU6
\
HLT_2TestChain4_muv1_dr_L12MU6 HLT_e5_e8_L12EM3
\
HLT_TestChain5_ev1_TestChain8_ev1_2TestChain6_muv1_L1EM3_L1EM5_L12MU6
\
HLT_TestChain10_muEmpty1_TestChain6_muEmpty1_L12MU6
\
HLT_TestChain10_muv1_TestChain6_muEmpty1_L1MU6
\
HLT_TestChain6_muv1_TestChain5_ev1_dr_L12MU6'
data
[
'l1emroi'
][
2
]
=
'2,0.2,0,EM3,EM5,EM7,EM15,EM20,EM50,EM100; 1,-1.1,0,EM3,EM5,EM7,EM15,EM20,EM50;'
data
[
'emclusters'
][
2
]
=
'eta:0.5,phi:0,et:120000; eta:1,phi:-1.2,et:65000;'
data
[
'l1muroi'
][
2
]
=
'2,0.5,0,MU6,MU8; 3,0.5,0,MU6,MU8,MU10;2.2,0.6,0,MU6;'
data
[
'msmu'
][
2
]
=
'eta:-1.2,phi:0.7,pt:6500,pt2:8500; eta:-1.1,phi:0.6,pt:10500,pt2:8500;eta:-1.1,phi:0.6,pt:8500,pt2:8500;'
#event 3: 1e + 1mu; HLT_TestChain6_muv1_TestChain10_ev1_L1MU6_EM5 does not pass because of e10
data
[
'ctp'
]
[
3
]
=
'HLT_TestChain20_muv1_L1MU10
\
HLT_TestChain10_muv1_L1MU10
\
HLT_TestChain8_muv1_L1MU10
\
HLT_TestChain8_muv1step_L1MU6
\
HLT_TestChain8_ev1_L1EM5
\
HLT_TestChain6_muv1_TestChain10_ev1_L1MU6_EM5
\
HLT_TestChain6_muv2_TestChain8_ev2_L1MU6_EM5'
data
[
'l1emroi'
][
3
]
=
'1,1.5,0,EM3,EM5,EM7;'
data
[
'emclusters'
][
3
]
=
'eta:-0.6,phi:1.7,et:9000;'
data
[
'l1muroi'
][
3
]
=
'2,-0.1,0,MU6,MU8,MU10;'
data
[
'msmu'
][
3
]
=
'eta:-1.7,phi:-0.2,pt:29500,pt2:8500;'
# otehr vectors
data
[
'tracks'
]
=
[
'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;'
,
'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;'
,
'eta:0.5,phi:0,pt:130000; eta:1,phi:-1.2,pt:60000;eta:-1.2,phi:0.7,pt:6700; eta:-1.1,phi:0.6,pt:8600;'
,
'eta:-0.6,phi:1.7,et:9000;'
]
# no MU track for MS candidate 'eta:-1.7,phi:-0.2,pt:9500;'
data
[
'mucomb'
]
=
[
';'
,
';'
,
'eta:-1.2,phi:0.7,pt:6600; eta:-1.1,phi:0.6,pt:8600;'
,
';'
]
data
[
'electrons'
]
=
[
';'
,
'eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;'
,
';'
,
';'
]
data
[
'photons'
]
=
[
';'
,
'eta:1,phi:1,pt:130000;'
,
';'
,
';'
]
from
DecisionHandling.TestUtils
import
writeEmulationFiles
writeEmulationFiles
(
data
)
###########################################################################
def
generateChainsManually
():
from
TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents
import
ChainStep
from
DecisionHandling.TestUtils
import
makeChain
doMuon
=
True
doElectron
=
True
doCombo
=
True
HLTChains
=
[]
# muon chains
if
doMuon
:
from
DecisionHandling.HLTSignatureConfig
import
muMenuSequence
#step1
mu11
=
muMenuSequence
(
step
=
"1"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
mu12
=
muMenuSequence
(
step
=
"1"
,
reconame
=
"v2"
,
hyponame
=
"v2"
)
#step2
mu21
=
muMenuSequence
(
step
=
"2"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
mu22
=
muMenuSequence
(
step
=
"2"
,
reconame
=
"v2"
,
hyponame
=
"v2"
)
#step3
mu31
=
muMenuSequence
(
step
=
"3"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
mu32
=
muMenuSequence
(
step
=
"3"
,
reconame
=
"v2"
,
hyponame
=
"v2"
)
#step4
mu41
=
muMenuSequence
(
step
=
"4"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
step_mu11
=
ChainStep
(
"Step1_mu11"
,
[
mu11
])
step_mu21
=
ChainStep
(
"Step2_mu21"
,
[
mu21
]
)
step_mu22
=
ChainStep
(
"Step2_mu22"
,
[
mu22
]
)
step_mu31
=
ChainStep
(
"Step3_mu31"
,
[
mu31
]
)
step_mu32
=
ChainStep
(
"Step3_mu32"
,
[
mu32
]
)
step_mu41
=
ChainStep
(
"Step4_mu41"
,
[
mu41
]
)
step_empy
=
ChainStep
(
"Step2_mu1empty"
,
multiplicity
=
[])
MuChains
=
[
makeChain
(
name
=
'HLT_TestChain8_muv1step_L1MU6'
,
L1Thresholds
=
[
"MU6"
],
ChainSteps
=
[
step_mu11
]),
makeChain
(
name
=
'HLT_TestChain8_muv1_L1MU10'
,
L1Thresholds
=
[
"MU10"
],
ChainSteps
=
[
step_mu11
,
step_mu21
,
step_mu31
,
step_mu41
]
),
makeChain
(
name
=
'HLT_TestChain20_muv1_L1MU10'
,
L1Thresholds
=
[
"MU10"
],
ChainSteps
=
[
step_mu11
,
step_mu21
,
step_mu31
,
step_mu41
]
),
makeChain
(
name
=
'HLT_TestChain10_muv2_L1MU10'
,
L1Thresholds
=
[
"MU10"
],
ChainSteps
=
[
step_mu11
,
step_mu22
,
step_mu31
]
),
makeChain
(
name
=
'HLT_TestChain6_muEmpty2_L1MU6'
,
L1Thresholds
=
[
"MU6"
],
ChainSteps
=
[
step_mu11
,
step_empy
,
step_mu32
,
step_mu41
]
),
]
HLTChains
+=
MuChains
## #electron chains
if
doElectron
:
from
DecisionHandling.HLTSignatureConfig
import
elMenuSequence
,
gamMenuSequence
el11
=
elMenuSequence
(
step
=
"1"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
el21
=
elMenuSequence
(
step
=
"2"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
el22
=
elMenuSequence
(
step
=
"2"
,
reconame
=
"v2"
,
hyponame
=
"v2"
)
el23
=
elMenuSequence
(
step
=
"2"
,
reconame
=
"v2"
,
hyponame
=
"v3"
)
el31
=
elMenuSequence
(
step
=
"3"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
el41
=
elMenuSequence
(
step
=
"4"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
# gamma
gamm11
=
gamMenuSequence
(
"1"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
ElChains
=
[
makeChain
(
name
=
'HLT_TestChain5_ev1_L1EM3'
,
L1Thresholds
=
[
"EM3"
],
ChainSteps
=
[
ChainStep
(
"Step1_em11"
,
[
el11
]),
ChainStep
(
"Step2_em21"
,
[
el21
]),
ChainStep
(
"Step3_em31"
,
[
el31
])]
),
makeChain
(
name
=
'HLT_TestChain8_ev1_L1EM5'
,
L1Thresholds
=
[
"EM5"
],
ChainSteps
=
[
ChainStep
(
"Step1_em11"
,
[
el11
]),
ChainStep
(
"Step2_em21"
,
[
el21
]),
ChainStep
(
"Step3_em31"
,
[
el31
])
]
),
makeChain
(
name
=
'HLT_TestChain5_ev2_L1EM7'
,
L1Thresholds
=
[
"EM7"
],
ChainSteps
=
[
ChainStep
(
"Step1_em11"
,
[
el11
]),
ChainStep
(
"Step2_em22"
,
[
el22
])
]
),
makeChain
(
name
=
'HLT_TestChain5_ev3_L1EM7'
,
L1Thresholds
=
[
"EM7"
],
ChainSteps
=
[
ChainStep
(
"Step1_em11"
,
[
el11
]),
ChainStep
(
"Step2_em23"
,
[
el23
])
]
),
makeChain
(
name
=
'HLT_TestChain5_gv1_L1EM7'
,
L1Thresholds
=
[
"EM7"
],
ChainSteps
=
[
ChainStep
(
"Step1_gam11"
,
[
gamm11
])
]
)
]
HLTChains
+=
ElChains
# combined chain
if
doCombo
:
emptySeq1
=
EmptyMenuSequence
(
"step1EmptySeqence"
)
emptySeq2
=
EmptyMenuSequence
(
"step2EmptySeqence"
)
if
not
doElectron
:
from
DecisionHandling.HLTSignatureConfig
import
elMenuSequence
el11
=
elMenuSequence
(
step
=
"1"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
el21
=
elMenuSequence
(
step
=
"2"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
el41
=
elMenuSequence
(
step
=
"4"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
if
not
doMuon
:
from
DecisionHandling.HLTSignatureConfig
import
muMenuSequence
#step1
mu11
=
muMenuSequence
(
step
=
"1"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
mu12
=
muMenuSequence
(
step
=
"1"
,
reconame
=
"v2"
,
hyponame
=
"v2"
)
#step2
mu21
=
muMenuSequence
(
step
=
"2"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
mu22
=
muMenuSequence
(
step
=
"2"
,
reconame
=
"v2"
,
hyponame
=
"v2"
)
#step3
mu31
=
muMenuSequence
(
step
=
"3"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
mu32
=
muMenuSequence
(
step
=
"3"
,
reconame
=
"v2"
,
hyponame
=
"v2"
)
#step4
mu41
=
muMenuSequence
(
step
=
"4"
,
reconame
=
"v1"
,
hyponame
=
"v1"
)
from
DecisionHandling.HLTSignatureHypoTools
import
dimuDrComboHypoTool
# multiplicity here indicates the number of objects to be combined:
# for the chain dictionary, get the sum of the multiplicity in the multiplicy array
# in symmetric chains, multiplicity=2 but only one sequence is used
CombChains
=
[
# This is an example of a chain running in "serial"
makeChain
(
name
=
'HLT_TestChain6_muv1_TestChain10_ev1_L1MU6_EM5'
,
L1Thresholds
=
[
"MU6"
,
"EM5"
],
ChainSteps
=
[
ChainStep
(
"Step1_mu_em_serial"
,
[
mu11
,
emptySeq1
],
multiplicity
=
[
1
,
1
]),
ChainStep
(
"Step2_mu_em_serial"
,
[
emptySeq2
,
el21
],
multiplicity
=
[
1
,
1
]),
ChainStep
(
"Step3_mu_em_serial"
,
multiplicity
=
[]),
ChainStep
(
"Step4_mu_em_serial"
,
[
mu41
,
el41
],
multiplicity
=
[
1
,
1
])]
),
makeChain
(
name
=
'HLT_TestChain6_muv2_TestChain8_ev2_L1MU6_EM5'
,
L1Thresholds
=
[
"MU6"
,
"EM5"
],
ChainSteps
=
[
ChainStep
(
"Step1_mu2_em"
,
[
mu12
,
el11
],
multiplicity
=
[
1
,
1
]),
ChainStep
(
"Step2_mu_em"
,
[
mu21
,
el21
],
multiplicity
=
[
1
,
1
])]
),
makeChain
(
name
=
'HLT_TestChain5_ev1_TestChain8_ev1_L12EM3'
,
L1Thresholds
=
[
"EM3"
,
"EM3"
],
ChainSteps
=
[
#norun
ChainStep
(
"Step1_2emAs"
,
[
el11
,
el11
],
multiplicity
=
[
1
,
1
]),
ChainStep
(
"Step2_2emAs"
,
[
el21
,
el21
],
multiplicity
=
[
1
,
1
])
]),
makeChain
(
name
=
'HLT_TestChain5_ev1_TestChain8_ev1_2TestChain6_muv1_L1EM3_L1EM5_L12MU6'
,
L1Thresholds
=
[
"EM3"
,
"EM5"
,
"MU6"
],
ChainSteps
=
[
ChainStep
(
"Step1_2em_2mu"
,
[
el11
,
el11
,
mu11
],
multiplicity
=
[
1
,
1
,
2
]),
ChainStep
(
"Step2_2em_2mu"
,
[
el21
,
el21
,
mu21
],
multiplicity
=
[
1
,
1
,
2
])
]),
makeChain
(
name
=
'HLT_2TestChain6_muv1_L12MU6'
,
L1Thresholds
=
[
"MU6"
],
ChainSteps
=
[
ChainStep
(
"Step1_2mu"
,
[
mu11
],
multiplicity
=
[
2
]),
ChainStep
(
"Step2_2mu"
,
[
mu21
],
multiplicity
=
[
2
])
]),
makeChain
(
name
=
'HLT_TestChain6_muv1_TestChain10_muv1_L12MU6'
,
L1Thresholds
=
[
"MU6"
,
"MU6"
],
ChainSteps
=
[
ChainStep
(
"Step1_2muAs"
,
[
mu11
,
mu11
],
multiplicity
=
[
1
,
1
]),
ChainStep
(
"Step2_2muAs"
,
[
mu21
,
mu21
],
multiplicity
=
[
1
,
1
])
]),
makeChain
(
name
=
'HLT_2TestChain6_muEmpty1_L12MU6'
,
L1Thresholds
=
[
"MU6"
],
ChainSteps
=
[
ChainStep
(
"Step1_2mu_empty"
,
multiplicity
=
[]),
#[2]
ChainStep
(
"Step2_2mu"
,
[
mu21
],
multiplicity
=
[
2
])
]),
makeChain
(
name
=
'HLT_TestChain6_muv1_TestChain5_ev1dr_L12MU6'
,
L1Thresholds
=
[
"MU6"
,
"EM5"
],
ChainSteps
=
[
ChainStep
(
"Step1_mu_em"
,
[
mu11
,
el11
],
multiplicity
=
[
1
,
1
],
comboToolConfs
=
[
dimuDrComboHypoTool
]),
ChainStep
(
"Step2_mu_em"
,
[
mu21
,
el21
],
multiplicity
=
[
1
,
1
],
comboToolConfs
=
[
dimuDrComboHypoTool
])]
),
makeChain
(
name
=
'HLT_2TestChain4_muv1dr_L12MU6'
,
L1Thresholds
=
[
"MU6"
],
ChainSteps
=
[
ChainStep
(
"Step1_2mu"
,
[
mu11
],
multiplicity
=
[
2
],
comboToolConfs
=
[
dimuDrComboHypoTool
]),
ChainStep
(
"Step2_2mu22"
,
[
mu22
],
multiplicity
=
[
2
])
]
),
# FSNOSEED not implemented in emulation
# L1Thresholds=["MU6", "MU6"],
makeChain
(
name
=
'HLT_TestChain10_muEmpty1_TestChain6_muEmpty1_L12MU6'
,
L1Thresholds
=
[
"MU6"
,
"MU6"
],
ChainSteps
=
[
ChainStep
(
"Step1_2muAs_empty"
,
multiplicity
=
[]),
ChainStep
(
"Step2_2muAs"
,
[
mu21
,
mu21
],
multiplicity
=
[
1
,
1
])
])
]
HLTChains
+=
CombChains
########################## L1 #################################################
def
generateL1Decoder
():
L1UnpackingSeq
=
parOR
(
"L1UnpackingSeq"
)
l1Decoder
=
L1Decoder
(
RoIBResult
=
""
,
L1TriggerResult
=
""
)
l1Decoder
.
L1DecoderSummaryKey
=
"L1DecoderSummary"
ctpUnpacker
=
CTPUnpackingEmulationTool
(
ForceEnableAllChains
=
False
,
InputFilename
=
"ctp.dat"
)
l1Decoder
.
ctpUnpacker
=
ctpUnpacker
## hack to solve the PS crash:
from
L1Decoder.L1DecoderConf
import
PrescalingEmulationTool
psEmulation
=
PrescalingEmulationTool
()
l1Decoder
.
prescaler
=
psEmulation
from
L1Decoder.L1DecoderConfig
import
mapThresholdToL1RoICollection
,
mapThresholdToL1DecisionCollection
emUnpacker
=
RoIsUnpackingEmulationTool
(
"EMRoIsUnpackingTool"
,
InputFilename
=
"l1emroi.dat"
,
OutputTrigRoIs
=
mapThresholdToL1RoICollection
(
"EM"
),
Decisions
=
mapThresholdToL1DecisionCollection
(
"EM"
),
ThresholdPrefix
=
"EM"
)
muUnpacker
=
RoIsUnpackingEmulationTool
(
"MURoIsUnpackingTool"
,
InputFilename
=
"l1muroi.dat"
,
OutputTrigRoIs
=
mapThresholdToL1RoICollection
(
"MU"
),
Decisions
=
mapThresholdToL1DecisionCollection
(
"MU"
),
ThresholdPrefix
=
"MU"
)
l1Decoder
.
roiUnpackers
=
[
emUnpacker
,
muUnpacker
]
L1UnpackingSeq
+=
l1Decoder
log
.
debug
(
L1UnpackingSeq
)
return
l1Decoder
Trigger/TrigSteer/DecisionHandling/share/EmuNewJOTest.py
deleted
100644 → 0
View file @
5683b312
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from
AthenaCommon.Configurable
import
Configurable
Configurable
.
configurableRun3Behavior
=
1
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
from
AthenaConfiguration.AllConfigFlags
import
ConfigFlags
as
flags
from
AthenaCommon.Constants
import
INFO
,
DEBUG
,
VERBOSE
from
AthenaCommon.Logging
import
logging
from
ByteStreamCnvSvc.ByteStreamConfig
import
ByteStreamReadCfg
from
TrigUpgradeTest.TriggerHistSvcConfig
import
TriggerHistSvcConfig
from
MuonConfig.MuonCablingConfig
import
RPCCablingConfigCfg
,
TGCCablingConfigCfg
from
TrigConfigSvc.TrigConfigSvcConfig
import
TrigConfigSvcCfg
from
TriggerJobOpts.TriggerConfig
import
triggerSummaryCfg
,
triggerMonitoringCfg
,
\
setupL1DecoderFromMenu
,
collectHypos
,
collectFilters
from
TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig_newJO
import
generateDecisionTree
from
TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents
import
MenuSequence
,
createStepView
from
AthenaCommon.CFElements
import
seqOR
from
RegionSelector.RegSelConfig
import
regSelCfg
from
TrigInDetConfig.TrigInDetConfig
import
TrigInDetCondConfig
from
TrigUpgradeTest.EmuStepProcessingConfig
import
generateL1DecoderAndChains
log
=
logging
.
getLogger
(
'EmuNewJOTest'
)
flags
.
needFlagsCategory
(
"Trigger"
)
flags
.
Input
.
isMC
=
False
flags
.
Input
.
Files
=
[
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"
]
flags
.
Trigger
.
L1Decoder
.
forceEnableAllChains
=
True
flags
.
lock
()
acc
=
ComponentAccumulator
()
acc
.
merge
(
ByteStreamReadCfg
(
flags
))
acc
.
merge
(
TriggerHistSvcConfig
(
flags
))
l1DecoderAlg
,
OrigHLTChains
=
generateL1DecoderAndChains
()
setupL1DecoderFromMenu
(
flags
,
l1DecoderAlg
)
l1DecoderAcc
=
ComponentAccumulator
()
l1DecoderAcc
.
merge
(
TGCCablingConfigCfg
(
flags
)
)
l1DecoderAcc
.
merge
(
RPCCablingConfigCfg
(
flags
)
)
l1DecoderAcc
.
merge
(
TrigConfigSvcCfg
(
flags
)
)
acc
.
merge
(
l1DecoderAcc
)
from
TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName
import
DictFromChainName
toChainDictTranslator
=
DictFromChainName
()
chainDicts
=
[
toChainDictTranslator
.
getChainDict
(
chain
.
name
)
for
chain
in
OrigHLTChains
]
## Set ca in all sequences to none
changed_sequences
=
{}
HLTChains
=
[]
# select only chains that work after the changes in defining the chains in the EmuStep:
# problem arises when two chains share the same step, exclty the same object, as will happen in the final menu
# since this function will be changed soon, I did not investigate more
# for now, I just exclude some chains in the test
excludeChainNames
=
[
'HLT_mu10'
,
'HLT_mu20'
,
'HLT_mu6'
,
'HLT_mu8_1step'
,
'HLT_e8'
,
'HLT_e5_v3'
,
'HLT_mu8_e8'
]
for
chain
in
OrigHLTChains
:
if
chain
.
name
not
in
excludeChainNames
:
HLTChains
.
append
(
chain
)
log
.
info
(
"Selected chain %s"
,
chain
.
name
)
for
chainIndex
,
chain
in
enumerate
(
HLTChains
):
for
stepIndex
,
step
in
enumerate
(
chain
.
steps
):
for
seqIndex
,
seq
in
enumerate
(
step
.
sequences
):
hypoAlg
=
seq
.
hypo
.
Alg
.
__class__
(
seq
.
hypo
.
Alg
.
name
(),
**
seq
.
hypo
.
Alg
.
getValuedProperties
())
if
seq
.
name
in
changed_sequences
:
hypoTool
=
changed_sequences
[
seq
.
name
].
hypoToolGen
(
chainDicts
[
chainIndex
])
hypoAlg
.
HypoTools
=
[
hypoTool
]
continue
else
:
conf
=
seq
.
hypoToolConf
hypoTool
=
conf
.
hypoToolGen
(
chainDicts
[
chainIndex
])
hypoAlg
.
HypoTools
=
[
hypoTool
]
changed_sequences
[
seq
.
name
]
=
conf
stepReco
,
stepView
=
createStepView
(
step
.
name
)
sequenceAcc
=
ComponentAccumulator
()
sequenceAcc
.
addSequence
(
stepView
)
sequenceAcc
.
addSequence
(
seq
.
sequence
.
Alg
,
parentName
=
stepReco
.
getName
())
sequenceAcc
.
addEventAlgo
(
hypoAlg
,
sequenceName
=
stepView
.
getName
())
seq
.
ca
=
sequenceAcc
sequenceAcc
.
wasMerged
()
ms
=
MenuSequence
(
Sequence
=
seq
.
sequence
.
Alg
,
Maker
=
seq
.
maker
.
Alg
,
Hypo
=
hypoAlg
,
HypoToolGen
=
None
,
CA
=
sequenceAcc
)
step
.
sequences
[
seqIndex
]
=
ms
menuAcc
=
generateDecisionTree
(
HLTChains
)
HLTSteps
=
menuAcc
.
getSequence
(
"HLTAllSteps"
)
hypos
=
collectHypos
(
HLTSteps
)
filters
=
collectFilters
(
HLTSteps
)
summaryAcc
,
summaryAlg
=
triggerSummaryCfg
(
flags
,
hypos
)
acc
.
merge
(
summaryAcc
)
monitoringAcc
,
monitoringAlg
=
triggerMonitoringCfg
(
flags
,
hypos
,
filters
,
l1DecoderAlg
)
acc
.
merge
(
monitoringAcc
)
topSequenceName
=
"HLTTop"
HLTTopSequence
=
seqOR
(
topSequenceName
,
[
l1DecoderAlg
,
HLTSteps
,
summaryAlg
,
monitoringAlg
])
acc
.
addSequence
(
HLTTopSequence
)
acc
.
merge
(
menuAcc
)
acc
.
merge
(
regSelCfg
(
flags
))
acc
.
merge
(
TrigInDetCondConfig
(
flags
))
acc
.
printConfig
()
fname
=
"EmuNewJOTest.pkl"
log
.
debug
(
"Storing config in the config %s"
,
fname
)
with
open
(
fname
,
"wb"
)
as
p
:
acc
.
store
(
p
,
nEvents
=
4
,
useBootStrapFile
=
False
,
threaded
=
True
)
p
.
close
()
Trigger/TrigSteer/DecisionHandling/share/EmuStepProcessingTest.py
deleted
100644 → 0
View file @
5683b312
###############################################################
#
# Job options file
#
# Based on AthExStoreGateExamples
#
#==============================================================
#--------------------------------------------------------------
# ATLAS default Application Configuration options
#--------------------------------------------------------------
from
__future__
import
print_function
# input parameters:
class
opt
:
doMenu
=
False
# use either menu or manual chain building
from
AthenaCommon.Logging
import
logging
from
TriggerJobOpts.TriggerFlags
import
TriggerFlags
from
DecisionHandling.EmuStepProcessingConfig
import
generateL1DecoderAndChainsManually
,
generateL1DecoderAndChainsByMenu
from
AthenaCommon.AlgSequence
import
AlgSequence
from
TriggerMenuMT.HLTMenuConfig.Menu.HLTMenuJSON
import
generateJSON
# signatures
# steps: sequential AND of 1=Filter 2=Processing
# chainstep=single chain step
# global step=joint for all chains
# filters: one SeqFilter per step, per chain
# inputMakers: one per each first RecoAlg in a step (so one per step), one input per chain that needs that step
log
=
logging
.
getLogger
(
'EmuStepProcessingTest.py'
)
log
.
info
(
'Setup options:'
)
defaultOptions
=
[
a
for
a
in
dir
(
opt
)
if
not
a
.
startswith
(
'__'
)]
for
option
in
defaultOptions
:
if
option
in
globals
():
setattr
(
opt
,
option
,
globals
()[
option
])
log
.
info
(
' %20s = %s'
%
(
option
,
getattr
(
opt
,
option
)))
else
:
log
.
info
(
' %20s = (Default) %s'
%
(
option
,
getattr
(
opt
,
option
)))
TriggerFlags
.
generateMenuDiagnostics
=
True
topSequence
=
AlgSequence
()
if
opt
.
doMenu
is
True
:
generateL1DecoderAndChainsByMenu
(
topSequence
)
else
:
generateL1DecoderAndChainsManually
(
topSequence
)
generateJSON
()