EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InttDefs.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file InttDefs.cc
1 
7 #include "InttDefs.h"
8 
9 #include <trackbase/TrkrDefs.h>
10 
11 uint8_t
13 {
14  TrkrDefs::hitsetkey tmp = (key >> InttDefs::kBitShiftLadderZId);
15  return tmp;
16 }
17 
18 uint8_t
20 {
21  TrkrDefs::hitsetkey tmp = (key >> TrkrDefs::kBitShiftClusId);
22  return getLadderZId(tmp);
23 }
24 
25 uint8_t
27 {
28  TrkrDefs::hitsetkey tmp = (key >> InttDefs::kBitShiftLadderPhiId);
29  return tmp;
30 }
31 
32 uint8_t
34 {
35  TrkrDefs::hitsetkey tmp = (key >> TrkrDefs::kBitShiftClusId);
36  return getLadderPhiId(tmp);
37 }
38 
41 {
42  TrkrDefs::hitkey tmp = (key >> InttDefs::kBitShiftCol);
43  return tmp;
44 }
45 
48 {
49  TrkrDefs::hitkey tmp = (key >> InttDefs::kBitShiftRow);
50  return tmp;
51 }
52 
54 InttDefs::genHitKey(const uint16_t col, const uint16_t row)
55 {
56  TrkrDefs::hitkey key = (col << InttDefs::kBitShiftCol);
57  TrkrDefs::hitkey tmp = (row << InttDefs::kBitShiftRow);
58  key |= tmp;
59  return key;
60 }
61 
63 InttDefs::genHitSetKey(const uint8_t lyr, const uint8_t ladder_z_index, uint8_t ladder_phi_index)
64 {
66  TrkrDefs::hitsetkey tmp = ladder_z_index;
67  key |= (tmp << InttDefs::kBitShiftLadderZId);
68  tmp = ladder_phi_index;
69  key |= (tmp << InttDefs::kBitShiftLadderPhiId);
70  return key;
71 }
72 
74 InttDefs::genClusKey(const uint8_t lyr, const uint8_t ladder_z_index, const uint8_t ladder_phi_index, const uint32_t clusid)
75 {
76  TrkrDefs::cluskey tmp = genHitSetKey(lyr, ladder_z_index, ladder_phi_index);
77  TrkrDefs::cluskey key = (tmp << TrkrDefs::kBitShiftClusId);
78  key |= clusid;
79  return key;
80 }
81 
84 {
85  TrkrDefs::cluskey tmp = hskey;
86  TrkrDefs::cluskey key = (tmp << TrkrDefs::kBitShiftClusId);
87  key |= clusid;
88  return key;
89 }