CMS 3D CMS Logo

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

#include <DigitizerUtility.h>

Public Member Functions

float ampl () const
 
 Amplitude ()
 
 Amplitude (float amp, float frac)
 
 Amplitude (float amp, const PSimHit *hitp, size_t hitIndex, size_t hitInd4CR, 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 35 of file DigitizerUtility.h.

Constructor & Destructor Documentation

◆ Amplitude() [1/3]

digitizerUtility::Amplitude::Amplitude ( )
inline

Definition at line 37 of file DigitizerUtility.h.

◆ Amplitude() [2/3]

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

Definition at line 38 of file DigitizerUtility.h.

References _frac.

38  : _amp(amp), _frac(1, frac) {
39  //in case of digi from noisypixels
40  //the MC information are removed
41  if (_frac[0] < -0.5) {
42  _frac.pop_back();
43  }
44  }
std::vector< float > _frac

◆ Amplitude() [3/3]

digitizerUtility::Amplitude::Amplitude ( float  amp,
const PSimHit hitp,
size_t  hitIndex,
size_t  hitInd4CR,
unsigned int  tofBin,
float  frac 
)
inline

Definition at line 46 of file DigitizerUtility.h.

References _frac, and _hitInfos.

47  : _amp(amp), _frac(1, frac) {
48  //in case of digi from noisypixels
49  //the MC information are removed
50  if (_frac[0] < -0.5) {
51  _frac.pop_back();
52  } else {
53  _hitInfos.emplace_back(hitp, hitIndex, tofBin, hitInd4CR, amp);
54  }
55  }
std::vector< SimHitInfoForLinks > _hitInfos
std::vector< float > _frac

Member Function Documentation

◆ ampl()

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

Definition at line 59 of file DigitizerUtility.h.

References _amp.

59 { return _amp; }

◆ hitInfos()

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

Definition at line 61 of file DigitizerUtility.h.

References _hitInfos.

61 { return _hitInfos; }
std::vector< SimHitInfoForLinks > _hitInfos

◆ individualampl()

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

Definition at line 60 of file DigitizerUtility.h.

References _frac.

60 { return _frac; }
std::vector< float > _frac

◆ operator float()

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

Definition at line 58 of file DigitizerUtility.h.

References _amp.

58 { return _amp; }

◆ operator+=() [1/2]

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

Definition at line 63 of file DigitizerUtility.h.

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

63  {
64  _amp += other._amp;
65  //in case of contribution of noise to the digi
66  //the MC information are removed
67  if (other._frac[0] > -0.5) {
68  if (!other._hitInfos.empty()) {
69  _hitInfos.insert(_hitInfos.end(), other._hitInfos.begin(), other._hitInfos.end());
70  }
71  _frac.insert(_frac.end(), other._frac.begin(), other._frac.end());
72  }
73  }
std::vector< SimHitInfoForLinks > _hitInfos
std::vector< float > _frac

◆ operator+=() [2/2]

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

Definition at line 74 of file DigitizerUtility.h.

References _amp.

74 { _amp += amp; }

◆ set()

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

Definition at line 76 of file DigitizerUtility.h.

References _amp, and CustomPhysics_cfi::amplitude.

76  { // Used to reset the amplitude
77  _amp = amplitude;
78  }

Member Data Documentation

◆ _amp

float digitizerUtility::Amplitude::_amp
private

Definition at line 83 of file DigitizerUtility.h.

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

◆ _frac

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

Definition at line 84 of file DigitizerUtility.h.

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

◆ _hitInfos

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

Definition at line 85 of file DigitizerUtility.h.

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