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
EPDDefs.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EPDDefs.h
1
#ifndef EPD_EPDDEFS_H
2
#define EPD_EPDDEFS_H
3
4
#pragma GCC diagnostic push
5
#pragma GCC diagnostic ignored "-Wunused-function"
6
7
namespace
EPDDefs
8
{
9
// key layout:
10
// 10-31 empty
11
// 9 arm
12
// 5-8 sector
13
// 0-4 tile
14
static
unsigned
int
get_arm
(uint32_t key)
15
{
16
return
(key >> 9) & 0x1;
17
}
18
static
unsigned
int
get_sector
(uint32_t key)
19
{
20
return
(key >> 5) & 0xF;
21
}
22
static
unsigned
int
get_tileid
(uint32_t key)
23
{
24
return
(key) &0x1F;
25
}
26
static
uint32_t
make_epd_key
(uint32_t arm, uint32_t sector, uint32_t tile_id)
27
{
28
return
(arm << 9U | sector << 5U | tile_id) & 0x3FF;
29
}
30
}
// namespace EPDDefs
31
32
#pragma GCC diagnostic pop
33
#endif
coresoftware
blob
master
offline
packages
epd
EPDDefs.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:05
using
1.8.2 with
sPHENIX GitHub integration