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 95 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

◆ Amplitude() [1/3]

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( )
inline

Definition at line 97 of file SiPixelDigitizerAlgorithm.h.

97 : _amp(0.0) {}

◆ Amplitude() [2/3]

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

Definition at line 98 of file SiPixelDigitizerAlgorithm.h.

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  }

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 106 of file SiPixelDigitizerAlgorithm.h.

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  }

References _frac, and _hitInfos.

Member Function Documentation

◆ ampl()

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

Definition at line 119 of file SiPixelDigitizerAlgorithm.h.

119 { return _amp; }

References _amp.

◆ hitInfos()

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

Definition at line 121 of file SiPixelDigitizerAlgorithm.h.

121 { return _hitInfos; }

References _hitInfos.

◆ individualampl()

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

Definition at line 120 of file SiPixelDigitizerAlgorithm.h.

120 { return _frac; }

References _frac.

◆ operator float()

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

Definition at line 118 of file SiPixelDigitizerAlgorithm.h.

118 { return _amp; }

References _amp.

◆ operator+=() [1/2]

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

Definition at line 123 of file SiPixelDigitizerAlgorithm.h.

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  }

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

◆ operator+=() [2/2]

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

Definition at line 134 of file SiPixelDigitizerAlgorithm.h.

134 { _amp += amp; }

References _amp.

◆ set()

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

Definition at line 136 of file SiPixelDigitizerAlgorithm.h.

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

References _amp, and CustomPhysics_cfi::amplitude.

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+=().

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