Skip to content
Snippets Groups Projects
Commit 5c15d5ad authored by Rafal Bielski's avatar Rafal Bielski :wave:
Browse files

Update L1Sim trigger tests and configuration to enable Phase-I testing

* Rename "emptyMenu" tests to "L1SimOnly"
* Improve naming and consistent use of flags steering Phase-I and Legacy LVL1 simulation/decoding
* Add new test "L1SimOnly_phaseI" with doLVL1PhaseI=True
* Configure PhaseI MUCTPI simulation in Lvl1SimulationConfig
* Add dummy xAOD::MuonRoIContainer output in the TrigT1MuctpiPhase1 tool
* Minor updates in TrigT1MuctpiPhase1
parent ec7c7242
No related branches found
No related tags found
No related merge requests found
Showing
with 212 additions and 114 deletions
...@@ -163,8 +163,8 @@ def L1DecoderCfg(flags): ...@@ -163,8 +163,8 @@ def L1DecoderCfg(flags):
acc = ComponentAccumulator() acc = ComponentAccumulator()
decoderAlg = CompFactory.L1Decoder() decoderAlg = CompFactory.L1Decoder()
decoderAlg.RoIBResult = "RoIBResult" if flags.Trigger.decodeLegacyL1 else "" decoderAlg.RoIBResult = "RoIBResult" if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1Phase1 else ""
decoderAlg.L1TriggerResult = "L1TriggerResult" if flags.Trigger.decodePhaseIL1 else "" decoderAlg.L1TriggerResult = "L1TriggerResult" if flags.Trigger.enableL1Phase1 else ""
decoderAlg.L1DecoderSummaryKey = "L1DecoderSummary" # Transient, consumed by DecisionSummaryMakerAlg decoderAlg.L1DecoderSummaryKey = "L1DecoderSummary" # Transient, consumed by DecisionSummaryMakerAlg
decoderAlg.ctpUnpacker = CompFactory.CTPUnpackingTool( ForceEnableAllChains = flags.Trigger.L1Decoder.forceEnableAllChains, decoderAlg.ctpUnpacker = CompFactory.CTPUnpackingTool( ForceEnableAllChains = flags.Trigger.L1Decoder.forceEnableAllChains,
MonTool = CTPUnpackingMonitoring(512, 200) ) MonTool = CTPUnpackingMonitoring(512, 200) )
...@@ -198,7 +198,7 @@ def L1DecoderCfg(flags): ...@@ -198,7 +198,7 @@ def L1DecoderCfg(flags):
acc.merge( L1TriggerByteStreamDecoderCfg(flags) ) acc.merge( L1TriggerByteStreamDecoderCfg(flags) )
# Add the algorithm creating L1TriggerResult which is the input to L1Decoder (Run-3 L1) # Add the algorithm creating L1TriggerResult which is the input to L1Decoder (Run-3 L1)
if flags.Trigger.decodePhaseIL1: if flags.Trigger.enableL1Phase1:
acc.addEventAlgo( getL1TriggerResultMaker() ) acc.addEventAlgo( getL1TriggerResultMaker() )
Configurable.configurableRun3Behavior -= 1 Configurable.configurableRun3Behavior -= 1
......
...@@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC ...@@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC
PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent
Tools/PathResolver Tools/PathResolver
Control/CxxUtils Control/CxxUtils
Event/xAOD/xAODTrigger
Trigger/TrigConfiguration/TrigConfInterfaces Trigger/TrigConfiguration/TrigConfInterfaces
Trigger/TrigConfiguration/TrigConfL1Data Trigger/TrigConfiguration/TrigConfL1Data
Trigger/TrigConfiguration/TrigConfMuctpi Trigger/TrigConfiguration/TrigConfMuctpi
...@@ -28,7 +29,7 @@ atlas_add_component( TrigT1MuctpiPhase1 ...@@ -28,7 +29,7 @@ atlas_add_component( TrigT1MuctpiPhase1
src/*.cxx src/*.cxx
src/components/*.cxx src/components/*.cxx
INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS}
LINK_LIBRARIES ${XERCESC_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel AnalysisTriggerEvent PathResolver TrigConfL1Data TrigConfMuctpi TrigT1Interfaces TrigT1Result ) LINK_LIBRARIES ${XERCESC_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel AnalysisTriggerEvent PathResolver TrigConfL1Data TrigConfMuctpi TrigT1Interfaces TrigT1Result xAODTrigger )
# Install files from the package: # Install files from the package:
atlas_install_headers( TrigT1MuctpiPhase1 ) atlas_install_headers( TrigT1MuctpiPhase1 )
......
...@@ -17,6 +17,7 @@ class description ...@@ -17,6 +17,7 @@ class description
#include "TrigT1Interfaces/MuCTPIL1Topo.h" #include "TrigT1Interfaces/MuCTPIL1Topo.h"
#include "TrigT1Result/MuCTPI_RDO.h" #include "TrigT1Result/MuCTPI_RDO.h"
#include "xAODTrigger/MuonRoIContainer.h"
#include "TrigT1MuctpiPhase1/Configuration.h" #include "TrigT1MuctpiPhase1/Configuration.h"
...@@ -84,8 +85,9 @@ namespace LVL1MUCTPIPHASE1 { ...@@ -84,8 +85,9 @@ namespace LVL1MUCTPIPHASE1 {
SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyRPC{this, "MuctpiPhase1LocationRPC", "L1MuctpiStoreRPC", "Location of muctpiPhase1 for Rpc"}; SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyRPC{this, "MuctpiPhase1LocationRPC", "L1MuctpiStoreRPC", "Location of muctpiPhase1 for Rpc"};
SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyTGC{this, "MuctpiPhase1LocationTGC", "L1MuctpiStoreTGC", "Location of muctpiPhase1 for Tgc"}; SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyTGC{this, "MuctpiPhase1LocationTGC", "L1MuctpiStoreTGC", "Location of muctpiPhase1 for Tgc"};
SG::ReadHandleKey<MuCTPI_RDO> m_MuCTPI_RDOReadKey{this, "MUCTPI_RDOLocation", "MUCTPI_RDO", "Location of MuCTPI_RDO"}; SG::ReadHandleKey<MuCTPI_RDO> m_MuCTPI_RDOReadKey{this, "MUCTPI_RDOReadKey", "MUCTPI_RDO", "Location of MuCTPI_RDO"};
SG::WriteHandleKey<MuCTPI_RDO> m_MuCTPI_RDOWriteKey{this, "MUCTPI_RDOLocation", "MUCTPI_RDO", "Location of MuCTPI_RDO"}; SG::WriteHandleKey<MuCTPI_RDO> m_MuCTPI_RDOWriteKey{this, "MUCTPI_RDOWriteKey", "MUCTPI_RDO", "Location of MuCTPI_RDO"};
SG::WriteHandleKey<xAOD::MuonRoIContainer> m_MuCTPI_xAODWriteKey{this, "MUCTPI_xAODLocation", "LVL1MuonRoIs", "Location of xAOD::MuonRoIContainer"};
SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey; SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey;
SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey_m2; SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey_m2;
SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey_m1; SG::WriteHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPIL1TopoKey_m1;
......
...@@ -118,7 +118,7 @@ class DefaultL1MuctpiPhase1Tool( LVL1MUCTPIPHASE1__MUCTPI_AthTool ): ...@@ -118,7 +118,7 @@ class DefaultL1MuctpiPhase1Tool( LVL1MUCTPIPHASE1__MUCTPI_AthTool ):
self.RunPeriod = "UNDEFINED" self.RunPeriod = "UNDEFINED"
self.FlaggingMode = False self.FlaggingMode = False
self.MultiplicityStrategyName = "INCLUSIVE" self.MultiplicityStrategyName = "INCLUSIVE"
self.GeometryXMLFile = "TrigT1MuctpiPhase1/L1MuonGeometry.xml" self.GeometryXMLFile = "TrigConfMuctpi/L1MuonGeometry_20200629.xml"
# Decide which LUT to use, based on which run we are simulating: # Decide which LUT to use, based on which run we are simulating:
from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags from AtlasGeoModel.CommonGMJobProperties import CommonGeometryFlags as commonGeoFlags
......
...@@ -10,7 +10,7 @@ namespace LVL1MUCTPIPHASE1 { ...@@ -10,7 +10,7 @@ namespace LVL1MUCTPIPHASE1 {
MUCTPI_AthAlg::MUCTPI_AthAlg( const std::string& name, ISvcLocator* pSvcLocator ) MUCTPI_AthAlg::MUCTPI_AthAlg( const std::string& name, ISvcLocator* pSvcLocator )
: :
AthAlgorithm(name, pSvcLocator), AthAlgorithm(name, pSvcLocator),
m_muctpiTool("LVL1MUCTPIPHASE1::MUCTPI_AthTool/LVL1MUCTPIPHASE1__MUCTPI_AthTool") m_muctpiTool("LVL1MUCTPIPHASE1__MUCTPI_AthTool/MUCTPI_AthTool")
{ {
// Init message // Init message
ATH_MSG_INFO( "=======================================" ); ATH_MSG_INFO( "=======================================" );
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "TrigT1Result/MuCTPI_RDO.h" #include "TrigT1Result/MuCTPI_RDO.h"
#include "TrigT1Result/MuCTPIRoI.h" #include "TrigT1Result/MuCTPIRoI.h"
#include "xAODTrigger/MuonRoI.h"
#include "xAODTrigger/MuonRoIAuxContainer.h"
#include "AnalysisTriggerEvent/LVL1_ROI.h" #include "AnalysisTriggerEvent/LVL1_ROI.h"
...@@ -45,7 +47,7 @@ namespace LVL1MUCTPIPHASE1 { ...@@ -45,7 +47,7 @@ namespace LVL1MUCTPIPHASE1 {
const std::string MUCTPI_AthTool::m_DEFAULT_L1MuctpiStoreLocationTGC = "/Event/L1MuctpiStoreTGC"; const std::string MUCTPI_AthTool::m_DEFAULT_L1MuctpiStoreLocationTGC = "/Event/L1MuctpiStoreTGC";
const std::string MUCTPI_AthTool::m_DEFAULT_AODLocID = "LVL1_ROI"; const std::string MUCTPI_AthTool::m_DEFAULT_AODLocID = "LVL1_ROI";
const std::string MUCTPI_AthTool::m_DEFAULT_RDOLocID = "MUCTPI_RDO"; const std::string MUCTPI_AthTool::m_DEFAULT_RDOLocID = "MUCTPI_RDO";
const std::string MUCTPI_AthTool::m_DEFAULT_geometryXMLFile = "TrigT1MuctpiPhase1/L1MuonGeometry.xml"; const std::string MUCTPI_AthTool::m_DEFAULT_geometryXMLFile = "TrigConfMuctpi/L1MuonGeometry_20200629.xml";
MUCTPI_AthTool::MUCTPI_AthTool(const std::string& type, const std::string& name, MUCTPI_AthTool::MUCTPI_AthTool(const std::string& type, const std::string& name,
const IInterface* parent) const IInterface* parent)
...@@ -142,7 +144,7 @@ namespace LVL1MUCTPIPHASE1 { ...@@ -142,7 +144,7 @@ namespace LVL1MUCTPIPHASE1 {
CHECK(m_configSvc.retrieve()); CHECK(m_configSvc.retrieve());
//initialize MSP ROI configuration //initialize MSP ROI configuration
const std::string fullFileName = PathResolverFindXMLFile( m_geometryXMLFile ); const std::string fullFileName = PathResolverFindCalibFile( m_geometryXMLFile );
m_theMuctpi->configureMSP(fullFileName); m_theMuctpi->configureMSP(fullFileName);
m_theMuctpi->getTriggerProcessor()->setThresholds(m_configSvc->thresholdConfig()->getThresholdVector(TrigConf::L1DataDef::MUON)); m_theMuctpi->getTriggerProcessor()->setThresholds(m_configSvc->thresholdConfig()->getThresholdVector(TrigConf::L1DataDef::MUON));
...@@ -188,6 +190,7 @@ namespace LVL1MUCTPIPHASE1 { ...@@ -188,6 +190,7 @@ namespace LVL1MUCTPIPHASE1 {
ATH_CHECK(m_muctpiPhase1KeyTGC.initialize()); ATH_CHECK(m_muctpiPhase1KeyTGC.initialize());
ATH_CHECK(m_MuCTPI_RDOReadKey.initialize(m_inputSource == "RDO")); ATH_CHECK(m_MuCTPI_RDOReadKey.initialize(m_inputSource == "RDO"));
ATH_CHECK(m_MuCTPI_RDOWriteKey.initialize(m_inputSource != "RDO")); ATH_CHECK(m_MuCTPI_RDOWriteKey.initialize(m_inputSource != "RDO"));
ATH_CHECK(m_MuCTPI_xAODWriteKey.initialize());
ATH_CHECK(m_MuCTPIL1TopoKey.initialize()); ATH_CHECK(m_MuCTPIL1TopoKey.initialize());
m_MuCTPIL1TopoKey_m2 = m_MuCTPIL1TopoKey.key()+std::to_string(-2); m_MuCTPIL1TopoKey_m2 = m_MuCTPIL1TopoKey.key()+std::to_string(-2);
...@@ -423,9 +426,15 @@ namespace LVL1MUCTPIPHASE1 { ...@@ -423,9 +426,15 @@ namespace LVL1MUCTPIPHASE1 {
ATH_CHECK(wh_muctpi_rdo.record(std::make_unique<MuCTPI_RDO>(*muCTPI_RDO))); ATH_CHECK(wh_muctpi_rdo.record(std::make_unique<MuCTPI_RDO>(*muCTPI_RDO)));
ATH_MSG_DEBUG( "MuCTPI_RDO object recorded to StoreGate"); ATH_MSG_DEBUG( "MuCTPI_RDO object recorded to StoreGate");
// create MuCTPI xAOD
auto xAODRoIs = SG::makeHandle(m_MuCTPI_xAODWriteKey);
ATH_CHECK(xAODRoIs.record(std::make_unique<xAOD::MuonRoIContainer>(), std::make_unique<xAOD::MuonRoIAuxContainer>()));
ATH_MSG_DEBUG("Recorded MuonRoIContainer with key " << m_MuCTPI_xAODWriteKey.key());
for (const unsigned int word : dataWords) {
xAODRoIs->push_back(new xAOD::MuonRoI);
// RB: dummy values just to have the objects for downstream code development
xAODRoIs->back()->initialize(word, 99, 99, "DummyThreshold", 99);
}
// get outputs for L1Topo and store into Storegate // get outputs for L1Topo and store into Storegate
ATH_MSG_DEBUG("Getting the output for L1Topo"); ATH_MSG_DEBUG("Getting the output for L1Topo");
......
...@@ -35,11 +35,11 @@ def ExampleL1TriggerByteStreamToolCfg(name, writeBS=False): ...@@ -35,11 +35,11 @@ def ExampleL1TriggerByteStreamToolCfg(name, writeBS=False):
def L1TriggerByteStreamDecoderCfg(flags): def L1TriggerByteStreamDecoderCfg(flags):
decoderTools = [] decoderTools = []
if flags.Trigger.decodeLegacyL1: if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1Phase1:
roibResultTool = RoIBResultByteStreamToolCfg(name="RoIBResultBSDecoderTool", writeBS=False) roibResultTool = RoIBResultByteStreamToolCfg(name="RoIBResultBSDecoderTool", writeBS=False)
decoderTools += [roibResultTool] decoderTools += [roibResultTool]
if flags.Trigger.decodePhaseIL1: if flags.Trigger.enableL1Phase1:
# Placeholder for real decoder tools - now it's just an example # Placeholder for real decoder tools - now it's just an example
exampleTool = ExampleL1TriggerByteStreamToolCfg(name="L1MuonBSDecoderTool", writeBS=False) exampleTool = ExampleL1TriggerByteStreamToolCfg(name="L1MuonBSDecoderTool", writeBS=False)
decoderTools += [exampleTool] decoderTools += [exampleTool]
...@@ -55,23 +55,21 @@ def L1TriggerByteStreamEncoderCfg(flags): ...@@ -55,23 +55,21 @@ def L1TriggerByteStreamEncoderCfg(flags):
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
acc = ComponentAccumulator() acc = ComponentAccumulator()
if flags.Trigger.decodeLegacyL1: # TODO: Maybe have separate encode*L1 flags? if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1Phase1:
roibResultTool = RoIBResultByteStreamToolCfg(name="RoIBResultBSEncoderTool", writeBS=True) roibResultTool = RoIBResultByteStreamToolCfg(name="RoIBResultBSEncoderTool", writeBS=True)
acc.addPublicTool(roibResultTool) acc.addPublicTool(roibResultTool)
if flags.Trigger.decodePhaseIL1: if flags.Trigger.enableL1Phase1:
# Placeholder for real encoder tools - now it's just an example # Placeholder for real encoder tools - now it's just an example
exampleTool = ExampleL1TriggerByteStreamToolCfg(name="L1MuonBSEncoderTool", writeBS=True) exampleTool = ExampleL1TriggerByteStreamToolCfg(name="L1MuonBSEncoderTool", writeBS=True)
acc.addPublicTool(exampleTool) acc.addPublicTool(exampleTool)
return acc return acc
def L1ByteStreamDecodersRecExSetup(enableRun2L1=True, enableRun3L1=True): def L1ByteStreamDecodersRecExSetup():
# Use new-style config from the above functions and import into old-style JO # Use new-style config from the above functions and import into old-style JO
from AthenaConfiguration.ComponentAccumulator import CAtoGlobalWrapper from AthenaConfiguration.ComponentAccumulator import CAtoGlobalWrapper
from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaConfiguration.AllConfigFlags import ConfigFlags
ConfigFlags.Trigger.decodeLegacyL1 = enableRun2L1
ConfigFlags.Trigger.decodePhaseIL1 = enableRun3L1
CAtoGlobalWrapper(L1TriggerByteStreamDecoderCfg,ConfigFlags) CAtoGlobalWrapper(L1TriggerByteStreamDecoderCfg,ConfigFlags)
def L1ByteStreamEncodersRecExSetup(): def L1ByteStreamEncodersRecExSetup():
......
...@@ -13,7 +13,14 @@ ex.type = 'athena' ...@@ -13,7 +13,14 @@ ex.type = 'athena'
ex.job_options = 'TriggerJobOpts/runHLT_standalone.py' ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
ex.input = 'ttbar' ex.input = 'ttbar'
ex.threads = 1 ex.threads = 1
ex.args = '-c "setMenu=\'LS2_v1\';doL1Sim=True;doEmptyMenu=True;doWriteBS=False;doWriteRDOTrigger=True;"' precommand = ''.join([
"setMenu='LS2_v1';", # LS2_v1 soon to be renamed to Dev_pp_run3_v1
"doL1Sim=True;",
"doEmptyMenu=True;",
"doWriteBS=False;",
"doWriteRDOTrigger=True;"
])
ex.args = '-c "{:s}"'.format(precommand)
test = Test.Test() test = Test.Test()
test.art_type = 'build' test.art_type = 'build'
......
#!/usr/bin/env python
# art-description: Trigger RDO->RDO_TRIG athena test with L1 simulation with Phase-I path enabled but without any HLT chains
# art-type: build
# art-include: master/Athena
# Skipping art-output which has no effect for build tests.
# If you create a grid version, check art-output in existing grid tests.
from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
ex = ExecStep.ExecStep()
ex.type = 'athena'
ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
ex.input = 'ttbar'
ex.threads = 1
precommand = ''.join([
"setMenu='LS2_v1';", # LS2_v1 soon to be renamed to Dev_pp_run3_v1
"doL1Sim=True;",
"enableL1Phase1=True;",
"enableL1CaloLegacy=True;",
"doEmptyMenu=True;",
"doWriteBS=False;",
"doWriteRDOTrigger=True;"
])
ex.args = '-c "{:s}"'.format(precommand)
test = Test.Test()
test.art_type = 'build'
test.exec_steps = [ex]
test.check_steps = CheckSteps.default_check_steps(test)
# Skip ZeroCounts check because empty menu has no counts
test.check_steps.remove(test.get_step("ZeroCounts"))
import sys
sys.exit(test.run())
...@@ -141,7 +141,7 @@ class HLTSimulationGetter(Configured): ...@@ -141,7 +141,7 @@ class HLTSimulationGetter(Configured):
if jobproperties.Global.InputFormat() == 'bytestream': if jobproperties.Global.InputFormat() == 'bytestream':
# Decode ROIB::RoIBResult from ByteStream # Decode ROIB::RoIBResult from ByteStream
from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
L1ByteStreamDecodersRecExSetup(enableRun2L1=True, enableRun3L1=False) L1ByteStreamDecodersRecExSetup()
log.info("Loading RegionSelector") log.info("Loading RegionSelector")
from AthenaCommon.AppMgr import ServiceMgr from AthenaCommon.AppMgr import ServiceMgr
......
...@@ -47,7 +47,7 @@ class Lvl1ResultBuilderGetter(Configured): ...@@ -47,7 +47,7 @@ class Lvl1ResultBuilderGetter(Configured):
if jobproperties.Global.InputFormat() == 'bytestream': if jobproperties.Global.InputFormat() == 'bytestream':
# Decode ROIB::RoIBResult from ByteStream # Decode ROIB::RoIBResult from ByteStream
from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
L1ByteStreamDecodersRecExSetup(enableRun2L1=True, enableRun3L1=False) L1ByteStreamDecodersRecExSetup()
from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import \ from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import \
RoIBResultToAOD RoIBResultToAOD
topSequence += RoIBResultToAOD("RoIBResultToxAOD") topSequence += RoIBResultToAOD("RoIBResultToxAOD")
......
...@@ -28,59 +28,67 @@ def Lvl1SimulationSequence( flags = None ): ...@@ -28,59 +28,67 @@ def Lvl1SimulationSequence( flags = None ):
log.info("setting up LVL1ConfigSvc, including the menu generation") log.info("setting up LVL1ConfigSvc, including the menu generation")
from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc
svcMgr += conf2toConfigurable(getL1ConfigSvc()) svcMgr += conf2toConfigurable(getL1ConfigSvc())
from TrigT1CaloSim.TrigT1CaloSimRun2Config import Run2TriggerTowerMaker
caloTowerMaker = Run2TriggerTowerMaker("Run2TriggerTowerMaker25ns")
caloTowerMaker.ExtraInputs = ["LArTTL1Container#LArTTL1EM", "LArTTL1Container#LArTTL1HAD", "TileTTL1Container#TileTTL1Cnt" ]
caloTowerMaker.ZeroSuppress = True
caloTowerMaker.CellType = 3
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__Run2CPMTowerMaker
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__Run2JetElementMaker
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__CPMSim
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JEMJetSim
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JEMEnergySim
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__CPCMX
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JetCMX
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__EnergyCMX
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__RoIROD
from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS
from TrigT1ZDC.TrigT1ZDCConf import LVL1__TrigT1ZDC
l1CaloSim = seqAND('l1CaloSim',[
caloTowerMaker,
#LVL1__Run2CPMTowerMaker( 'CPMTowerMaker', ExtraInputs=["XYZ#1"], ExtraOutputs=["XYZ#2"]) ,
LVL1__Run2CPMTowerMaker( 'CPMTowerMaker') ,
LVL1__Run2JetElementMaker( 'JetElementMaker'),
LVL1__CPMSim( 'CPMSim' ) ,
LVL1__JEMJetSim( 'JEMJetSim' ) ,
LVL1__JEMEnergySim( 'JEMEnergySim' ) ,
LVL1__CPCMX( 'CPCMX' ) ,
LVL1__JetCMX( 'JetCMX' ) ,
LVL1__EnergyCMX( 'EnergyCMX' ) ,
LVL1__RoIROD( 'RoIROD' ),
LVL1__TrigT1MBTS(),
LVL1__TrigT1ZDC()
])
from IOVDbSvc.CondDB import conddb
L1CaloFolderList = []
#L1CaloFolderList += ["/TRIGGER/L1Calo/V1/Calibration/Physics/PprChanCalib"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib"]
#L1CaloFolderList += ["/TRIGGER/L1Calo/V1/Conditions/RunParameters"]
#L1CaloFolderList += ["/TRIGGER/L1Calo/V1/Conditions/DerivedRunPars"]
#L1CaloFolderList += ["/TRIGGER/Receivers/Conditions/VgaDac"]
#L1CaloFolderList += ["/TRIGGER/Receivers/Conditions/Strategy"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Conditions/DisabledTowers"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Calibration/PpmDeadChannels"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults"]
##################################################
for l1calofolder in L1CaloFolderList: # Calo
#conddb.addFolderWithTag("TRIGGER_OFL", l1calofolder, "HEAD") ##################################################
conddb.addFolder( "TRIGGER_OFL", l1calofolder )
# muons if flags.Trigger.enableL1CaloLegacy:
from TrigT1CaloSim.TrigT1CaloSimRun2Config import Run2TriggerTowerMaker
caloTowerMaker = Run2TriggerTowerMaker("Run2TriggerTowerMaker25ns")
caloTowerMaker.ExtraInputs = ["LArTTL1Container#LArTTL1EM", "LArTTL1Container#LArTTL1HAD", "TileTTL1Container#TileTTL1Cnt" ]
caloTowerMaker.ZeroSuppress = True
caloTowerMaker.CellType = 3
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__Run2CPMTowerMaker
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__Run2JetElementMaker
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__CPMSim
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JEMJetSim
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JEMEnergySim
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__CPCMX
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__JetCMX
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__EnergyCMX
from TrigT1CaloSim.TrigT1CaloSimConf import LVL1__RoIROD
from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS
from TrigT1ZDC.TrigT1ZDCConf import LVL1__TrigT1ZDC
l1CaloSim = seqAND('l1CaloSim',[
caloTowerMaker,
#LVL1__Run2CPMTowerMaker( 'CPMTowerMaker', ExtraInputs=["XYZ#1"], ExtraOutputs=["XYZ#2"]) ,
LVL1__Run2CPMTowerMaker( 'CPMTowerMaker') ,
LVL1__Run2JetElementMaker( 'JetElementMaker'),
LVL1__CPMSim( 'CPMSim' ) ,
LVL1__JEMJetSim( 'JEMJetSim' ) ,
LVL1__JEMEnergySim( 'JEMEnergySim' ) ,
LVL1__CPCMX( 'CPCMX' ) ,
LVL1__JetCMX( 'JetCMX' ) ,
LVL1__EnergyCMX( 'EnergyCMX' ) ,
LVL1__RoIROD( 'RoIROD' ),
LVL1__TrigT1MBTS(),
LVL1__TrigT1ZDC()
])
from IOVDbSvc.CondDB import conddb
L1CaloFolderList = []
#L1CaloFolderList += ["/TRIGGER/L1Calo/V1/Calibration/Physics/PprChanCalib"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib"]
#L1CaloFolderList += ["/TRIGGER/L1Calo/V1/Conditions/RunParameters"]
#L1CaloFolderList += ["/TRIGGER/L1Calo/V1/Conditions/DerivedRunPars"]
#L1CaloFolderList += ["/TRIGGER/Receivers/Conditions/VgaDac"]
#L1CaloFolderList += ["/TRIGGER/Receivers/Conditions/Strategy"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Conditions/DisabledTowers"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Calibration/PpmDeadChannels"]
L1CaloFolderList += ["/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults"]
for l1calofolder in L1CaloFolderList:
#conddb.addFolderWithTag("TRIGGER_OFL", l1calofolder, "HEAD")
conddb.addFolder( "TRIGGER_OFL", l1calofolder )
##################################################
# Muons
##################################################
from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MuonRdoToMuonDigitTool from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MuonRdoToMuonDigitTool
MuonRdoToMuonDigitTool = MuonRdoToMuonDigitTool (DecodeMdtRDO = False, MuonRdoToMuonDigitTool = MuonRdoToMuonDigitTool (DecodeMdtRDO = False,
...@@ -104,15 +112,33 @@ def Lvl1SimulationSequence( flags = None ): ...@@ -104,15 +112,33 @@ def Lvl1SimulationSequence( flags = None ):
from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MuonRdoToMuonDigit from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import MuonRdoToMuonDigit
from TrigT1RPCsteering.TrigT1RPCsteeringConf import TrigT1RPC from TrigT1RPCsteering.TrigT1RPCsteeringConf import TrigT1RPC
from TrigT1TGC.TrigT1TGCConf import LVL1TGCTrigger__LVL1TGCTrigger from TrigT1TGC.TrigT1TGCConf import LVL1TGCTrigger__LVL1TGCTrigger
from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi
from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
ToolSvc += L1MuctpiTool("L1MuctpiTool") TrigT1RPC.useRun3Config = flags.Trigger.enableL1Phase1
ToolSvc.L1MuctpiTool.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc LVL1TGCTrigger__LVL1TGCTrigger.useRun3Config = flags.Trigger.enableL1Phase1
muctpi = L1Muctpi() if flags.Trigger.enableL1Phase1:
muctpi.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc # Placeholder for phase-I MUCTPI simulation
log.info("Configuring Phase-I MUCTPI simulation")
from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1
from TrigT1MuctpiPhase1.TrigT1MuctpiPhase1Config import L1MuctpiPhase1Tool
ToolSvc += L1MuctpiPhase1Tool("MUCTPI_AthTool")
ToolSvc.MUCTPI_AthTool.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
muctpi = L1MuctpiPhase1()
muctpi.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
else:
log.info("Configuring legacy (Run 2) MUCTPI simulation")
from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi
from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
ToolSvc += L1MuctpiTool("L1MuctpiTool")
ToolSvc.L1MuctpiTool.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
muctpi = L1Muctpi()
muctpi.LVL1ConfigSvc = svcMgr.LVL1ConfigSvc
l1MuonSim = seqAND("l1MuonSim", [ l1MuonSim = seqAND("l1MuonSim", [
MuonRdoToMuonDigit( "MuonRdoToMuonDigit", MuonRdoToMuonDigit( "MuonRdoToMuonDigit",
...@@ -138,37 +164,52 @@ def Lvl1SimulationSequence( flags = None ): ...@@ -138,37 +164,52 @@ def Lvl1SimulationSequence( flags = None ):
conddb.addFolder("TGC_OFL", "/TGC/TRIGGER/CW_EIFI", className="CondAttrListCollection") conddb.addFolder("TGC_OFL", "/TGC/TRIGGER/CW_EIFI", className="CondAttrListCollection")
conddb.addFolder("TGC_OFL", "/TGC/TRIGGER/CW_BW", className="CondAttrListCollection") conddb.addFolder("TGC_OFL", "/TGC/TRIGGER/CW_BW", className="CondAttrListCollection")
conddb.addFolder("TGC_OFL", "/TGC/TRIGGER/CW_TILE", className="CondAttrListCollection") conddb.addFolder("TGC_OFL", "/TGC/TRIGGER/CW_TILE", className="CondAttrListCollection")
from TrigT1CTP.TrigT1CTPConfig import CTPSimulationInReco
from TrigT1RoIB.TrigT1RoIBConfig import RoIBuilder
condSeq = AthSequencer("AthCondSeq") condSeq = AthSequencer("AthCondSeq")
from MuonCondSvc.MuonCondSvcConf import TGCTriggerDbAlg from MuonCondSvc.MuonCondSvcConf import TGCTriggerDbAlg
condSeq += TGCTriggerDbAlg() condSeq += TGCTriggerDbAlg()
from L1TopoSimulation.L1TopoSimulationConfig import L1TopoSimulation ##################################################
l1TopoSim = L1TopoSimulation() # Topo
##################################################
l1TopoSim.MuonInputProvider.ROIBResultLocation = "" #disable input from RoIBResult if flags.Trigger.enableL1Phase1:
l1TopoSim.MuonInputProvider.MuctpiSimTool = ToolSvc.L1MuctpiTool log.info("No phase1 configuration for L1Topo simulation is available, adding L1TopoSimPlaceholder")
l1TopoSim = AthSequencer("L1TopoSimPlaceholder")
# enable the reduced (coarse) granularity topo simulation
# currently only for MC
from AthenaCommon.GlobalFlags import globalflags
if globalflags.DataSource()!='data':
l1TopoSim.MuonInputProvider.MuonEncoding = 1
else: else:
l1TopoSim.MuonInputProvider.MuonEncoding = 0 from L1TopoSimulation.L1TopoSimulationConfig import L1TopoSimulation
l1TopoSim = L1TopoSimulation()
l1TopoSim.MuonInputProvider.ROIBResultLocation = "" #disable input from RoIBResult
l1TopoSim.MuonInputProvider.MuctpiSimTool = ToolSvc.L1MuctpiTool
# enable the reduced (coarse) granularity topo simulation
# currently only for MC
from AthenaCommon.GlobalFlags import globalflags
if globalflags.DataSource()!='data':
l1TopoSim.MuonInputProvider.MuonEncoding = 1
else:
l1TopoSim.MuonInputProvider.MuonEncoding = 0
##################################################
# CTP
##################################################
from TrigT1CTP.TrigT1CTPConfig import CTPSimulationInReco
ctp = CTPSimulationInReco("CTPSimulation") ctp = CTPSimulationInReco("CTPSimulation")
ctp.DoLUCID = False ctp.DoLUCID = False
ctp.DoBCM = False ctp.DoBCM = False
ctp.DoL1Topo = True ctp.DoL1Topo = not flags.Trigger.enableL1Phase1
ctp.UseCondL1Menu = False ctp.UseCondL1Menu = False
ctp.TrigConfigSvc = svcMgr.LVL1ConfigSvc ctp.TrigConfigSvc = svcMgr.LVL1ConfigSvc
ctpSim = seqAND("ctpSim", [ctp, RoIBuilder("RoIBuilder")]) ctpSim = seqAND("ctpSim", [ctp])
if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1Phase1:
from TrigT1RoIB.TrigT1RoIBConfig import RoIBuilder
roib = RoIBuilder("RoIBuilder")
roib.DoCalo = flags.Trigger.enableL1CaloLegacy
roib.DoMuon = not flags.Trigger.enableL1Phase1
ctpSim += [roib]
#l1Sim = seqAND("l1Sim", [caloTowerMaker] ) #l1Sim = seqAND("l1Sim", [caloTowerMaker] )
l1Sim = seqAND("l1Sim", [l1CaloSim, l1MuonSim, l1TopoSim, ctpSim] ) l1Sim = seqAND("l1Sim", [l1CaloSim, l1MuonSim, l1TopoSim, ctpSim] )
return l1Sim return l1Sim
...@@ -28,10 +28,12 @@ def createTriggerFlags(): ...@@ -28,10 +28,12 @@ def createTriggerFlags():
# changes decoding of L1 so that allways all configured chains are enabled, testing mode # changes decoding of L1 so that allways all configured chains are enabled, testing mode
flags.addFlag("Trigger.L1Decoder.forceEnableAllChains", False) flags.addFlag("Trigger.L1Decoder.forceEnableAllChains", False)
# L1 decoding options # Enable Run-3 LVL1 simulation and/or decoding
flags.addFlag('Trigger.decodeLegacyL1', True) flags.addFlag('Trigger.enableL1Phase1', False)
flags.addFlag('Trigger.decodePhaseIL1', False)
# Enable Run-2 L1Calo simulation and/or decoding (possible even if enablePhase1 is True)
flags.addFlag('Trigger.enableL1CaloLegacy', True)
# if 1, Run1 decoding version is set; if 2, Run2; if 3, Run 3 # if 1, Run1 decoding version is set; if 2, Run2; if 3, Run 3
def EDMDecodingVersion(flags): def EDMDecodingVersion(flags):
log.debug("Attempting to determine EDMDecodingVersion.") log.debug("Attempting to determine EDMDecodingVersion.")
......
...@@ -41,8 +41,8 @@ class opt: ...@@ -41,8 +41,8 @@ class opt:
endJobAfterGenerate = False # Finish job after menu generation endJobAfterGenerate = False # Finish job after menu generation
failIfNoProxy = False # Sets the SGInputLoader.FailIfNoProxy property failIfNoProxy = False # Sets the SGInputLoader.FailIfNoProxy property
forceEnableAllChains = False # if True, all HLT chains will run even if the L1 item is false forceEnableAllChains = False # if True, all HLT chains will run even if the L1 item is false
decodeLegacyL1 = True # Decode L1 RoIs from legacy L1 systems through RoIBResult for HLT seeding enableL1Phase1 = False # Enable Run-3 LVL1 simulation and/or decoding
decodePhaseIL1 = False # Decode L1 RoIs from Run-3 L1 systems through L1TriggerResult for HLT seeding enableL1CaloLegacy = True # Enable Run-2 L1Calo simulation and/or decoding (possible even if enablePhase1 is True)
#Individual slice flags #Individual slice flags
doEgammaSlice = True doEgammaSlice = True
doMuonSlice = True doMuonSlice = True
...@@ -176,6 +176,11 @@ if 'doL1Sim' not in globals(): ...@@ -176,6 +176,11 @@ if 'doL1Sim' not in globals():
opt.doL1Sim = globalflags.DataSource != 'data' opt.doL1Sim = globalflags.DataSource != 'data'
log.info('Setting default doL1Sim=%s because globalflags.DataSource=%s', opt.doL1Sim, globalflags.DataSource()) log.info('Setting default doL1Sim=%s because globalflags.DataSource=%s', opt.doL1Sim, globalflags.DataSource())
# Translate opts to flags for LVL1
ConfigFlags.Trigger.doLVL1 = opt.doL1Sim
ConfigFlags.Trigger.enableL1Phase1 = opt.enableL1Phase1
ConfigFlags.Trigger.enableL1CaloLegacy = opt.enableL1CaloLegacy
#------------------------------------------------------------- #-------------------------------------------------------------
# Transfer flags into TriggerFlags # Transfer flags into TriggerFlags
#------------------------------------------------------------- #-------------------------------------------------------------
...@@ -438,7 +443,7 @@ CAtoGlobalWrapper(L1ConfigSvcCfg,None) ...@@ -438,7 +443,7 @@ CAtoGlobalWrapper(L1ConfigSvcCfg,None)
# --------------------------------------------------------------- # ---------------------------------------------------------------
if opt.doL1Sim: if opt.doL1Sim:
from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence
topSequence += Lvl1SimulationSequence() topSequence += Lvl1SimulationSequence(ConfigFlags)
...@@ -451,20 +456,17 @@ if opt.doL1Unpacking: ...@@ -451,20 +456,17 @@ if opt.doL1Unpacking:
if globalflags.InputFormat.is_bytestream(): if globalflags.InputFormat.is_bytestream():
# Create inputs for L1Decoder from ByteStream # Create inputs for L1Decoder from ByteStream
from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
L1ByteStreamDecodersRecExSetup( L1ByteStreamDecodersRecExSetup()
enableRun2L1=opt.decodeLegacyL1,
enableRun3L1=opt.decodePhaseIL1)
if globalflags.InputFormat.is_bytestream() or opt.doL1Sim: if globalflags.InputFormat.is_bytestream() or opt.doL1Sim:
# TODO: replace with L1DecoderCfg
from L1Decoder.L1DecoderConfig import L1Decoder from L1Decoder.L1DecoderConfig import L1Decoder
l1decoder = L1Decoder("L1Decoder") l1decoder = L1Decoder("L1Decoder")
l1decoder.ctpUnpacker.ForceEnableAllChains = opt.forceEnableAllChains l1decoder.ctpUnpacker.ForceEnableAllChains = opt.forceEnableAllChains
if opt.decodePhaseIL1: l1decoder.RoIBResult = "RoIBResult" if opt.enableL1CaloLegacy or not opt.enableL1Phase1 else ""
l1decoder.L1TriggerResult = "L1TriggerResult" if opt.enableL1Phase1 else ""
if opt.enableL1Phase1:
from L1Decoder.L1DecoderConfig import getL1TriggerResultMaker from L1Decoder.L1DecoderConfig import getL1TriggerResultMaker
topSequence += conf2toConfigurable(getL1TriggerResultMaker()) topSequence += conf2toConfigurable(getL1TriggerResultMaker())
else:
l1decoder.L1TriggerResult = ""
if not opt.decodeLegacyL1:
l1decoder.RoIBResult = ""
if TriggerFlags.doTransientByteStream(): if TriggerFlags.doTransientByteStream():
transTypeKey = ("TransientBSOutType","StoreGateSvc+TransientBSOutKey") transTypeKey = ("TransientBSOutType","StoreGateSvc+TransientBSOutKey")
l1decoder.ExtraInputs += [transTypeKey] l1decoder.ExtraInputs += [transTypeKey]
......
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