15 std::unique_ptr<SiStripCommonModeNoiseSubtractor> cmn,
16 std::unique_ptr<SiStripFedZeroSuppression> zs,
17 std::unique_ptr<SiStripAPVRestorer>
res,
20 : subtractorPed(
std::
move(ped)),
61 uint16_t nAPVFlagged = 0;
62 auto beginAPV = hybridDigis.
begin();
63 const auto indigis_end = hybridDigis.
end();
65 while (beginAPV != indigis_end) {
68 if (nDigisInAPV > 64) {
70 for (
auto it = beginAPV; it != endAPV; ++it) {
71 workDigis[it->strip() - 128 * iAPV] = it->adc() * 2 - 1024;
75 const auto apvFlagged =
restorer->inspectAndRestore(
76 hybridDigis.
id, iAPV, workDigisPedSubtracted, workDigis,
subtractorCMN->getAPVsCM());
77 nAPVFlagged += apvFlagged;
79 suppressor->suppress(workDigis, iAPV, suppressedDigis);
81 for (uint16_t
i = 0;
i != 128; ++
i) {
82 const auto digi = workDigisPedSubtracted[
i];
132 rawdigis.reserve(rawDigis.
size());
157 int16_t nAPVFlagged = 0;
159 procRawDigisPedSubtracted.assign(procRawDigis.begin(), procRawDigis.end());
163 restorer->inspectAndRestore(
id, firstAPV, procRawDigisPedSubtracted, procRawDigis,
subtractorCMN->getAPVsCM());
181 rawdigis.reserve(rawDigis.
size());
209 for (
auto& digi : procRawDigis) {
215 for (
auto& digi : procRawDigis) {
219 procRawDigisPedSubtracted.assign(procRawDigis.begin(), procRawDigis.end());
225 for (
auto& digi : procRawDigis) {
230 const std::size_t nAPVs = procRawDigis.size() / 128;
231 for (uint16_t iAPV = firstAPV; iAPV < nAPVs + firstAPV; ++iAPV) {
234 for (uint16_t
i = 0;
i < 128; ++
i) {
235 const int16_t digi = procRawDigisPedSubtracted[128 * (iAPV - firstAPV) +
i];
236 output.push_back(
SiStripDigi(128 * iAPV +
i, (digi < 0 ? 0 : suppressor->truncate(digi))));
239 const auto firstDigiIt =
std::begin(procRawDigis) + 128 * (iAPV - firstAPV);
240 std::vector<int16_t> singleAPVdigi(firstDigiIt, firstDigiIt + 128);
263 rawdigis.reserve(rawDigis.
size());