98{
99
100
102
103 for (
auto entry :
m_map)
104 {
105
106 std::vector<FPGATrackSimHit>& hits_inner =
entry.second.first;
107 std::vector<FPGATrackSimHit>& hits_outer =
entry.second.second;
108
109 for (auto hit_in : hits_inner) {
110 int startsize = spacepoints.size();
111 bool foundPair =
searchForMatch(hit_in,hits_outer,tower,spacepoints);
112
114
115 std::vector<int> nextmod =
entry.first;
116 nextmod[3]+=1;
117 auto entry2 =
m_map.find(nextmod);
118 if (entry2!=
m_map.end()) {
119 foundPair =
searchForMatch(hit_in,entry2->second.second,tower,spacepoints);
121 }
122 }
123
124
126
127 std::vector<int> nextphimod =
entry.first;
128 nextphimod[2]+=1;
129 auto entry3 =
m_map.find(nextphimod);
130 if (entry3!=
m_map.end()) {
131 foundPair =
searchForMatch(hit_in,entry3->second.second,tower,spacepoints);
133 }
134 }
135
136
138
139 std::vector<int> next2mod =
entry.first;
140 next2mod[3]+=1;
141 next2mod[2]+=1;
142 auto entry4 =
m_map.find(next2mod);
143 if (entry4!=
m_map.end()) {
144 foundPair =
searchForMatch(hit_in,entry4->second.second,tower,spacepoints);
146 }
147 }
148
149 if (!foundPair) {
151 else {
153
154 FPGATrackSimCluster unpairedCluster;
157 spacepoints.push_back(std::move(unpairedCluster));
158 ATH_MSG_DEBUG(
"Unpaired hit z = " << hit_in.getZ() <<
", r = " << hit_in.getR() <<
", phi = " << hit_in.getGPhi() <<
", phi module = " << hit_in.getPhiModule() <<
", eta module = " << hit_in.getEtaModule());
159 }
160 }
161
163 }
164
165
166 for (const FPGATrackSimHit& hit_out : hits_outer) {
167 bool foundPair=false;
168 for (const FPGATrackSimHit& hit_in : hits_inner) {
169 if (std::abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
170 foundPair=true;
171 break;
172 }
173 }
174
175
176 std::vector<int> nextmod =
entry.first;
177 nextmod[3]-=1;
178 auto entry2 =
m_map.find(nextmod);
179 if (entry2!=
m_map.end()) {
180 for (const auto & hit_in : entry2->second.first) {
181 if (std::abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
182 foundPair=true;
184 break;
185 }
186 }
187 }
188
189
190 if (!foundPair) {
191
192 std::vector<int> nextphimod =
entry.first;
193 nextphimod[2]-=1;
194 auto entry3 =
m_map.find(nextphimod);
195 if (entry3!=
m_map.end()) {
196 for (const auto & hit_in : entry3->second.first) {
197 if (std::abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
198 foundPair=true;
200 break;
201 }
202 }
203 }
204 }
205
206
207 if (!foundPair) {
208
209 std::vector<int> next2mod =
entry.first;
210 next2mod[3]-=1;
211 next2mod[2]-=1;
212 auto entry4 =
m_map.find(next2mod);
213 if (entry4!=
m_map.end()) {
214 for (const auto & hit_in : entry4->second.first) {
215 if (std::abs(hit_in.getGPhi()-hit_out.getGPhi()) <
m_phiwindow) {
216 foundPair=true;
218 break;
219 }
220 }
221 }
222 }
223
224 if (!foundPair) {
226 else {
228
229 FPGATrackSimCluster unpairedCluster;
232 spacepoints.push_back(std::move(unpairedCluster));
233 ATH_MSG_DEBUG(
"Unpaired hit z = " << hit_out.getZ() <<
", r = " << hit_out.getR() <<
", phi = " << hit_out.getGPhi() <<
", phi module = " << hit_out.getPhiModule() <<
", eta module = " << hit_out.getEtaModule());
234 }
235 }
236 }
237 }
238
239
241
244
245
246 return StatusCode::SUCCESS;
247}
void setClusterEquiv(const FPGATrackSimHit &input)
void push_backHitList(const FPGATrackSimHit &input)