Belle II Software development
DigitValue Class Reference

Class representing the charge and particle contributions for one pixel. More...

#include <PXDDigitizerModule.h>

Public Types

typedef std::map< RelationElement::index_type, RelationElement::weight_typerelations_map
 Type to store contributions to pixel charge by different particles.
 

Public Member Functions

 DigitValue ()
 Constructor.
 
void add (double charge, int particle=-1, int truehit=-1)
 Add charge to the pixel.
 
double charge () const
 Return the charge collected in the pixel.
 
const relations_mapparticles () const
 Return the map containing all particle contributions to the pixel charge.
 
const relations_maptruehits () const
 Return the map containing all truehit contributions to the pixel charge.
 

Protected Attributes

double m_charge
 charge of the pixel
 
relations_map m_particles
 particle contributions to the charge
 
relations_map m_truehits
 truehit contributions to the charge
 

Detailed Description

Class representing the charge and particle contributions for one pixel.

Definition at line 49 of file PXDDigitizerModule.h.

Member Typedef Documentation

◆ relations_map

Type to store contributions to pixel charge by different particles.

Definition at line 52 of file PXDDigitizerModule.h.

Constructor & Destructor Documentation

◆ DigitValue()

DigitValue ( )
inline

Constructor.

Definition at line 54 of file PXDDigitizerModule.h.

54: m_charge(0) {}
double m_charge
charge of the pixel

Member Function Documentation

◆ add()

void add ( double  charge,
int  particle = -1,
int  truehit = -1 
)
inline

Add charge to the pixel.

Parameters
chargecharge in electrons to be added
particleIndex of the particle contributing the charge, -1 for no particle/noise
truehitIndex of the truehit contributing the charge, -1 for none

Definition at line 60 of file PXDDigitizerModule.h.

61 {
62 if (particle >= 0) m_particles[particle] += charge;
63 if (truehit >= 0) m_truehits[truehit] += charge;
65 }
relations_map m_truehits
truehit contributions to the charge
relations_map m_particles
particle contributions to the charge
double charge() const
Return the charge collected in the pixel.

◆ charge()

double charge ( ) const
inline

Return the charge collected in the pixel.

Definition at line 67 of file PXDDigitizerModule.h.

67{ return m_charge; }

◆ particles()

const relations_map & particles ( ) const
inline

Return the map containing all particle contributions to the pixel charge.

Definition at line 69 of file PXDDigitizerModule.h.

69{ return m_particles; }

◆ truehits()

const relations_map & truehits ( ) const
inline

Return the map containing all truehit contributions to the pixel charge.

Definition at line 71 of file PXDDigitizerModule.h.

71{ return m_truehits; }

Member Data Documentation

◆ m_charge

double m_charge
protected

charge of the pixel

Definition at line 74 of file PXDDigitizerModule.h.

◆ m_particles

relations_map m_particles
protected

particle contributions to the charge

Definition at line 76 of file PXDDigitizerModule.h.

◆ m_truehits

relations_map m_truehits
protected

truehit contributions to the charge

Definition at line 78 of file PXDDigitizerModule.h.


The documentation for this class was generated from the following file: