CMS 3D CMS Logo

/afs/cern.ch/work/c/cnuttens/private/SiStripDev/DocumentationProduction/CMSSW_6_1_0/src/SimTracker/SiStripDigitizer/plugins/DigiSimLinkPileUpSignals.cc

Go to the documentation of this file.
00001 #include "DigiSimLinkPileUpSignals.h"
00002 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00003 
00004 void DigiSimLinkPileUpSignals::resetLink(){
00005   theMapLink.clear();
00006   theCounterMapLink.clear();
00007 }
00008 
00009 void DigiSimLinkPileUpSignals::add(const std::vector<double>& locAmpl,
00010                           const size_t& firstChannelWithSignal, const size_t& lastChannelWithSignal,
00011                           const PSimHit* hit,const int& counter){
00012   for (size_t iChannel=firstChannelWithSignal; iChannel<lastChannelWithSignal; ++iChannel) {
00013     theMapLink[iChannel].push_back(std::pair < const PSimHit*, Amplitude >(hit,Amplitude(locAmpl[iChannel])));
00014     theCounterMapLink[iChannel].push_back(std::make_pair(hit, counter));
00015   }
00016 }
00017