CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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, float frac)
 
const std::vector< const
PSimHit * > & 
hits ()
 
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< const PSimHit * > _hits
 

Detailed Description

Internal use only.

Definition at line 176 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( )
inline

Definition at line 178 of file SiPixelDigitizerAlgorithm.h.

References _hits.

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( float  amp,
const PSimHit hitp,
float  frac 
)
inline

Definition at line 179 of file SiPixelDigitizerAlgorithm.h.

References _frac, and _hits.

179  :
180  _amp(amp), _hits(1, hitp), _frac(1,frac) {
181 
182  //in case of digi from noisypixels
183  //the MC information are removed
184  if (_frac[0]<-0.5) {
185  _frac.pop_back();
186  _hits.pop_back();
187  }
188 
189  }

Member Function Documentation

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

Definition at line 193 of file SiPixelDigitizerAlgorithm.h.

References _amp.

const std::vector<const PSimHit*>& SiPixelDigitizerAlgorithm::Amplitude::hits ( )
inline

Definition at line 195 of file SiPixelDigitizerAlgorithm.h.

References _hits.

195 { return _hits;}
std::vector<float> SiPixelDigitizerAlgorithm::Amplitude::individualampl ( ) const
inline

Definition at line 194 of file SiPixelDigitizerAlgorithm.h.

References _frac.

194 {return _frac;}
SiPixelDigitizerAlgorithm::Amplitude::operator float ( ) const
inline

Definition at line 192 of file SiPixelDigitizerAlgorithm.h.

References _amp.

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

Definition at line 197 of file SiPixelDigitizerAlgorithm.h.

References _amp, _frac, and _hits.

197  {
198  _amp += other._amp;
199  //in case of contribution of noise to the digi
200  //the MC information are removed
201  if (other._frac[0]>-0.5){
202  _hits.insert( _hits.end(), other._hits.begin(), other._hits.end());
203  _frac.insert(_frac.end(), other._frac.begin(), other._frac.end());
204  }
205  }
void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const float &  amp)
inline

Definition at line 207 of file SiPixelDigitizerAlgorithm.h.

References _amp.

207  {
208  _amp += amp;
209  }
void SiPixelDigitizerAlgorithm::Amplitude::set ( const float  amplitude)
inline

Definition at line 211 of file SiPixelDigitizerAlgorithm.h.

References _amp.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

211  { // Used to reset the amplitude
212  _amp = amplitude;
213  }

Member Data Documentation

float SiPixelDigitizerAlgorithm::Amplitude::_amp
private

Definition at line 218 of file SiPixelDigitizerAlgorithm.h.

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

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

Definition at line 220 of file SiPixelDigitizerAlgorithm.h.

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

std::vector<const PSimHit*> SiPixelDigitizerAlgorithm::Amplitude::_hits
private

Definition at line 219 of file SiPixelDigitizerAlgorithm.h.

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