16 std::unique_ptr<SiStripPedestalsSubtractor> ped,
17 std::unique_ptr<SiStripCommonModeNoiseSubtractor> cmn,
18 std::unique_ptr<SiStripFedZeroSuppression> zs,
19 std::unique_ptr<SiStripAPVRestorer>
res,
20 bool doAPVRest,
bool useCMMap)
21 : subtractorPed(
std::
move(ped)),
70 const auto nAPVFlagged =
restorer->inspectAndRestore(
id, firstAPV, procRawDigisPedSubtracted, procRawDigis,
subtractorCMN->getAPVsCM());
73 const std::size_t nAPVs = procRawDigis.size()/128;
74 for ( uint16_t iAPV = firstAPV; iAPV < firstAPV+nAPVs; ++iAPV ) {
76 const auto firstDigiIt =
std::begin(procRawDigis)+128*(iAPV-firstAPV);
77 std::vector<int16_t> singleAPVdigi(firstDigiIt, firstDigiIt+128);
78 suppressor->suppress(singleAPVdigi, iAPV, suppressedDigis);
80 for ( uint16_t
i = 0;
i < 128; ++
i ) {
81 const int16_t digi = procRawDigisPedSubtracted[128*(iAPV-firstAPV)+
i];
122 const std::size_t nAPVs = nStrips/128;
124 rawDigis.assign(nStrips, 0);
125 std::vector<uint16_t> stripsPerAPV(nAPVs, 0);
128 rawDigis[digi.strip()] = digi.adc();
129 ++stripsPerAPV[digi.strip()/128];
132 for ( uint16_t iAPV = 0; iAPV < nAPVs; ++iAPV ) {
133 if ( stripsPerAPV[iAPV] > 64 ) {
192 int16_t nAPVFlagged =0;
194 procRawDigisPedSubtracted.assign(procRawDigis.begin(), procRawDigis.end());
197 nAPVFlagged =
restorer->inspectAndRestore(
id, firstAPV, procRawDigisPedSubtracted, procRawDigis,
subtractorCMN->getAPVsCM());
198 suppressor->suppress(procRawDigis, firstAPV, output);
239 for (
auto& digi : procRawDigis ) { digi += 1024; }
243 for (
auto& digi : procRawDigis ) { digi /= 2; }
245 procRawDigisPedSubtracted.assign(procRawDigis.begin(), procRawDigis.end());
251 for (
auto& digi : procRawDigis ) { digi *= 2; }
254 const std::size_t nAPVs = procRawDigis.size()/128;
255 for ( uint16_t iAPV = firstAPV; iAPV < nAPVs+firstAPV; ++iAPV ) {
258 for ( uint16_t
i = 0;
i < 128; ++
i ) {
259 const int16_t digi = procRawDigisPedSubtracted[128*(iAPV-firstAPV)+
i];
263 const auto firstDigiIt =
std::begin(procRawDigis)+128*(iAPV-firstAPV);
264 std::vector<int16_t> singleAPVdigi(firstDigiIt, firstDigiIt+128);
265 suppressor->suppress(singleAPVdigi, iAPV, output);
const uint16_t & adc() const
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(std::unique_ptr< SiStripPedestalsSubtractor > ped, std::unique_ptr< SiStripCommonModeNoiseSubtractor > cmn, std::unique_ptr< SiStripFedZeroSuppression > zs, std::unique_ptr< SiStripAPVRestorer > res, bool doAPVRest, bool useCMMap)
void convertHybridDigiToRawDigiVector(const edm::DetSet< SiStripDigi > &inDigis, digivector_t &rawDigis)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const std::unique_ptr< SiStripAPVRestorer > restorer
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const std::unique_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
const std::unique_ptr< SiStripFedZeroSuppression > suppressor
virtual int nstrips() const =0
const std::vector< bool > & getAPVFlags() const
const TrackerGeometry * trGeo
uint16_t suppressHybridData(const edm::DetSet< SiStripDigi > &inDigis, edm::DetSet< SiStripDigi > &suppressedDigis, digivector_t &rawDigis)
void initialize(const edm::EventSetup &)
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
T const * product() const