diff --git a/Simulation/DetSimMixing/src/BackgroundLoader.hh b/Simulation/DetSimMixing/src/BackgroundLoader.hh index 6839ec53215523ae09148156ca6a5ec65e108034..f67b5b860ffc61e3fb67ad8e1d160063e44b261f 100644 --- a/Simulation/DetSimMixing/src/BackgroundLoader.hh +++ b/Simulation/DetSimMixing/src/BackgroundLoader.hh @@ -64,10 +64,10 @@ public: continue; } - std::cout << "Collection: " << name - << ", index: " << colidx - << ", time window: " << time_window << " ns" - << ", current time: " << current_time_in_ns; + // std::cout << "Collection: " << name + // << ", index: " << colidx + // << ", time window: " << time_window << " ns" + // << ", current time: " << current_time_in_ns; // debug only. don't create any hits. // conclusion: no memory leakage in the above code. @@ -137,7 +137,7 @@ public: continue; } - std::cout << ", counter: " << counter << std::endl; + // std::cout << ", counter: " << counter << std::endl; } diff --git a/Simulation/DetSimMixing/src/DetSimMixingAlg.cc b/Simulation/DetSimMixing/src/DetSimMixingAlg.cc index cd0e030fbed29ee5fff773ce49475a7b4072ee77..2c6c7ba7d9262f8920f38b14a972b4f7c42c657c 100644 --- a/Simulation/DetSimMixing/src/DetSimMixingAlg.cc +++ b/Simulation/DetSimMixing/src/DetSimMixingAlg.cc @@ -73,7 +73,7 @@ StatusCode DetSimMixingAlg::initialize() { m_trackerColMap[name_col] = col; auto sig_col = new DataHandle<edm4hep::SimTrackerHitCollection>(name_col, Gaudi::DataHandle::Reader, this); - m_sig_trackerColMap[name_col] = col; + m_sig_trackerColMap[name_col] = sig_col; } @@ -308,6 +308,9 @@ StatusCode DetSimMixingAlg::execute() { newhit.setQuality(oldhit.getQuality()); newhit.setPosition(oldhit.getPosition()); newhit.setMomentum(oldhit.getMomentum()); + + // associate MC particle for signal + newhit.setMCParticle(oldhit.getMCParticle()); } } else if (bkg_evt.calorimeter_hits.count(colidx)) {