CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SiPileUpSignals Class Reference

#include <SiPileUpSignals.h>

Public Types

typedef float Amplitude
 
typedef std::map< uint32_t,
SignalMapType
signalMaps
 
typedef std::map< int, AmplitudeSignalMapType
 

Public Member Functions

virtual void add (uint32_t detID, const std::vector< float > &locAmpl, const size_t &firstChannelWithSignal, const size_t &lastChannelWithSignal)
 
const SignalMapTypegetSignal (uint32_t detID) const
 
void reset ()
 
 SiPileUpSignals ()
 
virtual ~SiPileUpSignals ()
 

Private Member Functions

void resetSignals ()
 

Private Attributes

signalMaps signal_
 

Detailed Description

Class which takes the responses from each SimHit and piles-up them, within a given module. More precisely, it keeps for each strip the link to each individual measurement.

Definition at line 14 of file SiPileUpSignals.h.

Member Typedef Documentation

Definition at line 17 of file SiPileUpSignals.h.

typedef std::map<uint32_t, SignalMapType> SiPileUpSignals::signalMaps

Definition at line 21 of file SiPileUpSignals.h.

typedef std::map<int, Amplitude> SiPileUpSignals::SignalMapType

Definition at line 20 of file SiPileUpSignals.h.

Constructor & Destructor Documentation

SiPileUpSignals::SiPileUpSignals ( )
inline

Definition at line 23 of file SiPileUpSignals.h.

References reset().

23 { reset(); }
virtual SiPileUpSignals::~SiPileUpSignals ( )
inlinevirtual

Definition at line 25 of file SiPileUpSignals.h.

25 { }

Member Function Documentation

void SiPileUpSignals::add ( uint32_t  detID,
const std::vector< float > &  locAmpl,
const size_t &  firstChannelWithSignal,
const size_t &  lastChannelWithSignal 
)
virtual

Definition at line 8 of file SiPileUpSignals.cc.

Referenced by counter.Counter::register().

9  {
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 }
std::map< int, Amplitude > SignalMapType
const SignalMapType* SiPileUpSignals::getSignal ( uint32_t  detID) const
inline

Definition at line 33 of file SiPileUpSignals.h.

33  {
34  auto where = signal_.find(detID);
35  if(where == signal_.end()) {
36  return 0;
37  }
38  return &where->second;
39  }
void SiPileUpSignals::reset ( void  )
inline

Definition at line 31 of file SiPileUpSignals.h.

References resetSignals().

Referenced by SiPileUpSignals().

31 { resetSignals(); }
void SiPileUpSignals::resetSignals ( )
private

Definition at line 4 of file SiPileUpSignals.cc.

Referenced by reset().

4  {
5  signal_.clear();
6 }

Member Data Documentation

signalMaps SiPileUpSignals::signal_
private

Definition at line 43 of file SiPileUpSignals.h.