CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiPixelDigitizerAlgorithm::Amplitude Class Reference

#include <SiPixelDigitizerAlgorithm.h>

Public Member Functions

float ampl () const
 
 Amplitude ()
 
 Amplitude (float amp, float frac)
 
 Amplitude (float amp, const PSimHit *hitp, size_t hitIndex, unsigned int tofBin, float frac)
 
const std::vector< SimHitInfoForLinks > & hitInfos () const
 
const std::vector< float > & individualampl () const
 
 operator float () const
 
void operator+= (const Amplitude &other)
 
void operator+= (const float &amp)
 
void set (const float amplitude)
 

Private Attributes

float _amp
 
std::vector< float > _frac
 
std::vector< SimHitInfoForLinks_hitInfos
 

Detailed Description

Definition at line 95 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

◆ Amplitude() [1/3]

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( )
inline

◆ Amplitude() [2/3]

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( float  amp,
float  frac 
)
inline

Definition at line 98 of file SiPixelDigitizerAlgorithm.h.

References _frac.

98  : _amp(amp), _frac(1, frac) {
99  //in case of digi from noisypixels
100  //the MC information are removed
101  if (_frac[0] < -0.5) {
102  _frac.pop_back();
103  }
104  }

◆ Amplitude() [3/3]

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( float  amp,
const PSimHit hitp,
size_t  hitIndex,
unsigned int  tofBin,
float  frac 
)
inline

Definition at line 106 of file SiPixelDigitizerAlgorithm.h.

References _frac, and _hitInfos.

107  : _amp(amp), _frac(1, frac) {
108  //in case of digi from noisypixels
109  //the MC information are removed
110  if (_frac[0] < -0.5) {
111  _frac.pop_back();
112  } else {
113  _hitInfos.emplace_back(hitp, hitIndex, tofBin);
114  }
115  }
std::vector< SimHitInfoForLinks > _hitInfos

Member Function Documentation

◆ ampl()

float SiPixelDigitizerAlgorithm::Amplitude::ampl ( ) const
inline

Definition at line 119 of file SiPixelDigitizerAlgorithm.h.

References _amp.

◆ hitInfos()

const std::vector<SimHitInfoForLinks>& SiPixelDigitizerAlgorithm::Amplitude::hitInfos ( ) const
inline

Definition at line 121 of file SiPixelDigitizerAlgorithm.h.

References _hitInfos.

121 { return _hitInfos; }
std::vector< SimHitInfoForLinks > _hitInfos

◆ individualampl()

const std::vector<float>& SiPixelDigitizerAlgorithm::Amplitude::individualampl ( ) const
inline

Definition at line 120 of file SiPixelDigitizerAlgorithm.h.

References _frac.

120 { return _frac; }

◆ operator float()

SiPixelDigitizerAlgorithm::Amplitude::operator float ( ) const
inline

Definition at line 118 of file SiPixelDigitizerAlgorithm.h.

References _amp.

◆ operator+=() [1/2]

void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const Amplitude other)
inline

Definition at line 123 of file SiPixelDigitizerAlgorithm.h.

References _amp, _frac, _hitInfos, and trackingPlots::other.

123  {
124  _amp += other._amp;
125  //in case of contribution of noise to the digi
126  //the MC information are removed
127  if (other._frac[0] > -0.5) {
128  if (!other._hitInfos.empty()) {
129  _hitInfos.insert(_hitInfos.end(), other._hitInfos.begin(), other._hitInfos.end());
130  }
131  _frac.insert(_frac.end(), other._frac.begin(), other._frac.end());
132  }
133  }
std::vector< SimHitInfoForLinks > _hitInfos

◆ operator+=() [2/2]

void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const float &  amp)
inline

Definition at line 134 of file SiPixelDigitizerAlgorithm.h.

References _amp.

◆ set()

void SiPixelDigitizerAlgorithm::Amplitude::set ( const float  amplitude)
inline

Definition at line 136 of file SiPixelDigitizerAlgorithm.h.

References _amp, and CustomPhysics_cfi::amplitude.

136  { // Used to reset the amplitude
137  _amp = amplitude;
138  }

Member Data Documentation

◆ _amp

float SiPixelDigitizerAlgorithm::Amplitude::_amp
private

Definition at line 143 of file SiPixelDigitizerAlgorithm.h.

Referenced by ampl(), operator float(), operator+=(), and set().

◆ _frac

std::vector<float> SiPixelDigitizerAlgorithm::Amplitude::_frac
private

Definition at line 144 of file SiPixelDigitizerAlgorithm.h.

Referenced by Amplitude(), individualampl(), and operator+=().

◆ _hitInfos

std::vector<SimHitInfoForLinks> SiPixelDigitizerAlgorithm::Amplitude::_hitInfos
private

Definition at line 145 of file SiPixelDigitizerAlgorithm.h.

Referenced by Amplitude(), hitInfos(), and operator+=().