diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gFEXDriver.h b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gFEXDriver.h index 9785e83301eb065ad734390fe7d1571cb710719b..292af583ec5091da0d11c9eeeec85f71b5c591d7 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gFEXDriver.h +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gFEXDriver.h @@ -5,21 +5,10 @@ #include <string> // Athena/Gaudi -#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "AthenaBaseComps/AthAlgorithm.h" -#include "CaloEvent/CaloCellContainer.h" -#include "L1CaloFEXSim/gTower.h" -#include "L1CaloFEXSim/gTowerContainer.h" -#include "L1CaloFEXSim/gTowerBuilder.h" -#include "L1CaloFEXSim/gSuperCellTowerMapper.h" #include "L1CaloFEXToolInterfaces/IgFEXSysSim.h" -#include "L1CaloFEXSim/gFEXSim.h" -#include "xAODTrigL1Calo/TriggerTowerContainer.h" -#include "CaloIdentifier/CaloIdManager.h" -#include "CaloIdentifier/CaloCell_SuperCell_ID.h" #include "L1CaloFEXSim/gFEXOutputCollection.h" -#include "xAODTrigger/gFexJetRoIContainer.h" -#include "xAODTrigger/gFexGlobalRoIContainer.h" + class CaloIdManager; @@ -41,15 +30,10 @@ class gFEXDriver : public AthAlgorithm int m_numberOfEvents = 0; //Declare that gFEXDriver class will write an object of type LVL1::gTowerContainer, one of type gFEXOutputCollection - SG::WriteHandleKey<LVL1::gTowerContainer> m_gTowerContainerSGKey {this, "MyGTowers", "gTowerContainerDriver", "MyGTowers"}; SG::WriteHandleKey<gFEXOutputCollection> m_gFEXOutputCollectionSGKey {this, "MyOutputs", "gFEXOutputCollection", "MyOutputs"}; - ToolHandle<IgTowerBuilder> m_gTowerBuilderTool {this, "gTowerBuilderTool", "LVL1::gTowerBuilder", "Tool that builds gTowers for simulation"}; - ToolHandle<IgSuperCellTowerMapper> m_gSuperCellTowerMapperTool {this, "gSuperCellTowerMapperTool", "LVL1::gSuperCellTowerMapper", "Tool that maps supercells to gTowers"}; ToolHandle<IgFEXSysSim> m_gFEXSysSimTool {this, "gFEXSysSimTool", "LVL1::gFEXSysSim", "Tool that creates the gFEX System Simulation"}; - std::map<Identifier, std::pair<int,int> > m_cell_to_tower_map; - }; } // end of LVL1 namespace diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gTowerMakerFromGfexTowers.h b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gTowerMakerFromGfexTowers.h index c3dd2839c109d23b4c81332635dfe392d6f7f7ef..daae80521ff362275875fcfb09b0589150140f3a 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gTowerMakerFromGfexTowers.h +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/L1CaloFEXSim/gTowerMakerFromGfexTowers.h @@ -10,6 +10,7 @@ // Athena/Gaudi #include "AthenaBaseComps/AthAlgorithm.h" +#include "L1CaloFEXSim/gTowerBuilder.h" #include "L1CaloFEXSim/gTowerContainer.h" #include "xAODTrigL1Calo/gFexTowerContainer.h" #include "L1CaloFEXSim/gSuperCellTowerMapper.h" diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py index b51a976037e8d61b57a939d46e239879d6d50814..5ae064bc894b1edd6d69c963a868e87a8c6f12a5 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/python/L1CaloFEXSimCfg.py @@ -188,11 +188,7 @@ def L1CaloFEXSimCfg(flags, eFexTowerInputs = ["L1_eFexDataTowers","L1_eFexEmulat gFEXInputs.gSuperCellTowerMapperTool = CompFactory.LVL1.gSuperCellTowerMapper('gSuperCellTowerMapper', SCell=sCellType) gFEXInputs.gSuperCellTowerMapperTool.SCellMasking = not flags.Input.isMC - gFEX = CompFactory.LVL1.gFEXDriver('gFEXDriver') - - # The line below is a patch for (ATR-28066) - NEEDS to be cleaned up! - gFEX.gSuperCellTowerMapperTool = CompFactory.LVL1.gSuperCellTowerMapper('gSuperCellTowerMapper', SCell=sCellType) - + gFEX = CompFactory.LVL1.gFEXDriver('gFEXDriver') gFEX.gFEXSysSimTool = CompFactory.LVL1.gFEXSysSim('gFEXSysSimTool') acc.addEventAlgo(gFEXInputs) acc.addEventAlgo(gFEX) diff --git a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/gFEXDriver.cxx b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/gFEXDriver.cxx index ea32d1a835856c166a85cd1b38fa87a4c66b8064..c8e24c128219e94b731c76f75314110e2413bbcf 100644 --- a/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/gFEXDriver.cxx +++ b/Trigger/TrigT1/L1CaloFEX/L1CaloFEXSim/src/gFEXDriver.cxx @@ -4,23 +4,8 @@ #include "L1CaloFEXSim/gFEXDriver.h" - -#include "xAODTrigL1Calo/TriggerTowerContainer.h" -#include "L1CaloFEXSim/gSuperCellTowerMapper.h" - -#include "L1CaloFEXSim/gFEXSim.h" #include "L1CaloFEXSim/gFEXOutputCollection.h" -#include "L1CaloFEXSim/gFEXJetTOB.h" -#include "L1CaloFEXSim/gFEXJwoJTOB.h" - #include "StoreGate/WriteHandle.h" -#include "StoreGate/ReadHandle.h" - -#include "xAODTrigger/gFexJetRoI.h" -#include "xAODTrigger/gFexJetRoIContainer.h" - -#include "xAODTrigger/gFexGlobalRoI.h" -#include "xAODTrigger/gFexGlobalRoIContainer.h" #include <cassert> #include "SGTools/TestStore.h" @@ -57,14 +42,8 @@ StatusCode gFEXDriver::initialize() ATH_CHECK( histSvc.retrieve() ); - ATH_CHECK( m_gTowerBuilderTool.retrieve() ); - - ATH_CHECK( m_gSuperCellTowerMapperTool.retrieve() ); - ATH_CHECK( m_gFEXSysSimTool.retrieve() ); - ATH_CHECK( m_gTowerContainerSGKey.initialize() ); - ATH_CHECK( m_gFEXOutputCollectionSGKey.initialize() ); return StatusCode::SUCCESS; @@ -78,34 +57,17 @@ StatusCode gFEXDriver::initialize() ATH_MSG_DEBUG("Executing " << name() << ", processing event number " << m_numberOfEvents ); - // STEP 0 - Make a fresh local gTowerContainer - std::unique_ptr<gTowerContainer> local_gTowerContainerRaw = std::make_unique<gTowerContainer>(); - - //STEP 1 - Do some monitoring + // STEP 1 - Do some monitoring gFEXOutputCollection* my_gFEXOutputCollection = new gFEXOutputCollection(); my_gFEXOutputCollection->setdooutput(true); - - // STEP 2 - Make some gTowers and fill the local container - m_gTowerBuilderTool->init(local_gTowerContainerRaw); - - // STEP 3 - Do the supercell-tower mapping - put this information into the gTowerContainer - ATH_CHECK(m_gSuperCellTowerMapperTool->AssignTriggerTowerMapper(local_gTowerContainerRaw)); - ATH_CHECK(m_gSuperCellTowerMapperTool->AssignSuperCellsToTowers(local_gTowerContainerRaw)); - - // STEP 4 - Write the completed gTowerContainer into StoreGate (move the local copy in memory) - SG::WriteHandle<LVL1::gTowerContainer> gTowerContainerSG(m_gTowerContainerSGKey); - ATH_CHECK(gTowerContainerSG.record(std::move(local_gTowerContainerRaw))); - - // STEP 5 - Run the gFEXSysSim + // STEP 2 - Run the gFEXSysSim ATH_CHECK(m_gFEXSysSimTool->execute(my_gFEXOutputCollection)); - // STEP 6 - Close and clean the event + // STEP 3 - Close and clean the event m_gFEXSysSimTool->cleanup(); - m_gSuperCellTowerMapperTool->reset(); - m_gTowerBuilderTool->reset(); - // STEP 7 - Write the completed gFEXOutputCollection into StoreGate (move the local copy in memory) + // STEP 4 - Write the completed gFEXOutputCollection into StoreGate (move the local copy in memory) std::unique_ptr<gFEXOutputCollection> local_gFEXOutputCollection = std::unique_ptr<gFEXOutputCollection>(my_gFEXOutputCollection); SG::WriteHandle<LVL1::gFEXOutputCollection> gFEXOutputCollectionSG(m_gFEXOutputCollectionSGKey); ATH_CHECK(gFEXOutputCollectionSG.record(std::move(local_gFEXOutputCollection)));