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

Constructor & Destructor Documentation

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

Definition at line 119 of file SiPixelDigitizerAlgorithm.h.

119  :
120  _amp(amp), _frac(1, frac) {
121  //in case of digi from noisypixels
122  //the MC information are removed
123  if (_frac[0]<-0.5) {
124  _frac.pop_back();
125  }
126  }
SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( float  amp,
const PSimHit hitp,
size_t  hitIndex,
unsigned int  tofBin,
float  frac 
)
inline

Definition at line 128 of file SiPixelDigitizerAlgorithm.h.

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

Member Function Documentation

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

Definition at line 145 of file SiPixelDigitizerAlgorithm.h.

145 { return _hitInfos; }
std::vector< SimHitInfoForLinks > _hitInfos
const std::vector<float>& SiPixelDigitizerAlgorithm::Amplitude::individualampl ( ) const
inline

Definition at line 144 of file SiPixelDigitizerAlgorithm.h.

144 {return _frac;}
SiPixelDigitizerAlgorithm::Amplitude::operator float ( ) const
inline
void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const Amplitude other)
inline

Definition at line 147 of file SiPixelDigitizerAlgorithm.h.

References _amp, _frac, and _hitInfos.

147  {
148  _amp += other._amp;
149  //in case of contribution of noise to the digi
150  //the MC information are removed
151  if (other._frac[0]>-0.5){
152  if(!other._hitInfos.empty()) {
153  _hitInfos.insert(_hitInfos.end(), other._hitInfos.begin(), other._hitInfos.end());
154  }
155  _frac.insert(_frac.end(), other._frac.begin(), other._frac.end());
156  }
157  }
std::vector< SimHitInfoForLinks > _hitInfos
void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const float &  amp)
inline

Definition at line 158 of file SiPixelDigitizerAlgorithm.h.

158  {
159  _amp += amp;
160  }
void SiPixelDigitizerAlgorithm::Amplitude::set ( const float  amplitude)
inline

Definition at line 162 of file SiPixelDigitizerAlgorithm.h.

References CustomPhysics_cfi::amplitude.

162  { // Used to reset the amplitude
163  _amp = amplitude;
164  }

Member Data Documentation

float SiPixelDigitizerAlgorithm::Amplitude::_amp
private

Definition at line 169 of file SiPixelDigitizerAlgorithm.h.

Referenced by operator+=().

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

Definition at line 170 of file SiPixelDigitizerAlgorithm.h.

Referenced by operator+=().

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

Definition at line 171 of file SiPixelDigitizerAlgorithm.h.

Referenced by operator+=().