Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
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 "
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 - 31 tracker id // 8 bits
25
// 16 - 23 layer // 8 bits
26
// 9 - 15 stave id // 7 bits
27
// 5 - 8 chip id // 4 bits
28
// 0-4 strobe id // 5 bits
29
30
static
const
unsigned
int
kBitShiftStaveIdOffset
__attribute__
((unused)) = 9;
31
static
const
unsigned
int
kBitShiftStaveIdWidth
__attribute__
((unused)) = 7;
32
static
const
unsigned
int
kBitShiftChipIdOffset
__attribute__
((unused)) = 5;
33
static
const
unsigned
int
kBitShiftChipIdWidth
__attribute__
((unused)) = 4;
34
static
const
unsigned
int
kBitShiftStrobeIdOffset
__attribute__
((unused)) = 0;
35
static
const
unsigned
int
kBitShiftStrobeIdWidth
__attribute__
((unused)) = 5;
36
static
const
int
strobeOffset
__attribute__
((unused)) = 16;
37
38
// bit shift for hitkey
39
static
const
unsigned
int
kBitShiftCol
__attribute__
((unused)) = 16;
40
static
const
unsigned
int
kBitShiftRow
__attribute__
((unused)) = 0;
41
42
// max values for col and row index in chip
43
static
const
uint16_t MAXCOL
__attribute__
((unused)) = 1024;
44
static
const
uint16_t MAXROW
__attribute__
((unused)) = 512;
45
51
uint8_t
getStaveId
(
TrkrDefs::hitsetkey
key);
52
58
uint8_t
getStaveId
(
TrkrDefs::cluskey
key);
59
65
uint8_t
getChipId
(
TrkrDefs::hitsetkey
key);
66
72
uint8_t
getChipId
(
TrkrDefs::cluskey
key);
73
79
int
getStrobeId
(
TrkrDefs::hitsetkey
key);
80
86
int
getStrobeId
(
TrkrDefs::cluskey
key);
87
93
uint16_t
getCol
(
TrkrDefs::hitkey
key);
94
100
uint16_t
getRow
(
TrkrDefs::hitkey
key);
101
108
TrkrDefs::hitkey
genHitKey
(
const
uint16_t
col
,
const
uint16_t row);
109
120
TrkrDefs::hitsetkey
genHitSetKey
(
const
uint8_t lyr,
const
uint8_t stave,
const
uint8_t chip,
const
int
strobe);
121
131
TrkrDefs::cluskey
genClusKey
(
const
uint8_t lyr,
const
uint8_t stave,
const
uint8_t chip,
const
int
strobe,
const
uint32_t clusid);
132
138
TrkrDefs::hitsetkey
resetStrobeHitSetKey
(
const
TrkrDefs::hitsetkey
hitsetkey
);
139
140
}
// namespace MvtxDefs
141
142
#endif //MVTX_MVTXDEFUTIL_H
coresoftware
blob
master
offline
packages
trackbase
MvtxDefs.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:09
using
1.8.2 with
sPHENIX GitHub integration