CMS 3D CMS Logo

SiPileUpSignals.cc
Go to the documentation of this file.
3 
5 
6 void SiPileUpSignals::add(uint32_t detID,
7  const std::vector<float>& locAmpl,
8  const size_t& firstChannelWithSignal,
9  const size_t& lastChannelWithSignal) {
10  SignalMapType& theSignal = signal_[detID];
11  for (size_t iChannel = firstChannelWithSignal; iChannel < lastChannelWithSignal; ++iChannel) {
12  if (locAmpl[iChannel] != 0.0) {
13  if (theSignal.find(iChannel) == theSignal.end()) {
14  theSignal.insert(std::make_pair(iChannel, locAmpl[iChannel]));
15  } else {
16  theSignal[iChannel] += locAmpl[iChannel];
17  }
18  }
19  }
20 }
SiPileUpSignals::add
virtual void add(uint32_t detID, const std::vector< float > &locAmpl, const size_t &firstChannelWithSignal, const size_t &lastChannelWithSignal)
Definition: SiPileUpSignals.cc:6
PSimHit.h
SiPileUpSignals.h
SiPileUpSignals::resetSignals
void resetSignals()
Definition: SiPileUpSignals.cc:4
SiPileUpSignals::SignalMapType
std::map< int, Amplitude > SignalMapType
Definition: SiPileUpSignals.h:20
SiPileUpSignals::signal_
signalMaps signal_
Definition: SiPileUpSignals.h:44