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 waveform (double t, double initTime, double charge, double tau, WaveformShape wfun=w_betaprime) const
 Waveform shape.
 
double waveform (double t, const ElementaryWaveform &elemWaveform) const
 Waveform taking parameters from a ElementaryWaveform struct.
 
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.
 

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) {}
double m_charge
charge of the pixel
Definition: SVDWaveform.h:198

◆ 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 (ElementaryWaveform elementary_waveform : other.getElementaryWaveforms())
92 m_elementaryWaveforms.push_back(elementary_waveform);
93 }
elementary_waveform_list m_elementaryWaveforms
list of elementary waveform parameters.
Definition: SVDWaveform.h:200

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 }
relations_map m_truehits
Map of TrueHit associations.
Definition: SVDWaveform.h:204
relations_map m_particles
Map of MCParticle associations.
Definition: SVDWaveform.h:202
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:44

◆ getCharge()

double getCharge ( ) const
inline

Return the charge collected in the strip.

Returns
Total charge of the waveform.

Definition at line 169 of file SVDWaveform.h.

169{ 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 174 of file SVDWaveform.h.

174{ 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 179 of file SVDWaveform.h.

179{ 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 184 of file SVDWaveform.h.

184{ 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 157 of file SVDWaveform.h.

158 {
159 double total_waveform = 0;
160 for (SVDWaveform::ElementaryWaveform elementary_waveform : m_elementaryWaveforms) {
161 total_waveform += waveform(t, elementary_waveform);
162 }
163 return total_waveform;
164 }
double waveform(double t, double initTime, double charge, double tau, WaveformShape wfun=w_betaprime) const
Waveform shape.
Definition: SVDWaveform.h:138

◆ 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.clear();
125 std::copy(other.getElementaryWaveforms().begin(), other.getElementaryWaveforms().end(), m_elementaryWaveforms.begin());
126 return *this;
127 }

◆ toString()

std::string toString ( ) const
inline

Produce a string representation of the object.

Definition at line 186 of file SVDWaveform.h.

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

◆ waveform() [1/2]

double waveform ( double  t,
const ElementaryWaveform elemWaveform 
) const
inline

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 150 of file SVDWaveform.h.

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

◆ waveform() [2/2]

double waveform ( double  t,
double  initTime,
double  charge,
double  tau,
WaveformShape  wfun = w_betaprime 
) const
inline

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 138 of file SVDWaveform.h.

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

Member Data Documentation

◆ m_charge

double m_charge
protected

charge of the pixel

Definition at line 198 of file SVDWaveform.h.

◆ m_elementaryWaveforms

elementary_waveform_list m_elementaryWaveforms
protected

list of elementary waveform parameters.

Definition at line 200 of file SVDWaveform.h.

◆ m_particles

relations_map m_particles
protected

Map of MCParticle associations.

Definition at line 202 of file SVDWaveform.h.

◆ m_truehits

relations_map m_truehits
protected

Map of TrueHit associations.

Definition at line 204 of file SVDWaveform.h.


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