diff --git a/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.cxx b/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.cxx index e9499e28807e8409320a2558067aeb4cae487a59..badf73436279cd1b90744711c7bf8910309f03fe 100644 --- a/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.cxx +++ b/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // Class header @@ -169,7 +169,7 @@ void ZDC_FiberSD::EndOfAthenaEvent() m_HitColl = std::make_unique<ZDC_SimFiberHit_Collection>(m_HitColl.name()); for(auto hit : m_hitMap){ - m_HitColl->Emplace(hit.second); + m_HitColl->Emplace(*(hit.second)); } diff --git a/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.h b/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.h index 63465f8f1deb3bc6326cc4f6ccd1d6e3fa8b3892..fe920cc1790df61a7dbe1ad8509ea6f9bdb87fa7 100644 --- a/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.h +++ b/ForwardDetectors/ZDC/ZDC_SD/src/ZDC_FiberSD.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ #ifndef ZDC_SD_ZDC_FIBER_SD_H @@ -14,6 +14,7 @@ // STL header #include <string> +#include <map> #include <gtest/gtest_prod.h> // G4 needed classes diff --git a/ForwardDetectors/ZDC/ZDC_SimEvent/ZDC_SimEvent/ZDC_SimFiberHit.h b/ForwardDetectors/ZDC/ZDC_SimEvent/ZDC_SimEvent/ZDC_SimFiberHit.h index cbfd7e94c1a2cbd0d8b2200ce3a83d0480769154..98a0829d963ec43fa1c989cd87b7dda6e8d90aa6 100644 --- a/ForwardDetectors/ZDC/ZDC_SimEvent/ZDC_SimEvent/ZDC_SimFiberHit.h +++ b/ForwardDetectors/ZDC/ZDC_SimEvent/ZDC_SimEvent/ZDC_SimFiberHit.h @@ -40,15 +40,11 @@ class ZDC_SimFiberHit { } - /** - * @brief Copy constructor - */ - ZDC_SimFiberHit(const ZDC_SimFiberHit *right) : ZDC_SimFiberHit(*right){}; Identifier getID () const { return m_ID; } double getEdep () const { return m_Edep; } int getNPhotons() const { return m_Nphotons; } - + /** * @brief Assignment operator */ @@ -110,17 +106,11 @@ class ZDC_SimFiberHit m_Edep += h.m_Edep; } - void Add(ZDC_SimFiberHit *h){ - Add(*h); - } bool Equals(const ZDC_SimFiberHit& h) const { return (m_ID == h.m_ID); }; - bool Equals(const ZDC_SimFiberHit* h) const { - return Equals (*h); - } - + private: diff --git a/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx b/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx index f95798613a5b543a472b0ea9a322545b0b4e3e5f..a08f524007f90afc8d81fd5cf6ae378cc1a533fb 100644 --- a/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx +++ b/ForwardDetectors/ZDC/ZDC_SimuDigitization/src/ZDC_PileUpTool.cxx @@ -284,13 +284,13 @@ void ZDC_PileUpTool::addEmptyWaveforms(xAOD::ZdcModuleContainer *zdcModuleContai for(int mod = 0; mod < 4; mod++){ if(!zdcFound[side][mod]){ ATH_MSG_DEBUG("ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for ZDC side " << side << " module " << mod); - createAndStoreWaveform(new ZDC_SimFiberHit( m_ZdcID->channel_id(side, mod, ZdcIDType::SINGLECHANNEL, 0), 0, 0), rndEngine, zdcModuleContainer); + createAndStoreWaveform(ZDC_SimFiberHit( m_ZdcID->channel_id(side, mod, ZdcIDType::SINGLECHANNEL, 0), 0, 0), rndEngine, zdcModuleContainer); } } for(int channel = 0; channel < 16; channel++){ if(!rpdFound[side][channel] && m_doRPD){ ATH_MSG_DEBUG("ZDC_PileUpTool::addEmptyWaveforms Creating empty waveform for RPD side " << side << " channel " << channel); - createAndStoreWaveform(new ZDC_SimFiberHit( m_ZdcID->channel_id(side, 4, ZdcIDType::MULTICHANNEL, channel), 0, 0), rndEngine, zdcModuleContainer); + createAndStoreWaveform(ZDC_SimFiberHit( m_ZdcID->channel_id(side, 4, ZdcIDType::MULTICHANNEL, channel), 0, 0), rndEngine, zdcModuleContainer); } } } @@ -333,7 +333,7 @@ TimedHitCollection<ZDC_SimFiberHit> ZDC_PileUpTool::doZDClightGuideCuts(const ZD //Make sure the hit exists before attempting to insert it //If it doesn't we will take care of this module in addEmptyWaveforms if(newHits[side][module]){ - newCollection->Insert(newHits[side][module]); + newCollection->Insert(*(newHits[side][module])); } } }