Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Shaper.hh
Go to the documentation of this file.
1#ifndef G_SHAPER_H
2#define G_SHAPER_H
3
4#include <string>
5#include <cmath>
6
7namespace Garfield {
8
9/// Class for signal processing
10
11class Shaper {
12 public:
13 /// Default constructor.
14 Shaper() = delete;
15 /// Constructor.
16 Shaper(const unsigned int n, const double tau, const double g,
17 std::string shaperType);
18 /// Destructor.
20
21 /// Evaluate the transfer function.
22 double Shape(const double t) const;
23 /// Transfer function for a unipolar shaper.
24 double UnipolarShaper(const double t) const;
25 /// Transfer function for a bipolar shaper.
26 double BipolarShaper(const double t) const;
27 /// Time for the transfer function to rise from zero to peak height.
28 double PeakingTime() const { return m_tp; }
29
30 /// Return the integral of the transfer function squared.
31 double TransferFuncSq() const { return m_transfer_func_sq; }
32
33 private:
34 std::string m_className = "Shaper";
35
36 // Shaper type.
37 enum class ShaperType { Unipolar = 0, Bipolar };
38 ShaperType m_type = ShaperType::Unipolar;
39 // Order of the shaper.
40 unsigned int m_n = 1;
41 // Time constant.
42 double m_tau = 1.;
43 // Peaking time.
44 double m_tp = 1.;
45 // Normalization factor.
46 double m_prefactor = 1.;
47 // Gain.
48 double m_g = 1.;
49 // Integral of the transfer function squared.
50 double m_transfer_func_sq = -1.;
51};
52}
53
54#endif
Class for signal processing.
Definition: Shaper.hh:11
double BipolarShaper(const double t) const
Transfer function for a bipolar shaper.
Definition: Shaper.cc:67
Shaper()=delete
Default constructor.
double PeakingTime() const
Time for the transfer function to rise from zero to peak height.
Definition: Shaper.hh:28
double TransferFuncSq() const
Return the integral of the transfer function squared.
Definition: Shaper.hh:31
~Shaper()
Destructor.
Definition: Shaper.hh:19
double Shape(const double t) const
Evaluate the transfer function.
Definition: Shaper.cc:50
double UnipolarShaper(const double t) const
Transfer function for a unipolar shaper.
Definition: Shaper.cc:62