21 DataMixingSiStripWorker::DataMixingSiStripWorker() {}
25 : label_(ps.getParameter<
std::
string>(
"Label"))
59 for (; DSViter !=
input->end(); DSViter++) {
61 LogDebug(
"DataMixingSiStripWorker") <<
"Processing DetID " << DSViter->id;
65 LocalMap.
reserve((DSViter->data).size());
66 LocalMap.insert(LocalMap.end(), (DSViter->data).
begin(), (DSViter->data).
end());
77 LogDebug(
"DataMixingSiStripWorker") <<
"\n===============> adding pileups from event " <<
ep->id()
78 <<
" for bunchcrossing " << bcr;
83 std::shared_ptr<Wrapper<edm::DetSetVector<SiStripDigi>>
const> inputPTR =
99 for (; DSViter !=
input->end(); DSViter++) {
101 LogDebug(
"DataMixingSiStripWorker") <<
"Pileups: Processing DetID " << DSViter->id;
106 SiGlobalIndex::const_iterator itest;
112 LocalMap = itest->second;
123 LocalMap.
reserve((DSViter->data).size());
134 std::vector<edm::DetSet<SiStripDigi>> vSiStripDigi;
147 int formerStrip = -1;
151 OneDetectorMap::const_iterator iLocalchk;
152 OneDetectorMap::const_iterator iLocal = LocalMap.begin();
153 for (; iLocal != LocalMap.end(); ++iLocal) {
154 currentStrip = iLocal->strip();
156 if (currentStrip == formerStrip) {
157 ADCSum += iLocal->adc();
159 if (formerStrip != -1) {
162 else if (ADCSum > 253 && ADCSum < 512)
168 formerStrip = currentStrip;
169 ADCSum = iLocal->adc();
173 if ((++iLocalchk) == LocalMap.end()) {
176 else if (ADCSum > 253 && ADCSum < 512)
182 vSiStripDigi.push_back(SSD);
187 LogInfo(
"DataMixingSiStripWorker") <<
"total # Merged strips: " << vSiStripDigi.size();