EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MvtxDefs.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MvtxDefs.cc
1
#include "
MvtxDefs.h
"
2
3
#include <
trackbase/TrkrDefs.h
>
4
5
uint8_t
6
MvtxDefs::getStaveId
(
TrkrDefs::hitsetkey
key)
7
{
8
TrkrDefs::hitsetkey
tmp = (key >> MvtxDefs::kBitShiftStaveId);
9
return
tmp;
10
}
11
12
uint8_t
13
MvtxDefs::getStaveId
(
TrkrDefs::cluskey
key)
14
{
15
TrkrDefs::hitsetkey
tmp = (key >> TrkrDefs::kBitShiftClusId);
16
return
getStaveId
(tmp);
17
}
18
19
uint8_t
20
MvtxDefs::getChipId
(
TrkrDefs::hitsetkey
key)
21
{
22
TrkrDefs::hitsetkey
tmp = (key >> MvtxDefs::kBitShiftChipId);
23
return
tmp;
24
}
25
26
uint8_t
27
MvtxDefs::getChipId
(
TrkrDefs::cluskey
key)
28
{
29
TrkrDefs::hitsetkey
tmp = (key >> TrkrDefs::kBitShiftClusId);
30
return
getChipId
(tmp);
31
}
32
33
uint16_t
34
MvtxDefs::getCol
(
TrkrDefs::hitkey
key)
35
{
36
TrkrDefs::hitkey
tmp = (key >> MvtxDefs::kBitShiftCol);
37
return
tmp;
38
}
39
40
uint16_t
41
MvtxDefs::getRow
(
TrkrDefs::hitkey
key)
42
{
43
TrkrDefs::hitkey
tmp = (key >> MvtxDefs::kBitShiftRow);
44
return
tmp;
45
}
46
47
TrkrDefs::hitkey
48
MvtxDefs::genHitKey
(
const
uint16_t
col,
const
uint16_t
row)
49
{
50
TrkrDefs::hitkey
key = (col << MvtxDefs::kBitShiftCol);
51
TrkrDefs::hitkey
tmp = (row << MvtxDefs::kBitShiftRow);
52
key |= tmp;
53
return
key;
54
}
55
56
TrkrDefs::hitsetkey
57
MvtxDefs::genHitSetKey
(
const
uint8_t
lyr,
const
uint8_t
stave,
const
uint8_t
chip)
58
{
59
TrkrDefs::hitsetkey
key =
TrkrDefs::genHitSetKey
(
TrkrDefs::TrkrId::mvtxId
, lyr);
60
TrkrDefs::hitsetkey
tmp = stave;
61
key |= (tmp << MvtxDefs::kBitShiftStaveId);
62
tmp = chip;
63
key |= (tmp << MvtxDefs::kBitShiftChipId);
64
return
key;
65
}
66
67
TrkrDefs::cluskey
68
MvtxDefs::genClusKey
(
const
uint8_t
lyr,
const
uint8_t
stave,
const
uint8_t
chip,
const
uint32_t
clusid)
69
{
70
TrkrDefs::cluskey
tmp =
genHitSetKey
(lyr, stave, chip);
71
TrkrDefs::cluskey
key = (tmp << TrkrDefs::kBitShiftClusId);
72
key |= clusid;
73
return
key;
74
}
75
76
TrkrDefs::cluskey
77
MvtxDefs::genClusKey
(
const
TrkrDefs::hitsetkey
hskey,
const
uint32_t
clusid)
78
{
79
TrkrDefs::cluskey
tmp = hskey;
80
TrkrDefs::cluskey
key = (tmp << TrkrDefs::kBitShiftClusId);
81
key |= clusid;
82
return
key;
83
}
fun4all_coresoftware
blob
master
offline
packages
mvtx
MvtxDefs.cc
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:44
using
1.8.2 with
EIC GitHub integration