5#include "Tools/PulseShape.h"
66 double sampling_interval_ns,
double pedestal_adc,
67 double noise_sigma_adc,
double t_scan_min_ns = -50.0,
68 double t_scan_max_ns = 150.0,
double t_scan_step_ns = 1.0);
76 FitResult
fit(
const std::vector<short>& samples)
const;
84 FitResult
fitFixed(
const std::vector<short>& samples,
double T)
const;
88 std::pair<double, double>
evalAtT(
const std::vector<short>& samples,
93 double sampling_interval_ns_;
96 double t_scan_min_ns_;
97 double t_scan_max_ns_;
98 double t_scan_step_ns_;
Fits a pulse shape to the ADC samples of a single readout channel to extract hit amplitude and time.
std::pair< double, double > evalAtT(const std::vector< short > &samples, double T) const
Evaluate χ²(T) and the corresponding best-fit amplitude.
FitResult fitFixed(const std::vector< short > &samples, double T) const
Amplitude only fit with the hit time T known, e.g.
PulseFitter(const PulseShape &shape, double t0_offset_ns, double sampling_interval_ns, double pedestal_adc, double noise_sigma_adc, double t_scan_min_ns=-50.0, double t_scan_max_ns=150.0, double t_scan_step_ns=1.0)
double inv_sigma2_
1/σ², pre-computed.
FitResult fit(const std::vector< short > &samples) const
Fit the pulse to the given ADC sample vector.
Abstract base class for front-end readout pulse shapes.
double chi2
Chi-squared value at the minimum.
bool converged
False if no above-pedestal samples found.
double t0
Fitted hit arrival time T [ns].
double amplitude
Fitted peak amplitude [ADC counts], ped-subtracted.
int ndf
Degrees of freedom = n_samples − 2.