12 auto merged = std::make_unique<CSCStripDigiCollection>();
15 const CSCDetId &layerId = elem.first;
20 std::vector<CSCStripDigi> NewDigiList;
22 std::vector<int> StripList;
23 std::vector<CSCStripDigiCollection::const_iterator> StripPointer;
26 StripList.push_back((*dtdigi).getStrip());
27 StripPointer.push_back(dtdigi);
31 std::vector<int> DuplicateList;
33 std::vector<CSCStripDigiCollection::const_iterator>::const_iterator StripPtr = StripPointer.begin();
35 for (std::vector<int>::const_iterator istrip = StripList.begin(); istrip != StripList.end(); ++istrip) {
36 const int CurrentStrip = *(istrip);
38 if (CurrentStrip > PrevStrip) {
39 PrevStrip = CurrentStrip;
42 dupl_count =
std::count(StripList.begin(), StripList.end(), CurrentStrip);
44 std::vector<int>::const_iterator duplicate = istrip;
46 std::vector<CSCStripDigiCollection::const_iterator>::const_iterator DuplPointer = StripPtr;
48 for (; duplicate != StripList.end(); ++duplicate) {
49 if ((*duplicate) == CurrentStrip) {
50 DuplicateList.push_back(CurrentStrip);
52 std::vector<int> pileup_adc = (**DuplPointer).getADCCounts();
53 std::vector<int> signal_adc = (**StripPtr).getADCCounts();
55 std::vector<int>::const_iterator minplace;
57 minplace = std::min_element(pileup_adc.begin(), pileup_adc.end());
59 int minvalue = (*minplace);
61 std::vector<int> new_adc;
63 std::vector<int>::const_iterator newsig = signal_adc.begin();
65 for (std::vector<int>::const_iterator ibin = pileup_adc.begin(); ibin != pileup_adc.end(); ++ibin) {
66 new_adc.push_back((*newsig) + (*ibin) - minvalue);
72 NewDigiList.push_back(newDigi);
77 NewDigiList.push_back(**StripPtr);
86 check =
std::count(DuplicateList.begin(), DuplicateList.end(), CurrentStrip);
88 NewDigiList.push_back(**StripPtr);
95 merged->put(stripRange, layerId);
127 std::vector<PileupSummaryInfo>
const &ps,