11#include <framework/dataobjects/DigitBase.h>
46 c_TimeBaseCalibrated = 1,
47 c_ChannelT0Calibrated = 2,
48 c_ModuleT0Calibrated = 4,
49 c_CommonT0Calibrated = 8,
50 c_FullyCalibrated = c_TimeBaseCalibrated | c_ChannelT0Calibrated | c_ModuleT0Calibrated | c_CommonT0Calibrated,
51 c_OffsetSubtracted = 16,
52 c_EventT0Subtracted = 32,
53 c_BunchOffsetSubtracted = 64,
76 TOPDigit(
int moduleID,
int pixelID,
double rawTime):
215 return (
m_status & bitmask) == bitmask;
A common base for subdetector Digits.
EAppendStatus
Enum for return state of addBGDigit function.
Class to store TOP digitized hits (output of TOPDigitizer or raw data unpacker) relations to TOPSimHi...
float m_time
calibrated time in [ns], t0-subtracted
EHitQuality getHitQuality() const
Returns hit quality.
unsigned short m_status
calibration status bits
void setIntegral(int integral)
Sets pulse integral.
static void setDoubleHitResolution(double time)
Sets double hit resolution.
static void setPileupTime(double time)
Sets pile-up time.
void setRawTime(double rawTime)
Sets raw detection time.
float m_rawTime
raw time expressed in samples (TDC bins)
int getPMTNumber() const
Returns PMT number (1-based)
bool isSecondaryChargeShare() const
Returns charge share status.
unsigned int getASICNumber() const
Returns ASIC number.
int m_integral
pulse integral [ADC counts]
void setModuleID(int moduleID)
Sets module ID.
unsigned m_channel
hardware channel number (0-based)
ClassDefOverride(TOPDigit, 15)
ClassDef.
double getTimeError() const
Returns calibrated time uncertainty.
int getPMTPixelCol() const
Returns PMT pixel column number (1-based)
int getPMTRow() const
Returns PMT row number (1-based)
bool isModuleT0Calibrated() const
Returns calibration status.
void resetChargeShare()
Remove charge share flag.
int getPixelCol() const
Returns pixel column number (1-based)
void setTime(double time)
Sets calibrated detection time.
EHitQuality
hit quality enumerators
TOPDigit()
Default constructor.
unsigned short m_chargeShare
charge sharing flags
int getPixelID() const
Returns pixel ID (1-based)
unsigned int getChannel() const
Returns hardware channel number.
void setPrimaryChargeShare()
Sets primary charge share flag.
int m_moduleID
module ID (1-based)
EStatusBits
calibration status enumerators
float m_pulseWidth
pulse width (FWHM) in [ns]
int getModuleID() const
Returns module ID.
int getPMTPixelRow() const
Returns PMT pixel row number (1-based)
unsigned int getUniqueChannelID() const override
Implementation of the base class function.
int getPMTPixel() const
Returns PMT pixel number (1-based)
int getPixelRow() const
Returns pixel row number (1-based)
bool isPrimaryChargeShare() const
Returns charge share status.
int getPMTCol() const
Returns PMT column number (1-based)
void setFirstWindow(unsigned window)
Sets first ASIC window number of the merged waveform this hit is taken from.
void addStatus(unsigned short bitmask)
Add calibration status.
void setTimeError(double timeError)
Sets calibrated time uncertainty.
void setPixelID(int pixelID)
Sets pixel ID.
TOPDigit(int moduleID, int pixelID, double rawTime)
Usefull constructor.
unsigned short m_firstWindow
first ASIC window of the merged waveform
int m_pulseHeight
pulse height [ADC counts]
double getPulseWidth() const
Returns pulse width.
void setPulseHeight(int pulseHeight)
Sets pulse height.
int getIntegral() const
Returns pulse integral.
unsigned short getStatus() const
Returns calibration status bits.
unsigned int getASICChannel() const
Returns ASIC channel number.
int getPulseHeight() const
Returns pulse height.
bool isCalibrated() const
Returns calibration status.
unsigned int getBoardstackNumber() const
Returns boardstack number.
unsigned int getCarrierNumber() const
Returns carrier board number.
bool isChannelT0Calibrated() const
Returns calibration status.
double getRawTime() const
Returns raw detection time.
unsigned getFirstWindow() const
Returns first ASIC window number of the merged waveform this hit is taken from.
float m_timeError
time uncertainty (r.m.s) in [ns]
void setHitQuality(EHitQuality quality)
Sets hit quality flag.
void setPulseWidth(double width)
Sets pulse width.
bool isCommonT0Calibrated() const
Returns calibration status.
void setChannel(unsigned int channel)
Sets hardware channel number (0-based)
EHitQuality m_quality
hit quality
bool hasStatus(unsigned short bitmask) const
Returns calibration status.
void removeStatus(unsigned short bitmask)
Remove calibration status.
bool isTimeBaseCalibrated() const
Returns calibration status.
bool isChargeShare() const
Returns charge share status.
void setStatus(unsigned short status)
Sets calibration status (overwrites previously set bits)
void setSecondaryChargeShare()
Sets secondary charge share flag.
int m_pixelID
software channel ID (1-based)
EChargeShare
charge sharing enumerators
@ c_PrimaryChargeShare
the largest one among hits sharing the same charge
@ c_SecondaryChargeShare
others sharing the same charge
double getTime() const
Returns t0-subtracted and calibrated time.
void subtractT0(double t0)
Subtract start time from m_time.
static float s_doubleHitResolution
double hit resolving time in [ns]
DigitBase::EAppendStatus addBGDigit(const DigitBase *bg) override
Implementation of the base class function.
int getModulo256Sample() const
Returns sample number modulo 256.
static float s_pileupTime
pile-up time in [ns]
Abstract base class for different kinds of events.