CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DigiSimLinkPileUpSignals Class Reference

#include <DigiSimLinkPileUpSignals.h>

Public Types

typedef float Amplitude
 
typedef std::map< int, std::vector< std::pair< const PSimHit *, int > >, std::less< int > > HitCounterToDigisMapType
 
typedef std::map< int, std::vector< std::pair< const PSimHit *, Amplitude > >, std::less< int > > HitToDigisMapType
 

Public Member Functions

virtual void add (const std::vector< float > &locAmpl, const size_t &firstChannelWithSignal, const size_t &lastChannelWithSignal, const PSimHit *hit, const int &counter)
 
 DigiSimLinkPileUpSignals ()
 
const HitCounterToDigisMapTypedumpCounterLink () const
 
const HitToDigisMapTypedumpLink () const
 
void reset ()
 
virtual ~DigiSimLinkPileUpSignals ()
 

Private Member Functions

void resetLink ()
 

Private Attributes

HitCounterToDigisMapType theCounterMapLink
 
HitToDigisMapType theMapLink
 

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 13 of file DigiSimLinkPileUpSignals.h.

Member Typedef Documentation

◆ Amplitude

Definition at line 16 of file DigiSimLinkPileUpSignals.h.

◆ HitCounterToDigisMapType

typedef std::map<int, std::vector<std::pair<const PSimHit*, int> >, std::less<int> > DigiSimLinkPileUpSignals::HitCounterToDigisMapType

Definition at line 22 of file DigiSimLinkPileUpSignals.h.

◆ HitToDigisMapType

typedef std::map<int, std::vector<std::pair<const PSimHit*, Amplitude> >, std::less<int> > DigiSimLinkPileUpSignals::HitToDigisMapType

Definition at line 19 of file DigiSimLinkPileUpSignals.h.

Constructor & Destructor Documentation

◆ DigiSimLinkPileUpSignals()

DigiSimLinkPileUpSignals::DigiSimLinkPileUpSignals ( )
inline

Definition at line 24 of file DigiSimLinkPileUpSignals.h.

24 { reset(); }

References reset().

◆ ~DigiSimLinkPileUpSignals()

virtual DigiSimLinkPileUpSignals::~DigiSimLinkPileUpSignals ( )
inlinevirtual

Definition at line 26 of file DigiSimLinkPileUpSignals.h.

26 {}

Member Function Documentation

◆ add()

void DigiSimLinkPileUpSignals::add ( const std::vector< float > &  locAmpl,
const size_t &  firstChannelWithSignal,
const size_t &  lastChannelWithSignal,
const PSimHit hit,
const int &  counter 
)
virtual

Definition at line 9 of file DigiSimLinkPileUpSignals.cc.

13  {
14  for (size_t iChannel = firstChannelWithSignal; iChannel < lastChannelWithSignal; ++iChannel) {
15  theMapLink[iChannel].push_back(std::pair<const PSimHit*, Amplitude>(hit, Amplitude(locAmpl[iChannel])));
16  theCounterMapLink[iChannel].push_back(std::make_pair(hit, counter));
17  }
18 }

References theCounterMapLink, and theMapLink.

Referenced by counter.Counter::register(), and DigiSimLinkAlgorithm::run().

◆ dumpCounterLink()

const HitCounterToDigisMapType& DigiSimLinkPileUpSignals::dumpCounterLink ( ) const
inline

Definition at line 38 of file DigiSimLinkPileUpSignals.h.

38 { return theCounterMapLink; }

References theCounterMapLink.

Referenced by DigiSimLinkAlgorithm::run().

◆ dumpLink()

const HitToDigisMapType& DigiSimLinkPileUpSignals::dumpLink ( ) const
inline

Definition at line 36 of file DigiSimLinkPileUpSignals.h.

36 { return theMapLink; }

References theMapLink.

Referenced by DigiSimLinkAlgorithm::run().

◆ reset()

void DigiSimLinkPileUpSignals::reset ( void  )
inline

Definition at line 34 of file DigiSimLinkPileUpSignals.h.

34 { resetLink(); }

References resetLink().

Referenced by DigiSimLinkPileUpSignals(), and DigiSimLinkAlgorithm::run().

◆ resetLink()

void DigiSimLinkPileUpSignals::resetLink ( )
private

Definition at line 4 of file DigiSimLinkPileUpSignals.cc.

4  {
5  theMapLink.clear();
6  theCounterMapLink.clear();
7 }

References theCounterMapLink, and theMapLink.

Referenced by reset().

Member Data Documentation

◆ theCounterMapLink

HitCounterToDigisMapType DigiSimLinkPileUpSignals::theCounterMapLink
private

Definition at line 43 of file DigiSimLinkPileUpSignals.h.

Referenced by add(), dumpCounterLink(), and resetLink().

◆ theMapLink

HitToDigisMapType DigiSimLinkPileUpSignals::theMapLink
private

Definition at line 42 of file DigiSimLinkPileUpSignals.h.

Referenced by add(), dumpLink(), and resetLink().

counter
Definition: counter.py:1
DigiSimLinkPileUpSignals::reset
void reset()
Definition: DigiSimLinkPileUpSignals.h:34
DigiSimLinkPileUpSignals::theCounterMapLink
HitCounterToDigisMapType theCounterMapLink
Definition: DigiSimLinkPileUpSignals.h:43
DigiSimLinkPileUpSignals::resetLink
void resetLink()
Definition: DigiSimLinkPileUpSignals.cc:4
DigiSimLinkPileUpSignals::Amplitude
float Amplitude
Definition: DigiSimLinkPileUpSignals.h:16
DigiSimLinkPileUpSignals::theMapLink
HitToDigisMapType theMapLink
Definition: DigiSimLinkPileUpSignals.h:42
hit
Definition: SiStripHitEffFromCalibTree.cc:88