ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
RegionSelector
src
RegionSelectorLUT.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
RegionSelector/RegionSelectorLUT.h
"
6
7
RegionSelectorLUT::RegionSelectorLUT
(
unsigned
int
maxHash
){
8
m_etaMin
.resize(
maxHash
);
9
m_etaMax
.resize(
maxHash
);
10
m_phiMin
.resize(
maxHash
);
11
m_phiMax
.resize(
maxHash
);
12
m_position
.resize(
maxHash
);
13
m_number
.resize(
maxHash
);
14
m_robId
.resize(
maxHash
);
15
m_hashId
.resize(
maxHash
);
16
m_maxHash
= 0;
17
}
18
19
RegionSelectorLUT::RegionSelectorLUT
(
void
){
20
unsigned
int
maxHash
= 50000;
21
m_etaMin
.resize(
maxHash
);
22
m_etaMax
.resize(
maxHash
);
23
m_phiMin
.resize(
maxHash
);
24
m_phiMax
.resize(
maxHash
);
25
m_position
.resize(
maxHash
);
26
m_number
.resize(
maxHash
);
27
m_robId
.resize(
maxHash
);
28
m_hashId
.resize(
maxHash
);
29
m_maxHash
= 0;
30
}
31
32
int
RegionSelectorLUT::layerDiskPosition
(
int
hashId
)
const
{
33
return
m_position
[
hashId
];
34
}
35
36
int
RegionSelectorLUT::layerDiskNumber
(
int
hashId
)
const
{
37
return
m_number
[
hashId
];
38
}
39
40
double
RegionSelectorLUT::etaMin
(
int
hashId
)
const
{
41
return
m_etaMin
[
hashId
];
42
}
43
44
double
RegionSelectorLUT::etaMax
(
int
hashId
)
const
{
45
return
m_etaMax
[
hashId
];
46
}
47
48
double
RegionSelectorLUT::phiMin
(
int
hashId
)
const
{
49
return
m_phiMin
[
hashId
];
50
}
51
52
double
RegionSelectorLUT::phiMax
(
int
hashId
)
const
{
53
return
m_phiMax
[
hashId
];
54
}
55
56
int
RegionSelectorLUT::sampling
(
int
hashId
)
const
{
57
return
m_position
[
hashId
];
58
}
59
60
int
RegionSelectorLUT::robId
(
int
hashId
)
const
{
61
return
m_robId
[
hashId
];
62
}
63
64
int
RegionSelectorLUT::hashId
(
int
value )
const
{
65
return
m_hashId
[ value ];
66
}
67
68
unsigned
int
RegionSelectorLUT::maxHash
(
void
)
const
{
69
return
m_maxHash
;
70
}
71
72
double
RegionSelectorLUT::etaminElem
(){
73
double
etaminElem
= 1000.0;
74
unsigned
int
i;
75
76
if
(
m_maxHash
> 0 ){
77
for
( i = 0; i <
m_maxHash
; i++ ){
78
if
(
m_etaMin
[i] <
etaminElem
)
79
etaminElem
=
m_etaMin
[i];
80
}
81
}
82
return
etaminElem
;
83
}
84
85
double
RegionSelectorLUT::etamaxElem
(){
86
double
etamaxElem
= -1000.0;
87
unsigned
int
i;
88
89
if
(
m_maxHash
> 0 ){
90
for
( i = 0; i <
m_maxHash
; i++ ){
91
if
(
m_etaMax
[i] >
etamaxElem
)
92
etamaxElem
=
m_etaMax
[i];
93
}
94
}
95
return
etamaxElem
;
96
}
97
98
double
RegionSelectorLUT::phiminElem
(){
99
double
phiminElem
= 1000.0;
100
unsigned
int
i;
101
102
if
(
m_maxHash
> 0 ){
103
for
( i = 0; i <
m_maxHash
; i++ ){
104
if
(
m_phiMin
[i] <
phiminElem
)
105
phiminElem
=
m_phiMin
[i];
106
}
107
}
108
return
phiminElem
;
109
}
110
111
double
RegionSelectorLUT::phimaxElem
(){
112
double
phimaxElem
= -1000.0;
113
unsigned
int
i;
114
115
if
(
m_maxHash
> 0 ){
116
for
( i = 0; i <
m_maxHash
; i++ ){
117
if
(
m_phiMax
[i] >
phimaxElem
)
118
phimaxElem
=
m_phiMax
[i];
119
}
120
}
121
122
return
phimaxElem
;
123
}
124
125
void
RegionSelectorLUT::additem
(
const
int
hashId
,
126
const
double
etaMin
,
const
double
etaMax
,
127
const
double
phiMin
,
const
double
phiMax
,
128
const
int
layerDiskNumber
,
const
int
layerDiskPosition
){
129
m_etaMin
[
m_maxHash
] =
etaMin
;
130
m_etaMax
[
m_maxHash
] =
etaMax
;
131
m_phiMin
[
m_maxHash
] =
phiMin
;
132
m_phiMax
[
m_maxHash
] =
phiMax
;
133
m_number
[
m_maxHash
] =
layerDiskNumber
;
134
m_position
[
m_maxHash
] =
layerDiskPosition
;
135
m_hashId
[
m_maxHash
] =
hashId
;
136
m_maxHash
++;
137
138
}
139
140
void
RegionSelectorLUT::additem
(
const
double
etaMin
,
const
double
etaMax
,
141
const
double
phiMin
,
const
double
phiMax
,
142
const
int
layerDiskNumber
,
const
int
layerDiskPosition
,
143
const
int
hashId
,
const
int
robId
){
144
m_hashId
[
m_maxHash
] =
hashId
;
145
m_etaMin
[
m_maxHash
] =
etaMin
;
146
m_etaMax
[
m_maxHash
] =
etaMax
;
147
m_phiMin
[
m_maxHash
] =
phiMin
;
148
m_phiMax
[
m_maxHash
] =
phiMax
;
149
m_number
[
m_maxHash
] =
layerDiskNumber
;
150
m_position
[
m_maxHash
] =
layerDiskPosition
;
151
m_robId
[
m_maxHash
] =
robId
;
152
153
m_maxHash
++;
154
155
}
156
157
void
RegionSelectorLUT::additem
(
const
int
sampling
,
158
const
double
etaMin
,
const
double
etaMax
,
159
const
double
phiMin
,
const
double
phiMax
,
160
const
int
layerDiskNumber
,
161
const
int
hashId
,
const
int
robId
){
162
m_hashId
[
m_maxHash
] =
hashId
;
163
m_etaMin
[
m_maxHash
] =
etaMin
;
164
m_etaMax
[
m_maxHash
] =
etaMax
;
165
m_phiMin
[
m_maxHash
] =
phiMin
;
166
m_phiMax
[
m_maxHash
] =
phiMax
;
167
m_number
[
m_maxHash
] =
layerDiskNumber
;
168
m_position
[
m_maxHash
] =
sampling
;
169
m_robId
[
m_maxHash
] =
robId
;
170
m_maxHash
++;
171
}
RegionSelectorLUT.h
RegionSelectorLUT::layerDiskNumber
int layerDiskNumber(int hashId) const
Definition
RegionSelectorLUT.cxx:36
RegionSelectorLUT::hashId
int hashId(int value) const
Definition
RegionSelectorLUT.cxx:64
RegionSelectorLUT::m_etaMax
std::vector< double > m_etaMax
Definition
RegionSelectorLUT.h:58
RegionSelectorLUT::m_number
std::vector< int > m_number
Definition
RegionSelectorLUT.h:57
RegionSelectorLUT::m_etaMin
std::vector< double > m_etaMin
Definition
RegionSelectorLUT.h:58
RegionSelectorLUT::etaMax
double etaMax(int hashId) const
Definition
RegionSelectorLUT.cxx:44
RegionSelectorLUT::m_position
std::vector< int > m_position
Definition
RegionSelectorLUT.h:57
RegionSelectorLUT::additem
void additem(const int hashId, const double etaMin, const double etaMax, const double phiMin, const double phiMax, const int layerDiskNumber, const int layerDiskPosition)
Definition
RegionSelectorLUT.cxx:125
RegionSelectorLUT::m_phiMax
std::vector< double > m_phiMax
Definition
RegionSelectorLUT.h:58
RegionSelectorLUT::m_maxHash
unsigned int m_maxHash
Definition
RegionSelectorLUT.h:56
RegionSelectorLUT::layerDiskPosition
int layerDiskPosition(int hashId) const
Definition
RegionSelectorLUT.cxx:32
RegionSelectorLUT::phiMin
double phiMin(int hashId) const
Definition
RegionSelectorLUT.cxx:48
RegionSelectorLUT::robId
int robId(int hashId) const
Definition
RegionSelectorLUT.cxx:60
RegionSelectorLUT::etamaxElem
double etamaxElem()
Definition
RegionSelectorLUT.cxx:85
RegionSelectorLUT::maxHash
unsigned int maxHash(void) const
Definition
RegionSelectorLUT.cxx:68
RegionSelectorLUT::etaMin
double etaMin(int hashId) const
Definition
RegionSelectorLUT.cxx:40
RegionSelectorLUT::phimaxElem
double phimaxElem()
Definition
RegionSelectorLUT.cxx:111
RegionSelectorLUT::etaminElem
double etaminElem()
Definition
RegionSelectorLUT.cxx:72
RegionSelectorLUT::m_hashId
std::vector< int > m_hashId
Definition
RegionSelectorLUT.h:59
RegionSelectorLUT::m_robId
std::vector< int > m_robId
Definition
RegionSelectorLUT.h:59
RegionSelectorLUT::m_phiMin
std::vector< double > m_phiMin
Definition
RegionSelectorLUT.h:58
RegionSelectorLUT::sampling
int sampling(int hashId) const
Definition
RegionSelectorLUT.cxx:56
RegionSelectorLUT::phiminElem
double phiminElem()
Definition
RegionSelectorLUT.cxx:98
RegionSelectorLUT::RegionSelectorLUT
RegionSelectorLUT(void)
Definition
RegionSelectorLUT.cxx:19
RegionSelectorLUT::phiMax
double phiMax(int hashId) const
Definition
RegionSelectorLUT.cxx:52
Generated on
for ATLAS Offline Software by
1.17.0