Belle II Software development
Mapping_t Class Reference

Mapping class. More...

Static Public Member Functions

static void Mapping (int id, int &ThetaId, int &PhiId)
 Retrieving theta and phi id of crystal.
 
static void Mapping (int id, int &ThetaId, int &PhiId, int &nrep, int &indx)
 Retrieving theta id, phi id, reciprocal shift and index.
 
static int CellID (int ThetaId, int PhiId)
 return cell id as a function of theta id and phi id
 
static int Offset (int ThetaId)
 return offset based on theta id
 
static int Indx2ThetaId (int indx)
 getter for theta
 
static int ThetaId2NCry (int ThetaId)
 getter for number of crystals
 

Static Private Attributes

static const char m_dTheta [69]
 array of theta offsets
 
static const unsigned char m_Theta [546]
 array of theta
 
static const unsigned char m_tbl [69]
 array of crystals per phi sector
 
static const unsigned char m_offsets [69]
 array of offsets
 
static const unsigned char m_RECIPROCAL_SHIFT = 16
 reciprocal shift
 
static const unsigned int m_recip [5] = {pack(2), pack(3), pack(4), pack(6), pack(9)}
 array of reciprocal values
 
static const unsigned int m_denom [5] = { (2), (3), (4), (6), (9)}
 array of denominator values
 

Detailed Description

Mapping class.

Definition at line 36 of file ECLGeometryPar.cc.

Member Function Documentation

◆ CellID()

static int CellID ( int  ThetaId,
int  PhiId 
)
inlinestatic

return cell id as a function of theta id and phi id

Definition at line 61 of file ECLGeometryPar.cc.

62 {
63 return PhiId + m_dTheta[ThetaId] * 16 + ThetaId * 128;
64 }
static const char m_dTheta[69]
array of theta offsets

◆ Indx2ThetaId()

static int Indx2ThetaId ( int  indx)
inlinestatic

getter for theta

Definition at line 73 of file ECLGeometryPar.cc.

74 {
75 return m_Theta[indx];
76 }
static const unsigned char m_Theta[546]
array of theta

◆ Mapping() [1/2]

static void Mapping ( int  id,
int &  ThetaId,
int &  PhiId 
)
inlinestatic

Retrieving theta and phi id of crystal.

Definition at line 39 of file ECLGeometryPar.cc.

40 {
41 ThetaId = m_Theta[((unsigned int)id) >> 4];
42 PhiId = id - m_dTheta[ThetaId] * 16 - ThetaId * 128;
43 }

◆ Mapping() [2/2]

static void Mapping ( int  id,
int &  ThetaId,
int &  PhiId,
int &  nrep,
int &  indx 
)
inlinestatic

Retrieving theta id, phi id, reciprocal shift and index.

Definition at line 46 of file ECLGeometryPar.cc.

47 {
48 Mapping(id, ThetaId, PhiId);
49
50 int off = m_offsets[ThetaId];
51 int i = m_tbl[ThetaId];
52
53 int r = m_recip[i];
54 int d = m_denom[i];
55
56 nrep = (PhiId * r) >> m_RECIPROCAL_SHIFT;
57 indx = off + (PhiId - nrep * d);
58 }
static const unsigned char m_RECIPROCAL_SHIFT
reciprocal shift
static const unsigned int m_denom[5]
array of denominator values
static const unsigned int m_recip[5]
array of reciprocal values
static const unsigned char m_offsets[69]
array of offsets
static const unsigned char m_tbl[69]
array of crystals per phi sector
static void Mapping(int id, int &ThetaId, int &PhiId)
Retrieving theta and phi id of crystal.

◆ Offset()

static int Offset ( int  ThetaId)
inlinestatic

return offset based on theta id

Definition at line 67 of file ECLGeometryPar.cc.

68 {
69 return m_dTheta[ThetaId] + ThetaId * 8;
70 }

◆ ThetaId2NCry()

static int ThetaId2NCry ( int  ThetaId)
inlinestatic

getter for number of crystals

Definition at line 79 of file ECLGeometryPar.cc.

80 {
81 return m_denom[m_tbl[ThetaId]];
82 }

Member Data Documentation

◆ m_denom

const unsigned int m_denom = { (2), (3), (4), (6), (9)}
staticprivate

array of denominator values

Definition at line 92 of file ECLGeometryPar.cc.

◆ m_dTheta

const char m_dTheta
staticprivate
Initial value:
= {
0, -5, -10, -14, -18, -22, -24, -26, -28, -30, -32, -34, -33,
-32, -31, -30, -29, -28, -27, -26, -25, -24,
-23, -22, -21, -20, -19, -18, -17, -16, -15,
-14, -13, -12, -11, -10, -9, -8, -7, -6,
-5, -4, -3, -2, -1, 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 14, 12, 10, 8, 6, 2, -2
}

array of theta offsets

Definition at line 85 of file ECLGeometryPar.cc.

◆ m_offsets

const unsigned char m_offsets
staticprivate
Initial value:
= {
0, 3, 6, 10, 14, 18, 24, 30, 36, 42, 48, 54, 63,
132, 134, 136, 138, 140, 142, 144, 146, 148,
150, 152, 154, 156, 158, 160, 162, 164, 166,
168, 170, 172, 174, 176, 178, 180, 182, 184,
186, 188, 190, 192, 194, 196, 198, 200, 202,
204, 206, 208, 210, 212, 214, 216, 218, 220, 222,
72, 81, 90, 96, 102, 108, 114, 120, 124, 128
}

array of offsets

Definition at line 88 of file ECLGeometryPar.cc.

◆ m_recip

const unsigned int m_recip = {pack(2), pack(3), pack(4), pack(6), pack(9)}
staticprivate

array of reciprocal values

Definition at line 91 of file ECLGeometryPar.cc.

◆ m_RECIPROCAL_SHIFT

const unsigned char m_RECIPROCAL_SHIFT = 16
staticprivate

reciprocal shift

Definition at line 90 of file ECLGeometryPar.cc.

◆ m_tbl

const unsigned char m_tbl
staticprivate
Initial value:
= {
1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4, 4, 3, 3, 3, 3, 3, 2, 2, 2
}

array of crystals per phi sector

Definition at line 87 of file ECLGeometryPar.cc.

◆ m_Theta

const unsigned char m_Theta
staticprivate
Initial value:
= {
0, 0, 0, 1, 1, 1,
2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7,
8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10,
11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12,
13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15,
16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18,
19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21,
22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24,
25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27,
28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30,
31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33,
34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36,
37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39,
40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42,
43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45,
46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48,
49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51,
52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54,
55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57,
58, 58, 58, 58, 58, 58, 58, 58, 58,
59, 59, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60,
61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62,
63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64,
65, 65, 65, 65, 65, 65,
66, 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 68
}

array of theta

Definition at line 86 of file ECLGeometryPar.cc.


The documentation for this class was generated from the following file: