10 #ifndef ICARUSCODE_PMT_ALGORITHMS_PHOTOELECTRONPULSEFUNCTION_H
11 #define ICARUSCODE_PMT_ALGORITHMS_PHOTOELECTRONPULSEFUNCTION_H
24 namespace icarus::opdet {
27 template <
typename Stream,
typename T>
28 Stream& operator<< (Stream&& out, PhotoelectronPulseFunction<T>
const& pulse);
88 std::string
const& indent, std::string
const& firstIndent
90 {
doDump(out, indent, firstIndent); }
91 void dump(std::ostream&& out, std::string
const& indent =
"")
const
92 {
dump(out, indent, indent); }
104 (std::string
const& indent, std::string
const& firstIndent)
const;
105 std::string
toString(std::string
const& indent =
"")
const
106 {
return toString(indent, indent); }
149 std::string
const& indent, std::string
const& firstIndent
162 template <
typename T>
164 (std::string
const& indent, std::string
const& firstIndent)
const
166 std::ostringstream sstr;
167 dump(sstr, indent, firstIndent);
168 return std::move(sstr).str();
173 template <
typename Stream,
typename T>
174 Stream& icarus::opdet::operator<<
176 { out << pulse.toString();
return out; }
181 #endif // ICARUSCODE_PMT_ALGORITHMS_PHOTOELECTRONPULSEFUNCTION_H
virtual ADCcount doEvaluateAt(Time time) const =0
Implementation of the function evaluation at time.
virtual int doPolarity() const
Returns the polarity of the pulse (+1 or -1).
T Time
Type of time being used.
ADCcount baseline() const
Returns the baseline of the pulse in ADC counts.
virtual ADCcount doPeakAmplitude() const
Returns the amplitude of the first peak in ADC counts.
A value measured in the specified unit.
Time peakTime() const
Returns the time at which the first peak is found.
Interface for a function describing a pulse from a photoelectron.
ADCcount evaluateAt(Time time) const
Evaluates the pulse at the given time.
virtual void doDump(std::ostream &out, std::string const &indent, std::string const &firstIndent) const
Prints into the stream the parameters of this shape.
Dimensioned variables related to electronics.
void dump(std::ostream &out, std::string const &indent, std::string const &firstIndent) const
Prints on stream the parameters of this shape.
ADCcount operator()(Time time) const
Alias of evaluateAt().
std::string toString(std::string const &indent, std::string const &firstIndent) const
Returns the parameters of this shape as a descriptive string.
virtual Time doPeakTime() const =0
Returns the time at which the first peak is found.
virtual ~PhotoelectronPulseFunction()=default
std::string toString(std::string const &indent="") const
ADCcount peakAmplitude() const
Returns the amplitude of the first peak in ADC counts.
counts_as< float > counts_f
Number of ADC counts, represented by float.
util::quantities::counts_f ADCcount
Type for ADC counts (floating point).
void dump(std::ostream &&out, std::string const &indent="") const
int polarity() const
Returns the polarity of the pulse (+1: positive, or -1: negative).
virtual ADCcount doBaseline() const
Returns the baseline of the pulse.