15 std::unique_ptr<SiStripPedestalsSubtractor> ped,
16 std::unique_ptr<SiStripCommonModeNoiseSubtractor> cmn,
17 std::unique_ptr<SiStripFedZeroSuppression> zs,
18 std::unique_ptr<SiStripAPVRestorer> res,
21 : subtractorPed(std::
move(ped)),
22 subtractorCMN(std::
move(cmn)),
23 suppressor(std::
move(zs)),
24 restorer(std::
move(res)),
25 doAPVRestore(doAPVRest),
26 useCMMeanMap(useCMMap),
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());
164 suppressor->suppress(procRawDigis, firstAPV, output);
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];
239 const auto firstDigiIt =
std::begin(procRawDigis) + 128 * (iAPV - firstAPV);
240 std::vector<int16_t> singleAPVdigi(firstDigiIt, firstDigiIt + 128);
241 suppressor->suppress(singleAPVdigi, iAPV, output);
263 rawdigis.reserve(rawDigis.
size());
uint16_t suppressVirginRawData(uint32_t detId, uint16_t firstAPV, digivector_t &procRawDigis, edm::DetSet< SiStripDigi > &output)
void push_back(const T &t)
const std::unique_ptr< SiStripPedestalsSubtractor > subtractorPed
uint16_t suppressProcessedRawData(uint32_t detId, uint16_t firstAPV, digivector_t &procRawDigis, edm::DetSet< SiStripDigi > &output)
SiStripAPVRestorer::digivector_t digivector_t
uint16_t convertVirginRawToHybrid(uint32_t detId, uint16_t firstAPV, digivector_t &inDigis, edm::DetSet< SiStripDigi > &rawDigis)
SiStripRawProcessingAlgorithms(edm::ConsumesCollector iC, std::unique_ptr< SiStripPedestalsSubtractor > ped, std::unique_ptr< SiStripCommonModeNoiseSubtractor > cmn, std::unique_ptr< SiStripFedZeroSuppression > zs, std::unique_ptr< SiStripAPVRestorer > res, bool doAPVRest, bool useCMMap)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
const std::unique_ptr< SiStripAPVRestorer > restorer
bool getData(T &iHolder) const
const std::unique_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN
const uint16_t & strip() const
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
const std::unique_ptr< SiStripFedZeroSuppression > suppressor
const std::vector< bool > & getAPVFlags() const
const TrackerGeometry * trGeo
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
void initialize(const edm::EventSetup &)
const uint16_t & adc() const
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
uint16_t suppressHybridData(const edm::DetSet< SiStripDigi > &inDigis, edm::DetSet< SiStripDigi > &suppressedDigis, uint16_t firstAPV=0)