Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:36

0001 #include "DigiSimLinkPileUpSignals.h"
0002 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0003 
0004 void DigiSimLinkPileUpSignals::resetLink() {
0005   theMapLink.clear();
0006   theCounterMapLink.clear();
0007 }
0008 
0009 void DigiSimLinkPileUpSignals::add(const std::vector<float>& locAmpl,
0010                                    const size_t& firstChannelWithSignal,
0011                                    const size_t& lastChannelWithSignal,
0012                                    const PSimHit* hit,
0013                                    const int& counter) {
0014   for (size_t iChannel = firstChannelWithSignal; iChannel < lastChannelWithSignal; ++iChannel) {
0015     theMapLink[iChannel].push_back(std::pair<const PSimHit*, Amplitude>(hit, Amplitude(locAmpl[iChannel])));
0016     theCounterMapLink[iChannel].push_back(std::make_pair(hit, counter));
0017   }
0018 }