CbmRoot
|
Data class for a single-channel message in the STS. More...
#include <CbmStsDigi.h>
Public Member Functions | |
CbmStsDigi ()=default | |
XPU_D | CbmStsDigi (int32_t address, int32_t channel, uint32_t time, uint16_t charge) |
~CbmStsDigi ()=default | |
XPU_D int32_t | GetAddress () const |
XPU_D int32_t | GetAddressPacked () const |
XPU_D uint16_t | GetChannel () const |
Channel number in module @value Channel number. | |
XPU_D uint16_t | GetChargeU16 () const |
XPU_D uint32_t | GetTimeU32 () const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
XPU_D void | SetTime (uint32_t dNewTime) |
XPU_D void | SetChannel (uint16_t channel) |
XPU_D void | SetCharge (uint16_t charge) |
XPU_D void | SetAddress (int32_t address) |
XPU_D void | SetChannelAndCharge (uint16_t channel, uint16_t charge) |
XPU_D void | SetAddressAndTime (int32_t address, uint32_t time) |
std::string | ToString () const |
Static Public Member Functions | |
static const char * | GetBranchName () |
Get the desired name of the branch for this obj in the cbm output tree (static) | |
static const char * | GetClassName () |
Class name (static) | |
static ECbmModuleId | GetSystem () |
Static Public Attributes | |
static constexpr int | kNumAdcBits = 5 |
static constexpr uint32_t | kAdcMask = (1u << kNumAdcBits) - 1u |
static constexpr int | kNumLowerAddrBits = 16 |
static constexpr int | kNumTimestampBits = 31 |
static constexpr uint32_t | kTimestampMask = (1u << kNumTimestampBits) - 1u |
static constexpr uint32_t | kMaxTimestamp = kTimestampMask |
static constexpr uint32_t | kTimeAddressBitMask = ~kTimestampMask |
Private Member Functions | |
XPU_D void | PackTime (uint32_t newTime) |
XPU_D uint32_t | UnpackTime () const |
XPU_D void | PackChannelAndCharge (uint16_t channel, uint16_t charge) |
XPU_D uint16_t | UnpackChannel () const |
XPU_D uint16_t | UnpackCharge () const |
XPU_D void | PackAddressAndTime (int32_t newAddress, uint32_t newTime) |
XPU_D int32_t | UnpackAddress () const |
XPU_D uint32_t | ClampTime (uint32_t time) const |
ClassDefNV (CbmStsDigi, 8) | |
Private Attributes | |
uint32_t | fTime |
Time [ns] in lower 31 bits, highest bit is the 17th address bit. | |
uint16_t | fChannelAndCharge |
Channel number (lower 11 bits) and charge [ADC Units] in upper 5 bits. | |
uint16_t | fAddress |
Unique element address (lower 16 bits of 17) | |
Friends | |
class | boost::serialization::access |
Data class for a single-channel message in the STS.
The CbmStsDigi is the ROOT representation of the smallest information unit delivered by the CBM-STS by a single readout channel. It carries the channel address, the measurement time and the digitised charge as information.
Definition at line 40 of file CbmStsDigi.h.
|
default |
Default constructor
|
inline |
Standard constructor
address | Unique element address |
channel | Channel number |
time | Measurement time [ns] |
charge | Charge [ADC units] |
Definition at line 61 of file CbmStsDigi.h.
References ClampTime(), PackAddressAndTime(), and PackChannelAndCharge().
|
default |
Destructor
|
inlineprivate |
Definition at line 209 of file CbmStsDigi.h.
References kMaxTimestamp.
Referenced by CbmStsDigi(), SetAddressAndTime(), and SetTime().
|
private |
|
inline |
Unique detector element address (see CbmStsAddress) @value Unique address of readout channel
Definition at line 74 of file CbmStsDigi.h.
References UnpackAddress().
Referenced by CbmStsRecoModule::AddDigiToQueue(), CbmMcbm2019CheckPulser::CheckInterSystemOffset(), CbmCheckTiming::CheckTimeOrder(), CbmAlgoBuildRawEvents::CheckTriggerConditions(), compareStsDigiDataMembers(), CbmBuildEventsSimple::Exec(), CbmCheckDigisNbCorr::Exec(), CbmMcbm2019CheckTimingPairs::FillCorrBuffer(), CbmMcbm2019CheckPulser::FillSystemOffsetHistos(), CbmMcbmCheckTimingAlgo::GetDigiInfo(), CbmRecoSts::ProcessData(), CbmRecoStsPixel::ProcessData(), CbmStsDigitizeQa::ProcessDigisAndPoints(), and CbmEvBuildSource::ReadEvent().
|
inline |
Definition at line 77 of file CbmStsDigi.h.
References fAddress, fTime, kNumLowerAddrBits, and kNumTimestampBits.
Referenced by cbm::algo::sts::HitfinderChain::DigiMap::ModuleIndex(), and UnpackAddress().
|
inlinestatic |
Get the desired name of the branch for this obj in the cbm output tree (static)
Definition at line 87 of file CbmStsDigi.h.
Referenced by CbmDeviceDigiEventSink::InitTask().
|
inline |
Channel number in module @value Channel number.
Definition at line 93 of file CbmStsDigi.h.
References UnpackChannel().
Referenced by CbmStsRecoModule::AddDigiToQueue(), CbmStsAlgoAnaCluster::AnaSize1(), CbmStsAlgoAnaCluster::AnaSize2(), CbmStsAlgoAnaCluster::AnaSizeN(), cbm::algo::sts::Hitfinder::CalculateChannelOffsets(), CbmMcbm2019CheckPulser::CheckInterSystemOffset(), CbmAlgoBuildRawEvents::CheckTriggerConditions(), compareStsDigiDataMembers(), cbm::algo::sts::Hitfinder::CreateClusterFromConnectors1(), cbm::algo::sts::Hitfinder::CreateClusterFromConnectors2(), cbm::algo::sts::Hitfinder::CreateClusterFromConnectorsN(), CbmMcbm2019CheckDigisSts::Exec(), CbmMcbm2019CheckPulser::FillSystemOffsetHistos(), cbm::algo::sts::Hitfinder::FindClustersParallel(), CbmRecoStsPixel::ProcessData(), CbmStsDigitizeQa::ProcessDigisAndPoints(), cbm::algo::sts::Hitfinder::SortDigisInSpaceAndTime(), and CbmStsAlgoAnaCluster::WeightedMean().
|
inline |
Definition at line 108 of file CbmStsDigi.h.
References UnpackCharge().
Referenced by cbm::algo::sts::Hitfinder::CreateClusterFromConnectors1(), cbm::algo::sts::Hitfinder::CreateClusterFromConnectors2(), and cbm::algo::sts::Hitfinder::CreateClusterFromConnectorsN().
|
inlinestatic |
Class name (static)
Definition at line 99 of file CbmStsDigi.h.
Referenced by TEST().
|
inlinestatic |
System ID (static)
Definition at line 114 of file CbmStsDigi.h.
References kSts.
Referenced by compareStsDigiDataMembers().
|
inline |
Definition at line 123 of file CbmStsDigi.h.
References UnpackTime().
Referenced by cbm::algo::sts::Hitfinder::CreateClusterFromConnectors1(), cbm::algo::sts::Hitfinder::CreateClusterFromConnectors2(), cbm::algo::sts::Hitfinder::CreateClusterFromConnectorsN(), cbm::algo::sts::Hitfinder::FindClustersParallel(), and cbm::algo::sts::Hitfinder::SortDigisInSpaceAndTime().
|
inlineprivate |
Definition at line 192 of file CbmStsDigi.h.
References fAddress, fTime, kNumLowerAddrBits, kNumTimestampBits, kTimestampMask, and CbmStsAddress::PackDigiAddress().
Referenced by CbmStsDigi(), SetAddress(), and SetAddressAndTime().
|
inlineprivate |
Definition at line 185 of file CbmStsDigi.h.
References fChannelAndCharge, and kNumAdcBits.
Referenced by CbmStsDigi(), SetChannel(), SetChannelAndCharge(), and SetCharge().
|
inlineprivate |
Definition at line 181 of file CbmStsDigi.h.
References fTime, kTimeAddressBitMask, and kTimestampMask.
Referenced by SetTime().
|
inline |
Definition at line 127 of file CbmStsDigi.h.
References fAddress, fChannelAndCharge, and fTime.
|
inline |
Definition at line 148 of file CbmStsDigi.h.
References PackAddressAndTime(), and UnpackTime().
|
inline |
Set new address and time at once.
Slightly more efficient than calling both individual setters.
Definition at line 161 of file CbmStsDigi.h.
References ClampTime(), and PackAddressAndTime().
|
inline |
Definition at line 144 of file CbmStsDigi.h.
References PackChannelAndCharge(), and UnpackCharge().
|
inline |
Set new channel and charge.
Slightly more efficient than calling both individual setters.
Definition at line 155 of file CbmStsDigi.h.
References PackChannelAndCharge().
|
inline |
Definition at line 146 of file CbmStsDigi.h.
References PackChannelAndCharge(), and UnpackChannel().
|
inline |
Update Time of measurement
New | Time [ns] |
Definition at line 138 of file CbmStsDigi.h.
References ClampTime(), and PackTime().
Referenced by TEST().
string CbmStsDigi::ToString | ( | ) | const |
String output
Definition at line 24 of file CbmStsDigi.cxx.
References UnpackAddress(), UnpackChannel(), UnpackCharge(), and UnpackTime().
Referenced by CbmStsDigiSource::PrintStsDigi(), and TEST().
|
inlineprivate |
Definition at line 203 of file CbmStsDigi.h.
References GetAddressPacked(), and CbmStsAddress::UnpackDigiAddress().
Referenced by GetAddress(), and ToString().
|
inlineprivate |
Definition at line 189 of file CbmStsDigi.h.
References fChannelAndCharge, and kNumAdcBits.
Referenced by GetChannel(), SetCharge(), and ToString().
|
inlineprivate |
Definition at line 190 of file CbmStsDigi.h.
References fChannelAndCharge, and kAdcMask.
Referenced by GetChargeU16(), SetChannel(), and ToString().
|
inlineprivate |
Definition at line 182 of file CbmStsDigi.h.
References fTime, and kTimestampMask.
Referenced by GetTimeU32(), SetAddress(), and ToString().
|
friend |
Definition at line 173 of file CbmStsDigi.h.
|
private |
Unique element address (lower 16 bits of 17)
Definition at line 178 of file CbmStsDigi.h.
Referenced by GetAddressPacked(), PackAddressAndTime(), and serialize().
|
private |
Channel number (lower 11 bits) and charge [ADC Units] in upper 5 bits.
Definition at line 177 of file CbmStsDigi.h.
Referenced by PackChannelAndCharge(), serialize(), UnpackChannel(), and UnpackCharge().
|
private |
Time [ns] in lower 31 bits, highest bit is the 17th address bit.
Definition at line 176 of file CbmStsDigi.h.
Referenced by GetAddressPacked(), PackAddressAndTime(), PackTime(), serialize(), and UnpackTime().
|
staticconstexpr |
Definition at line 44 of file CbmStsDigi.h.
Referenced by UnpackCharge().
|
staticconstexpr |
Definition at line 48 of file CbmStsDigi.h.
Referenced by ClampTime().
|
staticconstexpr |
Definition at line 43 of file CbmStsDigi.h.
Referenced by PackChannelAndCharge(), and UnpackChannel().
|
staticconstexpr |
Definition at line 45 of file CbmStsDigi.h.
Referenced by GetAddressPacked(), and PackAddressAndTime().
|
staticconstexpr |
Definition at line 46 of file CbmStsDigi.h.
Referenced by GetAddressPacked(), and PackAddressAndTime().
|
staticconstexpr |
Definition at line 49 of file CbmStsDigi.h.
Referenced by PackTime().
|
staticconstexpr |
Definition at line 47 of file CbmStsDigi.h.
Referenced by PackAddressAndTime(), PackTime(), and UnpackTime().