Belle II Software development
SVDWaveform Class Reference

The SVD waveform class. More...

#include <SVDWaveform.h>

Classes

struct  ElementaryWaveform
 Type to store elementary waveform parameters. More...
 

Public Types

typedef std::deque< ElementaryWaveformelementary_waveform_list
 List of elementary waveforms.
 
typedef std::map< RelationElement::index_type, RelationElement::weight_typerelations_map
 Type to store contributions to strip signal by different particles on output of SVDWaveform.
 
typedef std::map< RelationElement::index_type, RelationElement::weight_type >::value_type relation_value_type
 Type of relation_map elements.
 

Public Member Functions

 SVDWaveform ()
 Default constructor.
 
 SVDWaveform (const SVDWaveform &other)
 Copy constructor.
 
void add (double initTime, double charge, double tau, int particle=-1, int truehit=-1, WaveformShape wfun=w_betaprime)
 Add a chargelet waveform to the total strip waveform.
 
SVDWaveformoperator= (const SVDWaveform &other)
 Make the SVDWaveform assignable.
 
double operator() (double t) const
 Make SVDWaveform a functor.
 
double getCharge () const
 Return the charge collected in the strip.
 
const elementary_waveform_listgetElementaryWaveforms () const
 Return the list of waveform parameters.
 
const relations_mapgetMCParticleRelations () const
 Return the list of MCParticle relations.
 
const relations_mapgetTrueHitRelations () const
 Return the list of TrueHit relations.
 
std::string toString () const
 Produce a string representation of the object.
 

Static Public Member Functions

static double waveform (double t, double initTime, double charge, double tau, WaveformShape wfun=w_betaprime)
 Waveform shape.
 
static double waveform (double t, const ElementaryWaveform &elemWaveform)
 Waveform taking parameters from a ElementaryWaveform struct.
 

Protected Attributes

double m_charge
 charge of the pixel
 
elementary_waveform_list m_elementaryWaveforms
 list of elementary waveform parameters.
 
relations_map m_particles
 Map of MCParticle associations.
 
relations_map m_truehits
 Map of TrueHit associations.
 

Detailed Description

The SVD waveform class.

The class implements the waveform appearing on an SVD strip as a result of ionization by particles passing through the detector. The class accumulates elementary waveforms formed by chargelets contributing to the charge accumulated on the strip. Currently two types of elementary waveforms are in use: w_betaprime and w_adjacent. The class is a functor returning values of summary waveform at a given time. Poisson and gaussian noises will be added externally.

Definition at line 38 of file SVDWaveform.h.

Member Typedef Documentation

◆ elementary_waveform_list

List of elementary waveforms.

Definition at line 77 of file SVDWaveform.h.

◆ relation_value_type

Type of relation_map elements.

Definition at line 82 of file SVDWaveform.h.

◆ relations_map

Type to store contributions to strip signal by different particles on output of SVDWaveform.

Definition at line 80 of file SVDWaveform.h.

Constructor & Destructor Documentation

◆ SVDWaveform() [1/2]

SVDWaveform ( )
inline

Default constructor.

Definition at line 85 of file SVDWaveform.h.

85: m_charge(0) {}

◆ SVDWaveform() [2/2]

SVDWaveform ( const SVDWaveform & other)
inline

Copy constructor.

Definition at line 88 of file SVDWaveform.h.

89 {
90 m_charge = other.getCharge();
91 for (const ElementaryWaveform& elementary_waveform : other.getElementaryWaveforms())
92 m_elementaryWaveforms.push_back(elementary_waveform);
93 }

Member Function Documentation

◆ add()

void add ( double initTime,
double charge,
double tau,
int particle = -1,
int truehit = -1,
WaveformShape wfun = w_betaprime )
inline

Add a chargelet waveform to the total strip waveform.

Negative sign of charge has a special meaning, it designates noise signal carrying otherwise no useful information.

Parameters
chargeCharge in electrons to be added
initTimeTime of arrival of the chargelet to the sensitive surface of the sensor.
tauCharacteristic time of waveform decay.
particleIndex of the particle contributing the charge, -1 for no particle/noise
truehitIndex of the truehit corresponding to the particle that contributed the charge.
wfunwaveform shaper function

Definition at line 106 of file SVDWaveform.h.

107 {
108 if (charge > 0) {
109 m_charge += charge;
110 m_elementaryWaveforms.push_back(ElementaryWaveform(initTime, charge, tau, wfun, particle, truehit));
111 if (particle > -1) m_particles[particle] += static_cast<float>(charge);
112 if (truehit > -1) m_truehits[truehit] += static_cast<float>(charge);
113 } else if (m_charge == 0)
114 m_charge += charge;
115 }

◆ getCharge()

double getCharge ( ) const
inline

Return the charge collected in the strip.

Returns
Total charge of the waveform.

Definition at line 168 of file SVDWaveform.h.

168{ return m_charge; }

◆ getElementaryWaveforms()

const elementary_waveform_list & getElementaryWaveforms ( ) const
inline

Return the list of waveform parameters.

Returns
The deque containing SVDWaveform::ElementaryWaveform structs with waveform parameters.

Definition at line 173 of file SVDWaveform.h.

173{ return m_elementaryWaveforms; }

◆ getMCParticleRelations()

const relations_map & getMCParticleRelations ( ) const
inline

Return the list of MCParticle relations.

Returns
SVDWaveform::relations_map with MCParticle relations of the signal.

Definition at line 178 of file SVDWaveform.h.

178{ return m_particles; }

◆ getTrueHitRelations()

const relations_map & getTrueHitRelations ( ) const
inline

Return the list of TrueHit relations.

Returns
SVDWaveform::relations_map with TrueHit relations of the signal.

Definition at line 183 of file SVDWaveform.h.

183{ return m_truehits; }

◆ operator()()

double operator() ( double t) const
inline

Make SVDWaveform a functor.

Parameters
tThe time at which output is to be calculated.
Returns
value of the waveform

Definition at line 156 of file SVDWaveform.h.

157 {
158 double total_waveform = 0;
159 for (const SVDWaveform::ElementaryWaveform& elementary_waveform : m_elementaryWaveforms) {
160 total_waveform += waveform(t, elementary_waveform);
161 }
162 return total_waveform;
163 }

◆ operator=()

SVDWaveform & operator= ( const SVDWaveform & other)
inline

Make the SVDWaveform assignable.

Parameters
otherThe original signal.
Returns
This signal with all quantities set to those of the other.

Definition at line 121 of file SVDWaveform.h.

122 {
123 m_charge = other.getCharge();
124 m_elementaryWaveforms = other.getElementaryWaveforms();
125 return *this;
126 }

◆ toString()

std::string toString ( ) const
inline

Produce a string representation of the object.

Definition at line 185 of file SVDWaveform.h.

186 {
187 std::ostringstream os;
188 size_t i = 0;
189 for (const auto& elementary_waveform : m_elementaryWaveforms)
190 os << ++i << '\t' << elementary_waveform.toString();
191 return os.str();
192 }

◆ waveform() [1/2]

static double waveform ( double t,
const ElementaryWaveform & elemWaveform )
inlinestatic

Waveform taking parameters from a ElementaryWaveform struct.

Parameters
tThe time at which the function is to be calculated.
elemWaveformThe SVDWaveform::ElementaryWaveform struct with parameters of a waveform.
Returns
The value of the waveform at time t.

Definition at line 149 of file SVDWaveform.h.

150 { return waveform(t, elemWaveform.m_initTime, elemWaveform.m_charge, elemWaveform.m_tau, elemWaveform.m_wfun); }

◆ waveform() [2/2]

static double waveform ( double t,
double initTime,
double charge,
double tau,
WaveformShape wfun = w_betaprime )
inlinestatic

Waveform shape.

Parameters
tThe time at which the function is to be calculated.
initTimeThe initial time of the waveform.
chargeThe charge (peak value) of the waveform.
tauThe scale parameter (decay time) of the waveform.
wfunThe functional form of the waveform. Default is betaprime. The function is normalized to peak value of 1.
Returns
Value of the waveform at t.

Definition at line 137 of file SVDWaveform.h.

139 {
140 double z = (t - initTime) / tau;
141 return charge * wfun(z);
142 }

Member Data Documentation

◆ m_charge

double m_charge
protected

charge of the pixel

Definition at line 197 of file SVDWaveform.h.

◆ m_elementaryWaveforms

elementary_waveform_list m_elementaryWaveforms
protected

list of elementary waveform parameters.

Definition at line 199 of file SVDWaveform.h.

◆ m_particles

relations_map m_particles
protected

Map of MCParticle associations.

Definition at line 201 of file SVDWaveform.h.

◆ m_truehits

relations_map m_truehits
protected

Map of TrueHit associations.

Definition at line 203 of file SVDWaveform.h.


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