CMS 3D CMS Logo

Public Member Functions | Private Attributes

SiPixelDigitizerAlgorithm::Amplitude Class Reference

List of all members.

Public Member Functions

float ampl () const
 Amplitude ()
 Amplitude (float amp, float frac)
 Amplitude (float amp, const PSimHit *hitp, float frac)
const EncodedEventIdeventId () const
const std::shared_ptr
< SimHitInfoForLinks > & 
hitInfo () const
std::vector< float > individualampl () const
 operator float () const
void operator+= (const float &amp)
void operator+= (const Amplitude &other)
void set (const float amplitude)
const std::vector< unsigned int > & trackIds () const

Private Attributes

float _amp
std::vector< float > _frac
std::shared_ptr
< SimHitInfoForLinks
_hitInfo

Detailed Description

Definition at line 82 of file SiPixelDigitizerAlgorithm.h.


Constructor & Destructor Documentation

SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( ) [inline]

Definition at line 84 of file SiPixelDigitizerAlgorithm.h.

: _amp(0.0) {}
SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( float  amp,
float  frac 
) [inline]

Definition at line 85 of file SiPixelDigitizerAlgorithm.h.

References _frac.

                                      :
      _amp(amp), _frac(1, frac), _hitInfo() {
    //in case of digi from noisypixels
      //the MC information are removed 
      if (_frac[0]<-0.5) {
        _frac.pop_back();
      }
    }
SiPixelDigitizerAlgorithm::Amplitude::Amplitude ( float  amp,
const PSimHit hitp,
float  frac 
) [inline]

Definition at line 94 of file SiPixelDigitizerAlgorithm.h.

References _frac, and _hitInfo.

                                                           :
      _amp(amp), _frac(1, frac), _hitInfo(new SimHitInfoForLinks(hitp)) {

    //in case of digi from noisypixels
      //the MC information are removed 
      if (_frac[0]<-0.5) {
        _frac.pop_back();
        _hitInfo->trackIds_.pop_back();
      }
    }

Member Function Documentation

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

Definition at line 107 of file SiPixelDigitizerAlgorithm.h.

References _amp.

{return _amp;}
const EncodedEventId& SiPixelDigitizerAlgorithm::Amplitude::eventId ( ) const [inline]

Definition at line 131 of file SiPixelDigitizerAlgorithm.h.

References _hitInfo.

                                         {
     return _hitInfo->eventId_;
   }
const std::shared_ptr<SimHitInfoForLinks>& SiPixelDigitizerAlgorithm::Amplitude::hitInfo ( ) const [inline]

Definition at line 112 of file SiPixelDigitizerAlgorithm.h.

References _hitInfo.

{return _hitInfo;}
std::vector<float> SiPixelDigitizerAlgorithm::Amplitude::individualampl ( ) const [inline]

Definition at line 108 of file SiPixelDigitizerAlgorithm.h.

References _frac.

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

Definition at line 106 of file SiPixelDigitizerAlgorithm.h.

References _amp.

{ return _amp;}
void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const float &  amp) [inline]

Definition at line 134 of file SiPixelDigitizerAlgorithm.h.

References _amp.

                                       {
      _amp += amp;
    }
void SiPixelDigitizerAlgorithm::Amplitude::operator+= ( const Amplitude other) [inline]

Definition at line 114 of file SiPixelDigitizerAlgorithm.h.

References _amp, _frac, _hitInfo, and trackIds().

                                             {
      _amp += other._amp;
      //in case of contribution of noise to the digi
      //the MC information are removed 
      if (other._frac[0]>-0.5){
        if(other._hitInfo) {
          std::vector<unsigned int>& otherTrackIds = other._hitInfo->trackIds_;
          if(_hitInfo) {
            std::vector<unsigned int>& trackIds = _hitInfo->trackIds_;
            trackIds.insert(trackIds.end(), otherTrackIds.begin(), otherTrackIds.end());
          } else {
            _hitInfo.reset(new SimHitInfoForLinks(*other._hitInfo));
          }
        }
        _frac.insert(_frac.end(), other._frac.begin(), other._frac.end());
      }
   }
void SiPixelDigitizerAlgorithm::Amplitude::set ( const float  amplitude) [inline]

Definition at line 138 of file SiPixelDigitizerAlgorithm.h.

References _amp.

                                     {  // Used to reset the amplitude
      _amp = amplitude;
    }
const std::vector<unsigned int>& SiPixelDigitizerAlgorithm::Amplitude::trackIds ( ) const [inline]

Definition at line 109 of file SiPixelDigitizerAlgorithm.h.

References _hitInfo.

Referenced by operator+=().

                                                    {
      return _hitInfo->trackIds_;
    }

Member Data Documentation

Definition at line 145 of file SiPixelDigitizerAlgorithm.h.

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

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

Definition at line 146 of file SiPixelDigitizerAlgorithm.h.

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

Definition at line 147 of file SiPixelDigitizerAlgorithm.h.

Referenced by Amplitude(), eventId(), hitInfo(), operator+=(), and trackIds().