Skip to content
Snippets Groups Projects
Commit f349880a authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'master-l1calo-athMT-addInputRename-AE' into 'master'

l1calo athenaMT migration to readhandles

See merge request atlas/athena!22046
parents 26340731 eb533670
No related branches found
No related tags found
No related merge requests found
...@@ -131,9 +131,6 @@ private: ...@@ -131,9 +131,6 @@ private:
//Flag to enable zero suppression (makes algorithm simulation much faster //Flag to enable zero suppression (makes algorithm simulation much faster
bool m_ZeroSuppress; bool m_ZeroSuppress;
// locations within the TES to store collections of Trigger Towers
std::string m_outputLocation;
// require all calorimeters, or allow running with some missing? // require all calorimeters, or allow running with some missing?
bool m_requireAllCalos; bool m_requireAllCalos;
...@@ -269,9 +266,10 @@ private: ...@@ -269,9 +266,10 @@ private:
SG::ReadHandleKey<xAOD::EventInfo> m_xaodevtKey; SG::ReadHandleKey<xAOD::EventInfo> m_xaodevtKey;
// location of input TriggerTowers (for reprocessing) // location of input TriggerTowers (for reprocessing)
SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_inputTTLocation; SG::ReadHandleKey<xAOD::TriggerTowerContainer> m_inputTTLocation;
// locations within the TES to store collections of Trigger Towers // locations within StoreGate to store collections of Trigger Towers
//SG::WriteHandleKey<xAOD::TriggerTowerContainer> m_outputLocation; SG::WriteHandleKey<xAOD::TriggerTowerContainer> m_outputLocation;
//SG::WriteHandleKey<xAOD::TriggerTowerAuxContainer> m_outputAuxLocation; // locations within StoreGate to store collections of Trigger Towers for reprocessing
SG::WriteHandleKey<xAOD::TriggerTowerContainer> m_outputLocationRerun;
// location of LAr TTL1 data // location of LAr TTL1 data
SG::ReadHandleKey<LArTTL1Container> m_EmTTL1ContainerName; SG::ReadHandleKey<LArTTL1Container> m_EmTTL1ContainerName;
......
...@@ -37,6 +37,9 @@ class Run2TriggerTowerMaker(Run2TriggerTowerMakerBase): ...@@ -37,6 +37,9 @@ class Run2TriggerTowerMaker(Run2TriggerTowerMakerBase):
super(Run2TriggerTowerMaker, self).__init__(name) super(Run2TriggerTowerMaker, self).__init__(name)
self.CellType = 3 # TTL1 input self.CellType = 3 # TTL1 input
self.ZeroSuppress = True self.ZeroSuppress = True
from SGComps.AddressRemappingSvc import addInputRename
addInputRename ( 'xAOD::TriggerTowerContainer', 'xAODTriggerTowers_rerun', 'xAODTriggerTowers')
from AthenaCommon import CfgMgr from AthenaCommon import CfgMgr
from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.AppMgr import ToolSvc
......
...@@ -22,6 +22,9 @@ job = AlgSequence() ...@@ -22,6 +22,9 @@ job = AlgSequence()
include('TrigT1CaloCalibConditions/L1CaloCalibConditionsMC_jobOptions.py') include('TrigT1CaloCalibConditions/L1CaloCalibConditionsMC_jobOptions.py')
from TrigT1CaloSim.TrigT1CaloSimRun2Config import Run2TriggerTowerMaker25ns, Run2TriggerTowerMaker50ns from TrigT1CaloSim.TrigT1CaloSimRun2Config import Run2TriggerTowerMaker25ns, Run2TriggerTowerMaker50ns
from SGComps.AddressRemappingSvc import addInputRename
addInputRename ( 'xAOD::TriggerTowerContainer', 'xAODTriggerTowers_rerun', 'xAODTriggerTowers')
# try to determine wheter running with 25ns/50ns bunchspacing # try to determine wheter running with 25ns/50ns bunchspacing
_bunchSpacing = None _bunchSpacing = None
_doPC = True # do pedestal correction? _doPC = True # do pedestal correction?
......
...@@ -110,6 +110,7 @@ namespace LVL1 { ...@@ -110,6 +110,7 @@ namespace LVL1 {
declareProperty("RequireAllCalos",m_requireAllCalos=true,"Should EM,Had and Tile all be available?"); declareProperty("RequireAllCalos",m_requireAllCalos=true,"Should EM,Had and Tile all be available?");
declareProperty("TriggerTowerLocation", m_outputLocation= TrigT1CaloDefs::xAODTriggerTowerLocation); declareProperty("TriggerTowerLocation", m_outputLocation= TrigT1CaloDefs::xAODTriggerTowerLocation);
declareProperty("TriggerTowerLocationRerun", m_outputLocationRerun = TrigT1CaloDefs::xAODTriggerTowerRerunLocation);
declareProperty("CellType", m_cellType = TTL1); declareProperty("CellType", m_cellType = TTL1);
// ADC simulation // ADC simulation
...@@ -190,13 +191,26 @@ namespace LVL1 { ...@@ -190,13 +191,26 @@ namespace LVL1 {
ATH_CHECK(m_xaodevtKey.initialize()); ATH_CHECK(m_xaodevtKey.initialize());
ATH_CHECK(m_inputTTLocation.initialize()); ATH_CHECK(m_inputTTLocation.initialize());
//ATH_CHECK(m_outputLocation.initialize());
//m_outputAuxLocation = m_outputAuxLocation.key() + "Aux.";
//ATH_CHECK(m_outputAuxLocation.initialize());
ATH_CHECK(m_EmTTL1ContainerName.initialize()); ATH_CHECK(m_EmTTL1ContainerName.initialize());
ATH_CHECK(m_HadTTL1ContainerName.initialize()); ATH_CHECK(m_HadTTL1ContainerName.initialize());
ATH_CHECK(m_TileTTL1ContainerName.initialize()); ATH_CHECK(m_TileTTL1ContainerName.initialize());
ATH_CHECK(m_outputLocation.initialize());
ATH_CHECK(m_outputLocationRerun.initialize());
//Rerun on trigger towers
if (m_cellType == TRIGGERTOWERS) {
renounce(m_EmTTL1ContainerName);
renounce(m_HadTTL1ContainerName);
renounce(m_TileTTL1ContainerName);
renounce(m_outputLocation);
}
//Start from RDO inputs
else if (m_cellType == TTL1) {
renounce(m_inputTTLocation);
renounce(m_outputLocationRerun);
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -887,9 +901,6 @@ namespace LVL1 { ...@@ -887,9 +901,6 @@ namespace LVL1 {
StatusCode Run2TriggerTowerMaker::store() StatusCode Run2TriggerTowerMaker::store()
{ {
ATH_MSG_DEBUG("Storing TTs in DataVector"); ATH_MSG_DEBUG("Storing TTs in DataVector");
if(m_outputLocation.empty()) return StatusCode::SUCCESS;
//if(m_outputLocation.key().empty()) return StatusCode::SUCCESS;
if(m_ZeroSuppress) { if(m_ZeroSuppress) {
// remove trigger towers whose energy is 0 // remove trigger towers whose energy is 0
m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(), m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
...@@ -899,12 +910,16 @@ namespace LVL1 { ...@@ -899,12 +910,16 @@ namespace LVL1 {
m_xaodTowers->end()); m_xaodTowers->end());
} }
CHECK(evtStore()->record(m_xaodTowers.release(), m_outputLocation));
CHECK(evtStore()->record(m_xaodTowersAux.release(), m_outputLocation+"Aux."));
//SG::WriteHandle<xAOD::TriggerTowerContainer> output(m_outputLocation); if (m_cellType == TRIGGERTOWERS) {
//SG::WriteHandle<xAOD::TriggerTowerAuxContainer> outputAux(m_outputAuxLocation); SG::WriteHandle<xAOD::TriggerTowerContainer> output(m_outputLocationRerun);
//CHECK(output.record(std::move(m_xaodTowers))); CHECK(output.record(std::move(m_xaodTowers), std::move(m_xaodTowersAux)));
//CHECK(outputAux.record(std::move(m_xaodTowersAux))); }
else if (m_cellType == TTL1) {
SG::WriteHandle<xAOD::TriggerTowerContainer> output(m_outputLocation);
CHECK(output.record(std::move(m_xaodTowers), std::move(m_xaodTowersAux)));
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} // end of LVL1::Run2TriggerTowerMaker::store(){ } // end of LVL1::Run2TriggerTowerMaker::store(){
......
...@@ -34,6 +34,7 @@ public: ...@@ -34,6 +34,7 @@ public:
static const std::string TriggerTowerLocation; static const std::string TriggerTowerLocation;
static const std::string xAODTriggerTowerLocation; static const std::string xAODTriggerTowerLocation;
static const std::string xAODTriggerTowerRerunLocation;
static const std::string CPMTowerLocation; static const std::string CPMTowerLocation;
static const std::string JetElementLocation; static const std::string JetElementLocation;
......
...@@ -29,6 +29,7 @@ const std::string TrigT1CaloDefs::AtlfastCellContainerLocation="/Event/AtlfastCe ...@@ -29,6 +29,7 @@ const std::string TrigT1CaloDefs::AtlfastCellContainerLocation="/Event/AtlfastCe
const std::string TrigT1CaloDefs::TriggerTowerLocation="TriggerTowers"; const std::string TrigT1CaloDefs::TriggerTowerLocation="TriggerTowers";
const std::string TrigT1CaloDefs::xAODTriggerTowerLocation="xAODTriggerTowers"; const std::string TrigT1CaloDefs::xAODTriggerTowerLocation="xAODTriggerTowers";
const std::string TrigT1CaloDefs::xAODTriggerTowerRerunLocation="xAODTriggerTowers_rerun";
const std::string TrigT1CaloDefs::JetElementLocation="JetElements"; const std::string TrigT1CaloDefs::JetElementLocation="JetElements";
const std::string TrigT1CaloDefs::CPMTowerLocation="CPMTowers"; const std::string TrigT1CaloDefs::CPMTowerLocation="CPMTowers";
......
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