21 DataMixingSiPixelWorker::DataMixingSiPixelWorker() {}
25 : label_(ps.getParameter<
std::
string>(
"Label"))
51 LogDebug(
"DataMixingSiPixelWorker") <<
"===============> adding MC signals for " <<
e.id();
58 for (; DSViter !=
input->end(); DSViter++) {
60 LogDebug(
"DataMixingSiPixelWorker") <<
"Processing DetID " << DSViter->id;
63 uint32_t detID = DSViter->id;
70 for (icopy =
begin; icopy !=
end; icopy++) {
83 LogDebug(
"DataMixingSiPixelWorker") <<
"\n===============> adding pileups from event " <<
ep->id()
84 <<
" for bunchcrossing " << bcr;
89 std::shared_ptr<Wrapper<edm::DetSetVector<PixelDigi>>
const> inputPTR =
101 for (; DSViter !=
input->end(); DSViter++) {
103 LogDebug(
"DataMixingSiPixelWorker") <<
"Pileups: Processing DetID " << DSViter->id;
106 uint32_t detID = DSViter->id;
113 SiGlobalIndex::const_iterator itest;
122 for (icopy =
begin; icopy !=
end; icopy++) {
133 for (icopy =
begin; icopy !=
end; icopy++) {
146 std::vector<edm::DetSet<PixelDigi>> vPixelDigi;
159 int formerPixel = -1;
163 OneDetectorMap::const_iterator iLocalchk;
165 for (OneDetectorMap::const_iterator iLocal = LocalMap.begin(); iLocal != LocalMap.end(); ++iLocal) {
166 currentPixel = iLocal->first;
168 if (currentPixel == formerPixel) {
169 ADCSum += (iLocal->second).
adc();
171 if (formerPixel != -1) {
174 else if (ADCSum > 253 && ADCSum < 512)
180 formerPixel = currentPixel;
181 ADCSum = (iLocal->second).
adc();
185 if ((++iLocalchk) == LocalMap.end()) {
188 else if (ADCSum > 253 && ADCSum < 512)
196 vPixelDigi.push_back(SPD);
201 LogInfo(
"DataMixingSiPixelWorker") <<
"total # Merged Pixels: " << vPixelDigi.size();