Belle II Software development
TOPSignalShape.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <TObject.h>
12#include <vector>
13#include <TSpline.h>
14
15namespace Belle2 {
20
25 class TOPSignalShape: public TObject {
26 public:
27
33
42 TOPSignalShape(std::vector<double> shape, double timeBin, double tau,
43 double pole1, double pole2);
44
48 TOPSignalShape(const TOPSignalShape& shape): TObject()
49 {
50 *this = shape;
52 }
53
58 {
59 if (this != &shape) {
60 m_shape = shape.getShape();
61 m_tmin = shape.getTMin();
62 m_tmax = shape.getTMax();
63 m_tau = shape.getTau();
64 m_pole1 = shape.getPole1();
65 m_pole2 = shape.getPole2();
68 m_peakTime = 0;
69 }
70 return *this;
71 }
72
77 {
79 }
80
86 double getValue(double t) const;
87
92 double getTMin() const {return m_tmin;}
93
98 double getTMax() const {return m_tmax;}
99
104 double getPeakingTime() const;
105
110 double getTau() const {return m_tau;}
111
116 double getPole1() const {return m_pole1;}
117
122 double getPole2() const {return m_pole2;}
123
128 const std::vector<double>& getShape() const {return m_shape;}
129
134 const TSpline5* getInterpolator() const {return m_interpolator;}
135
136 private:
137
138 std::vector<double> m_shape;
139 double m_tmin = 0;
140 double m_tmax = 0;
141 double m_tau = 0;
142 double m_pole1 = 0;
143 double m_pole2 = 0;
144
146 mutable TSpline5* m_interpolator = 0;
147
149 mutable double m_peakTime = 0;
150
152
153 };
154
156} // end namespace Belle2
double m_peakTime
do not write out
double getTMin() const
Returns time of the first waveform sample.
const std::vector< double > & getShape() const
Returns waveform values.
double getTau() const
Returns time constant of the exponential used for the extrapolation of tail.
double getTMax() const
Returns time of the last waveform sample.
ClassDef(TOPSignalShape, 1)
do not write out
std::vector< double > m_shape
waveform values
TOPSignalShape(const TOPSignalShape &shape)
Copy constructor.
const TSpline5 * getInterpolator() const
Returns interpolator.
TOPSignalShape & operator=(const TOPSignalShape &shape)
Assignment operator.
double m_pole2
noise bandwidth: second pole [GHz]
TSpline5 * m_interpolator
cache for the interpolator
double m_tau
time constant of the exponential tail [ns]
double m_tmin
time of the first waveform sample [ns]
double m_tmax
time of the last waveform sample [ns]
double getPole2() const
Returns second pole of noise bandwidth.
double m_pole1
noise bandwidth: first pole [GHz]
double getPole1() const
Returns first pole of noise bandwidth.
TOPSignalShape()
Default constructor.
~TOPSignalShape()
Destructor.
double getPeakingTime() const
Returns peaking time of the signal.
double getValue(double t) const
Returns value at time t of the normalized waveform using interpolator.
Abstract base class for different kinds of events.