56 std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> gTOBsat = {{0,0,0,0,0,0}};
57 std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> gJetTOBs = {{0,0,0,0,0,0}};
58 std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> gJetTOBv = {{0,0,0,0,0,0}};
59 std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> gJetTOBeta = {{0,0,0,0,0,0}};
60 std::array<int, FEXAlgoSpaceDefs::gJetTOBfib> gJetTOBphi = {{0,0,0,0,0,0}};
65 std::array<std::array<int, 3>,
FEXAlgoSpaceDefs::BTOBFIB> gBlockTOBv = {{ {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}} }};
66 std::array<std::array<int, 3>,
FEXAlgoSpaceDefs::BTOBFIB> gBlockTOBeta = {{ {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}} }};
67 std::array<std::array<int, 3>,
FEXAlgoSpaceDefs::BTOBFIB> gBlockTOBphi = {{ {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}}, {{0,0,0}} }};
77 CNtwr[irow][jcolumn] = Ctwr[irow][jcolumn] ;
85 if( Asat[irow][jcolumn] == 1 ) gTOBsat[0] = 1;
86 if( Bsat[irow][jcolumn] == 1 ) gTOBsat[2] = 1;
87 if( Csat[irow][jcolumn] == 1 ) gTOBsat[4] = 1;
90 if( Asat[irow][jcolumn] == 1 ) gTOBsat[1] = 1;
91 if( Bsat[irow][jcolumn] == 1 ) gTOBsat[3] = 1;
92 if( Csat[irow][jcolumn] == 1 ) gTOBsat[5] = 1;
138 if (Asat[irow][icolumn] != 0){
155 AjetsRestricted[irow][icolumn] = AjetsAlt[irow][icolumn];
156 BjetsRestricted[irow][icolumn] = BjetsAlt[irow][icolumn];
157 CjetsRestricted[irow][icolumn] = CjetsAlt[irow][icolumn];
164 gBlockAB(Atwr, gBLKA, hasSeedA, gLJ_seedThrA);
170 gBlockAB(Btwr, gBLKB, hasSeedB, gLJ_seedThrB);
176 gBlockAB(Ctwr, gBLKC, hasSeedC, gLJ_seedThrC);
180 std::array<int, 32> AgBlockOutL{};
181 std::array<int, 32> AgBlockEtaIndL{};
182 std::array<int, 32> AgBlockOutR{};
183 std::array<int, 32> AgBlockEtaIndR{};
184 blkOutAB(gBLKA, AgBlockOutL, AgBlockEtaIndL, AgBlockOutR, AgBlockEtaIndR);
186 std::array<int, 32> BgBlockOutL{};
187 std::array<int, 32> BgBlockEtaIndL{};
188 std::array<int, 32> BgBlockOutR{};
189 std::array<int, 32> BgBlockEtaIndR{};
190 blkOutAB(gBLKB, BgBlockOutL, BgBlockEtaIndL, BgBlockOutR, BgBlockEtaIndR);
192 std::array<int, 32> CgBlockOutL{};
193 std::array<int, 32> CgBlockEtaIndL{};
194 std::array<int, 32> CgBlockOutR{};
195 std::array<int, 32> CgBlockEtaIndR{};
196 blkOutAB(gBLKC, CgBlockOutL, CgBlockEtaIndL, CgBlockOutR, CgBlockEtaIndR) ;
202 gBlockMax2(gBLKA, 1, 0, gBlockTOBv[0], gBlockTOBeta[0], gBlockTOBphi[0]);
204 gBlockMax2(gBLKA, 2, 1, gBlockTOBv[1], gBlockTOBeta[1], gBlockTOBphi[1]);
207 gBlockMax2(gBLKB, 3, 0, gBlockTOBv[2], gBlockTOBeta[2], gBlockTOBphi[2]);
209 gBlockMax2(gBLKB, 4, 1, gBlockTOBv[3], gBlockTOBeta[3], gBlockTOBphi[3]);
212 gBlockMax2( gBLKC, 0, 0, gBlockTOBv[4], gBlockTOBeta[4], gBlockTOBphi[4]);
214 gBlockMax2( gBLKC, 5, 1, gBlockTOBv[5], gBlockTOBeta[5], gBlockTOBphi[5]);
271 std::array<int, 32> AjetOutL;
272 std::array<int, 32> AetaIndL;
273 std::array<int, 32> AjetOutR;
274 std::array<int, 32> AetaIndR;
277 jetOutAB(AjetsRestricted, AjetOutL, AetaIndL, AjetOutR, AetaIndR);
279 std::array<int, 32> BjetOutL;
280 std::array<int, 32> BetaIndL;
281 std::array<int, 32> BjetOutR;
282 std::array<int, 32> BetaIndR;
284 jetOutAB(BjetsRestricted, BjetOutL, BetaIndL, BjetOutR, BetaIndR);
286 std::array<int, 32> CNjetOut;
287 std::array<int, 32> CNetaInd;
288 std::array<int, 32> CPjetOut;
289 std::array<int, 32> CPetaInd;
291 jetOutAB(CjetsRestricted, CNjetOut, CNetaInd, CPjetOut, CPetaInd);
295 gJetTOBgen(AjetOutL, AetaIndL, 0, jetThreshold, gJetTOBs, gJetTOBv, gJetTOBeta, gJetTOBphi);
296 gJetTOBgen(AjetOutR, AetaIndR, 1, jetThreshold, gJetTOBs, gJetTOBv, gJetTOBeta, gJetTOBphi);
298 gJetTOBgen(BjetOutL, BetaIndL, 2, jetThreshold, gJetTOBs, gJetTOBv, gJetTOBeta, gJetTOBphi);
299 gJetTOBgen(BjetOutR, BetaIndR, 3, jetThreshold, gJetTOBs, gJetTOBv, gJetTOBeta, gJetTOBphi);
301 gJetTOBgen(CNjetOut, CNetaInd, 4, jetThreshold, gJetTOBs, gJetTOBv, gJetTOBeta, gJetTOBphi);
302 gJetTOBgen(CPjetOut, CPetaInd, 5, jetThreshold, gJetTOBs, gJetTOBv, gJetTOBeta, gJetTOBphi);
305 std::vector<std::unique_ptr<gFEXJetTOB>> tobs_v;
313 ATOB2_dat[0] = (( pucA & 0x0000FFFF ) << 8);
314 BTOB2_dat[0] = (( pucB & 0x0000FFFF ) << 8);
315 CTOB2_dat[0] = (( pucC & 0x0000FFFF ) << 8);
318 tobs_v[0] = std::make_unique<gFEXJetTOB>();
319 tobs_v[0]->setWord(ATOB2_dat[0]);
320 tobs_v[0]->setET(pucA);
321 tobs_v[0]->setEta(0);
322 tobs_v[0]->setPhi(0);
323 tobs_v[0]->setTobID(0);
324 tobs_v[0]->setStatus(1);
326 tobs_v[1] = std::make_unique<gFEXJetTOB>();
327 tobs_v[1]->setWord(BTOB2_dat[0]);
328 tobs_v[1]->setET(pucB);
329 tobs_v[1]->setEta(0);
330 tobs_v[1]->setPhi(0);
331 tobs_v[1]->setTobID(0);
332 tobs_v[1]->setStatus(1);
336 ATOB1_dat[1] = 0x00000001;
337 if( gBlockTOBv[0][0] > gJ_ptMinToTopoCounts2 ) ATOB1_dat[1] = ATOB1_dat[1] | 0x00000080;
338 ATOB1_dat[1] = ATOB1_dat[1] | ( ( gBlockTOBv[0][0] & 0x00000FFF ) << 8);
339 ATOB1_dat[1] = ATOB1_dat[1] | ( ( gBlockTOBeta[0][0] & 0x0000003F ) <<20);
340 ATOB1_dat[1] = ATOB1_dat[1] | ( ( gBlockTOBphi[0][0] & 0x0000001F ) <<26);
342 tobs_v[2] = std::make_unique<gFEXJetTOB>();
343 tobs_v[2]->setWord(ATOB1_dat[1]);
344 tobs_v[2]->setET(gBlockTOBv[0][0]);
345 tobs_v[2]->setEta(gBlockTOBeta[0][0]);
346 tobs_v[2]->setPhi(gBlockTOBphi[0][0]);
347 tobs_v[2]->setTobID(1);
348 if( gBlockTOBv[0][0] > gJ_ptMinToTopoCounts2 ) tobs_v[2]->setStatus(1);
349 else tobs_v[2]->setStatus(0);
351 ATOB2_dat[1] = 0x00000002;
352 if( gBlockTOBv[1][0] > gJ_ptMinToTopoCounts1 ) ATOB2_dat[1] = ATOB2_dat[1] | 0x00000080;
353 ATOB2_dat[1] = ATOB2_dat[1] | ( ( gBlockTOBv[1][0] & 0x00000FFF ) << 8);
354 ATOB2_dat[1] = ATOB2_dat[1] | ( ( gBlockTOBeta[1][0] & 0x0000003F ) <<20);
355 ATOB2_dat[1] = ATOB2_dat[1] | ( ( gBlockTOBphi[1][0] & 0x0000001F ) <<26);
357 tobs_v[3] = std::make_unique<gFEXJetTOB>();
358 tobs_v[3]->setWord(ATOB2_dat[1]);
359 tobs_v[3]->setET(gBlockTOBv[1][0]);
360 tobs_v[3]->setEta(gBlockTOBeta[1][0]);
361 tobs_v[3]->setPhi(gBlockTOBphi[1][0]);
362 tobs_v[3]->setTobID(2);
363 if( gBlockTOBv[1][0] > gJ_ptMinToTopoCounts1 ) tobs_v[3]->setStatus(1);
364 else tobs_v[3]->setStatus(0);
367 BTOB1_dat[1] = 0x00000001;
368 if( gBlockTOBv[2][0] > gJ_ptMinToTopoCounts1 ) BTOB1_dat[1] = BTOB1_dat[1] | 0x00000080;
369 BTOB1_dat[1] = BTOB1_dat[1] | ( ( gBlockTOBv[2][0] & 0x00000FFF ) << 8);
370 BTOB1_dat[1] = BTOB1_dat[1] | ( ( gBlockTOBeta[2][0] & 0x0000003F ) <<20);
371 BTOB1_dat[1] = BTOB1_dat[1] | ( ( gBlockTOBphi[2][0] & 0x0000001F) <<26);
373 tobs_v[4] = std::make_unique<gFEXJetTOB>();
374 tobs_v[4]->setWord(BTOB1_dat[1]);
375 tobs_v[4]->setET(gBlockTOBv[2][0]);
376 tobs_v[4]->setEta(gBlockTOBeta[2][0]);
377 tobs_v[4]->setPhi(gBlockTOBphi[2][0]);
378 tobs_v[4]->setTobID(1);
379 if( gBlockTOBv[2][0] > gJ_ptMinToTopoCounts1 ) tobs_v[4]->setStatus(1);
380 else tobs_v[4]->setStatus(0);
383 BTOB2_dat[1] = 0x00000002;
384 if( gBlockTOBv[3][0] > gJ_ptMinToTopoCounts2 ) BTOB2_dat[1] = BTOB2_dat[1] | 0x00000080;
385 BTOB2_dat[1] = BTOB2_dat[1] | ( ( gBlockTOBv[3][0] & 0x00000FFF ) << 8);
386 BTOB2_dat[1] = BTOB2_dat[1] | ( ( gBlockTOBeta[3][0] & 0x0000003F ) <<20);
387 BTOB2_dat[1] = BTOB2_dat[1] | ( ( gBlockTOBphi[3][0] & 0x0000001F ) <<26);
389 tobs_v[5] = std::make_unique<gFEXJetTOB>();
390 tobs_v[5]->setWord(BTOB2_dat[1]);
391 tobs_v[5]->setET(gBlockTOBv[3][0]);
392 tobs_v[5]->setEta(gBlockTOBeta[3][0]);
393 tobs_v[5]->setPhi(gBlockTOBphi[3][0]);
394 tobs_v[5]->setTobID(2);
395 if( gBlockTOBv[3][0] > gJ_ptMinToTopoCounts2 ) tobs_v[5]->setStatus(1);
396 else tobs_v[5]->setStatus(0);
399 CTOB1_dat[1] = 0x00000001;
400 if( gBlockTOBv[4][0] > gJ_ptMinToTopoCounts1 ) CTOB1_dat[1] = CTOB1_dat[1] | 0x00000080;
401 CTOB1_dat[1] = CTOB1_dat[1] | ( ( gBlockTOBv[4][0] & 0x00000FFF ) << 8);
402 CTOB1_dat[1] = CTOB1_dat[1] | ( ( gBlockTOBeta[4][0] & 0x0000003F ) <<20);
403 CTOB1_dat[1] = CTOB1_dat[1] | ( ( gBlockTOBphi[4][0] & 0x0000001F) <<26);
406 CTOB2_dat[1] = 0x00000002;
407 if( gBlockTOBv[5][0] > gJ_ptMinToTopoCounts2) CTOB2_dat[1] = CTOB2_dat[1] | 0x00000080;
408 CTOB2_dat[1] = CTOB2_dat[1] | ( ( gBlockTOBv[5][0] & 0x00000FFF ) << 8);
409 CTOB2_dat[1] = CTOB2_dat[1] | ( ( gBlockTOBeta[5][0] & 0x0000003F ) <<20);
410 CTOB2_dat[1] = CTOB2_dat[1] | ( ( gBlockTOBphi[5][0] & 0x0000001F ) <<26);
415 ATOB1_dat[2] = 0x00000003;
416 if( gBlockTOBv[0][1] > gJ_ptMinToTopoCounts2 ) ATOB1_dat[2] = ATOB1_dat[2] | 0x00000080;
417 ATOB1_dat[2] = ATOB1_dat[2] | ( ( gBlockTOBv[0][1] & 0x00000FFF ) << 8);
418 ATOB1_dat[2] = ATOB1_dat[2] | ( ( gBlockTOBeta[0][1] & 0x0000003F ) <<20);
419 ATOB1_dat[2] = ATOB1_dat[2] | ( ( gBlockTOBphi[0][1] & 0x0000001F ) <<26);
421 tobs_v[6] = std::make_unique<gFEXJetTOB>();
422 tobs_v[6]->setWord(ATOB1_dat[2]);
423 tobs_v[6]->setET(gBlockTOBv[0][1]);
424 tobs_v[6]->setEta(gBlockTOBeta[0][1]);
425 tobs_v[6]->setPhi(gBlockTOBphi[0][1]);
426 tobs_v[6]->setTobID(3);
427 if( gBlockTOBv[0][1] > gJ_ptMinToTopoCounts2 ) tobs_v[6]->setStatus(1);
428 else tobs_v[6]->setStatus(0);
431 ATOB2_dat[2] = 0x00000004;
432 if( gBlockTOBv[1][1] > gJ_ptMinToTopoCounts1 ) ATOB2_dat[2] = ATOB2_dat[2] | 0x00000080;
433 ATOB2_dat[2] = ATOB2_dat[2] | ( ( gBlockTOBv[1][1] & 0x00000FFF ) << 8);
434 ATOB2_dat[2] = ATOB2_dat[2] | ( ( gBlockTOBeta[1][1] & 0x0000003F ) <<20);
435 ATOB2_dat[2] = ATOB2_dat[2] | ( ( gBlockTOBphi[1][1] & 0x0000001F ) <<26);
437 tobs_v[7] = std::make_unique<gFEXJetTOB>();
438 tobs_v[7]->setWord(ATOB2_dat[2]);
439 tobs_v[7]->setET(gBlockTOBv[1][1]);
440 tobs_v[7]->setEta(gBlockTOBeta[1][1]);
441 tobs_v[7]->setPhi(gBlockTOBphi[1][1]);
442 tobs_v[7]->setTobID(4);
443 if( gBlockTOBv[1][1] > gJ_ptMinToTopoCounts1 ) tobs_v[7]->setStatus(1);
444 else tobs_v[7]->setStatus(0);
447 BTOB1_dat[2] = 0x00000003;
448 if( gBlockTOBv[2][1] > gJ_ptMinToTopoCounts1 ) BTOB1_dat[2] = BTOB1_dat[2] | 0x00000080;
449 BTOB1_dat[2] = BTOB1_dat[2] | ( ( gBlockTOBv[2][1] & 0x00000FFF ) << 8);
450 BTOB1_dat[2] = BTOB1_dat[2] | ( ( gBlockTOBeta[2][1] & 0x0000003F ) <<20);
451 BTOB1_dat[2] = BTOB1_dat[2] | ( ( gBlockTOBphi[2][1] & 0x0000001F ) <<26);
453 tobs_v[8] = std::make_unique<gFEXJetTOB>();
454 tobs_v[8]->setWord(BTOB1_dat[2]);
455 tobs_v[8]->setET(gBlockTOBv[2][1]);
456 tobs_v[8]->setEta(gBlockTOBeta[2][1]);
457 tobs_v[8]->setPhi(gBlockTOBphi[2][1]);
458 tobs_v[8]->setTobID(3);
459 if( gBlockTOBv[2][1] > gJ_ptMinToTopoCounts1 ) tobs_v[8]->setStatus(1);
460 else tobs_v[8]->setStatus(0);
463 BTOB2_dat[2] = 0x00000004;
464 if( gBlockTOBv[3][1] > gJ_ptMinToTopoCounts2 ) BTOB2_dat[2] = BTOB2_dat[2] | 0x00000080;
465 BTOB2_dat[2] = BTOB2_dat[2] | ( ( gBlockTOBv[3][1] & 0x00000FFF ) << 8);
466 BTOB2_dat[2] = BTOB2_dat[2] | ( ( gBlockTOBeta[3][1] & 0x0000003F ) <<20);
467 BTOB2_dat[2] = BTOB2_dat[2] | ( ( gBlockTOBphi[3][1] & 0x0000001F ) <<26);
469 tobs_v[9] = std::make_unique<gFEXJetTOB>();
470 tobs_v[9]->setWord(BTOB2_dat[2]);
471 tobs_v[9]->setET(gBlockTOBv[3][1]);
472 tobs_v[9]->setEta(gBlockTOBeta[3][1]);
473 tobs_v[9]->setPhi(gBlockTOBphi[3][1]);
474 tobs_v[9]->setTobID(4);
475 if( gBlockTOBv[3][1] > gJ_ptMinToTopoCounts2 ) tobs_v[9]->setStatus(1);
476 else tobs_v[9]->setStatus(0);
479 CTOB1_dat[2] = 0x00000003;
480 if( gBlockTOBv[4][1] > gJ_ptMinToTopoCounts1 ) CTOB1_dat[2] = CTOB1_dat[2] | 0x00000080;
481 CTOB1_dat[2] = CTOB1_dat[2] | ( ( gBlockTOBv[4][1] & 0x00000FFF ) << 8);
482 CTOB1_dat[2] = CTOB1_dat[2] | ( ( gBlockTOBeta[4][1] & 0x0000003F ) <<20);
483 CTOB1_dat[2] = CTOB1_dat[2] | ( ( gBlockTOBphi[4][1] & 0x0000001F ) <<26);
485 CTOB2_dat[2] = 0x00000004;
486 if( gBlockTOBv[5][1] > gJ_ptMinToTopoCounts2 ) CTOB2_dat[2] = CTOB2_dat[2] | 0x00000080;
487 CTOB2_dat[2] = CTOB2_dat[2] | ( ( gBlockTOBv[5][1] & 0x00000FFF ) << 8);
488 CTOB2_dat[2] = CTOB2_dat[2] | ( ( gBlockTOBeta[5][1] & 0x0000003F ) <<20);
489 CTOB2_dat[2] = CTOB2_dat[2] | ( ( gBlockTOBphi[5][1] & 0x0000001F ) <<26);
499 int tobvMask = 0x00000FFF;
502 ATOB1_dat[3] = 0x00000005;
503 if( gJetTOBv[0] > gLJ_ptMinToTopoCounts2 ) ATOB1_dat[3] = ATOB1_dat[3] | 0x00000080;
504 ATOB1_dat[3] = ATOB1_dat[3] | ( ( gJetTOBv[0] & tobvMask) << tobvShift);
505 ATOB1_dat[3] = ATOB1_dat[3] | ( ( gJetTOBeta[0] & 0x0000003F ) <<20);
506 ATOB1_dat[3] = ATOB1_dat[3] | ( ( gJetTOBphi[0] & 0x0000001F ) <<26);
508 tobs_v[10] = std::make_unique<gFEXJetTOB>();
509 tobs_v[10]->setWord(ATOB1_dat[3]);
510 tobs_v[10]->setET(gJetTOBv[0]);
511 tobs_v[10]->setEta(gJetTOBeta[0]);
512 tobs_v[10]->setPhi(gJetTOBphi[0]);
513 tobs_v[10]->setTobID(5);
514 if(gJetTOBv[0] > gLJ_ptMinToTopoCounts2 ) tobs_v[10]->setStatus(1);
515 else tobs_v[10]->setStatus(0);
518 ATOB2_dat[3] = 0x00000006;
519 if( gJetTOBv[1] > gLJ_ptMinToTopoCounts1 ) ATOB2_dat[3] = ATOB2_dat[3] | 0x00000080;
520 ATOB2_dat[3] = ATOB2_dat[3] | ( ( gJetTOBv[1] & tobvMask ) << tobvShift);
521 ATOB2_dat[3] = ATOB2_dat[3] | ( ( gJetTOBeta[1] & 0x0000003F ) <<20);
522 ATOB2_dat[3] = ATOB2_dat[3] | ( ( gJetTOBphi[1] & 0x0000001F ) <<26);
524 tobs_v[11] = std::make_unique<gFEXJetTOB>();
525 tobs_v[11]->setWord(ATOB2_dat[3]);
526 tobs_v[11]->setET(gJetTOBv[1]);
527 tobs_v[11]->setEta(gJetTOBeta[1]);
528 tobs_v[11]->setPhi(gJetTOBphi[1]);
529 tobs_v[11]->setTobID(6);
530 if( gJetTOBv[1] > gLJ_ptMinToTopoCounts1 ) tobs_v[11]->setStatus(1);
531 else tobs_v[11]->setStatus(0);
534 BTOB1_dat[3] = 0x00000005;
535 if( gJetTOBv[2] > gLJ_ptMinToTopoCounts1 ) BTOB1_dat[3] = BTOB1_dat[3] | 0x00000080;
536 BTOB1_dat[3] = BTOB1_dat[3] | ( ( gJetTOBv[2] & tobvMask) << tobvShift);
537 BTOB1_dat[3] = BTOB1_dat[3] | ( ( gJetTOBeta[2] & 0x0000003F ) <<20);
538 BTOB1_dat[3] = BTOB1_dat[3] | ( ( gJetTOBphi[2] & 0x0000001F ) <<26);
540 tobs_v[12] = std::make_unique<gFEXJetTOB>();
541 tobs_v[12]->setWord(BTOB1_dat[3]);
542 tobs_v[12]->setET(gJetTOBv[2]);
543 tobs_v[12]->setEta(gJetTOBeta[2]);
544 tobs_v[12]->setPhi(gJetTOBphi[2]);
545 tobs_v[12]->setTobID(5);
546 if( gJetTOBv[2] > gLJ_ptMinToTopoCounts1 ) tobs_v[12]->setStatus(1);
547 else tobs_v[12]->setStatus(0);
550 BTOB2_dat[3] = 0x00000006;
551 if( gJetTOBv[3] > gLJ_ptMinToTopoCounts2 ) BTOB2_dat[3] = BTOB2_dat[3] | 0x00000080;
552 BTOB2_dat[3] = BTOB2_dat[3] | ( ( gJetTOBv[3] & tobvMask ) << tobvShift);
553 BTOB2_dat[3] = BTOB2_dat[3] | ( ( gJetTOBeta[3] & 0x0000003F ) <<20);
554 BTOB2_dat[3] = BTOB2_dat[3] | ( ( gJetTOBphi[3] & 0x0000001F ) <<26);
556 tobs_v[13] = std::make_unique<gFEXJetTOB>();
557 tobs_v[13]->setWord(BTOB2_dat[3]);
558 tobs_v[13]->setET(gJetTOBv[3]);
559 tobs_v[13]->setEta(gJetTOBeta[3]);
560 tobs_v[13]->setPhi(gJetTOBphi[3]);
561 tobs_v[13]->setTobID(6);
562 if( gJetTOBv[3] > gLJ_ptMinToTopoCounts2 ) tobs_v[13]->setStatus(1);
563 else tobs_v[13]->setStatus(0);
566 CTOB1_dat[3] = 0x00000005;
567 if( gJetTOBv[4] > gLJ_ptMinToTopoCounts1 ) CTOB1_dat[3] = CTOB1_dat[3] | 0x00000080;
568 CTOB1_dat[3] = CTOB1_dat[3] | ( ( gJetTOBv[4] & tobvMask) << tobvShift);
569 CTOB1_dat[3] = CTOB1_dat[3] | ( ( gJetTOBeta[4] & 0x0000003F ) <<20);
570 CTOB1_dat[3] = CTOB1_dat[3] | ( ( gJetTOBphi[4] & 0x0000001F ) <<26);
572 CTOB2_dat[3] = 0x00000006;
573 if( gJetTOBv[5] > gLJ_ptMinToTopoCounts2 ) CTOB2_dat[3] = CTOB2_dat[3] | 0x00000080;
574 CTOB2_dat[3] = CTOB2_dat[3] | ( ( gJetTOBv[5] & tobvMask ) << tobvShift);
575 CTOB2_dat[3] = CTOB2_dat[3] | ( ( gJetTOBeta[5] & 0x0000003F ) <<20);
576 CTOB2_dat[3] = CTOB2_dat[3] | ( ( gJetTOBphi[5] & 0x0000001F ) <<26);
585 ATOB1_dat[1] = ( ATOB1_dat[1] | 0x80000000 );
586 ATOB1_dat[3] = ( ATOB1_dat[3] | 0x80000000 );
590 ATOB2_dat[1] = ( ATOB2_dat[1] | 0x80000000 );
591 ATOB2_dat[3] = ( ATOB2_dat[3] | 0x80000000 );
595 BTOB1_dat[1] = ( BTOB1_dat[1] | 0x80000000 );
596 BTOB1_dat[3] = ( BTOB1_dat[3] | 0x80000000 );
600 BTOB2_dat[1] = ( BTOB2_dat[1] | 0x80000000 );
601 BTOB2_dat[3] = ( BTOB2_dat[3] | 0x80000000 );
605 CTOB1_dat[1] = ( CTOB1_dat[1] | 0x80000000 );
606 CTOB1_dat[3] = ( CTOB1_dat[3] | 0x80000000 );
610 CTOB2_dat[1] = ( CTOB2_dat[1] | 0x80000000 );
611 CTOB2_dat[3] = ( CTOB2_dat[3] | 0x80000000 );
628 ATOB1_dat[5] = ( (
BCID&0x0000007F)<<8 ) ;
629 ATOB2_dat[5] = ( (
BCID&0x0000007F)<<8 ) ;
630 BTOB1_dat[5] = ( (
BCID&0x0000007F)<<8 ) ;
631 BTOB2_dat[5] = ( (
BCID&0x0000007F)<<8 ) ;
632 CTOB1_dat[5] = ( (
BCID&0x0000007F)<<8 ) ;
633 CTOB2_dat[5] = ( (
BCID&0x0000007F)<<8 ) ;
639 ATOB1_dat[6] = 0x000000BC | ( (
BCID&0x0000000F)<<8 ) | (3<<12) | (CRC<<23);
640 ATOB2_dat[6] = 0x000000BC | ( (
BCID&0x0000000F)<<8 ) | (3<<12) | (CRC<<23);
641 BTOB1_dat[6] = 0x000000BC | ( (
BCID&0x0000000F)<<8 ) | (3<<12) | (CRC<<23);
642 BTOB2_dat[6] = 0x000000BC | ( (
BCID&0x0000000F)<<8 ) | (3<<12) | (CRC<<23);
643 CTOB1_dat[6] = 0x000000BC | ( (
BCID&0x0000000F)<<8 ) | (3<<12) | (CRC<<23);
644 CTOB2_dat[6] = 0x000000BC | ( (
BCID&0x0000000F)<<8 ) | (3<<12) | (CRC<<23);