LDMX Software
PulseShape.h
1#pragma once
2
3#include <cmath>
4#include <memory>
5#include <string>
6
7namespace tracking::digitization {
8
31 public:
32 virtual ~PulseShape() = default;
33
38 virtual double eval(double t) const = 0;
39
47 static std::unique_ptr<PulseShape> make(const std::string& name, double tp,
48 double tp2 = 0.0);
49};
50
51// ---------------------------------------------------------------------------
52// CR-RC shaper (single-pole)
53// ---------------------------------------------------------------------------
54
64class CRRCShape : public PulseShape {
65 public:
66 explicit CRRCShape(double tp) : tp_(tp) {}
67
68 double eval(double t) const override {
69 if (t <= 0.0) return 0.0;
70 return (t / tp_) * std::exp(1.0 - t / tp_);
71 }
72
73 private:
74 double tp_;
75};
76
77// ---------------------------------------------------------------------------
78// Four-pole shaper (CR + 3 RC stages)
79// ---------------------------------------------------------------------------
80
98class FourPoleShape : public PulseShape {
99 public:
100 FourPoleShape(double tp, double tp2);
101
102 double eval(double t) const override;
103
104 private:
105 double tp_, tp2_;
106 double A_, B_;
107 double peak_amp_;
108};
109
110} // namespace tracking::digitization
Single CR·RC shaper.
Definition PulseShape.h:64
double eval(double t) const override
Evaluate the peak-normalised pulse amplitude at time t [ns] after charge arrival.
Definition PulseShape.h:68
Fourth-order shaper with two time constants.
Definition PulseShape.h:98
double eval(double t) const override
Evaluate the peak-normalised pulse amplitude at time t [ns] after charge arrival.
double peak_amp_
g(t_peak), used for normalisation.
Definition PulseShape.h:107
Abstract base class for silicon-strip readout pulse shapes.
Definition PulseShape.h:30
static std::unique_ptr< PulseShape > make(const std::string &name, double tp, double tp2=0.0)
Factory: construct a pulse shape by name.
virtual double eval(double t) const =0
Evaluate the peak-normalised pulse amplitude at time t [ns] after charge arrival.