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 {
25 class TOPSignalShape: public TObject {
26 public:
27
32 {}
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 }
69 return *this;
70 }
71
76 {
78 }
79
85 double getValue(double t) const;
86
91 double getTMin() const {return m_tmin;}
92
97 double getTMax() const {return m_tmax;}
98
103 double getPeakingTime() const;
104
109 double getTau() const {return m_tau;}
110
115 double getPole1() const {return m_pole1;}
116
121 double getPole2() const {return m_pole2;}
122
127 const std::vector<double>& getShape() const {return m_shape;}
128
133 const TSpline5* getInterpolator() const {return m_interpolator;}
134
135 private:
136
137 std::vector<double> m_shape;
138 double m_tmin = 0;
139 double m_tmax = 0;
140 double m_tau = 0;
141 double m_pole1 = 0;
142 double m_pole2 = 0;
145 mutable TSpline5* m_interpolator = 0;
146
148 mutable double m_peakTime = 0;
149
152 };
153
155} // end namespace Belle2
Normalized shape of single photon pulse (waveform) Pulse must be positive.
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.