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

Constructor & Destructor Documentation

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

Definition at line 95 of file SiPixelDigitizerAlgorithm.h.

95  :
96  _amp(amp), _frac(1, frac) {
97  //in case of digi from noisypixels
98  //the MC information are removed
99  if (_frac[0]<-0.5) {
100  _frac.pop_back();
101  }
102  }
SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( float  amp,
const PSimHit hitp,
size_t  hitIndex,
unsigned int  tofBin,
float  frac 
)
inline

Definition at line 104 of file SiPixelDigitizerAlgorithm.h.

104  :
105  _amp(amp), _frac(1, frac) {
106 
107  //in case of digi from noisypixels
108  //the MC information are removed
109  if (_frac[0]<-0.5) {
110  _frac.pop_back();
111  }
112  else {
113  _hitInfos.emplace_back(hitp, hitIndex, tofBin);
114  }
115  }
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 121 of file SiPixelDigitizerAlgorithm.h.

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

Definition at line 120 of file SiPixelDigitizerAlgorithm.h.

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

Definition at line 123 of file SiPixelDigitizerAlgorithm.h.

References _amp, _frac, and _hitInfos.

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  }
std::vector< SimHitInfoForLinks > _hitInfos
void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const float &  amp)
inline

Definition at line 134 of file SiPixelDigitizerAlgorithm.h.

134  {
135  _amp += amp;
136  }
void SiPixelDigitizerAlgorithm::Amplitude::set ( const float  amplitude)
inline

Definition at line 138 of file SiPixelDigitizerAlgorithm.h.

References CustomPhysics_cfi::amplitude.

138  { // Used to reset the amplitude
139  _amp = amplitude;
140  }

Member Data Documentation

float SiPixelDigitizerAlgorithm::Amplitude::_amp
private

Definition at line 145 of file SiPixelDigitizerAlgorithm.h.

Referenced by operator+=().

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

Definition at line 146 of file SiPixelDigitizerAlgorithm.h.

Referenced by operator+=().

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

Definition at line 147 of file SiPixelDigitizerAlgorithm.h.

Referenced by operator+=().