547 patt.push_back({ 0, 0, 0, 0});
548 patt.push_back({ 0, -1, 0, 0});
549 patt.push_back({ 0, -1, 1, 0});
550 patt.push_back({ 0, -1, -1, 0});
551 patt.push_back({ 0, -2, 0, 0});
552 patt.push_back({ 0, -2, 1, 0});
553 patt.push_back({ 0, -2, 2, 0});
554 patt.push_back({ 0, -2, 3, 0});
555 patt.push_back({ 0, -3, 1, 0});
556 patt.push_back({ 0, -3, 2, 0});
557 patt.push_back({ 0, -3, 3, 0});
558 patt.push_back({ 0, -4, 2, 0});
559 patt.push_back({ 0, -4, 3, 0});
560 patt.push_back({ 0, 0, 0, 1});
561 patt.push_back({ 0, 0, 1, 1});
562 patt.push_back({ 0, -1, 0, 1});
563 patt.push_back({ 0, -1, 1, 1});
564 patt.push_back({ 0, -1, 2, 1});
565 patt.push_back({ 0, -2, 2, 1});
566 patt.push_back({ 0, -2, 3, 1});
567 patt.push_back({ 0, -3, 2, 1});
568 patt.push_back({ 0, -3, 3, 1});
569 patt.push_back({ 0, 0, 0, -1});
570 patt.push_back({ 0, 0, -1, -1});
571 patt.push_back({ 0, -1, 0, -1});
572 patt.push_back({ 0, -1, -1, -1});
573 patt.push_back({ 0, -2, 0, -1});
574 patt.push_back({ 0, -2, 1, -1});
575 patt.push_back({ 0, -3, 1, -1});
576 patt.push_back({ 0, -3, 2, -1});
577 patt.push_back({ -1, -1, 0, 0});
578 patt.push_back({ -1, -1, 1, 0});
579 patt.push_back({ -1, -2, 0, 0});
580 patt.push_back({ -1, -2, 1, 0});
581 patt.push_back({ -1, -3, 1, 0});
582 patt.push_back({ -1, -3, 2, 0});
583 patt.push_back({ -1, -3, 3, 0});
584 patt.push_back({ -1, -4, 2, 0});
585 patt.push_back({ -1, -4, 3, 0});
586 patt.push_back({ 1, 0, 1, 0});
587 patt.push_back({ 1, 0, 0, 0});
588 patt.push_back({ 1, 0, -1, 0});
589 patt.push_back({ 1, -1, 0, 0});
590 patt.push_back({ 1, -1, 1, 0});
591 patt.push_back({ 1, -2, 2, 0});
592 patt.push_back({ 1, -2, 3, 0});
593 patt.push_back({ 1, -3, 2, 0});
594 patt.push_back({ 1, -3, 3, 0});
595 patt.push_back({ -1, -1, 0, 1});
596 patt.push_back({ -1, -1, 1, 1});
597 patt.push_back({ -1, -2, 0, 1});
598 patt.push_back({ -1, -2, 1, 1});
599 patt.push_back({ -1, -2, 2, 1});
600 patt.push_back({ -1, -3, 1, 1});
601 patt.push_back({ -1, -3, 2, 1});
602 patt.push_back({ -1, -3, 3, 1});
603 patt.push_back({ -1, -4, 2, 1});
604 patt.push_back({ -1, -4, 3, 1});
605 patt.push_back({ 1, 0, -1, -1});
606 patt.push_back({ 1, 0, 0, -1});
607 patt.push_back({ 1, -1, -1, -1});
608 patt.push_back({ 1, -1, 0, -1});
609 patt.push_back({ 1, -1, 1, -1});
610 patt.push_back({ 1, -2, 1, -1});
611 patt.push_back({ 1, -2, 2, -1});
612 patt.push_back({ 1, -3, 1, -1});
613 patt.push_back({ 1, -3, 2, -1});
614 patt.push_back({ -1, -1, 1, 2});
615 patt.push_back({ -1, -1, 2, 2});
616 patt.push_back({ -1, -2, 1, 2});
617 patt.push_back({ -1, -2, 2, 2});
618 patt.push_back({ -1, -2, 3, 2});
619 patt.push_back({ -1, -3, 2, 2});
620 patt.push_back({ -1, -3, 3, 2});
621 patt.push_back({ -1, -3, 4, 2});
622 patt.push_back({ 1, 0, -1, -2});
623 patt.push_back({ 1, 0, 0, -2});
624 patt.push_back({ 1, -1, 1, -2});
625 patt.push_back({ 1, -1, 0, -2});
626 patt.push_back({ 1, -1, -1, -2});
627 patt.push_back({ 1, -2, 0, -2});
628 patt.push_back({ 1, -2, 1, -2});
629 patt.push_back({ -2, -2, 0, 1});
630 patt.push_back({ -2, -2, 1, 1});
631 patt.push_back({ -2, -3, 1, 1});
632 patt.push_back({ -2, -3, 2, 1});
633 patt.push_back({ -2, -4, 2, 1});
634 patt.push_back({ -2, -4, 3, 1});
635 patt.push_back({ -2, -5, 3, 1});
636 patt.push_back({ 2, 1, 0, -1});
637 patt.push_back({ 2, 0, 1, -1});
638 patt.push_back({ 2, 0, 0, -1});
639 patt.push_back({ 2, 0, -1, -1});
640 patt.push_back({ 2, -1, 1, -1});
641 patt.push_back({ 2, -1, 0, -1});
642 patt.push_back({ 2, -2, 2, -1});
643 patt.push_back({ 2, -2, 1, -1});
644 patt.push_back({ -2, -2, 1, 2});
645 patt.push_back({ -2, -2, 2, 2});
646 patt.push_back({ -2, -3, 1, 2});
647 patt.push_back({ -2, -3, 2, 2});
648 patt.push_back({ -2, -3, 3, 2});
649 patt.push_back({ -2, -4, 2, 2});
650 patt.push_back({ -2, -4, 3, 2});
651 patt.push_back({ -2, -4, 4, 2});
652 patt.push_back({ 2, 1, 0, -2});
653 patt.push_back({ 2, 1, -1, -2});
654 patt.push_back({ 2, 0, 1, -2});
655 patt.push_back({ 2, 0, 0, -2});
656 patt.push_back({ 2, 0, -1, -2});
657 patt.push_back({ 2, 0, -2, -2});
658 patt.push_back({ 2, -1, 2, -2});
659 patt.push_back({ 2, -1, 1, -2});
660 patt.push_back({ 2, -1, 0, -2});
661 patt.push_back({ 2, -1, -1, -2});
662 patt.push_back({ 2, -2, 0, -2});
663 patt.push_back({ 2, -2, 1, -2});
664 patt.push_back({ -2, -2, 1, 3});
665 patt.push_back({ -2, -2, 2, 3});
666 patt.push_back({ -2, -3, 2, 3});
667 patt.push_back({ -2, -3, 3, 3});
668 patt.push_back({ -2, -3, 4, 3});
669 patt.push_back({ -2, -4, 3, 3});
670 patt.push_back({ -2, -4, 4, 3});
671 patt.push_back({ 2, 1, -1, -3});
672 patt.push_back({ 2, 0, -1, -3});
673 patt.push_back({ 2, 0, -2, -3});
674 patt.push_back({ 2, -1, 0, -3});
675 patt.push_back({ 2, -2, 0, -3});
676 patt.push_back({ 2, -2, 1, -3});
677 patt.push_back({ -2, -2, 2, 4});
678 patt.push_back({ -2, -3, 3, 4});
679 patt.push_back({ -2, -3, 4, 4});
680 patt.push_back({ -2, -4, 4, 4});
681 patt.push_back({ 2, -1, 0, 4});
682 patt.push_back({ 2, -1, -1, 4});
683 patt.push_back({ 2, -2, 0, 4});
757 std::vector<bool>& ecl_phimap, std::vector<bool>& ecl_phimap_fwd, std::vector<bool>& ecl_phimap_bwd,
758 std::vector<bool>& ecl_sectormap_fwd, std::vector<bool>& ecl_sectormap_bwd)
760 bool ecl_phimap_loose_fwd[36];
761 bool ecl_phimap_loose_bwd[36];
762 for (
int i = 0; i < 36; i++) {
763 ecl_phimap_loose_fwd[i] =
false;
764 ecl_phimap_loose_bwd[i] =
false;
767 for (
int iclst = 0; iclst < clusterlist.
getEntries(); iclst++) {
769 double _cluster_x = clusterlist[iclst]->getPositionX();
770 double _cluster_y = clusterlist[iclst]->getPositionY();
773 double phi_ECL = 0.0;
774 if (_cluster_x >= 0 && _cluster_y >= 0) {phi_ECL =
atan(_cluster_y / _cluster_x);}
775 else if (_cluster_x < 0 && _cluster_y >= 0) {phi_ECL =
atan(_cluster_y / _cluster_x) + M_PI;}
776 else if (_cluster_x < 0 && _cluster_y < 0) {phi_ECL =
atan(_cluster_y / _cluster_x) + M_PI;}
777 else if (_cluster_x >= 0 && _cluster_y < 0) {phi_ECL =
atan(_cluster_y / _cluster_x) + 2 * M_PI;}
781 for (
int i = 0; i < 36; i++) {
782 if (phi_ECL > i * M_PI / 18 && phi_ECL < (i + 1)*M_PI / 18) {phi_ECL_d = i;}
786 int _cluster_thetaid = clusterlist[iclst]->getMaxThetaId();
787 if (_cluster_thetaid < 4 || _cluster_thetaid > 15) ecl_phimap[phi_ECL_d] =
true;
788 if (_cluster_thetaid < 4) ecl_phimap_fwd[phi_ECL_d] =
true;
789 if (_cluster_thetaid > 15) ecl_phimap_bwd[phi_ECL_d] =
true;
790 if (_cluster_thetaid < 5) ecl_phimap_loose_fwd[phi_ECL_d] =
true;
791 if (_cluster_thetaid > 14) ecl_phimap_loose_bwd[phi_ECL_d] =
true;
795 ecl_sectormap_fwd[0] = ecl_phimap_loose_fwd[35] or ecl_phimap_loose_fwd[0] or ecl_phimap_loose_fwd[1] or ecl_phimap_loose_fwd[2] or
796 ecl_phimap_loose_fwd[3] or ecl_phimap_loose_fwd[4] or ecl_phimap_loose_fwd[5] or ecl_phimap_loose_fwd[6] or
797 ecl_phimap_loose_fwd[7] or ecl_phimap_loose_fwd[8] or ecl_phimap_loose_fwd[9];
798 ecl_sectormap_fwd[1] = ecl_phimap_loose_fwd[8] or ecl_phimap_loose_fwd[9] or ecl_phimap_loose_fwd[10] or ecl_phimap_loose_fwd[11]
800 ecl_phimap_loose_fwd[12] or ecl_phimap_loose_fwd[13] or ecl_phimap_loose_fwd[14] or ecl_phimap_loose_fwd[15] or
801 ecl_phimap_loose_fwd[16] or ecl_phimap_loose_fwd[17] or ecl_phimap_loose_fwd[18] or ecl_phimap_loose_fwd[19];
802 ecl_sectormap_fwd[2] = ecl_phimap_loose_fwd[18] or ecl_phimap_loose_fwd[19] or ecl_phimap_loose_fwd[20]
803 or ecl_phimap_loose_fwd[21] or
804 ecl_phimap_loose_fwd[22] or ecl_phimap_loose_fwd[23] or ecl_phimap_loose_fwd[24] or ecl_phimap_loose_fwd[25] or
805 ecl_phimap_loose_fwd[26] or ecl_phimap_loose_fwd[27] or ecl_phimap_loose_fwd[28];
806 ecl_sectormap_fwd[3] = ecl_phimap_loose_fwd[26] or ecl_phimap_loose_fwd[27] or ecl_phimap_loose_fwd[28]
807 or ecl_phimap_loose_fwd[29] or
808 ecl_phimap_loose_fwd[30] or ecl_phimap_loose_fwd[31] or ecl_phimap_loose_fwd[32] or ecl_phimap_loose_fwd[33] or
809 ecl_phimap_loose_fwd[34] or ecl_phimap_loose_fwd[35] or ecl_phimap_loose_fwd[0];
811 ecl_sectormap_bwd[0] = ecl_phimap_loose_bwd[35] or ecl_phimap_loose_bwd[0] or ecl_phimap_loose_bwd[1] or ecl_phimap_loose_bwd[2] or
812 ecl_phimap_loose_bwd[3] or ecl_phimap_loose_bwd[4] or ecl_phimap_loose_bwd[5] or ecl_phimap_loose_bwd[6] or
813 ecl_phimap_loose_bwd[7] or ecl_phimap_loose_bwd[8] or ecl_phimap_loose_bwd[9];
814 ecl_sectormap_bwd[1] = ecl_phimap_loose_bwd[8] or ecl_phimap_loose_bwd[9] or ecl_phimap_loose_bwd[10] or ecl_phimap_loose_bwd[11]
816 ecl_phimap_loose_bwd[12] or ecl_phimap_loose_bwd[13] or ecl_phimap_loose_bwd[14] or ecl_phimap_loose_bwd[15] or
817 ecl_phimap_loose_bwd[16] or ecl_phimap_loose_bwd[17] or ecl_phimap_loose_bwd[18] or ecl_phimap_loose_bwd[19];
818 ecl_sectormap_bwd[2] = ecl_phimap_loose_bwd[18] or ecl_phimap_loose_bwd[19] or ecl_phimap_loose_bwd[20]
819 or ecl_phimap_loose_bwd[21] or
820 ecl_phimap_loose_bwd[22] or ecl_phimap_loose_bwd[23] or ecl_phimap_loose_bwd[24] or ecl_phimap_loose_bwd[25] or
821 ecl_phimap_loose_bwd[26] or ecl_phimap_loose_bwd[27] or ecl_phimap_loose_bwd[28];
822 ecl_sectormap_bwd[3] = ecl_phimap_loose_bwd[26] or ecl_phimap_loose_bwd[27] or ecl_phimap_loose_bwd[28]
823 or ecl_phimap_loose_bwd[29] or
824 ecl_phimap_loose_bwd[30] or ecl_phimap_loose_bwd[31] or ecl_phimap_loose_bwd[32] or ecl_phimap_loose_bwd[33] or
825 ecl_phimap_loose_bwd[34] or ecl_phimap_loose_bwd[35] or ecl_phimap_loose_bwd[0];
853 std::vector<bool> phimap_i,
854 std::vector<bool> ecl_phimap_fwd,
855 std::vector<bool> ecl_phimap_bwd,
856 std::vector<bool> klm_sectormap_fwd,
857 std::vector<bool> klm_sectormap_bwd,
858 std::vector< std::vector<int> >& pattern_base0, std::vector< std::vector<int> >& pattern_base2,
862 std::vector<bool> SL0(64, 0);
863 std::vector<bool> SL1(64, 0);
864 std::vector<bool> SL2(64, 0);
865 std::vector<bool> SL3(64, 0);
866 std::vector<bool> SL4(64, 0);
867 std::vector<bool> ST0(64, 0);
868 std::vector<bool> ST0_36b(36, 0);
869 std::vector<bool> ST2(64, 0);
870 std::vector<int> patt_ID(64, -1);
872 std::vector<bool> st_ec1(64, 0);
873 std::vector<bool> st_ec1_36b(36, 0);
874 std::vector<bool> st_ec1_4b(4, 0);
875 std::vector<bool> st_ec2(64, 0);
876 std::vector<bool> st_ec2_36b(36, 0);
877 std::vector<bool> st_ec2_4b(4, 0);
880 for (
int i = 0; i < tslist.
getEntries(); i++) {
881 int id = tslist[i]->getSegmentID();
883 if (
id >= 0 * 32 &&
id < 5 * 32) {sl = 0;
id -= 0;}
884 else if (
id >= 5 * 32 &&
id < 10 * 32) {sl = 1;
id -= 5 * 32;}
885 else if (
id >= 10 * 32 &&
id < 16 * 32) {sl = 2;
id -= 10 * 32;}
886 else if (
id >= 16 * 32 &&
id < 23 * 32) {sl = 3;
id -= 16 * 32;}
887 else if (
id >= 23 * 32 &&
id < 31 * 32) {sl = 4;
id -= 23 * 32;}
891 int X = (int)(
id / 5), Y =
id % 5;
892 if (Y == 0 || Y == 1) { SL0[2 * X] =
true; }
893 else if (Y == 3 || Y == 4) { SL0[2 * X + 1] =
true; }
894 else { SL0[2 * X] =
true; SL0[2 * X + 1] =
true; }
895 }
else if (sl == 1) {
896 int X = (int)(
id / 5), Y =
id % 5;
897 if (Y == 0 || Y == 1) { SL1[2 * X] =
true; }
898 else if (Y == 3 || Y == 4) { SL1[2 * X + 1] =
true; }
899 else { SL1[2 * X] =
true; SL1[2 * X + 1] =
true; }
900 }
else if (sl == 2) {
901 int X = (int)(
id / 3);
903 }
else if (sl == 3) {
904 int X = (int)(
id / 7), Y =
id % 7;
905 if (Y == 0 || Y == 1 || Y == 2) { SL3[2 * X] =
true; }
906 else if (Y == 4 || Y == 5 || Y == 6) { SL3[2 * X + 1] =
true; }
907 else { SL3[2 * X] =
true; SL3[2 * X + 1] =
true; }
908 }
else if (sl == 4) {
909 int X = (int)(
id / 4);
916 for (
int i = 0; i < 64; i++) {
917 if (map_veto[i]) {SL0[i] =
false; SL1[i] =
false; SL2[i] =
false;}
935 std::vector< std::vector<int> > stlist_buf(0);
938 for (
int i = 0; i < 64; i++) {
945 stlist_buf.push_back({0, 0, 0, 0, 0, 0});
947 if (!SL2[i])
continue;
948 bool SL2_already_found =
false;
950 for (
int p = 0; p < 137; p++) {
953 if (p == 4)
continue;
954 if (p == 5)
continue;
955 if (p == 17)
continue;
956 if (p == 26)
continue;
957 if (p == 38)
continue;
958 if (p == 41)
continue;
959 if (p == 42)
continue;
960 if (p == 47)
continue;
961 if (p == 50)
continue;
962 if (p == 60)
continue;
963 if (p == 63)
continue;
964 if (p == 64)
continue;
965 if (p == 74)
continue;
966 if (p == 93)
continue;
967 if (p == 94)
continue;
968 if (p == 95)
continue;
969 if (p == 96)
continue;
970 if (p == 104)
continue;
971 if (p == 113)
continue;
972 if (p == 114)
continue;
973 if (p == 115)
continue;
974 if (p == 123)
continue;
975 if (p == 134)
continue;
976 if (p == 135)
continue;
977 if (p == 136)
continue;
979 int x0 = pattern_base2[p][0];
980 int x1 = pattern_base2[p][1];
981 int x3 = pattern_base2[p][2];
982 int x4 = pattern_base2[p][3];
985 if (SL2[i] && SL0[
N64(i + x0)] && SL1[
N64(i + x1)] && SL3[
N64(i + x3)] && SL4[
N64(i + x4)] && !SL2_already_found) {
992 SL2_already_found =
true;
996 if (SL2_already_found)
break;
1000 if (SL2_already_found) {
1001 stlist_buf[i][0] = 1;
1002 stlist_buf[i][1] = ID0;
1003 stlist_buf[i][2] = ID1;
1004 stlist_buf[i][3] = ID2;
1005 stlist_buf[i][4] = ID3;
1006 stlist_buf[i][5] = ID4;
1011 for (
int i = 0; i < 64; i++) {
1013 if (!SL0[i])
continue;
1014 bool SL0_already_found =
false;
1016 for (
int p = 0; p < 137; p++) {
1019 if (p == 4)
continue;
1020 if (p == 5)
continue;
1021 if (p == 17)
continue;
1022 if (p == 26)
continue;
1023 if (p == 38)
continue;
1024 if (p == 41)
continue;
1025 if (p == 42)
continue;
1026 if (p == 47)
continue;
1027 if (p == 50)
continue;
1028 if (p == 60)
continue;
1029 if (p == 63)
continue;
1030 if (p == 64)
continue;
1031 if (p == 74)
continue;
1032 if (p == 93)
continue;
1033 if (p == 94)
continue;
1034 if (p == 95)
continue;
1035 if (p == 96)
continue;
1036 if (p == 104)
continue;
1037 if (p == 113)
continue;
1038 if (p == 114)
continue;
1039 if (p == 115)
continue;
1040 if (p == 123)
continue;
1041 if (p == 134)
continue;
1042 if (p == 135)
continue;
1043 if (p == 136)
continue;
1045 int y1 = pattern_base0[p][0];
1046 int y2 = pattern_base0[p][1];
1047 int y3 = pattern_base0[p][2];
1048 int y4 = pattern_base0[p][3];
1050 if (SL0[i] && SL1[
N64(i + y1)] && SL2[
N64(i + y2)] && SL3[
N64(i + y3)] && SL4[
N64(i + y4)] && !SL0_already_found) {
1052 if (patt_ID[i] < 0) { patt_ID[i] = p; }
1053 SL0_already_found =
true;
1057 if (SL0_already_found)
break;
1064 for (
int i = 0; i < 64; i++) {
1065 if (patt_ID[i] == -1)
continue;
1067 int ec = 0, l = 0, r = 0;
1070 for (
int e = l; e <= r; e++) { st_ec1[
N64(i + e)] =
true; }
1073 for (
int e = l; e <= r; e++) { st_ec2[
N64(i + e)] =
true; }
1078 for (
int i = 0; i < 4; i++) {
1079 ST0_36b[0 + 9 * i] = ST0[0 + 16 * i] or ST0[1 + 16 * i];
1080 ST0_36b[1 + 9 * i] = ST0[1 + 16 * i] or ST0[2 + 16 * i] or ST0[3 + 16 * i];
1081 ST0_36b[2 + 9 * i] = ST0[3 + 16 * i] or ST0[4 + 16 * i] or ST0[5 + 16 * i];
1082 ST0_36b[3 + 9 * i] = ST0[5 + 16 * i] or ST0[6 + 16 * i] or ST0[7 + 16 * i];
1083 ST0_36b[4 + 9 * i] = ST0[7 + 16 * i] or ST0[8 + 16 * i];
1084 ST0_36b[5 + 9 * i] = ST0[8 + 16 * i] or ST0[9 + 16 * i] or ST0[10 + 16 * i];
1085 ST0_36b[6 + 9 * i] = ST0[10 + 16 * i] or ST0[11 + 16 * i] or ST0[12 + 16 * i];
1086 ST0_36b[7 + 9 * i] = ST0[12 + 16 * i] or ST0[13 + 16 * i] or ST0[14 + 16 * i];
1087 ST0_36b[8 + 9 * i] = ST0[14 + 16 * i] or ST0[15 + 16 * i];
1088 st_ec1_36b[0 + 9 * i] = st_ec1[0 + 16 * i] or st_ec1[1 + 16 * i];
1089 st_ec1_36b[1 + 9 * i] = st_ec1[1 + 16 * i] or st_ec1[2 + 16 * i] or st_ec1[3 + 16 * i];
1090 st_ec1_36b[2 + 9 * i] = st_ec1[3 + 16 * i] or st_ec1[4 + 16 * i] or st_ec1[5 + 16 * i];
1091 st_ec1_36b[3 + 9 * i] = st_ec1[5 + 16 * i] or st_ec1[6 + 16 * i] or st_ec1[7 + 16 * i];
1092 st_ec1_36b[4 + 9 * i] = st_ec1[7 + 16 * i] or st_ec1[8 + 16 * i];
1093 st_ec1_36b[5 + 9 * i] = st_ec1[8 + 16 * i] or st_ec1[9 + 16 * i] or st_ec1[10 + 16 * i];
1094 st_ec1_36b[6 + 9 * i] = st_ec1[10 + 16 * i] or st_ec1[11 + 16 * i] or st_ec1[12 + 16 * i];
1095 st_ec1_36b[7 + 9 * i] = st_ec1[12 + 16 * i] or st_ec1[13 + 16 * i] or st_ec1[14 + 16 * i];
1096 st_ec1_36b[8 + 9 * i] = st_ec1[14 + 16 * i] or st_ec1[15 + 16 * i];
1098 st_ec2_36b[0 + 9 * i] = st_ec2[0 + 16 * i] or st_ec2[1 + 16 * i];
1099 st_ec2_36b[1 + 9 * i] = st_ec2[1 + 16 * i] or st_ec2[2 + 16 * i] or st_ec2[3 + 16 * i];
1100 st_ec2_36b[2 + 9 * i] = st_ec2[3 + 16 * i] or st_ec2[4 + 16 * i] or st_ec2[5 + 16 * i];
1101 st_ec2_36b[3 + 9 * i] = st_ec2[5 + 16 * i] or st_ec2[6 + 16 * i] or st_ec2[7 + 16 * i];
1102 st_ec2_36b[4 + 9 * i] = st_ec2[7 + 16 * i] or st_ec2[8 + 16 * i];
1103 st_ec2_36b[5 + 9 * i] = st_ec2[8 + 16 * i] or st_ec2[9 + 16 * i] or st_ec2[10 + 16 * i];
1104 st_ec2_36b[6 + 9 * i] = st_ec2[10 + 16 * i] or st_ec2[11 + 16 * i] or st_ec2[12 + 16 * i];
1105 st_ec2_36b[7 + 9 * i] = st_ec2[12 + 16 * i] or st_ec2[13 + 16 * i] or st_ec2[14 + 16 * i];
1106 st_ec2_36b[8 + 9 * i] = st_ec2[14 + 16 * i] or st_ec2[15 + 16 * i];
1109 st_ec1_4b[0] = st_ec1_36b[35] or st_ec1_36b[0] or st_ec1_36b[1] or st_ec1_36b[2] or st_ec1_36b[3] or st_ec1_36b[4] or st_ec1_36b[5]
1110 or st_ec1_36b[6] or st_ec1_36b[7] or st_ec1_36b[8] or st_ec1_36b[9];
1111 st_ec1_4b[1] = st_ec1_36b[8] or st_ec1_36b[9] or st_ec1_36b[10] or st_ec1_36b[11] or st_ec1_36b[12] or st_ec1_36b[13]
1112 or st_ec1_36b[14] or st_ec1_36b[15] or st_ec1_36b[16] or st_ec1_36b[17] or st_ec1_36b[18] or st_ec1_36b[19];
1113 st_ec1_4b[2] = st_ec1_36b[18] or st_ec1_36b[19] or st_ec1_36b[20] or st_ec1_36b[21] or st_ec1_36b[22] or st_ec1_36b[23]
1114 or st_ec1_36b[24] or st_ec1_36b[25] or st_ec1_36b[26] or st_ec1_36b[27] or st_ec1_36b[28];
1115 st_ec1_4b[3] = st_ec1_36b[26] or st_ec1_36b[27] or st_ec1_36b[28] or st_ec1_36b[29] or st_ec1_36b[30] or st_ec1_36b[31]
1116 or st_ec1_36b[32] or st_ec1_36b[33] or st_ec1_36b[34] or st_ec1_36b[35] or st_ec1_36b[0];
1117 st_ec2_4b[0] = st_ec2_36b[35] or st_ec2_36b[0] or st_ec2_36b[1] or st_ec2_36b[2] or st_ec2_36b[3] or st_ec2_36b[4] or st_ec2_36b[5]
1118 or st_ec2_36b[6] or st_ec2_36b[7] or st_ec2_36b[8] or st_ec2_36b[9];
1119 st_ec2_4b[1] = st_ec2_36b[8] or st_ec2_36b[9] or st_ec2_36b[10] or st_ec2_36b[11] or st_ec2_36b[12] or st_ec2_36b[13]
1120 or st_ec2_36b[14] or st_ec2_36b[15] or st_ec2_36b[16] or st_ec2_36b[17] or st_ec2_36b[18] or st_ec2_36b[19];
1121 st_ec2_4b[2] = st_ec2_36b[18] or st_ec2_36b[19] or st_ec2_36b[20] or st_ec2_36b[21] or st_ec2_36b[22] or st_ec2_36b[23]
1122 or st_ec2_36b[24] or st_ec2_36b[25] or st_ec2_36b[26] or st_ec2_36b[27] or st_ec2_36b[28];
1123 st_ec2_4b[3] = st_ec2_36b[26] or st_ec2_36b[27] or st_ec2_36b[28] or st_ec2_36b[29] or st_ec2_36b[30] or st_ec2_36b[31]
1124 or st_ec2_36b[32] or st_ec2_36b[33] or st_ec2_36b[34] or st_ec2_36b[35] or st_ec2_36b[0];
1150 for (
int i = 0; i < 64; i++) {
1154 int L = i - 1,
R = i + 1;
1155 while (ST2[
N64(L)]) {
1156 ST2[
N64(L)] =
false;
1159 while (ST2[
N64(
R)]) {
1160 ST2[
N64(
R)] =
false;
1166 int index =
N64((L +
R) / 2);
1168 st->set_TS_ID(0, stlist_buf[index][1]);
1169 st->set_TS_ID(1, stlist_buf[index][2]);
1170 st->set_TS_ID(2, stlist_buf[index][3]);
1171 st->set_TS_ID(3, stlist_buf[index][4]);
1172 st->set_TS_ID(4, stlist_buf[index][5]);
1175 for (
int i = 0; i < 64; i++) {
1176 if (st_ec1[i]) N_ST_fwd++;
1178 for (
int i = 0; i < 64; i++) {
1179 if (st_ec2[i]) N_ST_bwd++;
1183 for (
int i = 0; i < 36; i++) {
1184 s2s3 = (ST0_36b[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)])) or s2s3;
1185 s2s5 = (ST0_36b[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)]
1186 or ST0_36b[
N36(i + 16)] or ST0_36b[
N36(i + 20)])) or s2s5;
1187 s2so = (ST0_36b[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)]
1188 or ST0_36b[
N36(i + 16)] or ST0_36b[
N36(i + 20)]
1189 or ST0_36b[
N36(i + 15)] or ST0_36b[
N36(i + 21)]
1190 or ST0_36b[
N36(i + 14)] or ST0_36b[
N36(i + 22)]
1191 or ST0_36b[
N36(i + 13)] or ST0_36b[
N36(i + 23)]
1192 or ST0_36b[
N36(i + 12)] or ST0_36b[
N36(i + 24)]
1193 or ST0_36b[
N36(i + 11)] or ST0_36b[
N36(i + 25)]
1194 or ST0_36b[
N36(i + 10)] or ST0_36b[
N36(i + 26)]
1195 or ST0_36b[
N36(i + 9)] or ST0_36b[
N36(i + 27)])) or s2so ;
1196 s2s30 = (ST0_36b[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)]
1197 or ST0_36b[
N36(i + 16)] or ST0_36b[
N36(i + 20)]
1198 or ST0_36b[
N36(i + 15)] or ST0_36b[
N36(i + 21)]
1199 or ST0_36b[
N36(i + 14)] or ST0_36b[
N36(i + 22)]
1200 or ST0_36b[
N36(i + 13)] or ST0_36b[
N36(i + 23)]
1201 or ST0_36b[
N36(i + 12)] or ST0_36b[
N36(i + 24)]
1202 or ST0_36b[
N36(i + 11)] or ST0_36b[
N36(i + 25)]
1203 or ST0_36b[
N36(i + 10)] or ST0_36b[
N36(i + 26)]
1204 or ST0_36b[
N36(i + 9)] or ST0_36b[
N36(i + 27)]
1205 or ST0_36b[
N36(i + 8)] or ST0_36b[
N36(i + 28)]
1206 or ST0_36b[
N36(i + 7)] or ST0_36b[
N36(i + 29)]
1207 or ST0_36b[
N36(i + 6)] or ST0_36b[
N36(i + 30)]
1208 or ST0_36b[
N36(i + 5)] or ST0_36b[
N36(i + 31)]
1209 or ST0_36b[
N36(i + 4)] or ST0_36b[
N36(i + 32)]
1210 or ST0_36b[
N36(i + 3)] or ST0_36b[
N36(i + 33)])) or s2s30 ;
1213 s2f3 = (phimap_i[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)])) or s2f3;
1214 s2f5 = (phimap_i[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)]
1215 or ST0_36b[
N36(i + 16)] or ST0_36b[
N36(i + 20)])) or s2f5;
1216 s2fo = (phimap_i[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)]
1217 or ST0_36b[
N36(i + 16)] or ST0_36b[
N36(i + 20)]
1218 or ST0_36b[
N36(i + 15)] or ST0_36b[
N36(i + 21)]
1219 or ST0_36b[
N36(i + 14)] or ST0_36b[
N36(i + 22)]
1220 or ST0_36b[
N36(i + 13)] or ST0_36b[
N36(i + 23)]
1221 or ST0_36b[
N36(i + 12)] or ST0_36b[
N36(i + 24)]
1222 or ST0_36b[
N36(i + 11)] or ST0_36b[
N36(i + 25)]
1223 or ST0_36b[
N36(i + 10)] or ST0_36b[
N36(i + 26)]
1224 or ST0_36b[
N36(i + 9)] or ST0_36b[
N36(i + 27)])) or s2fo ;
1225 s2f30 = (phimap_i[i] and (ST0_36b[
N36(i + 18)] or ST0_36b[
N36(i + 17)] or ST0_36b[
N36(i + 19)]
1226 or ST0_36b[
N36(i + 16)] or ST0_36b[
N36(i + 20)]
1227 or ST0_36b[
N36(i + 15)] or ST0_36b[
N36(i + 21)]
1228 or ST0_36b[
N36(i + 14)] or ST0_36b[
N36(i + 22)]
1229 or ST0_36b[
N36(i + 13)] or ST0_36b[
N36(i + 23)]
1230 or ST0_36b[
N36(i + 12)] or ST0_36b[
N36(i + 24)]
1231 or ST0_36b[
N36(i + 11)] or ST0_36b[
N36(i + 25)]
1232 or ST0_36b[
N36(i + 10)] or ST0_36b[
N36(i + 26)]
1233 or ST0_36b[
N36(i + 9)] or ST0_36b[
N36(i + 27)]
1234 or ST0_36b[
N36(i + 8)] or ST0_36b[
N36(i + 28)]
1235 or ST0_36b[
N36(i + 7)] or ST0_36b[
N36(i + 29)]
1236 or ST0_36b[
N36(i + 6)] or ST0_36b[
N36(i + 30)]
1237 or ST0_36b[
N36(i + 5)] or ST0_36b[
N36(i + 31)]
1238 or ST0_36b[
N36(i + 4)] or ST0_36b[
N36(i + 32)]
1239 or ST0_36b[
N36(i + 3)] or ST0_36b[
N36(i + 33)])) or s2f30 ;
1244 for (
int i = 0; i < 36; i++) {
1245 if (ecl_phimap_fwd[i] and st_ec1_36b[i])secl_fwd++;
1247 for (
int i = 0; i < 36; i++) {
1248 if (ecl_phimap_bwd[i] and st_ec2_36b[i])secl_bwd++;
1250 secl = secl_fwd + secl_bwd;
1253 for (
int i = 0; i < 4; i++) {
1254 if (klm_sectormap_fwd[i] and st_ec1_4b[i])sklm_fwd++;
1256 for (
int i = 0; i < 4; i++) {
1257 if (klm_sectormap_bwd[i] and st_ec2_4b[i])sklm_bwd++;
1259 sklm = sklm_fwd + sklm_bwd;
1262 trgInfo->setNshorttrk(N_ST);
1263 trgInfo->setNshorttrk_fwd(N_ST_fwd);
1264 trgInfo->setNshorttrk_bwd(N_ST_bwd);
1265 trgInfo->sets2s3(s2s3);
1266 trgInfo->sets2s5(s2s5);
1267 trgInfo->sets2so(s2so);
1268 trgInfo->sets2s30(s2s30);
1269 trgInfo->sets2f3(s2f3);
1270 trgInfo->sets2f5(s2f5);
1271 trgInfo->sets2fo(s2fo);
1272 trgInfo->sets2f30(s2f30);
1273 trgInfo->setbwdsb(0);
1274 trgInfo->setbwdnb(0);
1275 trgInfo->setfwdsb(0);
1276 trgInfo->setfwdnb(0);
1277 trgInfo->setbrlfb(0);
1278 trgInfo->setbrlnb(0);
1279 trgInfo->setNsecl(secl);
1280 trgInfo->setNsecl_fwd(secl_fwd);
1281 trgInfo->setNsecl_bwd(secl_bwd);
1282 trgInfo->setNsklm(sklm);
1283 trgInfo->setNsklm_fwd(sklm_fwd);
1284 trgInfo->setNsklm_bwd(sklm_bwd);
1533 if (pattern == 6) {ec = 1; l = 0; r = 1;}
1534 if (pattern == 7) {ec = 1; l = 0; r = 1;}
1535 if (pattern == 8) {ec = 1; l = 0; r = 1;}
1536 if (pattern == 9) {ec = 1; l = 0; r = 2;}
1537 if (pattern == 10) {ec = 1; l = 0; r = 2;}
1538 if (pattern == 11) {ec = 1; l = 0; r = 1;}
1539 if (pattern == 12) {ec = 1; l = 0; r = 2;}
1540 if (pattern == 18) {ec = 1; l = 0; r = 2;}
1541 if (pattern == 19) {ec = 1; l = 0; r = 2;}
1542 if (pattern == 20) {ec = 1; l = 0; r = 4;}
1543 if (pattern == 21) {ec = 1; l = 0; r = 4;}
1544 if (pattern == 28) {ec = 1; l = -4; r = 0;}
1545 if (pattern == 29) {ec = 1; l = -3; r = 0;}
1546 if (pattern == 34) {ec = 1; l = 0; r = 1;}
1547 if (pattern == 35) {ec = 1; l = 0; r = 3;}
1548 if (pattern == 36) {ec = 1; l = 1; r = 3;}
1549 if (pattern == 37) {ec = 1; l = 0; r = 3;}
1550 if (pattern == 44) {ec = 1; l = -4; r = 0;}
1551 if (pattern == 45) {ec = 1; l = -2; r = 0;}
1552 if (pattern == 46) {ec = 1; l = -3; r = 0;}
1553 if (pattern == 54) {ec = 1; l = 1; r = 7;}
1554 if (pattern == 55) {ec = 1; l = 1; r = 6;}
1555 if (pattern == 56) {ec = 1; l = 1; r = 5;}
1556 if (pattern == 57) {ec = 1; l = 1; r = 5;}
1557 if (pattern == 64) {ec = 1; l = -6; r = -1;}
1558 if (pattern == 73) {ec = 1; l = 3; r = 13;}
1559 if (pattern == 81) {ec = 1; l = -10; r = -3;}
1560 if (pattern == 86) {ec = 1; l = 3; r = 12;}
1561 if (pattern == 87) {ec = 1; l = 3; r = 6;}
1562 if (pattern == 100) {ec = 1; l = 7; r = 20;}
1563 if (pattern == 101) {ec = 1; l = 5; r = 20;}
1564 if (pattern == 102) {ec = 1; l = 5; r = 20;}
1565 if (pattern == 103) {ec = 1; l = 4; r = 14;}
1566 if (pattern == 111) {ec = 1; l = -12; r = -5;}
1567 if (pattern == 112) {ec = 1; l = -18; r = -5;}
1568 if (pattern == 116) {ec = 1; l = -11; r = -6;}
1569 if (pattern == 120) {ec = 1; l = 7; r = 21;}
1570 if (pattern == 121) {ec = 1; l = 7; r = 14;}
1571 if (pattern == 122) {ec = 1; l = 7; r = 21;}
1572 if (pattern == 127) {ec = 1; l = -21; r = -8;}
1573 if (pattern == 128) {ec = 1; l = -15; r = -7;}
1574 if (pattern == 129) {ec = 1; l = -12; r = -7;}
1575 if (pattern == 132) {ec = 1; l = 10; r = 18;}
1576 if (pattern == 133) {ec = 1; l = 8; r = 18;}
1578 if (pattern == 0) {ec = 2; l = -3; r = 1;}
1579 if (pattern == 1) {ec = 2; l = -3; r = 1;}
1580 if (pattern == 3) {ec = 2; l = -3; r = 0;}
1581 if (pattern == 13) {ec = 2; l = 0; r = 3;}
1582 if (pattern == 14) {ec = 2; l = 0; r = 4;}
1583 if (pattern == 15) {ec = 2; l = 0; r = 5;}
1584 if (pattern == 22) {ec = 2; l = -4; r = -1;}
1585 if (pattern == 23) {ec = 2; l = -5; r = -1;}
1586 if (pattern == 24) {ec = 2; l = -3; r = 0;}
1587 if (pattern == 25) {ec = 2; l = -4; r = 0;}
1588 if (pattern == 30) {ec = 2; l = 1; r = 5;}
1589 if (pattern == 39) {ec = 2; l = -2; r = 0;}
1590 if (pattern == 40) {ec = 2; l = -2; r = 0;}
1591 if (pattern == 48) {ec = 2; l = 2; r = 6;}
1592 if (pattern == 49) {ec = 2; l = 3; r = 8;}
1593 if (pattern == 58) {ec = 2; l = -9; r = -3;}
1594 if (pattern == 59) {ec = 2; l = -9; r = -3;}
1595 if (pattern == 67) {ec = 2; l = 5; r = 11;}
1596 if (pattern == 75) {ec = 2; l = -13; r = -6;}
1597 if (pattern == 82) {ec = 2; l = 5; r = 9;}
1598 if (pattern == 83) {ec = 2; l = 5; r = 9;}
1599 if (pattern == 89) {ec = 2; l = -10; r = -4;}
1600 if (pattern == 92) {ec = 2; l = -10; r = -4;}
1601 if (pattern == 97) {ec = 2; l = 7; r = 19;}
1602 if (pattern == 105) {ec = 2; l = -16; r = -10;}
1603 if (pattern == 106) {ec = 2; l = -17; r = -7;}
1604 if (pattern == 109) {ec = 2; l = -17; r = -6;}
1605 if (pattern == 111) {ec = 2; l = -16; r = -7;}
1606 if (pattern == 117) {ec = 2; l = 9; r = 19;}
1607 if (pattern == 118) {ec = 2; l = 9; r = 19;}
1608 if (pattern == 124) {ec = 2; l = -17; r = -8;}
1609 if (pattern == 125) {ec = 2; l = -17; r = -8;}
1610 if (pattern == 126) {ec = 2; l = -17; r = -8;}