Skip to content
Snippets Groups Projects
Commit b048ce48 authored by Tomasz Bold's avatar Tomasz Bold
Browse files

added function allowing to configure from chainDicts, added test

parent 92b0db40
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!20593Config met hypo from chain dict
......@@ -35,6 +35,9 @@ atlas_add_component( TrigMissingETHypo
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} TrigInterfacesLib TrigTimeAlgsLib xAODTrigMissingET GaudiKernel TrigMissingEtEvent TrigMissingETHypoLib DecisionHandling )
atlas_add_test( TrigMissingETHypoConfigMT SCRIPT python -m TrigMissingETHypo.TrigMissingETHypoConfigMT
POST_EXEC_SCRIPT nopost.sh )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/TriggerConfig_*.py )
......
......@@ -49,11 +49,44 @@ class MissingETHypoToolMT(TrigMissingETHypoToolMT):
self.metThreshold = int(filter(str.isdigit, trigParts[idx-1]))
def TrigMETCellHypoToolFromDict(chainDict):
""" Configure tool operating on met from cells"""
# note for future developers, it seems that the chainDict has the information about the type of alg, it would be god to use it
# not calling the class above as it tries to parse the name back
# also there seems no property to decide if it is met from cells yet, not setting it therefore
# possibly there would be only one function if the met source is available in the chainDict and settable tool property
tool = MissingETHypoToolMT( chainDict['chainName'] )
tool.metThreshold = int(chainDict['chainParts'][0]['threshold'])
return tool
def TrigMETCellHypoToolFromName(name, conf):
return MissingETHypoToolMT(name, alg='cell')
from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import DictFromChainName
decoder = DictFromChainName()
decodedDict = decoder.analyseShortName(conf, [], "") # no L1 info
decodedDict['chainName'] = name
return TrigMETCellHypoToolFromDict( decodedDict )
def TrigMETPufitHypoToolFromName(name, conf):
return MissingETHypoToolMT(name, alg='pufit')
def TrigMETPufitHypoToolFromName(name, conf):
return MissingETHypoToolMT(name, alg='pufit')
def TrigMETMhtHypoToolFromName(name, conf):
return MissingETHypoToolMT(name, alg='mht')
if __name__ == "__main__":
confCell = TrigMETCellHypoToolFromName("HLT_xe65_L1XE50", "HLT_xe65_L1XE50")
assert confCell, "Cell tool not configured"
......@@ -16,8 +16,8 @@ from TrigUpgradeTest.metMenuDefs import metCellSequence
metCellSeq = metCellSequence()
metCellStep = ChainStep("Step1_met_cell", [metCellSeq])
testChains = [
Chain(name="HLT_xe65_L1XE50", Seed="L1_XE50", ChainSteps=[metCellStep]),
Chain(name="HLT_xe30_L1XE10", Seed="L1_XE10", ChainSteps=[metCellStep])
Chain(name="HLT_xe65_L1XE50", Seed="L1_XE50", ChainSteps=[metCellStep]),
Chain(name="HLT_xe30_L1XE10", Seed="L1_XE10", ChainSteps=[metCellStep])
]
#################################
......
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