CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
virtual void add(uint32_t detID, const std::vector< float > &locAmpl, const size_t &firstChannelWithSignal, const size_t &lastChannelWithSignal)
std::map< int, Amplitude > SignalMapType
signalMaps signal_