EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MvtxDefs.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MvtxDefs.h
1 
7 #ifndef MVTX_MVTXDEFUTIL_H
8 #define MVTX_MVTXDEFUTIL_H
9 
10 #include <trackbase/TrkrDefs.h>
11 
12 #include <cstdint> // for uint8_t, uint16_t, uint32_t
13 
20 namespace MvtxDefs
21 {
22 // hitsetkey layout:
23 // Mvtx specific lower 16 bits
24 // 24 - 32 tracker id
25 // 16 - 24 layer
26 // 8 - 16 stave id
27 // 0 - 8 chip id
28 static const unsigned int kBitShiftStaveId __attribute__((unused)) = 8;
29 static const unsigned int kBitShiftChipId __attribute__((unused)) = 0;
30 
31 // bit shift for hitkey
32 static const unsigned int kBitShiftCol __attribute__((unused)) = 16;
33 static const unsigned int kBitShiftRow __attribute__((unused)) = 0;
34 
35 // max values for col and row index in chip
36 static const uint16_t MAXCOL __attribute__((unused)) = 1024;
37 static const uint16_t MAXROW __attribute__((unused)) = 512;
38 
45 
52 
59 
66 
73 
80 
87 TrkrDefs::hitkey genHitKey(const uint16_t col, const uint16_t row);
88 
99 TrkrDefs::hitsetkey genHitSetKey(const uint8_t lyr, const uint8_t stave, const uint8_t chip);
100 
109 TrkrDefs::cluskey genClusKey(const uint8_t lyr, const uint8_t stave, const uint8_t chip, const uint32_t clusid);
110 
117 TrkrDefs::cluskey genClusKey(const TrkrDefs::hitsetkey hskey, const uint32_t clusid);
118 
119 } // namespace MvtxDefs
120 
121 #endif //MVTX_MVTXDEFUTIL_H