CMS 3D CMS Logo

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

#include <DigitizerUtility.h>

Public Member Functions

float ampl () const
 
 operator float () const
 
void operator+= (const Ph2Amplitude &other)
 
void operator+= (const float &amp)
 
 Ph2Amplitude ()
 
 Ph2Amplitude (float amp, const PSimHit *hitp, float frac=0, float tcor=0, size_t hitIndex=0, uint32_t tofBin=0)
 
void set (const float amplitude)
 
const std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > & simInfoList () const
 

Private Attributes

float _amp
 
std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > _simInfoList
 

Detailed Description

Definition at line 89 of file DigitizerUtility.h.

Constructor & Destructor Documentation

◆ Ph2Amplitude() [1/2]

digitizerUtility::Ph2Amplitude::Ph2Amplitude ( )
inline

Definition at line 91 of file DigitizerUtility.h.

◆ Ph2Amplitude() [2/2]

digitizerUtility::Ph2Amplitude::Ph2Amplitude ( float  amp,
const PSimHit hitp,
float  frac = 0,
float  tcor = 0,
size_t  hitIndex = 0,
uint32_t  tofBin = 0 
)
inline

Definition at line 92 of file DigitizerUtility.h.

References _simInfoList, and DivergingColor::frac.

94  : _amp(amp) {
95  if (frac > 0) {
96  if (hitp != nullptr)
97  _simInfoList.push_back({frac, std::make_unique<SimHitInfo>(hitp, tcor, hitIndex, tofBin)});
98  else
99  _simInfoList.push_back({frac, nullptr});
100  }
101  }
std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > _simInfoList

Member Function Documentation

◆ ampl()

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

Definition at line 105 of file DigitizerUtility.h.

References _amp.

Referenced by Phase2TrackerDigitizerAlgorithm::digitize().

◆ operator float()

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

Definition at line 104 of file DigitizerUtility.h.

References _amp.

◆ operator+=() [1/2]

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

Definition at line 108 of file DigitizerUtility.h.

References _amp, _simInfoList, and trackingPlots::other.

108  {
109  _amp += other._amp;
110  // in case of digi from the noise, the MC information need not be there
111  for (auto const& ic : other.simInfoList()) {
112  if (ic.first > -0.5)
113  _simInfoList.push_back({ic.first, std::make_unique<SimHitInfo>(*ic.second)});
114  }
115  }
std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > _simInfoList

◆ operator+=() [2/2]

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

Definition at line 116 of file DigitizerUtility.h.

References _amp.

◆ set()

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

Definition at line 117 of file DigitizerUtility.h.

References _amp, and CustomPhysics_cfi::amplitude.

117  { // Used to reset the amplitude
118  _amp = amplitude;
119  }

◆ simInfoList()

const std::vector<std::pair<float, std::unique_ptr<SimHitInfo> > >& digitizerUtility::Ph2Amplitude::simInfoList ( ) const
inline

Definition at line 106 of file DigitizerUtility.h.

References _simInfoList.

Referenced by Phase2TrackerDigitizerAlgorithm::digitize().

106 { return _simInfoList; }
std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > _simInfoList

Member Data Documentation

◆ _amp

float digitizerUtility::Ph2Amplitude::_amp
private

Definition at line 122 of file DigitizerUtility.h.

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

◆ _simInfoList

std::vector<std::pair<float, std::unique_ptr<SimHitInfo> > > digitizerUtility::Ph2Amplitude::_simInfoList
private

Definition at line 123 of file DigitizerUtility.h.

Referenced by operator+=(), Ph2Amplitude(), and simInfoList().