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, const PSimHit *hitp, size_t hitIndex, unsigned int tofBin, float frac)
 
 Amplitude (float amp, 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 94 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

◆ Amplitude() [1/3]

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( )
inline

Definition at line 96 of file SiPixelDigitizerAlgorithm.h.

96 : _amp(0.0) {}

◆ Amplitude() [2/3]

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

Definition at line 97 of file SiPixelDigitizerAlgorithm.h.

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

References _frac.

◆ Amplitude() [3/3]

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

Definition at line 105 of file SiPixelDigitizerAlgorithm.h.

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

References _frac, and _hitInfos.

Member Function Documentation

◆ ampl()

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

Definition at line 118 of file SiPixelDigitizerAlgorithm.h.

118 { return _amp; }

References _amp.

◆ hitInfos()

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

Definition at line 120 of file SiPixelDigitizerAlgorithm.h.

120 { return _hitInfos; }

References _hitInfos.

◆ individualampl()

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

Definition at line 119 of file SiPixelDigitizerAlgorithm.h.

119 { return _frac; }

References _frac.

◆ operator float()

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

Definition at line 117 of file SiPixelDigitizerAlgorithm.h.

117 { return _amp; }

References _amp.

◆ operator+=() [1/2]

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

Definition at line 122 of file SiPixelDigitizerAlgorithm.h.

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

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

◆ operator+=() [2/2]

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

Definition at line 133 of file SiPixelDigitizerAlgorithm.h.

133 { _amp += amp; }

References _amp.

◆ set()

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

Definition at line 135 of file SiPixelDigitizerAlgorithm.h.

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

References _amp, and CustomPhysics_cfi::amplitude.

Member Data Documentation

◆ _amp

float SiPixelDigitizerAlgorithm::Amplitude::_amp
private

Definition at line 142 of file SiPixelDigitizerAlgorithm.h.

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

◆ _frac

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

Definition at line 143 of file SiPixelDigitizerAlgorithm.h.

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

◆ _hitInfos

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

Definition at line 144 of file SiPixelDigitizerAlgorithm.h.

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

SiPixelDigitizerAlgorithm::Amplitude::_amp
float _amp
Definition: SiPixelDigitizerAlgorithm.h:142
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
SiPixelDigitizerAlgorithm::Amplitude::_frac
std::vector< float > _frac
Definition: SiPixelDigitizerAlgorithm.h:143
DivergingColor.frac
float frac
Definition: DivergingColor.py:175
trackingPlots.other
other
Definition: trackingPlots.py:1467
SiPixelDigitizerAlgorithm::Amplitude::_hitInfos
std::vector< SimHitInfoForLinks > _hitInfos
Definition: SiPixelDigitizerAlgorithm.h:144