16#ifndef O2_GLOBAL_TRACK_ID
17#define O2_GLOBAL_TRACK_ID
76 static_assert(
NSources <= 32,
"bitset<32> insufficient");
80 static constexpr std::string_view
NONE{
"none"};
81 static constexpr std::string_view
ALL{
"all"};
90 GPUdi() static
bool isTrackSource(
int s);
91 GPUdi() auto getSourceDetectorsMask()
const {
return getSourceDetectorsMask(getSource()); }
105 GPUdi()
mask_t getSourceMask()
const {
return getSourceMask(getSource()); }
107 GPUdi() operator
int()
const {
return int(getIndex()); }
121namespace globaltrackid_internal
170 sMasks[GlobalTrackID::ITS] | sMasks[GlobalTrackID::TPC] | sMasks[GlobalTrackID::MFT] | sMasks[GlobalTrackID::MCH] | sMasks[GlobalTrackID::ITSTPC] | sMasks[GlobalTrackID::TPCTOF] |
171 sMasks[GlobalTrackID::TPCTRD] | sMasks[GlobalTrackID::MFTMCH] | sMasks[GlobalTrackID::ITSTPCTRD] | sMasks[GlobalTrackID::ITSTPCTOF] | sMasks[GlobalTrackID::TPCTRDTOF] |
172 sMasks[GlobalTrackID::MFTMCHMID] | sMasks[GlobalTrackID::ITSTPCTRDTOF] | sMasks[GlobalTrackID::ITSAB] | sMasks[GlobalTrackID::MCHMID];
178GPUdi() constexpr GlobalTrackID::mask_t GlobalTrackID::getSourceMask(
int s) {
return globaltrackid_internal::sMasks[s]; }
181GPUdi() bool GlobalTrackID::isTrackSource(
int s)
183 return globaltrackid_internal::sTrackSources[s];
187GPUdi() bool GlobalTrackID::includesDet(
DetID id, GlobalTrackID::mask_t srcm)
189 for (
int i = 0;
i < NSources;
i++) {
190 if (includesSource(
i, srcm) && (getSourceDetectorsMask(
i) &
id.getMask()).any()) {
200 for (
int i = 0;
i < NSources;
i++) {
202 mdet |= getSourceDetectorsMask(
i);
216struct hash<
o2::dataformats::GlobalTrackID> {
220 return id.getRawWOFlags();
Class to refer to object indicating its Indec, Source and status flags.
Static class with identifiers, bitmasks and names for ALICE detectors.
o2::gpu::gpustd::bitset< 32 > mask_t
static std::string getNames(mask_t mask, char delimiter=',')
static mask_t getMask(const std::string_view detList)
detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...