16#ifndef O2_GLOBAL_TRACK_ID
17#define O2_GLOBAL_TRACK_ID
74 static_assert(
NSources <= 32,
"bitset<32> insufficient");
78 static constexpr std::string_view
NONE{
"none"};
79 static constexpr std::string_view
ALL{
"all"};
88 GPUdi() static
bool isTrackSource(
int s);
89 GPUdi() auto getSourceDetectorsMask()
const {
return getSourceDetectorsMask(getSource()); }
103 GPUdi()
mask_t getSourceMask()
const {
return getSourceMask(getSource()); }
105 GPUdi() operator
int()
const {
return int(getIndex()); }
119namespace globaltrackid_internal
168 sMasks[GlobalTrackID::ITS] | sMasks[GlobalTrackID::TPC] | sMasks[GlobalTrackID::MFT] | sMasks[GlobalTrackID::MCH] | sMasks[GlobalTrackID::ITSTPC] | sMasks[GlobalTrackID::TPCTOF] |
169 sMasks[GlobalTrackID::TPCTRD] | sMasks[GlobalTrackID::MFTMCH] | sMasks[GlobalTrackID::ITSTPCTRD] | sMasks[GlobalTrackID::ITSTPCTOF] | sMasks[GlobalTrackID::TPCTRDTOF] |
170 sMasks[GlobalTrackID::MFTMCHMID] | sMasks[GlobalTrackID::ITSTPCTRDTOF] | sMasks[GlobalTrackID::ITSAB] | sMasks[GlobalTrackID::MCHMID];
176GPUdi() constexpr GlobalTrackID::mask_t GlobalTrackID::getSourceMask(
int s) {
return globaltrackid_internal::sMasks[s]; }
179GPUdi() bool GlobalTrackID::isTrackSource(
int s)
181 return globaltrackid_internal::sTrackSources[s];
185GPUdi() bool GlobalTrackID::includesDet(
DetID id, GlobalTrackID::mask_t srcm)
187 for (
int i = 0;
i < NSources;
i++) {
188 if (includesSource(
i, srcm) && (getSourceDetectorsMask(
i) &
id.getMask()).any()) {
198 for (
int i = 0;
i < NSources;
i++) {
200 mdet |= getSourceDetectorsMask(
i);
214struct hash<
o2::dataformats::GlobalTrackID> {
218 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 ...
Defining DataPointCompositeObject explicitly as copiable.