 |
Belle II Software
release-05-02-19
|
13 #include <framework/datastore/RelationsObject.h>
462 double correctTime(
double time,
unsigned short storageDepth = 508) const;
492 if (slope == 0)
return sample;
493 return (
int(
m_VPeak) - 2 * value) / (2 * slope) + sample;
507 bool checkEdge(
int v1,
int v2,
int vp)
const
509 return (vp > 0 and v1 < v2 and 2 * v1 <= vp and v2 <= vp)
510 or (vp < 0 and v1 > v2 and 2 * v1 >= vp and v2 >= vp);
bool isMadeOffline() const
Returns offline flag.
@ c_ProductionDebug
from production debugging format
void setCarrierNumber(unsigned short carrier)
Sets carrier board number.
void setSampleRise(unsigned short sample)
Sets sample number just before 50% CFD crossing at leading edge.
bool isFEValid() const
Checks if feature extraction points make sense.
int getValuePeak() const
Returns ADC value at peak (e.g.
void setTFine(unsigned short tfine)
Sets fine timing for 50% CFD at rising edge (within two samples)
unsigned short m_errorFlags
feature extraction error flags (see enum)
@ c_HeadMagic
if magic number not 0xA
void setASICWindow(unsigned short window)
Sets first storage window number (logical window number)
void setValuePeak(short adc)
Sets ADC value at m_sampleRise + m_dSamplePeak (e.g.
int getValueRise0() const
Returns ADC value at leading edge (at m_sampleRise)
int getValueFall0() const
Returns ADC value at falling edge (at m_sampleRise + m_dSampleFall)
void setErrorFlags(unsigned short flags)
Sets error flags.
bool areWindowsInOrder(unsigned short storageDepth=508) const
Checks if storage windows come in the consecutive order before the last sample (no gaps before the la...
void setASICChannel(unsigned short channel)
Sets ASIC channel number.
void setPhase(unsigned short phase)
Sets beam orbit synchronisation phase (production firmware only) 9-state count: valid values are 0 - ...
void setStorageWindows(const std::vector< unsigned short > &windows)
Sets storage windows of waveform segments.
unsigned short m_channel
ASIC channel number.
unsigned getScrodID() const
Returns SCROD ID.
double getLeadingSlope() const
Returns leading edge slope.
unsigned getSamplePeak() const
Returns peak position.
short m_VRise0
ADC value at m_sampleRise.
int getValueRise1() const
Returns ADC value at leading edge (at m_sampleRise + 1)
void setValueFall0(short adc)
Sets ADC value at m_sampleRise + m_dSampleFall.
bool isAtWindowDiscontinuity(unsigned short storageDepth=508) const
Checks if feature extraction points are at window discontinuity (e.g.
int getValueFall1() const
Returns ADC value at falling edge (at m_sampleRise + m_dSampleFall + 1)
void setValueRise0(short adc)
Sets ADC value at m_sampleRise.
unsigned getLastWriteAddr() const
Returns current (reference) ASIC window number.
unsigned short m_scrodID
SCROD ID.
unsigned getASICChannel() const
Returns ASIC channel number.
void setOfflineFlag()
Sets offline flag: telling that this digit was extracted offline in basf2.
unsigned getTFine() const
Returns fine timing for 50% CFD (within two samples)
unsigned short getErrorFlags() const
Returns error flags.
void setLookBackWindows(unsigned short lookBack)
Sets number of look-back windows.
bool isWindowConsistent() const
Checks if the first window number is the same as the first one in m_windows Note: returns true if m_w...
unsigned short m_phase
carrier phase
unsigned short m_lastWriteAddr
current (reference) window number
@ c_TailMagic
if magic bits not '101' = 0x5
double getFWHM() const
Returns signal full width half maximum.
EDataTypes
Enum for data types needed to steer time conversion in TOPRawDigitConverter.
@ c_MC
from MC digitization
ErrorFlags
Enum for error flags; bits set if corresponding data not consistent.
unsigned short m_revo9Counter
number of clock ticks since last revo9 flag
unsigned short m_asic
ASIC number.
unsigned short m_dSamplePeak
peak position relative to m_sampleRise
const std::vector< unsigned short > & getStorageWindows() const
Returns storage window numbers of waveform segments (not always available!)
int m_integral
integral of a pulse (e.g.
void setDeltaSampleFall(unsigned short dsample)
Sets falling edge sample number just before 50% CFD crossing relative to m_sampleRise.
bool isFallingEdgeValid() const
Checks if falling edge is consistently defined.
ClassDef(TOPRawDigit, 6)
ClassDef.
Class to store unpacked raw data (hits in feature-extraction format) It provides also calculation of ...
unsigned getSampleFall() const
Returns sample number at falling edge just before 50% CFD crossing.
bool m_offline
feature extraction flag: by firmware or software
double getCFDLeadingTimeError(double rmsNoise) const
Returns leading edge CFD time uncertainty (assuming uncorrelated noise)
double getFallingSlope() const
Returns falling edge slope.
short m_VFall1
ADC value at m_sampleRise + m_dSampleFall + 1.
unsigned getDeltaSampleFall() const
Returns sample number at falling edge just before 50% CFD relative to m_sampleRise.
Abstract base class for different kinds of events.
int getIntegral() const
Returns integral of a pulse (e.g.
double getCFDFallingTimeError(double rmsNoise) const
Returns falling edge CFD time uncertainty (assuming uncorrelated noise)
short m_VRise1
ADC value at m_sampleRise + 1.
short m_VFall0
ADC value at m_sampleRise + m_dSampleFall.
short m_VPeak
ADC value at m_sampleRise + m_dSamplePeak.
double correctTime(double time, unsigned short storageDepth=508) const
Corrects time after window discontinuity by adding missing samples.
void setLastWriteAddr(unsigned short window)
Sets current (reference) window number.
@ c_HitMagic
if magic number not 0xB
double timeErrorCoefficient(double y1, double y2) const
Calculate the coefficient of time error.
void setRevo9Counter(unsigned short revo9Counter)
Sets number of global clock tics since last revo9 flag (production firmware only)
bool checkEdge(int v1, int v2, int vp) const
Checks if values v1, v2 and vp are consistent.
unsigned short m_carrier
carrier board number
unsigned short m_dSampleFall
same for falling edge, rel.
unsigned getCarrierNumber() const
Returns carrier board number.
unsigned short m_sampleRise
sample number just before 50% CFD crossing
@ c_WindowSize
number of samples per window
unsigned short getLookBackWindows() const
Returns number of look-back windows.
void setValueFall1(short adc)
Sets ADC value at m_sampleRise + m_dSampleFall + 1.
EDataTypes m_dataType
data type
unsigned short getRevo9Counter() const
Returns 127 MHz clock ticks since last revo9 marker.
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
TOPRawDigit()
Default constructor.
double getCFDFallingTime() const
Returns falling edge CFD time.
bool isLeadingEdgeValid() const
Checks if leading edge is consistently defined.
std::vector< unsigned short > m_windows
storage windows of waveform segments
void setASICNumber(unsigned short asic)
Sets ASIC number.
@ c_HitChecksum
if sum of 16-bit words not zero
double timeCFDCrossing(int sample, int value, double slope) const
calculates time of 50% CFD crossing
unsigned getScrodChannel() const
Returns channel number within SCROD (in the range 0 - 127)
unsigned short m_window
first ASIC storage window number
@ c_Interim
from interim feature extraction
void setValueRise1(short adc)
Sets ADC value at m_sampleRise + 1.
unsigned getASICWindow() const
Returns ASIC storage window number.
unsigned short m_TFine
fine timing for 50% CFD (within two samples)
unsigned getASICNumber() const
Returns ASIC number.
bool isPedestalJump() const
Checks if feature extraction finds a pedestal jump.
unsigned getSampleRise() const
Returns sample number at leading edge just before 50% CFD crossing.
unsigned short m_lookBackWindows
number of look-back windows
unsigned short getPhase() const
Returns beam orbit synchronisation phase (9-state count: valid values are 0 - 8)
void setIntegral(int integral)
Sets integral of a pulse (e.g.
@ c_Production
from the future production format
EDataTypes getDataType() const
Returns data type.
unsigned getDeltaSamplePeak() const
Returns peak position relative to m_sampleRise.
double getCFDLeadingTime() const
Returns leading edge CFD time.
void setDeltaSamplePeak(unsigned short dsample)
Sets peak position relative to m_sampleRise.