ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
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
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
35
37 return m_number[ hashId ];
38}
39
41 return m_etaMin[ hashId ];
42}
43
45 return m_etaMax[ hashId ];
46}
47
49 return m_phiMin[ hashId ];
50}
51
53 return m_phiMax[ hashId ];
54}
55
57 return m_position[ hashId ];
58}
59
61 return m_robId[ hashId ];
62}
63
64int RegionSelectorLUT::hashId( int value ) const{
65 return m_hashId[ value ];
66}
67
68unsigned int RegionSelectorLUT::maxHash( void ) const{
69 return m_maxHash;
70}
71
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
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
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
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
126 const double etaMin, const double etaMax,
127 const double phiMin, const double phiMax,
128 const int layerDiskNumber, const int layerDiskPosition ){
136 m_maxHash++;
137
138}
139
140void 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 ){
152
153 m_maxHash++;
154
155}
156
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 ){
170 m_maxHash++;
171}
int layerDiskNumber(int hashId) const
int hashId(int value) const
std::vector< double > m_etaMax
std::vector< int > m_number
std::vector< double > m_etaMin
double etaMax(int hashId) const
std::vector< int > m_position
void additem(const int hashId, const double etaMin, const double etaMax, const double phiMin, const double phiMax, const int layerDiskNumber, const int layerDiskPosition)
std::vector< double > m_phiMax
int layerDiskPosition(int hashId) const
double phiMin(int hashId) const
int robId(int hashId) const
unsigned int maxHash(void) const
double etaMin(int hashId) const
std::vector< int > m_hashId
std::vector< int > m_robId
std::vector< double > m_phiMin
int sampling(int hashId) const
double phiMax(int hashId) const