Convert to coincidences.
92 {
93 bool hit[8];
94 int delta[8];
96
97 bool isFirstHit = true;
98
100 ++iBc) {
101 const bool* bitArray = slb->getBitArray(iBc);
102 bool forward;
104
106 switch (slb->getType()) {
109
111 if (!hit[i]) {
112 continue;
113 }
114
116 iBc, subDetectorId, rodId, slb->getSswId(),
117 slb->getSbLoc(), slb->getL1Id(), slb->getBcId(),
119 delta[i], 0, i, pos[i]);
120 vChannel.push_back(rCh);
121
122
123 if (isFirstHit) {
125 "Tgc TgcSlbDataHelper::convertCoincidence :"
126 << " slb type =" << slb->getType());
127 isFirstHit = false;
128 }
131 ? "TgcRawData : LPT_D_W "
132 : "TgcRawData : LPT_D_S ")
133 << " BC:" << iBc << " subDetId:" << subDetectorId
134 << " rodId:" << rodId << " sswId:" << slb->getSswId()
135 << " sbLoc:" << slb->getSbLoc()
136 << " slbId:" << slb->getSlbId() << " sub: " << i
137 << " pos:" << pos[i] << " delta:" << delta[i]);
138 }
139 break;
140
143
145 if (!hit[i]) {
146 continue;
147 }
148
150 iBc, subDetectorId, rodId, slb->getSswId(),
151 slb->getSbLoc(), slb->getL1Id(), slb->getBcId(),
153 delta[i], 0, i, pos[i]);
154 vChannel.push_back(rCh);
155
156 if (isFirstHit) {
158 "Tgc TgcSlbDataHelper::convertCoincidence :"
159 << " slb type =" << slb->getType());
160 isFirstHit = false;
161 }
164 ? "TgcRawData : LPT_D_W "
165 : "TgcRawData : LPT_D_S ")
166 << " BC:" << iBc << " subDetId:" << subDetectorId
167 << " rodId:" << rodId << " sswId:" << slb->getSswId()
168 << " sbLoc:" << slb->getSbLoc()
169 << " slbId:" << slb->getSlbId() << " sub: " << i
170 << " pos:" << pos[i] << " delta:" << delta[i]);
171 }
172 break;
173
177 if (!hit[i]) {
178 continue;
179 }
181
183 iBc, subDetectorId, rodId, slb->getSswId(),
184 slb->getSbLoc(), slb->getL1Id(), slb->getBcId(),
186 delta[i], 0, i, pos[i]);
187 vChannel.push_back(rCh);
188 if (isFirstHit) {
190 "Tgc TgcSlbDataHelper::convertCoincidence :"
191 << " slb type =" << slb->getType());
192 isFirstHit = false;
193 }
195 << " BC:" << iBc << " subDetId:"
196 << subDetectorId << " rodId:" << rodId
197 << " sswId:" << slb->getSswId()
198 << " sbLoc:" << slb->getSbLoc()
199 << " slbId:" << slb->getSlbId()
200 << " sub: " << i << " pos:" << pos[i]);
201 }
202 break;
203
207 if (!hit[i]) {
208 continue;
209 }
211 int seg = 0;
213 if (i > 3) {
214 seg = 1;
216 }
217
219 iBc, subDetectorId, rodId, slb->getSswId(),
220 slb->getSbLoc(), slb->getL1Id(), slb->getBcId(),
222 delta[i], seg, subc, pos[i]);
223 vChannel.push_back(rCh);
224 if (isFirstHit) {
226 "Tgc TgcSlbDataHelper::convertCoincidence :"
227 << " slb type =" << slb->getType());
228 isFirstHit = false;
229 }
231 "TgcRawData : LPT_T_S "
232 << " BC:" << iBc << " subDetId:" << subDetectorId
233 << " rodId:" << rodId << " sswId:" << slb->getSswId()
234 << " sbLoc:" << slb->getSbLoc()
235 << " slbId:" << slb->getSlbId() << " seg: " << seg
236 << " sub: " << subc << " pos:" << pos[i]);
237 }
238 break;
239
242
243
248 if (!hit[i]) {
249 continue;
250 }
252 iBc,
253 subDetectorId,
254 rodId,
255 slb->getSswId(),
256 slb->getSbLoc(),
257 slb->getL1Id(),
258 slb->getBcId(),
262 SLB_TYPE_INNER_WIRE),
263
264
265
266
267 0,
269 i >=
272 2),
273
274
275 0);
276 vChannel.push_back(rCh);
277 if (isFirstHit) {
279 "Tgc TgcSlbDataHelper::convertCoincidence :"
280 << " slb type =" << slb->getType());
281 isFirstHit = false;
282 }
284 "TgcRawData : "
286 ? "LPT_I_S"
287 : "LPT_I_W")
288 <<
" BC:" << rCh->
bcTag() <<
" subDetId:"
290 <<
" sswId:" << rCh->
sswId() <<
" sbLoc:"
291 << rCh->
slbId() <<
" slbId:" << slb->getSlbId()
292 <<
" seg: " << rCh->
segment() <<
" sub: "
294 }
295
296 break;
297
300
302 sector =
getSector(forward, subDetectorId, rodId, slb);
303
304
305 bool cand3plus;
306 bool hitSL[2];
307 bool muplus[2];
309 bool overlap[2];
311 if (forward) {
313 muplus, threshold, overlap, roi);
314 } else {
316 muplus, threshold, overlap, roi);
317 }
318
319 for (
size_t i = 0;
i < 2; ++
i) {
320 if (!hitSL[i]) {
321 continue;
322 }
323
324 bool veto[2] = {
false};
326 iBc, subDetectorId, rodId, slb->getL1Id(),
327 slb->getBcId(), cand3plus, forward, sector, i,
328 muplus[i], threshold[i], overlap[i],
veto[i], roi[i]);
329 vChannel.push_back(rCh);
330 if (isFirstHit) {
332 "Tgc TgcSlbDataHelper::convertCoincidence :"
333 << " slb type =" << slb->getType());
334 isFirstHit = false;
335 }
337 "TgcRawData : SL "
338 << " BC:" << iBc << " subDetId:" << subDetectorId
339 << " rodId:" << rodId << " sswId:" << slb->getSswId()
340 << " sbLoc:" << slb->getSbLoc()
341 << " slbId:" << slb->getSlbId() << " roi:" << roi[i]
342 << " pt:" << threshold[i]);
343 }
344
345
354
355 size_t numberOfHit;
356 if (forward) {
359 index,
hipt, hitId, sub,
360 deltaHPT);
361 } else {
364 index,
hipt, hitId, sub,
365 deltaHPT);
366 }
367
368 for (
size_t i = 0;
i < numberOfHit; ++
i) {
369 if (!hitP[i]) {
370 continue;
371 }
372
373
375 hipt[i], hitId[i], sub[i], deltaHPT[i])) {
376 std::string hpt_Type = "E";
377 if (forward) {
378 hpt_Type = "F";
379 }
381 hpt_Type += "S";
382 } else {
383 hpt_Type += "W";
384 }
385
386 if (isFirstHit) {
388 "Tgc TgcSlbDataHelper::convertCoincidence :"
389 << " slb type =" << slb->getType());
390 isFirstHit = false;
391 }
393 << hpt_Type << " BC:" << iBc
394 << " subDetId:" << subDetectorId
395 << " rodId:" << rodId
396 << " sswId:" << slb->getSswId()
397 << " sbLoc:" << slb->getSbLoc()
398 << " slbId:" << slb->getSlbId()
399 << std::dec << " chip:" << chip[i]
400 << " index:" << index[i] << " hitId:"
401 << hitId[i] << " delta:" << deltaHPT[i]);
402 continue;
403 }
404
405
406 {
408 rCh =
new TgcRawData(iBc, subDetectorId, rodId,
409 slb->getL1Id(), slb->getBcId(),
410 strip[i], forward, sector, chip[i],
411 index[i],
hipt[i], hitId[i],
412 sub[i], deltaHPT[i], inner[i]);
413 }
414 vChannel.push_back(rCh);
415 if (isFirstHit) {
417 "Tgc TgcSlbDataHelper::convertCoincidence :"
418 << " slb type =" << slb->getType());
419 isFirstHit = false;
420 }
421 auto hptType = [&]() {
422 std::string hptType = "E";
423 if (forward) {
424 hptType = "F";
425 }
427 hptType += "S";
428 } else {
429 hptType += "W";
430 }
431 return hptType;
432 };
434 "TgcRawData : HPT "
435 << hptType() << " BC:" << iBc
436 << " subDetId:" << subDetectorId << " rodId:" << rodId
437 << " sswId:" << slb->getSswId()
438 << " sbLoc:" << slb->getSbLoc()
439 << " slbId:" << slb->getSlbId() << std::dec
440 << " chip:" << chip[i] << " index:" << index[i]
441 << " hitId:" << hitId[i] << " delta:" << deltaHPT[i]);
442 }
443
444 break;
445
446 default:
447 break;
448
449 }
450 }
451}
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current TgcRawData
static bool isValid_HPT(bool hit, bool strip, uint16_t chip, uint16_t index, bool hipt, uint16_t hitId, uint16_t pos, int16_t delta)
Check if it is valid high-pT coincidence or not.
void getLPTforInner(const bool *bitArray, bool hit[]) const
Decode low-pT coincidence (tracklet) information for inner from bit array.
void getHPT_E(const bool *bitArray, bool hit[], bool strip[], uint16_t chip[], uint16_t index[], bool hipt[], uint16_t hitId[], uint16_t sub[], int16_t delta[]) const
Decode high-pT coincidence information for endcap region from bit array.
void getLPTforTripletStrip(const bool *bitArray, bool hit[], int pos[]) const
Decode low-pT coincidence (tracklet) information for triplet strip from bit array.
void getSL_F(const bool *bitArray, bool &cand3plus, bool hit[], bool muplus[], uint16_t pt[], bool overlap[], uint16_t roi[]) const
Decode Sector Logic coincidence information for forward region from bit array.
void getSL_E(const bool *bitArray, bool &cand3plus, bool hit[], bool muplus[], uint16_t pt[], bool overlap[], uint16_t roi[]) const
Decode Sector Logic coincidence information for endcap region from bit array.
void getLPTforTripletWire(const bool *bitArray, bool hit[], int pos[]) const
Decode low-pT coincidence (tracklet) information for triplet wire from bit array.
void getHPT_F(const bool *bitArray, bool hit[], bool strip[], uint16_t chip[], uint16_t index[], bool hipt[], uint16_t hitId[], uint16_t sub[], int16_t delta[]) const
Decode high-pT coincidence information for forward region from bit array.
static uint16_t getSector(bool forward, uint16_t subDetectorId, uint16_t rodId, const TgcSlbData *slb)
Set sector for HpT/SL based on slbId.
void getLPTforDoublet(const bool *bitArray, bool hit[], int delta[], int pos[]) const
Decode low-pT coincidence (tracklet) information for doublet from bit array.
uint16_t position() const
uint16_t subMatrix() const
uint16_t subDetectorId() const
std::vector< std::string > veto
these patterns are anded
setScaleOne setStatusOne setSaturated int16_t