Belle II Software development
|
Packed class to represent energy deposit along a path in electrons. More...
#include <VXDElectronDeposit.h>
Public Types | |
enum | EBits { c_FractionBits = 10 , c_ElectronBits = 22 , c_TotalBits = c_FractionBits + c_ElectronBits , c_MaxFraction = (1 << c_FractionBits) - 1 , c_MaxElectrons = (1 << c_ElectronBits) - 1 } |
Enum storing the bit informations for the packed information. More... | |
Public Member Functions | |
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. | |
float | getFraction () const |
get the fraction along the path | |
unsigned int | getElectrons () const |
get the number of deposited electrons | |
unsigned int | getPacked () const |
get the packed value | |
operator unsigned int () const | |
convert to unsigned int using the packed representation | |
Private Attributes | |
unsigned int | m_packed: c_TotalBits |
packed representation of the fraction and electron deposition | |
Packed class to represent energy deposit along a path in electrons.
This class is used by the VXD to efficiently store the number of electrons deposited in the silicon along a given path by storing the fraction along the path and the number of electrons at that point in a packed way. The fraction is encoded between 0 and 1 using 8 bits and the number of electrons is stored as 24bit unsigned integer which allows for 16.7 million electrons per step. As the electron hole pair production energy is 3eV in silicon this corresponds to an energy loss of around 50GeV so there should be no problem at all.
Definition at line 32 of file VXDElectronDeposit.h.
enum EBits |
Enum storing the bit informations for the packed information.
Definition at line 35 of file VXDElectronDeposit.h.
|
inlineexplicit |
Create a new instance from a packed value.
packed | value to be interpreted as packed fraction/electrons |
Definition at line 50 of file VXDElectronDeposit.h.
|
inline |
create a new instance from a fraction along the path and a number of electrons.
fraction | fraction along the path, should be 0<=x<=1 |
electrons | number of electrons deposited |
Definition at line 57 of file VXDElectronDeposit.h.
|
inline |
get the number of deposited electrons
Definition at line 70 of file VXDElectronDeposit.h.
|
inline |
get the fraction along the path
Definition at line 65 of file VXDElectronDeposit.h.
|
inline |
|
inline |
convert to unsigned int using the packed representation
Definition at line 77 of file VXDElectronDeposit.h.
|
private |
packed representation of the fraction and electron deposition
Definition at line 80 of file VXDElectronDeposit.h.