diff --git a/algo/detectors/tof/Calibrate.cxx b/algo/detectors/tof/Calibrate.cxx index 720361658e84cd2bd0d277964ec765cd82648f15..3c2199751715a97012e00a593cabb8ab7ecae666 100644 --- a/algo/detectors/tof/Calibrate.cxx +++ b/algo/detectors/tof/Calibrate.cxx @@ -63,7 +63,7 @@ namespace cbm::algo::tof mChannelDeadTime[iAddr] = pDigi.GetTime() + rpcPar.channelDeadtime; // Create calibrated digi - CbmTofDigi pCalDigi(pDigi); + CbmTofDigi& pCalDigi = calDigiOut.emplace_back(pDigi); // calibrate Digi Time pCalDigi.SetTime(pCalDigi.GetTime() - chanPar.vCPTOff[Side]); @@ -93,7 +93,6 @@ namespace cbm::algo::tof if (0 < iWx) { dWT -= dDTot * (walk[iWx - 1] - walk[iWx]); } } pCalDigi.SetTime(pCalDigi.GetTime() - dWT); // calibrate Digi Time - calDigiOut.push_back(pCalDigi); } /// Sort the buffers of hits due to the time offsets applied @@ -101,6 +100,7 @@ namespace cbm::algo::tof [](const CbmTofDigi& a, const CbmTofDigi& b) -> bool { return a.GetTime() < b.GetTime(); }); monitor.fTime = xpu::pop_timer(); + //L_(info) << MakeReport("CalibrateTime", monitor.fTime); return result; } diff --git a/algo/detectors/tof/Clusterizer.cxx b/algo/detectors/tof/Clusterizer.cxx index 640481411c1ac92c87f3c8cead0922dfbe133eb5..b71c1cace4fea801ff2af8dacd901004ca49563f 100644 --- a/algo/detectors/tof/Clusterizer.cxx +++ b/algo/detectors/tof/Clusterizer.cxx @@ -144,7 +144,7 @@ namespace cbm::algo::tof lastChan = chan; lastPosY = pos.Y(); lastTime = time; - if (AddNextChan(input, lastChan, cluster, clustersOut, &lastChanPos)) { cluster.reset(); } + AddNextChan(input, lastChan, cluster, clustersOut, &lastChanPos); } // while( 1 < storDigi.size() ) storDigi.clear(); //D.Smith 11.8.23: In rare cases, a single digi remains and is deleted here. } // for( int32_t chan = 0; chan < iNbCh; chan++ ) @@ -249,6 +249,7 @@ namespace cbm::algo::tof cluster.normalize(fParams.fTimeRes); cluster.finalize(detcell, fParams); clustersOut.push_back(cluster); + cluster.reset(); return true; }