ECCE @ EIC Software
Reference for
ECCE @ 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
TrkrDefs.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrkrDefs.h
1
7
#ifndef TRACKBASE_TRKRDEFUTIL_H
8
#define TRACKBASE_TRKRDEFUTIL_H
9
10
#include <cstdint>
11
#include <iostream>
12
16
namespace
TrkrDefs
17
{
18
static
double
EdepScaleFactor
__attribute__
((unused)) = 0.25;
19
static
double
MvtxEnergyScaleup
__attribute__
((unused)) = 5.0e8;
20
static
double
InttEnergyScaleup
__attribute__
((unused)) = 5.0e7;
21
23
typedef
uint32_t
hitkey
;
// 32 bit TrkrHit key type
24
typedef
uint32_t
hitsetkey
;
// 32 bit TrkrHitSet key type
25
typedef
uint64_t
cluskey
;
// 64 but TrkrCluster id type
26
typedef
uint32_t
clushitkey
;
// 32 bit hit id type in TrkrCluster
27
typedef
uint16_t
subsurfkey
;
// 16 bit sub surface key type
28
30
static
hitkey
HITKEYMAX
__attribute__
((unused)) = UINT32_MAX;
31
static
hitsetkey
HITSETKEYMAX
__attribute__
((unused)) = UINT32_MAX;
32
static
cluskey
CLUSKEYMAX
__attribute__
((unused)) = UINT64_MAX;
33
static
clushitkey
CLUSHITKEYMAX
__attribute__
((unused)) = UINT32_MAX;
34
static
subsurfkey
SUBSURFKEYMAX
__attribute__
((unused)) = UINT16_MAX;
35
36
// hitsetkey layout:
37
// common upper 16 bits
38
// 24 - 32 tracker id
39
// 16 - 24 layer
40
static
const
unsigned
int
kBitShiftTrkrId
__attribute__
((unused)) = 24;
// 32 - 8
41
static
const
unsigned
int
kBitShiftLayer
__attribute__
((unused)) = 16;
// bitshift_trackerid - 8
42
43
// cluskey layour
44
// hitsetkey upper 32 bits
45
// cluster id lower 32 bits
46
static
const
unsigned
int
kBitShiftClusId
__attribute__
((unused)) = 32;
47
48
50
enum
TrkrId
51
{
52
mvtxId
= 0,
53
inttId
= 1,
54
tpcId
= 2,
55
micromegasId
= 3,
56
ttl
= 4,
57
};
58
59
61
void
printBits
(
const
TrkrDefs::hitsetkey
key, std::ostream& os = std::cout);
62
void
printBits
(
const
TrkrDefs::cluskey
key, std::ostream& os = std::cout);
63
// void print_bits(const TrkrDefs::hitkey key, std::ostream& os = std::cout);
64
66
uint8_t
getTrkrId
(
const
TrkrDefs::hitsetkey
key);
67
uint8_t
getTrkrId
(
const
TrkrDefs::cluskey
key);
68
70
uint8_t
getLayer
(
const
TrkrDefs::hitsetkey
key);
71
uint8_t
getLayer
(
const
TrkrDefs::cluskey
key);
72
74
uint32_t
getClusIndex
(
const
TrkrDefs::cluskey
key);
75
77
TrkrDefs::hitsetkey
genHitSetKey
(
const
TrkrDefs::TrkrId
trkrId,
const
uint8_t lyr);
78
80
uint32_t
getHitSetKeyFromClusKey
(
const
TrkrDefs::cluskey
key);
81
83
TrkrDefs::hitsetkey
getHitSetKeyLo
(
const
TrkrDefs::TrkrId
trkrId);
84
TrkrDefs::hitsetkey
getHitSetKeyHi
(
const
TrkrDefs::TrkrId
trkrId);
85
TrkrDefs::hitsetkey
getHitSetKeyLo
(
const
TrkrDefs::TrkrId
trkrId,
const
uint8_t lyr);
86
TrkrDefs::hitsetkey
getHitSetKeyHi
(
const
TrkrDefs::TrkrId
trkrId,
const
uint8_t lyr);
87
89
TrkrDefs::cluskey
getClusKeyLo
(
const
TrkrDefs::TrkrId
trkrId);
90
TrkrDefs::cluskey
getClusKeyHi
(
const
TrkrDefs::TrkrId
trkrId);
91
TrkrDefs::cluskey
getClusKeyLo
(
const
TrkrDefs::TrkrId
trkrId,
const
uint8_t lyr);
92
TrkrDefs::cluskey
getClusKeyHi
(
const
TrkrDefs::TrkrId
trkrId,
const
uint8_t lyr);
93
94
static
const
unsigned
int
kBitShiftPhiElement
__attribute__
((unused)) = 8;
//sector
95
static
const
unsigned
int
kBitShiftZElement
__attribute__
((unused)) = 0;
//side
96
97
uint8_t
getPhiElement
(
TrkrDefs::hitsetkey
key);
//sector
98
uint8_t
getZElement
(
TrkrDefs::hitsetkey
key);
//side
99
uint8_t
getPhiElement
(
TrkrDefs::cluskey
key);
//sector
100
uint8_t
getZElement
(
TrkrDefs::cluskey
key);
//side
101
102
}
103
104
#endif //TRACKBASE_TRKRDEFUTIL_H
coresoftware
blob
master
offline
packages
trackbase
TrkrDefs.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:37
using
1.8.2 with
ECCE GitHub integration