Project
Loading...
Searching...
No Matches
o2::detectors::DetID Class Reference

Static class with identifiers, bitmasks and names for ALICE detectors. More...

#include <DetID.h>

Public Types

typedef int ID
 Detector identifiers: continuous, starting from 0.
 
typedef o2::gpu::gpustd::bitset< 32 > mask_t
 

Public Member Functions

constexpr GPUdi () DetID(ID id)
 
constexpr DetID (const char *name)
 
 GPUdDefault () DetID(const DetID &src)=default
 
 GPUdDefault () DetID &operator
 
 DetID ()
 
 GPUdi () ID getID() const
 get detector id
 
 GPUdi () mask_t getMask() const
 get detector mask
 
 GPUdi () o2h
 get detector origin
 
 GPUd () static const expr mask_t getMask(ID id)
 

Static Public Member Functions

static constexpr const chargetName (ID id)
 names of defined detectors
 
static constexpr o2h::DataOrigin getDataOrigin (ID id)
 
static mask_t getMask (const std::string_view detList)
 detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
 
static std::string getNames (mask_t mask, char delimiter=',')
 
static constexpr int nameToID (char const *name, int id=First)
 
static bool upgradesEnabled ()
 

Static Public Attributes

static constexpr ID ITS = 0
 
static constexpr ID TPC = 1
 
static constexpr ID TRD = 2
 
static constexpr ID TOF = 3
 
static constexpr ID PHS = 4
 
static constexpr ID CPV = 5
 
static constexpr ID EMC = 6
 
static constexpr ID HMP = 7
 
static constexpr ID MFT = 8
 
static constexpr ID MCH = 9
 
static constexpr ID MID = 10
 
static constexpr ID ZDC = 11
 
static constexpr ID FT0 = 12
 
static constexpr ID FV0 = 13
 
static constexpr ID FDD = 14
 
static constexpr ID TST = 15
 
static constexpr ID CTP = 16
 
static constexpr ID FOC = 17
 
static constexpr ID Last = FOC
 if extra detectors added, update this !!!
 
static constexpr ID First = ITS
 
static constexpr int nDetectors = Last + 1
 number of defined detectors
 
static constexpr mask_t FullMask = (0x1u << nDetectors) - 1
 
static constexpr std::string_view NONE {"none"}
 keywork for no-detector
 
static constexpr std::string_view ALL {"all"}
 keywork for all detectors
 

Detailed Description

Static class with identifiers, bitmasks and names for ALICE detectors.

Definition at line 57 of file DetID.h.

Member Typedef Documentation

◆ ID

Detector identifiers: continuous, starting from 0.

Definition at line 61 of file DetID.h.

◆ mask_t

Definition at line 97 of file DetID.h.

Constructor & Destructor Documentation

◆ DetID() [1/2]

constexpr o2::detectors::DetID::DetID ( const char name)
inlineconstexpr

Definition at line 112 of file DetID.h.

◆ DetID() [2/2]

o2::detectors::DetID::DetID ( )
inline

Definition at line 122 of file DetID.h.

Member Function Documentation

◆ getDataOrigin()

static constexpr o2h::DataOrigin o2::detectors::DetID::getDataOrigin ( ID  id)
inlinestaticconstexpr

Definition at line 147 of file DetID.h.

◆ getMask()

DetID::mask_t DetID::getMask ( const std::string_view  detList)
static

detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)

Definition at line 42 of file DetID.cxx.

◆ getName()

static constexpr const char * o2::detectors::DetID::getName ( ID  id)
inlinestaticconstexpr

names of defined detectors

Definition at line 145 of file DetID.h.

◆ getNames()

std::string DetID::getNames ( DetID::mask_t  mask,
char  delimiter = ',' 
)
static

Definition at line 74 of file DetID.cxx.

◆ GPUd()

o2::detectors::DetID::GPUd ( ) const

◆ GPUdDefault() [1/2]

o2::detectors::DetID::GPUdDefault ( ) &

◆ GPUdDefault() [2/2]

o2::detectors::DetID::GPUdDefault ( ) const &
default

◆ GPUdi() [1/4]

constexpr o2::detectors::DetID::GPUdi ( )
inlineconstexpr

Definition at line 107 of file DetID.h.

◆ GPUdi() [2/4]

o2::detectors::DetID::GPUdi ( ) const
inline

get detector id

Definition at line 125 of file DetID.h.

◆ GPUdi() [3/4]

o2::detectors::DetID::GPUdi ( ) const
inline

get detector mask

Definition at line 127 of file DetID.h.

◆ GPUdi() [4/4]

o2::detectors::DetID::GPUdi ( )
inline

get detector origin

Definition at line 130 of file DetID.h.

◆ nameToID()

static constexpr int o2::detectors::DetID::nameToID ( char const *  name,
int  id = First 
)
inlinestaticconstexpr

Definition at line 154 of file DetID.h.

◆ upgradesEnabled()

static bool o2::detectors::DetID::upgradesEnabled ( )
inlinestatic

Definition at line 162 of file DetID.h.

Member Data Documentation

◆ ALL

constexpr std::string_view o2::detectors::DetID::ALL {"all"}
staticconstexpr

keywork for all detectors

Definition at line 104 of file DetID.h.

◆ CPV

constexpr DetID::ID DetID::CPV = 5
staticconstexpr

Definition at line 68 of file DetID.h.

◆ CTP

constexpr DetID::ID DetID::CTP = 16
staticconstexpr

Definition at line 79 of file DetID.h.

◆ EMC

constexpr DetID::ID DetID::EMC = 6
staticconstexpr

Definition at line 69 of file DetID.h.

◆ FDD

constexpr DetID::ID DetID::FDD = 14
staticconstexpr

Definition at line 77 of file DetID.h.

◆ First

constexpr DetID::ID DetID::First = ITS
staticconstexpr

Definition at line 94 of file DetID.h.

◆ FOC

constexpr DetID::ID DetID::FOC = 17
staticconstexpr

Definition at line 80 of file DetID.h.

◆ FT0

constexpr DetID::ID DetID::FT0 = 12
staticconstexpr

Definition at line 75 of file DetID.h.

◆ FullMask

constexpr mask_t o2::detectors::DetID::FullMask = (0x1u << nDetectors) - 1
staticconstexpr

Definition at line 100 of file DetID.h.

◆ FV0

constexpr DetID::ID DetID::FV0 = 13
staticconstexpr

Definition at line 76 of file DetID.h.

◆ HMP

constexpr DetID::ID DetID::HMP = 7
staticconstexpr

Definition at line 70 of file DetID.h.

◆ ITS

constexpr DetID::ID DetID::ITS = 0
staticconstexpr

Definition at line 63 of file DetID.h.

◆ Last

constexpr DetID::ID DetID::Last = FOC
staticconstexpr

if extra detectors added, update this !!!

Definition at line 92 of file DetID.h.

◆ MCH

constexpr DetID::ID DetID::MCH = 9
staticconstexpr

Definition at line 72 of file DetID.h.

◆ MFT

constexpr DetID::ID DetID::MFT = 8
staticconstexpr

Definition at line 71 of file DetID.h.

◆ MID

constexpr DetID::ID DetID::MID = 10
staticconstexpr

Definition at line 73 of file DetID.h.

◆ nDetectors

constexpr int DetID::nDetectors = Last + 1
staticconstexpr

number of defined detectors

Definition at line 96 of file DetID.h.

◆ NONE

constexpr std::string_view o2::detectors::DetID::NONE {"none"}
staticconstexpr

keywork for no-detector

Definition at line 103 of file DetID.h.

◆ PHS

constexpr DetID::ID DetID::PHS = 4
staticconstexpr

Definition at line 67 of file DetID.h.

◆ TOF

constexpr DetID::ID DetID::TOF = 3
staticconstexpr

Definition at line 66 of file DetID.h.

◆ TPC

constexpr DetID::ID DetID::TPC = 1
staticconstexpr

Definition at line 64 of file DetID.h.

◆ TRD

constexpr DetID::ID DetID::TRD = 2
staticconstexpr

Definition at line 65 of file DetID.h.

◆ TST

constexpr DetID::ID DetID::TST = 15
staticconstexpr

Definition at line 78 of file DetID.h.

◆ ZDC

constexpr DetID::ID DetID::ZDC = 11
staticconstexpr

Definition at line 74 of file DetID.h.


The documentation for this class was generated from the following files: