27 std::vector<ldmx::RawSiStripHit> hits;
28 hits.reserve(raw.size());
30 for (
const auto& raw_hit : raw) {
31 const auto* ped = peds.find(raw_hit.getFebId(), raw_hit.getHybridId(),
32 raw_hit.getApvId(), raw_hit.getChannel());
34 const auto& s = raw_hit.getSamples();
35 std::vector<short> sub(s.begin(), s.end());
41 raw_hit.getApvId(), raw_hit.getChannel());
42 if (warned_channels_.insert(key).second) {
43 std::cout <<
"[PedestalSubtractor] WARN: no pedestal for channel "
44 << key <<
" — passing through un-subtracted" << std::endl;
48 i < static_cast<int>(sub.size());
50 sub[i] =
static_cast<short>(s[i] - ped->mean_[i]);
56 out.setApvId(raw_hit.getApvId());
57 out.setHybridId(raw_hit.getHybridId());
58 out.setFebId(raw_hit.getFebId());
59 out.setApvTrigger(raw_hit.getApvTrigger());
60 hits.push_back(std::move(out));
63 event.add(output_collection_, hits);