Skip to content
Snippets Groups Projects
Commit 3d61a7c2 authored by Dominik Smith's avatar Dominik Smith Committed by Dominik Smith
Browse files

Small improvements to cbm::algo::tof::Clusterizer and cbm::algo::tof::Calibrate.

parent e650950c
No related branches found
No related tags found
1 merge request!1462Various small optimizations to online TOF code.
Pipeline #25313 passed
......@@ -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;
}
......
......@@ -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;
}
......
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