11 #ifndef ICARUSCODE_PMT_ALGORITHMS_ASYMGAUSSPULSEFUNCTION_H
12 #define ICARUSCODE_PMT_ALGORITHMS_ASYMGAUSSPULSEFUNCTION_H
28 namespace icarus::opdet {
88 {
return amplitude *
std::exp(-
sqr((x - mean)/sigma)/2.0); }
127 std::string
const& indent, std::string
const& firstIndent
132 template <
typename V>
135 template <
typename V>
138 using namespace util::quantities::electronics_literals;
139 return (value.abs() < 1
e-6_ADCf)? 0.0_ADCf: value;
149 template <
typename T>
163 template <
typename T>
166 std::string
const& indent, std::string
const& firstIndent
170 << firstIndent <<
"Pulse shape: asymmetric Gaussian with peak at "
182 #endif // ICARUSCODE_PMT_ALGORITHMS_ASYMGAUSSPULSEFUNCTION_H
Time fSigmaR
RMS parameter of the shape after transition.
virtual Time doPeakTime() const override
Returns the time at which the first peak is found.
process_name opflash particleana ie x
virtual ADCcount doEvaluateAt(Time time) const override
Evaluates the pulse at the given time.
T Time
Type of time being used.
typename Base_t::ADCcount ADCcount
Type for ADC counts (floating point).
ADCcount myAmplitude() const
Returns the amplitude of the pulse from the baseline, including its sign.
static ADCcount Gaussian(Time x, Time mean, Time sigma, ADCcount amplitude)
Returns the value of normal distribution at specified point.
Abstract interface of shape of a pulse from one photoelectron.
Time myPeakTime() const
Returns the time of the center of the Gaussian.
virtual void doDump(std::ostream &out, std::string const &indent, std::string const &firstIndent) const override
Prints on stream the parameters of this shape.
typename Base_t::Time Time
Type of time being used.
Time peakTime() const
Returns the time at which the first peak is found.
virtual ADCcount doPeakAmplitude() const override
Returns the amplitude of the first peak in ADC counts.
Time fTransitTime
Time of transition between the two forms of shape.
Interface for a function describing a pulse from a photoelectron.
Time fSigmaL
RMS parameter of the shape before transition.
ADCcount amplitude() const
Dimensioned variables related to electronics.
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
ADCcount fAmplitude
Amplitude at peak (transition).
AsymGaussPulseFunction(ADCcount amplitude, Time peakTime, Time sigmaLeft, Time sigmaRight)
Constructor: assigns the parameters of the shape.
util::quantities::counts_f ADCcount
Type for ADC counts (floating point).
Describes the waveform from a single photoelectron.