10#ifndef VXD_SIMULATION_ELECTRONDEPOSIT_H
11#define VXD_SIMULATION_ELECTRONDEPOSIT_H
59 const unsigned int intfrac = std::round(std::max(0.f, fraction) *
static_cast<float>(
c_MaxFraction));
60 const unsigned int intelec = std::round(std::max(0.f, electrons));
77 operator unsigned int()
const {
return m_packed; }
Packed class to represent energy deposit along a path in electrons.
unsigned int getElectrons() const
get the number of deposited electrons
EBits
Enum storing the bit informations for the packed information.
@ c_TotalBits
Total number of bits needed for the packed structure.
@ c_MaxFraction
Maximum integer value allowed for the fraction part.
@ c_ElectronBits
Number of bits to encode the number of electrons.
@ c_FractionBits
Number of bits to encode the fraction along the path.
@ c_MaxElectrons
Maximum number of electrons allowed.
unsigned int m_packed
packed representation of the fraction and electron deposition
float getFraction() const
get the fraction along the path
VXDElectronDeposit(unsigned int packed)
Create a new instance from a packed value.
VXDElectronDeposit(float fraction, float electrons)
create a new instance from a fraction along the path and a number of electrons.
unsigned int getPacked() const
get the packed value
Abstract base class for different kinds of events.