 |
Belle II Software
release-05-01-25
|
14 #include <framework/dataobjects/RelationElement.h>
19 #include <svd/simulation/SVDSimulationTools.h>
56 Wave(
double initTime,
double charge,
double tau,
64 std::ostringstream os;
84 typedef std::map<RelationElement::index_type, RelationElement::weight_type>
relations_map;
86 typedef std::map<RelationElement::index_type, RelationElement::weight_type>::value_type
relation_value_type;
95 for (
Wave wave : other.getFunctions())
115 void add(
double initTime,
double charge,
double tau,
int particle = -1,
int truehit = -1)
119 m_functions.push_back(Wave(initTime, charge, tau, particle, truehit));
120 if (particle > -1)
m_particles[particle] +=
static_cast<float>(charge);
121 if (truehit > -1)
m_truehits[truehit] +=
static_cast<float>(charge);
134 std::copy(other.getFunctions().begin(), other.getFunctions().end(),
m_functions.begin());
147 double waveform(
double t,
double initTime,
double charge,
double tau,
150 double z = (t - initTime) / tau;
151 return charge * wfun(z);
159 double waveform(
double t,
const Wave& wave)
const
160 {
return waveform(t, wave.m_initTime, wave.m_charge, wave.m_tau); }
197 std::ostringstream os;
200 os << ++i <<
'\t' << w.toString();
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
SVDSignal & operator=(const SVDSignal &other)
Make the SVDSignal assignable.
relations_map m_particles
Map of MCParticle associations.
double m_charge
charge of the pixel
SVDSignal()
Default constructor.
std::deque< Wave > function_list
List of elementary waveforms.
const relations_map & getMCParticleRelations() const
Return the list of MCParticle relations.
std::function< double(double)> waveFunction
Wavefrom function type.
function_list m_functions
list of elementary waveform parameters.
RelationElement::index_type m_truehit
DataStore index of the associated SVDTrueHit.
void add(double initTime, double charge, double tau, int particle=-1, int truehit=-1)
Add a chargelet to the strip signal.
double getCharge() const
Return the charge collected in the strip.
double m_tau
Decay time of the waveform.
double operator()(double t) const
Make SVDSignal a functor.
std::map< RelationElement::index_type, RelationElement::weight_type >::value_type relation_value_type
Type of relation_map elements.
Abstract base class for different kinds of events.
unsigned int index_type
type used for indices.
RelationElement::index_type m_particle
DataStore index of the generating MC Particle.
double m_initTime
Start time of the waveform.
Type to store elementary waveforms.
double w_betaprime(double t)
Beta-prime wave function, x^alpha/(1+x)^beta.
std::map< RelationElement::index_type, RelationElement::weight_type > relations_map
Type to store contributions to strip signal by different particles on output of SVDSignal.
double waveform(double t, double initTime, double charge, double tau, waveFunction wfun=w_betaprime) const
Waveform shape.
relations_map m_truehits
Map of TrueHit associations.
double m_charge
Charge of the wave.
std::string toString() const
Create a string containing data of this Wave object.
const function_list & getFunctions() const
Return the list of waveform parameters.
const relations_map & getTrueHitRelations() const
Return the list of TrueHit relations.
Wave(double initTime, double charge, double tau, RelationElement::index_type particle, RelationElement::index_type truehit)
Constructor.
std::string toString() const
Produce a string representation of the object.
bool isNoise() const
Check whether this is a noise signal.