9 #include <top/dataobjects/TOPTemplateFitResult.h>
20 TOPTemplateFitResult::TOPTemplateFitResult() {}
22 TOPTemplateFitResult::TOPTemplateFitResult(
short risingEdge,
short backgroundOffset,
23 short amplitude,
short chisquare)
25 m_risingEdgeRaw = risingEdge;
26 m_risingEdge = risingEdgeShortToRisingEdgeDouble(risingEdge);
27 m_backgroundOffset = backgroundOffset;
28 m_amplitude = amplitude;
29 m_chisquare = chisquare;
30 m_risingEdgeTime = -1.;
33 TOPTemplateFitResult::TOPTemplateFitResult(
double risingEdge,
double risingEdgeTime,
double backgroundOffset,
34 double amplitude,
double chisquare)
35 : m_risingEdge(risingEdge), m_risingEdgeTime(risingEdgeTime), m_backgroundOffset(backgroundOffset), m_amplitude(amplitude),
36 m_chisquare(chisquare)
49 double risingEdgeD = (risingEdgeS & 0xff00) >> 8;
51 for (
int i = 0; i < 8; i++) {
52 int b = (risingEdgeS & mask);
53 if (b != 0) risingEdgeD += 1. / (pow(2, i + 1));
double m_risingEdge
template fit rising edge position
unsigned m_risingEdgeRaw
template fit rising edge position received from FEE
double risingEdgeShortToRisingEdgeDouble(unsigned short risingEdgeS) const
Convert rising edge saved in short to double.
void setRisingEdgeAndConvert(unsigned short risingEdge)
Sets rising edge from Zynq and converts to double This does not convert from sample to time space.
Abstract base class for different kinds of events.