Belle II Software development
TOPTemplateFitResult.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <framework/datastore/RelationsObject.h>
11
12namespace Belle2 {
22 public:
23
28
36 explicit TOPTemplateFitResult(short risingEdge, short backgroundOffset,
37 short amplitude, short chisquare);
38
47 TOPTemplateFitResult(double risingEdge, double risingEdgeTime, double backgroundOffset,
48 double amplitude, double chisquare);
49
54 void setBackgroundOffset(double backgroundOffset) { m_backgroundOffset = backgroundOffset;}
55
60 void setAmplitude(double amplitude) {m_amplitude = amplitude;}
61
66 void setChisquare(double chisquare) {m_chisquare = chisquare;}
67
73 void setRisingEdgeAndConvert(unsigned short risingEdge);
74
79 void setRisingEdge(double risingEdge) {m_risingEdge = risingEdge;}
80
85 void setRisingEdgeTime(double risingEdge) {m_risingEdgeTime = risingEdge;}
86
91 double getRisingEdge() const {return m_risingEdge;}
92
97 double getRisingEdgeTime() const {return m_risingEdgeTime;}
98
103 unsigned getRisingEdgeRaw() const {return m_risingEdgeRaw;}
104
110
115 double getAmplitude() const {return m_amplitude;};
116
121 double getChisquare() const {return m_chisquare;}
122
123 private:
124
130 double risingEdgeShortToRisingEdgeDouble(unsigned short risingEdgeS) const;
131
140 };
141
143}
Defines interface for accessing relations of objects in StoreArray.
Class to store template fit result from feature extraction data.
void setChisquare(double chisquare)
Sets chi square.
double m_chisquare
chi square value of template fit
void setRisingEdge(double risingEdge)
Sets rising edge in samples.
double m_amplitude
amplitude from fit
double getChisquare() const
Get chi square.
double m_backgroundOffset
background offset from fit
double m_risingEdgeTime
template fit rising edge in ns
double getRisingEdge() const
Get rising edge in samples.
void setBackgroundOffset(double backgroundOffset)
Sets background offset.
double getBackgroundOffset() const
Get background offset.
double getAmplitude() const
Get ampltide.
double m_risingEdge
template fit rising edge position
ClassDef(TOPTemplateFitResult, 2)
ClassDef.
unsigned getRisingEdgeRaw() const
Get rising Edge Raw.
double getRisingEdgeTime() const
Get rising Edge.
unsigned m_risingEdgeRaw
template fit rising edge position received from FEE
void setAmplitude(double amplitude)
Sets amplitude.
void setRisingEdgeTime(double risingEdge)
Sets rising edge in ns.
double risingEdgeShortToRisingEdgeDouble(unsigned short risingEdgeS) const
Convert rising edge saved in short to double.
TOPTemplateFitResult()
Default constructor.
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.