CMS 3D CMS Logo

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

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

Constructor & Destructor Documentation

◆ Amplitude() [1/3]

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( )
inline

Definition at line 117 of file SiPixelDigitizerAlgorithm.h.

117 : _amp(0.0) {}

◆ Amplitude() [2/3]

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

Definition at line 118 of file SiPixelDigitizerAlgorithm.h.

118  : _amp(amp), _frac(1, frac) {
119  //in case of digi from noisypixels
120  //the MC information are removed
121  if (_frac[0] < -0.5) {
122  _frac.pop_back();
123  }
124  }

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

127  : _amp(amp), _frac(1, frac) {
128  //in case of digi from noisypixels
129  //the MC information are removed
130  if (_frac[0] < -0.5) {
131  _frac.pop_back();
132  } else {
133  _hitInfos.emplace_back(hitp, hitIndex, tofBin);
134  }
135  }

References _frac, and _hitInfos.

Member Function Documentation

◆ ampl()

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

Definition at line 139 of file SiPixelDigitizerAlgorithm.h.

139 { return _amp; }

References _amp.

◆ hitInfos()

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

Definition at line 141 of file SiPixelDigitizerAlgorithm.h.

141 { return _hitInfos; }

References _hitInfos.

◆ individualampl()

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

Definition at line 140 of file SiPixelDigitizerAlgorithm.h.

140 { return _frac; }

References _frac.

◆ operator float()

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

Definition at line 138 of file SiPixelDigitizerAlgorithm.h.

138 { return _amp; }

References _amp.

◆ operator+=() [1/2]

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

Definition at line 143 of file SiPixelDigitizerAlgorithm.h.

143  {
144  _amp += other._amp;
145  //in case of contribution of noise to the digi
146  //the MC information are removed
147  if (other._frac[0] > -0.5) {
148  if (!other._hitInfos.empty()) {
149  _hitInfos.insert(_hitInfos.end(), other._hitInfos.begin(), other._hitInfos.end());
150  }
151  _frac.insert(_frac.end(), other._frac.begin(), other._frac.end());
152  }
153  }

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

◆ operator+=() [2/2]

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

Definition at line 154 of file SiPixelDigitizerAlgorithm.h.

154 { _amp += amp; }

References _amp.

◆ set()

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

Definition at line 156 of file SiPixelDigitizerAlgorithm.h.

156  { // Used to reset the amplitude
157  _amp = amplitude;
158  }

References _amp, and CustomPhysics_cfi::amplitude.

Member Data Documentation

◆ _amp

float SiPixelDigitizerAlgorithm::Amplitude::_amp
private

Definition at line 163 of file SiPixelDigitizerAlgorithm.h.

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

◆ _frac

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

Definition at line 164 of file SiPixelDigitizerAlgorithm.h.

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

◆ _hitInfos

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

Definition at line 165 of file SiPixelDigitizerAlgorithm.h.

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

SiPixelDigitizerAlgorithm::Amplitude::_amp
float _amp
Definition: SiPixelDigitizerAlgorithm.h:163
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
cropTnPTrees.frac
frac
Definition: cropTnPTrees.py:18
SiPixelDigitizerAlgorithm::Amplitude::_frac
std::vector< float > _frac
Definition: SiPixelDigitizerAlgorithm.h:164
trackingPlots.other
other
Definition: trackingPlots.py:1465
SiPixelDigitizerAlgorithm::Amplitude::_hitInfos
std::vector< SimHitInfoForLinks > _hitInfos
Definition: SiPixelDigitizerAlgorithm.h:165