Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hybrid Format SiStrip Zero Suppression algorithm for 2018 PbPb data-taking #24339

Merged
merged 62 commits into from Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
19e6887
changing parameters and creating the Force Restore method
Jul 19, 2017
8cad752
adding display macro
Aug 31, 2017
81ab34e
adding baseline comparator
Aug 31, 2017
12deba3
adding hybryd generathor method
Mar 14, 2018
3b54574
adding HybridFormat Amulation
Mar 15, 2018
a213776
adding HybridFormat Amulation, bug fixing
Mar 15, 2018
9ac9966
hybrid emulation done + hybrid analyzer
Mar 20, 2018
32adf9c
hybrid emulation done + hybrid analyzer
Mar 20, 2018
6a7a7ac
committing emulation code final + tester
Apr 11, 2018
2c125b8
first implementation of hybrid format zero suppression
Apr 27, 2018
2057709
Clean up SiStripZeroSupression and split "merge" version
pieterdavid Apr 28, 2018
9ba51d0
Pedestals and CM subtractors: pass numbers by value
pieterdavid Apr 28, 2018
3650798
auto_ptr to unique_ptr
pieterdavid Apr 28, 2018
9b73c2d
FedZeroSuppression and APVRestorer: interface and whitespace cleanup
pieterdavid Apr 28, 2018
4c641a6
SiStripRawProcessingAlgorithms: uint32_t and uint16_t in interfaces
pieterdavid Apr 28, 2018
6501aed
Document and clean up Processed and Virgin raw processing algorithms
pieterdavid Apr 28, 2018
8ab873e
Document SiStripRawProcessingAlgorithms, cleanup hybrid methods
pieterdavid Apr 29, 2018
7a84df3
SiStripAPVRestorer: interface and other cleanup
pieterdavid May 2, 2018
d53e07e
SiStripAPVRestorer::DerivativeFollowerRestore indentation
pieterdavid May 3, 2018
e8c207a
also use digivector_t typedef in src/SiStripRawProcessingAlgorithms.cc
pieterdavid May 3, 2018
1753f31
Update configs
pieterdavid May 3, 2018
5b135ad
More documentation, simplify ConvertHybridDigiToRawDigiVector signature
pieterdavid May 14, 2018
67722ab
re-apply code checks fixes
pieterdavid Jun 1, 2018
a7e98be
Add hybrid zero-suppressed mode to the on-demand unpacker
pieterdavid Aug 10, 2018
602e0af
Add scope mode case to ZS
pieterdavid Aug 10, 2018
27321f1
Update configs to changes in SiStripClusterizerFromRaw parameters
CesarBernardes Aug 18, 2018
b457689
Revert last commit and use HLT customisation for changes in SiStripCl…
CesarBernardes Aug 18, 2018
afb9e1b
Add call to custom function customiseForPR24339HybridFormatSiStripZS …
CesarBernardes Aug 20, 2018
b861d8c
Merge branch 'master' into sistripZSNewAlgoDevHI_103X
CesarBernardes Aug 21, 2018
b78adcf
Add consistent indentation and use consumes calls missing in the anal…
CesarBernardes Aug 28, 2018
bdc86e4
Start name of local variables and data members with lower case letter
CesarBernardes Aug 29, 2018
5aa90a2
Remove superfluous includes and substitute couts by LogTrace/LogWarnings
CesarBernardes Aug 29, 2018
5a2736f
Change analyzers to edm::one and define a fillDescriptions function
CesarBernardes Aug 29, 2018
f27d767
Add SharedResources in analyzers since it is used TFileService
CesarBernardes Aug 29, 2018
851bf68
Fix typos, add range for loops in analyzers, and use lower case lette…
CesarBernardes Aug 30, 2018
60467c6
Use consistent variable names and add named constants
CesarBernardes Aug 30, 2018
da5639e
Changes in config files:
CesarBernardes Aug 30, 2018
3a0e15e
Apply the following changes:
CesarBernardes Aug 30, 2018
68d2918
Apply the following changes:
CesarBernardes Aug 30, 2018
0f0ef27
Remove commented out codes
CesarBernardes Aug 30, 2018
7374274
Add new era as a clone of era Run2_HI to be used with new Strip Hybri…
CesarBernardes Sep 1, 2018
b5d1fb8
Apply the following changes:
CesarBernardes Sep 1, 2018
fa2d9ab
Add 10-bit ZS repacking to cmsDriver, and a customise module to inser…
pieterdavid Sep 3, 2018
0eaea27
SiStripHybridFormatAnalyzer: make pedestals variables local, range-ba…
pieterdavid Sep 4, 2018
1997ef7
coding style: type name cmMap -> CMMap
pieterdavid Sep 4, 2018
5d63bc2
Generate siStripBaselineComparator_cfi from fillDescriptions
pieterdavid Sep 4, 2018
0fad6c9
SiStripBaselineComparator: review comments (style, simplifications)
pieterdavid Sep 4, 2018
e5fec55
Generate siStripHybridFormatAnalyzer_cfi from fillDescriptions
pieterdavid Sep 4, 2018
8f18c3d
SiStripAPVRestorer: make nTotStripsPerAPV a (static constexpr) member
pieterdavid Sep 4, 2018
a41cd51
ClustersFromRawProducer: indentation
pieterdavid Sep 4, 2018
2d8d495
SiStripMergeZeroSuppression: silence a static analyzer warning (varia…
pieterdavid Sep 4, 2018
6216658
rename hybrid emulation customize method to addBeforeRepackZS10
pieterdavid Sep 4, 2018
c5b1243
config fixes, customise method for running on hybrid data
pieterdavid Sep 4, 2018
6005756
Merge branch 'master' into sistripZSNewAlgoDevHI_103X
CesarBernardes Sep 5, 2018
7da7570
remove run2_HI_2018 (for relvals, replaced by customisation)
pieterdavid Sep 4, 2018
6b256d8
move non-production plugins to test/
pieterdavid Sep 5, 2018
5fa516e
Fix SiStripBaselineComparator fillDescriptions
pieterdavid Sep 5, 2018
bb5576e
Add BuildFile for RecoLocalTracker/SiStripZeroSuppression/test
pieterdavid Sep 5, 2018
b3821d1
use fillDescriptions for SiStripMeanCMExtractor
pieterdavid Sep 5, 2018
97603e4
forgot to remove run2_HI_2018 in one place
pieterdavid Sep 5, 2018
b462d55
Adjust customisations for separate hybridemulation, repack+zs and rec…
pieterdavid Sep 5, 2018
bcf84c8
Fix a regression in SiStripAPVRestorer::cleaner_LocalMinimumAdder
pieterdavid Sep 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Expand Up @@ -209,6 +209,16 @@ def customizeHLTForL3OIPR24267(process):



###For parameter changes in SiStripClusterizerFromRaw for PbPb 2018 data-taking
def customiseForPR24339HybridFormatSiStripZS(process):
for producer in producers_by_type(process, "SiStripClusterizerFromRaw"):
producer.Algorithms.Use10bitsTruncation = cms.bool( False )
producer.HybridZeroSuppressed = cms.bool( False )
return process
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the above the setting which reproduces the old behaviour?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you need to call this custom function - see at the end of the file:
process = customiseForPR24339HybridFormatSiStripZS(process)






# CMSSW version specific customizations
def customizeHLTforCMSSW(process, menuType="GRun"):
Expand Down
297 changes: 184 additions & 113 deletions RecoLocalTracker/SiStripClusterizer/plugins/ClustersFromRawProducer.cc
Expand Up @@ -108,11 +108,13 @@ namespace {
ClusterFiller(const FEDRawDataCollection& irawColl,
StripClusterizerAlgorithm & iclusterizer,
SiStripRawProcessingAlgorithms & irawAlgos,
bool idoAPVEmulatorCheck):
bool idoAPVEmulatorCheck,
bool hybridZeroSuppressed):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is off

rawColl(irawColl),
clusterizer(iclusterizer),
rawAlgos(irawAlgos),
doAPVEmulatorCheck(idoAPVEmulatorCheck){
doAPVEmulatorCheck(idoAPVEmulatorCheck),
hybridZeroSuppressed_(hybridZeroSuppressed){
incTot(clusterizer.allDetIds().size());
for (auto & d : done) d=nullptr;
}
Expand All @@ -137,6 +139,8 @@ namespace {

// March 2012: add flag for disabling APVe check in configuration
bool doAPVEmulatorCheck;

bool hybridZeroSuppressed_;


#ifdef VIDEBUG
Expand Down Expand Up @@ -192,7 +196,8 @@ class SiStripClusterizerFromRaw final : public edm::stream::EDProducer<> {
cabling_(nullptr),
clusterizer_(StripClusterizerAlgorithmFactory::create(conf.getParameter<edm::ParameterSet>("Clusterizer"))),
rawAlgos_(SiStripRawProcessingFactory::create(conf.getParameter<edm::ParameterSet>("Algorithms"))),
doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true)
doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true),
hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed"))
{
productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
produces< edmNew::DetSetVector<SiStripCluster> > ();
Expand All @@ -218,7 +223,7 @@ class SiStripClusterizerFromRaw final : public edm::stream::EDProducer<> {
std::unique_ptr< edmNew::DetSetVector<SiStripCluster> >
output( onDemand ?
new edmNew::DetSetVector<SiStripCluster>(std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(*rawData, *clusterizer_,
*rawAlgos_, doAPVEmulatorCheck_)
*rawAlgos_, doAPVEmulatorCheck_, hybridZeroSuppressed_)
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some less pedantic indentation less strictly matching each opening brace may make this more readable by fitting the code in the screen width

clusterizer_->allDetIds())
: new edmNew::DetSetVector<SiStripCluster>());
Expand Down Expand Up @@ -262,6 +267,7 @@ class SiStripClusterizerFromRaw final : public edm::stream::EDProducer<> {
// March 2012: add flag for disabling APVe check in configuration
bool doAPVEmulatorCheck_;

bool hybridZeroSuppressed_;
};

#include "FWCore/Framework/interface/MakerMacros.h"
Expand All @@ -281,7 +287,7 @@ void SiStripClusterizerFromRaw::initialize(const edm::EventSetup& es) {
void SiStripClusterizerFromRaw::run(const FEDRawDataCollection& rawColl,
edmNew::DetSetVector<SiStripCluster> & output) {

ClusterFiller filler(rawColl, *clusterizer_, *rawAlgos_, doAPVEmulatorCheck_);
ClusterFiller filler(rawColl, *clusterizer_, *rawAlgos_, doAPVEmulatorCheck_, hybridZeroSuppressed_);

// loop over good det in cabling
for ( auto idet : clusterizer_->allDetIds()) {
Expand All @@ -295,6 +301,91 @@ void SiStripClusterizerFromRaw::run(const FEDRawDataCollection& rawColl,
} // end loop over dets
}

namespace {
template<typename OUT>
OUT unpackZS(const sistrip::FEDChannel& chan, sistrip::FEDReadoutMode mode, uint16_t stripOffset, OUT out)
{
using namespace sistrip;
switch ( mode ) {
case READOUT_MODE_ZERO_SUPPRESSED_LITE8:
case READOUT_MODE_ZERO_SUPPRESSED_LITE8_CMOVERRIDE:
{ auto unpacker = FEDZSChannelUnpacker::zeroSuppressedLiteModeUnpacker(chan);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()); unpacker++; }
} break;
case READOUT_MODE_ZERO_SUPPRESSED_LITE10:
case READOUT_MODE_ZERO_SUPPRESSED_LITE10_CMOVERRIDE:
{ auto unpacker = FEDBSChannelUnpacker::zeroSuppressedLiteModeUnpacker(chan, 10);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()); unpacker++; }
} break;
case READOUT_MODE_ZERO_SUPPRESSED:
case READOUT_MODE_ZERO_SUPPRESSED_FAKE:
{
switch ( chan.packetCode() ) {
case PACKET_CODE_ZERO_SUPPRESSED:
{ auto unpacker = FEDZSChannelUnpacker::zeroSuppressedModeUnpacker(chan);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()); unpacker++; }
} break;
case PACKET_CODE_ZERO_SUPPRESSED10:
{ auto unpacker = FEDBSChannelUnpacker::zeroSuppressedModeUnpacker(chan, 10);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()); unpacker++; }
} break;
case PACKET_CODE_ZERO_SUPPRESSED8_BOTBOT:
{ auto unpacker = FEDBSChannelUnpacker::zeroSuppressedModeUnpacker(chan, 8);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()<<2); unpacker++; }
} break;
case PACKET_CODE_ZERO_SUPPRESSED8_TOPBOT:
{ auto unpacker = FEDBSChannelUnpacker::zeroSuppressedModeUnpacker(chan, 8);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()<<1); unpacker++; }
} break;
default:
edm::LogWarning(mlRawToCluster_) << "[ClustersFromRawProducer::" << __func__ << "]"
<< " invalid packet code " << chan.packetCode() << " for zero-suppressed.";
}
} break;
case READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT:
case READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT_CMOVERRIDE:
{ auto unpacker = FEDZSChannelUnpacker::zeroSuppressedLiteModeUnpacker(chan);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()<<1); unpacker++; }
} break;
case READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT:
case READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT_CMOVERRIDE:
{ auto unpacker = FEDZSChannelUnpacker::zeroSuppressedLiteModeUnpacker(chan);
while (unpacker.hasData()) { *out++ = SiStripDigi(stripOffset+unpacker.sampleNumber(), unpacker.adc()<<2); unpacker++; }
} break;
default:;
}
return out;
}

class StripByStripAdder {
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;

StripByStripAdder(StripClusterizerAlgorithm& clusterizer,
StripClusterizerAlgorithm::State& state,
StripClusterizerAlgorithm::output_t::TSFastFiller& record)
: clusterizer_(clusterizer), state_(state), record_(record) {}

StripByStripAdder& operator= ( SiStripDigi digi )
{
clusterizer_.stripByStripAdd(state_, digi.strip(), digi.adc(), record_);
return *this;
}

StripByStripAdder& operator* () { return *this; }
StripByStripAdder& operator++ () { return *this; }
StripByStripAdder& operator++ (int) { return *this; }
private:
StripClusterizerAlgorithm& clusterizer_;
StripClusterizerAlgorithm::State& state_;
StripClusterizerAlgorithm::output_t::TSFastFiller& record_;
};
}

void ClusterFiller::fill(StripClusterizerAlgorithm::output_t::TSFastFiller & record) {
try { // edmNew::CapacityExaustedException
incReady();
Expand Down Expand Up @@ -347,118 +438,98 @@ try { // edmNew::CapacityExaustedException


const sistrip::FEDReadoutMode mode = buffer->readoutMode();


if LIKELY(mode == sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10 || mode == sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8) {

try {
// create unpacker
sistrip::FEDZSChannelUnpacker unpacker = sistrip::FEDZSChannelUnpacker::zeroSuppressedLiteModeUnpacker(buffer->channel(fedCh));

// unpack
clusterizer.addFed(state,unpacker,ipair,record);
/*
while (unpacker.hasData()) {
clusterizer.stripByStripAdd(unpacker.sampleNumber()+ipair*256,unpacker.adc(),record);
unpacker++;
}
*/
} catch (edmNew::CapacityExaustedException const&) {
throw;
} catch (const cms::Exception& e) {
if (edm::isDebugEnabled()) {
std::ostringstream ss;
ss << "Unordered clusters for channel " << fedCh << " on FED " << fedId << ": " << e.what();
edm::LogWarning(sistrip::mlRawToCluster_) << ss.str();
}
continue;
}
} else {

if (mode == sistrip::READOUT_MODE_ZERO_SUPPRESSED || mode == sistrip::READOUT_MODE_ZERO_SUPPRESSED_FAKE ) {
try {
// create unpacker
sistrip::FEDZSChannelUnpacker unpacker = sistrip::FEDZSChannelUnpacker::zeroSuppressedModeUnpacker(buffer->channel(fedCh));

// unpack
clusterizer.addFed(state,unpacker,ipair,record);
/*
while (unpacker.hasData()) {
clusterizer.stripByStripAdd(unpacker.sampleNumber()+ipair*256,unpacker.adc(),record);
unpacker++;
}
*/
} catch (edmNew::CapacityExaustedException const&) {
throw;
}catch (const cms::Exception& e) {
if (edm::isDebugEnabled()) {
std::ostringstream ss;
ss << "Unordered clusters for channel " << fedCh << " on FED " << fedId << ": " << e.what();
edm::LogWarning(sistrip::mlRawToCluster_) << ss.str();
}
continue;
}
} else if (mode == sistrip::READOUT_MODE_VIRGIN_RAW ) {

// create unpacker
sistrip::FEDRawChannelUnpacker unpacker = sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker(buffer->channel(fedCh));

// unpack
std::vector<int16_t> digis;
while (unpacker.hasData()) {
digis.push_back(unpacker.adc());
unpacker++;
}

//process raw
uint32_t id = conn->detId();
edm::DetSet<SiStripDigi> zsdigis(id);
//rawAlgos_->subtractorPed->subtract( id, ipair*256, digis);
//rawAlgos_->subtractorCMN->subtract( id, digis);
//rawAlgos_->suppressor->suppress( digis, zsdigis);
uint16_t firstAPV = ipair*2;
rawAlgos.SuppressVirginRawData(id, firstAPV,digis, zsdigis);
for( edm::DetSet<SiStripDigi>::const_iterator it = zsdigis.begin(); it!=zsdigis.end(); it++) {
clusterizer.stripByStripAdd(state, it->strip(), it->adc(), record);
}

if LIKELY( ( mode > sistrip::READOUT_MODE_VIRGIN_RAW ) && ( mode < sistrip::READOUT_MODE_SPY ) && ( mode != sistrip::READOUT_MODE_PROC_RAW ) ) {
// ZS modes
try {
auto perStripAdder = StripByStripAdder(clusterizer, state, record);
if LIKELY( ! hybridZeroSuppressed_ ) {
unpackZS(buffer->channel(fedCh), mode, ipair*256, perStripAdder);
} else {
const uint32_t id = conn->detId();
edm::DetSet<SiStripDigi> unpDigis{id}; unpDigis.reserve(256);
unpackZS(buffer->channel(fedCh), mode, ipair*256, std::back_inserter(unpDigis));
SiStripRawProcessingAlgorithms::digivector_t workRawDigis;
rawAlgos.ConvertHybridDigiToRawDigiVector(unpDigis, workRawDigis);
edm::DetSet<SiStripDigi> suppDigis{id};
rawAlgos.SuppressHybridData(id, ipair*2, workRawDigis, suppDigis);
std::copy(std::begin(suppDigis), std::end(suppDigis), perStripAdder);
}
} catch (edmNew::CapacityExaustedException) {
throw;
} catch (const cms::Exception& e) {
if (edm::isDebugEnabled()) {
edm::LogWarning(sistrip::mlRawToCluster_) << "Unordered clusters for channel " << fedCh << " on FED " << fedId << ": " << e.what();
}
continue;
}

else if (mode == sistrip::READOUT_MODE_PROC_RAW ) {

// create unpacker
sistrip::FEDRawChannelUnpacker unpacker = sistrip::FEDRawChannelUnpacker::procRawModeUnpacker(buffer->channel(fedCh));

// unpack
std::vector<int16_t> digis;
while (unpacker.hasData()) {
digis.push_back(unpacker.adc());
unpacker++;
}

//process raw
uint32_t id = conn->detId();
edm::DetSet<SiStripDigi> zsdigis(id);
//rawAlgos_->subtractorCMN->subtract( id, digis);
//rawAlgos_->suppressor->suppress( digis, zsdigis);
uint16_t firstAPV = ipair*2;
rawAlgos.SuppressProcessedRawData(id, firstAPV,digis, zsdigis);
for( edm::DetSet<SiStripDigi>::const_iterator it = zsdigis.begin(); it!=zsdigis.end(); it++) {
clusterizer.stripByStripAdd(state, it->strip(), it->adc(), record);
}
} else {
edm::LogWarning(sistrip::mlRawToCluster_)
<< "[ClustersFromRawProducer::"
<< __func__ << "]"
<< " FEDRawData readout mode "
<< mode
<< " from FED id "
<< fedId
<< " not supported.";
continue;

} else if ( mode == sistrip::READOUT_MODE_VIRGIN_RAW ) {

std::vector<int16_t> digis;
switch ( buffer->channel(fedCh).packetCode() ) {
case sistrip::PACKET_CODE_VIRGIN_RAW:
{ auto unpacker = sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker(buffer->channel(fedCh));
while (unpacker.hasData()) { digis.push_back(unpacker.adc()); unpacker++; }
} break;
case sistrip::PACKET_CODE_VIRGIN_RAW10:
{ auto unpacker = sistrip::FEDBSChannelUnpacker::virginRawModeUnpacker(buffer->channel(fedCh), 10);
while (unpacker.hasData()) { digis.push_back(unpacker.adc()); unpacker++; }
} break;
case sistrip::PACKET_CODE_VIRGIN_RAW8_BOTBOT:
{ auto unpacker = sistrip::FEDBSChannelUnpacker::virginRawModeUnpacker(buffer->channel(fedCh), 8);
while (unpacker.hasData()) { digis.push_back(unpacker.adc()<<2); unpacker++; }
} break;
case sistrip::PACKET_CODE_VIRGIN_RAW8_TOPBOT:
{ auto unpacker = sistrip::FEDBSChannelUnpacker::virginRawModeUnpacker(buffer->channel(fedCh), 8);
while (unpacker.hasData()) { digis.push_back(unpacker.adc()<<1); unpacker++; }
} break;
default:
edm::LogWarning(sistrip::mlRawToCluster_) << "[ClustersFromRawProducer::" << __func__ << "]"
<< " invalid packet code " << buffer->channel(fedCh).packetCode() << " for virgin raw.";
}
//process raw
uint32_t id = conn->detId();
edm::DetSet<SiStripDigi> zsdigis(id);
//rawAlgos_->subtractorPed->subtract( id, ipair*256, digis);
//rawAlgos_->subtractorCMN->subtract( id, digis);
//rawAlgos_->suppressor->suppress( digis, zsdigis);
uint16_t firstAPV = ipair*2;
rawAlgos.SuppressVirginRawData(id, firstAPV,digis, zsdigis);
for ( const auto digi : zsdigis ) {
clusterizer.stripByStripAdd(state, digi.strip(), digi.adc(), record);
}

} else if ( mode == sistrip::READOUT_MODE_PROC_RAW ) {

// create unpacker
sistrip::FEDRawChannelUnpacker unpacker = sistrip::FEDRawChannelUnpacker::procRawModeUnpacker(buffer->channel(fedCh));

// unpack
std::vector<int16_t> digis;
while (unpacker.hasData()) {
digis.push_back(unpacker.adc());
unpacker++;
}

//process raw
uint32_t id = conn->detId();
edm::DetSet<SiStripDigi> zsdigis(id);
//rawAlgos_->subtractorCMN->subtract( id, digis);
//rawAlgos_->suppressor->suppress( digis, zsdigis);
uint16_t firstAPV = ipair*2;
rawAlgos.SuppressProcessedRawData(id, firstAPV,digis, zsdigis);
for( edm::DetSet<SiStripDigi>::const_iterator it = zsdigis.begin(); it!=zsdigis.end(); it++) {
clusterizer.stripByStripAdd(state, it->strip(), it->adc(), record);
}
} else {
edm::LogWarning(sistrip::mlRawToCluster_)
<< "[ClustersFromRawProducer::" << __func__ << "]"
<< " FEDRawData readout mode " << mode << " from FED id " << fedId << " not supported.";
continue;
}

} // end loop over conn

clusterizer.stripByStripEnd(state,record);

incAct();
Expand Down
Expand Up @@ -9,6 +9,7 @@
Clusterizer = DefaultClusterizer,
Algorithms = DefaultAlgorithms,
DoAPVEmulatorCheck = cms.bool(False),
HybridZeroSuppressed = cms.bool(False),
ProductLabel = cms.InputTag('rawDataCollector')
)

Expand Down
Expand Up @@ -7,5 +7,6 @@
Clusterizer = DefaultClusterizer,
Algorithms = DefaultAlgorithms,
DoAPVEmulatorCheck = cms.bool(False),
HybridZeroSuppressed = cms.bool(False),
ProductLabel = cms.InputTag('rawDataCollector')
)
Expand Up @@ -7,5 +7,6 @@
Clusterizer = DefaultClusterizer,
Algorithms = DefaultAlgorithms,
DoAPVEmulatorCheck = cms.bool(False),
HybridZeroSuppressed = cms.bool(False),
ProductLabel = cms.InputTag('rawDataCollector')
)