10#include "G4LogicalVolume.hh"
36 for(
unsigned int i=0; i<5; i++ ) {
43 if( m_tofData1.size()>0 ) {
44 std::vector<TofData*>::iterator iter1 = m_tofData1.begin();
47 if( m_tofData2.size()>0 ) {
48 std::vector<TofData*>::iterator iter2 = m_tofData2.begin();
51 if( m_tofData3.size()>0 ) {
52 std::vector<TofData*>::iterator iter3 = m_tofData3.begin();
55 if( m_tofData4.size()>0 ) {
56 std::vector<TofData*>::iterator iter4 = m_tofData4.begin();
74 for(
unsigned int i=0; i<5; i++ ) {
82 m_sigma_mrpc[i]=-999.0;
106 for(
unsigned int i=0; i<5; i++ ) {
107 m_texpInner[i] = -999.0;
108 m_texpOuter[i] = -999.0;
122 m_corresponding_time=-999.0;
123 t_trans_with_extrap=
false;
124 t_trans_with_dbs=
false;
129 m_stripidentifier=-999;;
135 m_simulated_transtime=-999;;
149 if( m_tofData1.size()>0 ) {
150 std::vector<TofData*>::iterator iter1 = m_tofData1.begin();
153 if( m_tofData2.size()>0 ) {
154 std::vector<TofData*>::iterator iter2 = m_tofData2.begin();
157 if( m_tofData3.size()>0 ) {
158 std::vector<TofData*>::iterator iter3 = m_tofData3.begin();
161 if( m_tofData4.size()>0 ) {
162 std::vector<TofData*>::iterator iter4 = m_tofData4.begin();
188 if(tof1volumename ==
"logical_sensitive_detector_east_1")
206 else if(tof1volumename ==
"logical_sensitive_detector_east_2")
222 else if(tof1volumename ==
"logical_sensitive_detector_west_1")
238 else if(tof1volumename ==
"logical_sensitive_detector_west_2")
253 else if(
tofId1>=0 &&
tofId1<=87 && ( tof1volumename.contains(
"ScinBr") || tof1volumename.contains(
"ScinEc") || tof2volumename.contains(
"ScinBr") || tof2volumename.contains(
"ScinEc") ))
260 else if(
tofId1>=176 &&
tofId1<=223 && ( tof1volumename.contains(
"ScinBr") || tof1volumename.contains(
"ScinEc") || tof2volumename.contains(
"ScinBr") || tof2volumename.contains(
"ScinEc" ) ))
262 m_id1 =
tofId1 - 176 + 48;
268 else if(
tofId1>=224 &&
tofId1<=271 && ( tof1volumename.contains(
"ScinBr") || tof1volumename.contains(
"ScinEc") || tof2volumename.contains(
"ScinBr") || tof2volumename.contains(
"ScinEc") )) {
269 m_id1 =
tofId1 - 176 - 48;
283 if(
tofId2>=88 &&
tofId2<=175 && ( tof1volumename.contains(
"ScinBr") || tof1volumename.contains(
"ScinEc") || tof2volumename.contains(
"ScinBr") || tof2volumename.contains(
"ScinEc") )) {
289 else if( m_hitCase==
NoHit ) {
296 m_trackId = extTrack->
trackId();
300 for(
unsigned int i=0; i<5; i++ ) {
301 m_texpInner[i] = extTrack->
tof1(i);
310 for(
unsigned int i=0; i<5; i++ ) {
317 for(
unsigned int i=0; i<5; i++ ) {
318 m_texpInner[i] = extTrack->
tof1(i);
328 for(
unsigned int i=0; i<5; i++ ) {
337 for(
unsigned int i=0; i<5; i++ ) {
338 m_texpOuter[i] = extTrack->
tof2(i);
345 for(
unsigned int i=0; i<5; i++ ) {
351 if( m_hitCase ==
NoHit ) { m_quality = 11; }
353 for(
unsigned int i=0; i<5; i++ ) {
372 if( (
abs(m_id1-track->
id1())<=1 ) || ( m_id1==0 && track->
id1()==87 ) || ( m_id1==87 && track->
id1()==0 ) ) {
374 m_quality1 = ( m_quality1 | 0x400 );
379 if( (
abs(m_id2-track->
id2())<=1 ) || ( m_id2==88 && track->
id2()==175 ) || ( m_id2==175 && track->
id2()==88 ) ) {
381 m_quality2 = ( m_quality2 | 0x400 );
388 if( (
abs(m_id1-track->
id1())<=1 ) || ( m_id1==0 && track->
id1()==47 ) || ( m_id1==47 && track->
id1()==0 ) ) {
390 m_quality1 = ( m_quality1 | 0x400 );
396 if( (
abs(m_id1-track->
id1())<=1 ) || ( m_id1==48 && track->
id1()==95 ) || ( m_id1==95 && track->
id1()==48 ) ) {
398 m_quality1 = ( m_quality1 | 0x400 );
423 if( m_hitCase ==
NoHit )
return;
425 if(
mrpc_dbs_debug_counter) std::cout <<
"---------------- BEGIN EVENT -> mrpc_dbs_debug_counter ------------------------" << std::endl;
431 unsigned int identify0 = 0x0000c000;
432 unsigned int identify1 = 0x0000c000;
433 unsigned int identify2 = 0x0000c000;
434 unsigned int count0 = 0;
435 unsigned int count1 = 0;
436 unsigned int count2 = 0;
439 unsigned int identify_it_o=0x0000c000;
440 unsigned int identify_it_e=0x0000c000;
445 unsigned int identify_u_o =0x0000c000;
446 unsigned int identify_b_o =0x0000c000;
447 unsigned int identify_u_e =0x0000c000;
448 unsigned int identify_b_e =0x0000c000;
453 unsigned int identify_l_o =0x0000c000;
454 unsigned int identify_lu_o=0x0000c000;
455 unsigned int identify_lb_o=0x0000c000;
456 unsigned int identify_r_o =0x0000c000;
457 unsigned int identify_ru_o=0x0000c000;
458 unsigned int identify_rb_o=0x0000c000;
459 unsigned int identify_l_e =0x0000c000;
460 unsigned int identify_lu_e=0x0000c000;
461 unsigned int identify_lb_e=0x0000c000;
462 unsigned int identify_r_e =0x0000c000;
463 unsigned int identify_ru_e=0x0000c000;
464 unsigned int identify_rb_e=0x0000c000;
470 unsigned int identify_if4_it_e=0x0000c000;
471 unsigned int identify_if4_m1_e=0x0000c000;
472 unsigned int identify_if4_m2_e=0x0000c000;
473 unsigned int identify_if4_m3_e=0x0000c000;
474 unsigned int identify_if4_m4_e=0x0000c000;
475 unsigned int identify_if4_m5_e=0x0000c000;
476 unsigned int identify_if4_m6_e=0x0000c000;
477 unsigned int identify_if4_m7_e=0x0000c000;
478 unsigned int identify_if4_m8_e=0x0000c000;
479 unsigned int identify_if4_m9_e=0x0000c000;
480 unsigned int identify_if4_m10_e=0x0000c000;
481 unsigned int identify_if4_m11_e=0x0000c000;
482 unsigned int identify_if4_m12_e=0x0000c000;
483 unsigned int identify_if4_it_o=0x0000c000;
484 unsigned int identify_if4_m1_o=0x0000c000;
485 unsigned int identify_if4_m2_o=0x0000c000;
486 unsigned int identify_if4_m3_o=0x0000c000;
487 unsigned int identify_if4_m4_o=0x0000c000;
488 unsigned int identify_if4_m5_o=0x0000c000;
489 unsigned int identify_if4_m6_o=0x0000c000;
490 unsigned int identify_if4_m7_o=0x0000c000;
491 unsigned int identify_if4_m8_o=0x0000c000;
492 unsigned int identify_if4_m9_o=0x0000c000;
493 unsigned int identify_if4_m10_o=0x0000c000;
494 unsigned int identify_if4_m11_o=0x0000c000;
495 unsigned int identify_if4_m12_o=0x0000c000;
501 unsigned int identify_if5_it_o=0x0000c000;
502 unsigned int identify_if5_m1_o=0x0000c000;
503 unsigned int identify_if5_m2_o=0x0000c000;
504 unsigned int identify_if5_m3_o=0x0000c000;
505 unsigned int identify_if5_m4_o=0x0000c000;
506 unsigned int identify_if5_m5_o=0x0000c000;
507 unsigned int identify_if5_m6_o=0x0000c000;
508 unsigned int identify_if5_m7_o=0x0000c000;
509 unsigned int identify_if5_m8_o=0x0000c000;
510 unsigned int identify_if5_m9_o=0x0000c000;
511 unsigned int identify_if5_m10_o=0x0000c000;
512 unsigned int identify_if5_m11_o=0x0000c000;
513 unsigned int identify_if5_m12_o=0x0000c000;
514 unsigned int identify_if5_l1_o=0x0000c000;
515 unsigned int identify_if5_l2_o=0x0000c000;
516 unsigned int identify_if5_l3_o=0x0000c000;
517 unsigned int identify_if5_l4_o=0x0000c000;
518 unsigned int identify_if5_l5_o=0x0000c000;
519 unsigned int identify_if5_l6_o=0x0000c000;
520 unsigned int identify_if5_l7_o=0x0000c000;
521 unsigned int identify_if5_l8_o=0x0000c000;
522 unsigned int identify_if5_l9_o=0x0000c000;
523 unsigned int identify_if5_l10_o=0x0000c000;
524 unsigned int identify_if5_l11_o=0x0000c000;
525 unsigned int identify_if5_l12_o=0x0000c000;
526 unsigned int identify_if5_r1_o=0x0000c000;
527 unsigned int identify_if5_r2_o=0x0000c000;
528 unsigned int identify_if5_r3_o=0x0000c000;
529 unsigned int identify_if5_r4_o=0x0000c000;
530 unsigned int identify_if5_r5_o=0x0000c000;
531 unsigned int identify_if5_r6_o=0x0000c000;
532 unsigned int identify_if5_r7_o=0x0000c000;
533 unsigned int identify_if5_r8_o=0x0000c000;
534 unsigned int identify_if5_r9_o=0x0000c000;
535 unsigned int identify_if5_r10_o=0x0000c000;
536 unsigned int identify_if5_r11_o=0x0000c000;
537 unsigned int identify_if5_r12_o=0x0000c000;
538 unsigned int identify_if5_it_e=0x0000c000;
539 unsigned int identify_if5_m1_e=0x0000c000;
540 unsigned int identify_if5_m2_e=0x0000c000;
541 unsigned int identify_if5_m3_e=0x0000c000;
542 unsigned int identify_if5_m4_e=0x0000c000;
543 unsigned int identify_if5_m5_e=0x0000c000;
544 unsigned int identify_if5_m6_e=0x0000c000;
545 unsigned int identify_if5_m7_e=0x0000c000;
546 unsigned int identify_if5_m8_e=0x0000c000;
547 unsigned int identify_if5_m9_e=0x0000c000;
548 unsigned int identify_if5_m10_e=0x0000c000;
549 unsigned int identify_if5_m11_e=0x0000c000;
550 unsigned int identify_if5_m12_e=0x0000c000;
551 unsigned int identify_if5_l1_e=0x0000c000;
552 unsigned int identify_if5_l2_e=0x0000c000;
553 unsigned int identify_if5_l3_e=0x0000c000;
554 unsigned int identify_if5_l4_e=0x0000c000;
555 unsigned int identify_if5_l5_e=0x0000c000;
556 unsigned int identify_if5_l6_e=0x0000c000;
557 unsigned int identify_if5_l7_e=0x0000c000;
558 unsigned int identify_if5_l8_e=0x0000c000;
559 unsigned int identify_if5_l9_e=0x0000c000;
560 unsigned int identify_if5_l10_e=0x0000c000;
561 unsigned int identify_if5_l11_e=0x0000c000;
562 unsigned int identify_if5_l12_e=0x0000c000;
563 unsigned int identify_if5_r1_e=0x0000c000;
564 unsigned int identify_if5_r2_e=0x0000c000;
565 unsigned int identify_if5_r3_e=0x0000c000;
566 unsigned int identify_if5_r4_e=0x0000c000;
567 unsigned int identify_if5_r5_e=0x0000c000;
568 unsigned int identify_if5_r6_e=0x0000c000;
569 unsigned int identify_if5_r7_e=0x0000c000;
570 unsigned int identify_if5_r8_e=0x0000c000;
571 unsigned int identify_if5_r9_e=0x0000c000;
572 unsigned int identify_if5_r10_e=0x0000c000;
573 unsigned int identify_if5_r11_e=0x0000c000;
574 unsigned int identify_if5_r12_e=0x0000c000;
577 unsigned int count_it=0;
579 unsigned int count_u =0;
580 unsigned int count_b =0;
582 unsigned int count_l =0;
583 unsigned int count_lu=0;
584 unsigned int count_lb=0;
585 unsigned int count_r =0;
586 unsigned int count_ru=0;
587 unsigned int count_rb=0;
589 unsigned int count_if4_m1=0;
unsigned int count_if4_m2=0;
unsigned int count_if4_m3=0;
unsigned int count_if4_m4=0;
unsigned int count_if4_m5=0;
unsigned int count_if4_m6=0;
unsigned int count_if4_m7=0;
590 unsigned int count_if4_m8=0;
unsigned int count_if4_m9=0;
unsigned int count_if4_m10=0;
unsigned int count_if4_m11=0;
unsigned int count_if4_m12=0;
592 unsigned int count_if5_m1=0;
unsigned int count_if5_m2=0;
unsigned int count_if5_m3=0;
unsigned int count_if5_m4=0;
unsigned int count_if5_m5=0;
unsigned int count_if5_m6=0;
unsigned int count_if5_m7=0;
593 unsigned int count_if5_m8=0;
unsigned int count_if5_m9=0;
unsigned int count_if5_m10=0;
unsigned int count_if5_m11=0;
unsigned int count_if5_m12=0;
unsigned int count_if5_l1=0;
unsigned int count_if5_l2=0;
594 unsigned int count_if5_l3=0;
unsigned int count_if5_l4=0;
unsigned int count_if5_l5=0;
unsigned int count_if5_l6=0;
unsigned int count_if5_l7=0;
unsigned int count_if5_l8=0;
unsigned int count_if5_l9=0;
595 unsigned int count_if5_l10=0;
unsigned int count_if5_l11=0;
unsigned int count_if5_l12=0;
unsigned int count_if5_r1=0;
unsigned int count_if5_r2=0;
unsigned int count_if5_r3=0;
unsigned int count_if5_r4=0;
596 unsigned int count_if5_r5=0;
unsigned int count_if5_r6=0;
unsigned int count_if5_r7=0;
unsigned int count_if5_r8=0;
unsigned int count_if5_r9=0;
unsigned int count_if5_r10=0;
unsigned int count_if5_r11=0;
597 unsigned int count_if5_r12=0;
600 unsigned int count_it_e=0;
602 unsigned int count_u_e=0;
603 unsigned int count_b_e=0;
605 unsigned int count_l_e=0;
606 unsigned int count_lu_e=0;
607 unsigned int count_lb_e=0;
608 unsigned int count_r_e=0;
609 unsigned int count_ru_e=0;
610 unsigned int count_rb_e=0;
612 unsigned int count_if4_m1_e=0;
unsigned int count_if4_m2_e=0;
unsigned int count_if4_m3_e=0;
unsigned int count_if4_m4_e=0;
unsigned int count_if4_m5_e=0;
unsigned int count_if4_m6_e=0;
unsigned int count_if4_m7_e=0;
613 unsigned int count_if4_m8_e=0;
unsigned int count_if4_m9_e=0;
unsigned int count_if4_m10_e=0;
unsigned int count_if4_m11_e=0;
unsigned int count_if4_m12_e=0;
615 unsigned int count_if5_m1_e=0;
unsigned int count_if5_m2_e=0;
unsigned int count_if5_m3_e=0;
unsigned int count_if5_m4_e=0;
unsigned int count_if5_m5_e=0;
unsigned int count_if5_m6_e=0;
unsigned int count_if5_m7_e=0;
616 unsigned int count_if5_m8_e=0;
unsigned int count_if5_m9_e=0;
unsigned int count_if5_m10_e=0;
unsigned int count_if5_m11_e=0;
unsigned int count_if5_m12_e=0;
unsigned int count_if5_l1_e=0;
unsigned int count_if5_l2_e=0;
617 unsigned int count_if5_l3_e=0;
unsigned int count_if5_l4_e=0;
unsigned int count_if5_l5_e=0;
unsigned int count_if5_l6_e=0;
unsigned int count_if5_l7_e=0;
unsigned int count_if5_l8_e=0;
unsigned int count_if5_l9_e=0;
618 unsigned int count_if5_l10_e=0;
unsigned int count_if5_l11_e=0;
unsigned int count_if5_l12_e=0;
unsigned int count_if5_r1_e=0;
unsigned int count_if5_r2_e=0;
unsigned int count_if5_r3_e=0;
unsigned int count_if5_r4_e=0;
619 unsigned int count_if5_r5_e=0;
unsigned int count_if5_r6_e=0;
unsigned int count_if5_r7_e=0;
unsigned int count_if5_r8_e=0;
unsigned int count_if5_r9_e=0;
unsigned int count_if5_r10_e=0;
unsigned int count_if5_r11_e=0;
620 unsigned int count_if5_r12_e=0;
622 unsigned int count_it_o=0;
624 unsigned int count_u_o=0;
625 unsigned int count_b_o=0;
627 unsigned int count_l_o=0;
628 unsigned int count_lu_o=0;
629 unsigned int count_lb_o=0;
630 unsigned int count_r_o=0;
631 unsigned int count_ru_o=0;
632 unsigned int count_rb_o=0;
634 unsigned int count_if4_m1_o=0;
unsigned int count_if4_m2_o=0;
unsigned int count_if4_m3_o=0;
unsigned int count_if4_m4_o=0;
unsigned int count_if4_m5_o=0;
unsigned int count_if4_m6_o=0;
unsigned int count_if4_m7_o=0;
635 unsigned int count_if4_m8_o=0;
unsigned int count_if4_m9_o=0;
unsigned int count_if4_m10_o=0;
unsigned int count_if4_m11_o=0;
unsigned int count_if4_m12_o=0;
637 unsigned int count_if5_m1_o=0;
unsigned int count_if5_m2_o=0;
unsigned int count_if5_m3_o=0;
unsigned int count_if5_m4_o=0;
unsigned int count_if5_m5_o=0;
unsigned int count_if5_m6_o=0;
unsigned int count_if5_m7_o=0;
638 unsigned int count_if5_m8_o=0;
unsigned int count_if5_m9_o=0;
unsigned int count_if5_m10_o=0;
unsigned int count_if5_m11_o=0;
unsigned int count_if5_m12_o=0;
unsigned int count_if5_l1_o=0;
unsigned int count_if5_l2_o=0;
639 unsigned int count_if5_l3_o=0;
unsigned int count_if5_l4_o=0;
unsigned int count_if5_l5_o=0;
unsigned int count_if5_l6_o=0;
unsigned int count_if5_l7_o=0;
unsigned int count_if5_l8_o=0;
unsigned int count_if5_l9_o=0;
640 unsigned int count_if5_l10_o=0;
unsigned int count_if5_l11_o=0;
unsigned int count_if5_l12_o=0;
unsigned int count_if5_r1_o=0;
unsigned int count_if5_r2_o=0;
unsigned int count_if5_r3_o=0;
unsigned int count_if5_r4_o=0;
641 unsigned int count_if5_r5_o=0;
unsigned int count_if5_r6_o=0;
unsigned int count_if5_r7_o=0;
unsigned int count_if5_r8_o=0;
unsigned int count_if5_r9_o=0;
unsigned int count_if5_r10_o=0;
unsigned int count_if5_r11_o=0;
642 unsigned int count_if5_r12_o=0;
651 int tofid_help=m_id1;
668 if(this_partID==0){ cout <<
"MRPCDBSREC --- MrpcDBSTrack --- Fatal Error: PartID is not existing ---> " << this_partID << endl;
return; }
673 count_it_o = tofDataMap.count(identify_it_o);
674 count_it_e = tofDataMap.count(identify_it_e);
675 count_it=count_it_o+count_it_e;
700 int module_help_lu =module_help_l;
701 int partid_lu = partid_l;
702 int strip_lu_help_12=strip_u_help_12;
704 int module_help_lb = module_help_l;
705 int partid_lb =partid_l;
706 int strip_lb_help_12=strip_b_help_12;
708 int module_help_ru = module_help_r;
709 int partid_ru = partid_r;
710 int strip_ru_help_12=strip_u_help_12;
712 int module_help_rb = module_help_r;
713 int partid_rb = partid_r;
714 int strip_rb_help_12=strip_b_help_12;
741 if( (neighborhood==2) || (neighborhood==3))
745 count_u_e = tofDataMap.count(identify_u_e);
746 count_u_o = tofDataMap.count(identify_u_o);
747 count_u = count_u_e + count_u_o;
751 count_b_e = tofDataMap.count(identify_b_e);
752 count_b_o = tofDataMap.count(identify_b_o);
753 count_b= count_b_e + count_b_o;
757 if((neighborhood==3))
761 count_l_e = tofDataMap.count(identify_l_e);
762 count_l_o = tofDataMap.count(identify_l_o);
763 count_l= count_l_e + count_l_o;
768 count_r_e = tofDataMap.count(identify_r_e);
769 count_r_o = tofDataMap.count(identify_r_o);
770 count_r= count_r_e + count_r_o;
776 count_lu_e = tofDataMap.count(identify_lu_e);
777 count_lu_o = tofDataMap.count(identify_lu_o);
778 count_lu= count_lu_e + count_lu_o;
783 count_lb_e = tofDataMap.count(identify_lb_e);
784 count_lb_o = tofDataMap.count(identify_lb_o);
785 count_lb= count_lb_e + count_lb_o;
790 count_ru_e = tofDataMap.count(identify_ru_e);
791 count_ru_o = tofDataMap.count(identify_ru_o);
792 count_ru= count_ru_e + count_ru_o;
797 count_rb = tofDataMap.count(identify_rb_e) + tofDataMap.count(identify_rb_o);
798 count_rb_e = tofDataMap.count(identify_rb_e);
799 count_rb_o = tofDataMap.count(identify_rb_o);
800 count_rb= count_rb_e + count_rb_o;
805 if((neighborhood==4))
839 if( (identify_it_e!=identify_if4_m1_e) ) count_if4_m1_e= tofDataMap.count(identify_if4_m1_e);
840 if( (identify_it_e!=identify_if4_m2_e) ) count_if4_m2_e= tofDataMap.count(identify_if4_m2_e);
841 if( (identify_it_e!=identify_if4_m3_e) ) count_if4_m3_e= tofDataMap.count(identify_if4_m3_e);
842 if( (identify_it_e!=identify_if4_m4_e) ) count_if4_m4_e= tofDataMap.count(identify_if4_m4_e);
843 if( (identify_it_e!=identify_if4_m5_e) ) count_if4_m5_e= tofDataMap.count(identify_if4_m5_e);
844 if( (identify_it_e!=identify_if4_m6_e) ) count_if4_m6_e= tofDataMap.count(identify_if4_m6_e);
845 if( (identify_it_e!=identify_if4_m7_e) ) count_if4_m7_e= tofDataMap.count(identify_if4_m7_e);
846 if( (identify_it_e!=identify_if4_m8_e) ) count_if4_m8_e= tofDataMap.count(identify_if4_m8_e);
847 if( (identify_it_e!=identify_if4_m9_e) ) count_if4_m9_e= tofDataMap.count(identify_if4_m9_e);
848 if( (identify_it_e!=identify_if4_m10_e) ) count_if4_m10_e= tofDataMap.count(identify_if4_m10_e);
849 if( (identify_it_e!=identify_if4_m11_e) ) count_if4_m11_e= tofDataMap.count(identify_if4_m11_e);
850 if( (identify_it_e!=identify_if4_m12_e) ) count_if4_m12_e= tofDataMap.count(identify_if4_m12_e);
852 if( (identify_it_o!=identify_if4_m1_o) ) count_if4_m1_o= tofDataMap.count(identify_if4_m1_o);
853 if( (identify_it_o!=identify_if4_m2_o) ) count_if4_m2_o= tofDataMap.count(identify_if4_m2_o);
854 if( (identify_it_o!=identify_if4_m3_o) ) count_if4_m3_o= tofDataMap.count(identify_if4_m3_o);
855 if( (identify_it_o!=identify_if4_m4_o) ) count_if4_m4_o= tofDataMap.count(identify_if4_m4_o);
856 if( (identify_it_o!=identify_if4_m5_o) ) count_if4_m5_o= tofDataMap.count(identify_if4_m5_o);
857 if( (identify_it_o!=identify_if4_m6_o) ) count_if4_m6_o= tofDataMap.count(identify_if4_m6_o);
858 if( (identify_it_o!=identify_if4_m7_o) ) count_if4_m7_o= tofDataMap.count(identify_if4_m7_o);
859 if( (identify_it_o!=identify_if4_m8_o) ) count_if4_m8_o= tofDataMap.count(identify_if4_m8_o);
860 if( (identify_it_o!=identify_if4_m9_o) ) count_if4_m9_o= tofDataMap.count(identify_if4_m9_o);
861 if( (identify_it_o!=identify_if4_m10_o) ) count_if4_m10_o= tofDataMap.count(identify_if4_m10_o);
862 if( (identify_it_o!=identify_if4_m11_o) ) count_if4_m11_o= tofDataMap.count(identify_if4_m11_o);
863 if( (identify_it_o!=identify_if4_m12_o) ) count_if4_m12_o= tofDataMap.count(identify_if4_m12_o);
865 count_if4_m1 = count_if4_m1_o + count_if4_m1_e;
866 count_if4_m2 = count_if4_m2_o + count_if4_m2_e;
867 count_if4_m3 = count_if4_m3_o + count_if4_m3_e;
868 count_if4_m4 = count_if4_m4_o + count_if4_m4_e;
869 count_if4_m5 = count_if4_m5_o + count_if4_m5_e;
870 count_if4_m6 = count_if4_m6_o + count_if4_m6_e;
871 count_if4_m7 = count_if4_m7_o + count_if4_m7_e;
872 count_if4_m8 = count_if4_m8_o + count_if4_m8_e;
873 count_if4_m9 = count_if4_m9_o + count_if4_m9_e;
874 count_if4_m10 = count_if4_m10_o + count_if4_m10_e;
875 count_if4_m11 = count_if4_m11_o + count_if4_m11_e;
876 count_if4_m12 = count_if4_m12_o + count_if4_m12_e;
882 if((neighborhood==5))
919 if( (identify_it_e!=identify_if5_m1_e) ) count_if5_m1_e= tofDataMap.count(identify_if5_m1_e);
920 if( (identify_it_e!=identify_if5_m2_e) ) count_if5_m2_e= tofDataMap.count(identify_if5_m2_e);
921 if( (identify_it_e!=identify_if5_m3_e) ) count_if5_m3_e= tofDataMap.count(identify_if5_m3_e);
922 if( (identify_it_e!=identify_if5_m4_e) ) count_if5_m4_e= tofDataMap.count(identify_if5_m4_e);
923 if( (identify_it_e!=identify_if5_m5_e) ) count_if5_m5_e= tofDataMap.count(identify_if5_m5_e);
924 if( (identify_it_e!=identify_if5_m6_e) ) count_if5_m6_e= tofDataMap.count(identify_if5_m6_e);
925 if( (identify_it_e!=identify_if5_m7_e) ) count_if5_m7_e= tofDataMap.count(identify_if5_m7_e);
926 if( (identify_it_e!=identify_if5_m8_e) ) count_if5_m8_e= tofDataMap.count(identify_if5_m8_e);
927 if( (identify_it_e!=identify_if5_m9_e) ) count_if5_m9_e= tofDataMap.count(identify_if5_m9_e);
928 if( (identify_it_e!=identify_if5_m10_e) ) count_if5_m10_e= tofDataMap.count(identify_if5_m10_e);
929 if( (identify_it_e!=identify_if5_m11_e) ) count_if5_m11_e= tofDataMap.count(identify_if5_m11_e);
930 if( (identify_it_e!=identify_if5_m12_e) ) count_if5_m12_e= tofDataMap.count(identify_if5_m12_e);
932 if( (identify_it_o!=identify_if5_m1_o) ) count_if5_m1_o= tofDataMap.count(identify_if5_m1_o);
933 if( (identify_it_o!=identify_if5_m2_o) ) count_if5_m2_o= tofDataMap.count(identify_if5_m2_o);
934 if( (identify_it_o!=identify_if5_m3_o) ) count_if5_m3_o= tofDataMap.count(identify_if5_m3_o);
935 if( (identify_it_o!=identify_if5_m4_o) ) count_if5_m4_o= tofDataMap.count(identify_if5_m4_o);
936 if( (identify_it_o!=identify_if5_m5_o) ) count_if5_m5_o= tofDataMap.count(identify_if5_m5_o);
937 if( (identify_it_o!=identify_if5_m6_o) ) count_if5_m6_o= tofDataMap.count(identify_if5_m6_o);
938 if( (identify_it_o!=identify_if5_m7_o) ) count_if5_m7_o= tofDataMap.count(identify_if5_m7_o);
939 if( (identify_it_o!=identify_if5_m8_o) ) count_if5_m8_o= tofDataMap.count(identify_if5_m8_o);
940 if( (identify_it_o!=identify_if5_m9_o) ) count_if5_m9_o= tofDataMap.count(identify_if5_m9_o);
941 if( (identify_it_o!=identify_if5_m10_o) ) count_if5_m10_o= tofDataMap.count(identify_if5_m10_o);
942 if( (identify_it_o!=identify_if5_m11_o) ) count_if5_m11_o= tofDataMap.count(identify_if5_m11_o);
943 if( (identify_it_o!=identify_if5_m12_o) ) count_if5_m12_o= tofDataMap.count(identify_if5_m12_o);
945 count_if5_m1 = count_if5_m1_o + count_if5_m1_e;
946 count_if5_m2 = count_if5_m2_o + count_if5_m2_e;
947 count_if5_m3 = count_if5_m3_o + count_if5_m3_e;
948 count_if5_m4 = count_if5_m4_o + count_if5_m4_e;
949 count_if5_m5 = count_if5_m5_o + count_if5_m5_e;
950 count_if5_m6 = count_if5_m6_o + count_if5_m6_e;
951 count_if5_m7 = count_if5_m7_o + count_if5_m7_e;
952 count_if5_m8 = count_if5_m8_o + count_if5_m8_e;
953 count_if5_m9 = count_if5_m9_o + count_if5_m9_e;
954 count_if5_m10 = count_if5_m10_o + count_if5_m10_e;
955 count_if5_m11 = count_if5_m11_o + count_if5_m11_e;
956 count_if5_m12 = count_if5_m12_o + count_if5_m12_e;
1023 if(identify_it_e!=identify_if5_l1_e ) count_if5_l1_e= tofDataMap.count(identify_if5_l1_e);
1024 if(identify_it_e!=identify_if5_l2_e ) count_if5_l2_e= tofDataMap.count(identify_if5_l2_e);
1025 if(identify_it_e!=identify_if5_l3_e ) count_if5_l3_e= tofDataMap.count(identify_if5_l3_e);
1026 if(identify_it_e!=identify_if5_l4_e ) count_if5_l4_e= tofDataMap.count(identify_if5_l4_e);
1027 if(identify_it_e!=identify_if5_l5_e ) count_if5_l5_e= tofDataMap.count(identify_if5_l5_e);
1028 if(identify_it_e!=identify_if5_l6_e ) count_if5_l6_e= tofDataMap.count(identify_if5_l6_e);
1029 if(identify_it_e!=identify_if5_l7_e ) count_if5_l7_e= tofDataMap.count(identify_if5_l7_e);
1030 if(identify_it_e!=identify_if5_l8_e ) count_if5_l8_e= tofDataMap.count(identify_if5_l8_e);
1031 if(identify_it_e!=identify_if5_l9_e ) count_if5_l9_e= tofDataMap.count(identify_if5_l9_e);
1032 if(identify_it_e!=identify_if5_l10_e ) count_if5_l10_e= tofDataMap.count(identify_if5_l10_e);
1033 if(identify_it_e!=identify_if5_l11_e ) count_if5_l11_e= tofDataMap.count(identify_if5_l11_e);
1034 if(identify_it_e!=identify_if5_l12_e ) count_if5_l12_e= tofDataMap.count(identify_if5_l12_e);
1036 if(identify_it_o!=identify_if5_l1_o ) count_if5_l1_o= tofDataMap.count(identify_if5_l1_o);
1037 if(identify_it_o!=identify_if5_l2_o ) count_if5_l2_o= tofDataMap.count(identify_if5_l2_o);
1038 if(identify_it_o!=identify_if5_l3_o ) count_if5_l3_o= tofDataMap.count(identify_if5_l3_o);
1039 if(identify_it_o!=identify_if5_l4_o ) count_if5_l4_o= tofDataMap.count(identify_if5_l4_o);
1040 if(identify_it_o!=identify_if5_l5_o ) count_if5_l5_o= tofDataMap.count(identify_if5_l5_o);
1041 if(identify_it_o!=identify_if5_l6_o ) count_if5_l6_o= tofDataMap.count(identify_if5_l6_o);
1042 if(identify_it_o!=identify_if5_l7_o ) count_if5_l7_o= tofDataMap.count(identify_if5_l7_o);
1043 if(identify_it_o!=identify_if5_l8_o ) count_if5_l8_o= tofDataMap.count(identify_if5_l8_o);
1044 if(identify_it_o!=identify_if5_l9_o ) count_if5_l9_o= tofDataMap.count(identify_if5_l9_o);
1045 if(identify_it_o!=identify_if5_l10_o ) count_if5_l10_o= tofDataMap.count(identify_if5_l10_o);
1046 if(identify_it_o!=identify_if5_l11_o ) count_if5_l11_o= tofDataMap.count(identify_if5_l11_o);
1047 if(identify_it_o!=identify_if5_l12_o ) count_if5_l12_o= tofDataMap.count(identify_if5_l12_o);
1049 count_if5_l1 = count_if5_l1_e + count_if5_l1_o;
1050 count_if5_l2 = count_if5_l2_e + count_if5_l2_o;
1051 count_if5_l3 = count_if5_l3_e + count_if5_l3_o;
1052 count_if5_l4 = count_if5_l4_e + count_if5_l4_o;
1053 count_if5_l5 = count_if5_l5_e + count_if5_l5_o;
1054 count_if5_l6 = count_if5_l6_e + count_if5_l6_o;
1055 count_if5_l7 = count_if5_l7_e + count_if5_l7_o;
1056 count_if5_l8 = count_if5_l8_e + count_if5_l8_o;
1057 count_if5_l9 = count_if5_l9_e + count_if5_l9_o;
1058 count_if5_l10 = count_if5_l10_e + count_if5_l10_o;
1059 count_if5_l11 = count_if5_l11_e + count_if5_l11_o;
1060 count_if5_l12 = count_if5_l12_e + count_if5_l12_o;
1063 if(identify_it_e!=identify_if5_r1_e ) count_if5_r1_e= tofDataMap.count(identify_if5_r1_e);
1064 if(identify_it_e!=identify_if5_r2_e ) count_if5_r2_e= tofDataMap.count(identify_if5_r2_e);
1065 if(identify_it_e!=identify_if5_r3_e ) count_if5_r3_e= tofDataMap.count(identify_if5_r3_e);
1066 if(identify_it_e!=identify_if5_r4_e ) count_if5_r4_e= tofDataMap.count(identify_if5_r4_e);
1067 if(identify_it_e!=identify_if5_r5_e ) count_if5_r5_e= tofDataMap.count(identify_if5_r5_e);
1068 if(identify_it_e!=identify_if5_r6_e ) count_if5_r6_e= tofDataMap.count(identify_if5_r6_e);
1069 if(identify_it_e!=identify_if5_r7_e ) count_if5_r7_e= tofDataMap.count(identify_if5_r7_e);
1070 if(identify_it_e!=identify_if5_r8_e ) count_if5_r8_e= tofDataMap.count(identify_if5_r8_e);
1071 if(identify_it_e!=identify_if5_r9_e ) count_if5_r9_e= tofDataMap.count(identify_if5_r9_e);
1072 if(identify_it_e!=identify_if5_r10_e ) count_if5_r10_e= tofDataMap.count(identify_if5_r10_e);
1073 if(identify_it_e!=identify_if5_r11_e ) count_if5_r11_e= tofDataMap.count(identify_if5_r11_e);
1074 if(identify_it_e!=identify_if5_r12_e ) count_if5_r12_e= tofDataMap.count(identify_if5_r12_e);
1076 if(identify_it_o!=identify_if5_r1_o ) count_if5_r1_o= tofDataMap.count(identify_if5_r1_o);
1077 if(identify_it_o!=identify_if5_r2_o ) count_if5_r2_o= tofDataMap.count(identify_if5_r2_o);
1078 if(identify_it_o!=identify_if5_r3_o ) count_if5_r3_o= tofDataMap.count(identify_if5_r3_o);
1079 if(identify_it_o!=identify_if5_r4_o ) count_if5_r4_o= tofDataMap.count(identify_if5_r4_o);
1080 if(identify_it_o!=identify_if5_r5_o ) count_if5_r5_o= tofDataMap.count(identify_if5_r5_o);
1081 if(identify_it_o!=identify_if5_r6_o ) count_if5_r6_o= tofDataMap.count(identify_if5_r6_o);
1082 if(identify_it_o!=identify_if5_r7_o ) count_if5_r7_o= tofDataMap.count(identify_if5_r7_o);
1083 if(identify_it_o!=identify_if5_r8_o ) count_if5_r8_o= tofDataMap.count(identify_if5_r8_o);
1084 if(identify_it_o!=identify_if5_r9_o ) count_if5_r9_o= tofDataMap.count(identify_if5_r9_o);
1085 if(identify_it_o!=identify_if5_r10_o ) count_if5_r10_o= tofDataMap.count(identify_if5_r10_o);
1086 if(identify_it_o!=identify_if5_r11_o ) count_if5_r11_o= tofDataMap.count(identify_if5_r11_o);
1087 if(identify_it_o!=identify_if5_r12_o ) count_if5_r12_o= tofDataMap.count(identify_if5_r12_o);
1089 count_if5_r1 = count_if5_r1_e + count_if5_r1_o;
1090 count_if5_r2 = count_if5_r2_e + count_if5_r2_o;
1091 count_if5_r3 = count_if5_r3_e + count_if5_r3_o;
1092 count_if5_r4 = count_if5_r4_e + count_if5_r4_o;
1093 count_if5_r5 = count_if5_r5_e + count_if5_r5_o;
1094 count_if5_r6 = count_if5_r6_e + count_if5_r6_o;
1095 count_if5_r7 = count_if5_r7_e + count_if5_r7_o;
1096 count_if5_r8 = count_if5_r8_e + count_if5_r8_o;
1097 count_if5_r9 = count_if5_r9_e + count_if5_r9_o;
1098 count_if5_r10 = count_if5_r10_e + count_if5_r10_o;
1099 count_if5_r11 = count_if5_r11_e + count_if5_r11_o;
1100 count_if5_r12 = count_if5_r12_e + count_if5_r12_o;
1109 int data_map_size = tofDataMap.size();
1110 std::cout <<
"MrpcDBSTrack setTofData Number of elements in TofDataMap " << data_map_size << std::endl;
1112 for ( it=tofDataMap.begin() ; it != tofDataMap.end(); it++ )
1113 std::cout <<
" MrpcDBSTrack setTofData TofDataMap entries : "<< (*it).first <<
" P_id " << (((*it).first & 0x7000)>>12) <<
" S_id "<< ((*it).first & 0xFFF) << std::endl;
1118 std::cout <<
"Constructed Identifiers: " << std::endl;
1119 std::cout <<
" it "<< identify_it_e <<
" " << identify_it_o<<
" P " << ((identify_it_o & 0x7000)>>12) <<
" S " << (identify_it_o & 0xFFF) << std::endl;
1120 std::cout <<
" u "<< identify_u_e <<
" " << identify_u_o <<
" P " << ((identify_u_o & 0x7000)>>12) <<
" S " << (identify_u_o & 0xFFF) << std::endl;
1121 std::cout <<
" b "<< identify_b_e <<
" " << identify_b_o <<
" P " << ((identify_b_o & 0x7000)>>12) <<
" S " << (identify_b_o & 0xFFF) << std::endl;
1122 std::cout <<
" l "<< identify_l_e <<
" " << identify_l_o <<
" P " << ((identify_l_o & 0x7000)>>12) <<
" S " << (identify_l_o & 0xFFF) << std::endl;
1123 std::cout <<
" r "<< identify_r_e <<
" " << identify_r_o <<
" P " << ((identify_r_o & 0x7000)>>12) <<
" S " << (identify_r_o & 0xFFF) << std::endl;
1124 std::cout <<
" lu "<< identify_lu_e <<
" " << identify_lu_o<<
" P " << ((identify_lu_o & 0x7000)>>12) <<
" S " << (identify_lu_o & 0xFFF) << std::endl;
1125 std::cout <<
" ru "<< identify_ru_e <<
" " << identify_ru_o<<
" P " << ((identify_ru_o & 0x7000)>>12) <<
" S " << (identify_ru_o & 0xFFF) << std::endl;
1126 std::cout <<
" lb "<< identify_lb_e <<
" " << identify_lb_o<<
" P " << ((identify_lb_o & 0x7000)>>12) <<
" S " << (identify_lb_o & 0xFFF) << std::endl;
1127 std::cout <<
" rb "<< identify_rb_e <<
" " << identify_rb_o<<
" P " << ((identify_rb_o & 0x7000)>>12) <<
" S " << (identify_rb_o & 0xFFF) << std::endl;
1136 std::cout <<
"Constructed Identifiers: " << std::endl;
1137 std::cout <<
" it "<< identify_it_e <<
" " << identify_it_o << std::endl;
1138 std::cout <<
" it if4 "<< identify_if4_it_e <<
" " << identify_if4_it_o <<
" P " << ((identify_if4_it_o & 0x7000)>>12) <<
" S " << (identify_if4_it_o & 0xFFF) <<std::endl;
1139 std::cout <<
" m1 " <<identify_if4_m1_e <<
" " << identify_if4_m1_o <<
" P " << ((identify_if4_m1_o & 0x7000)>>12) <<
" S " << (identify_if4_m1_o & 0xFFF) << std::endl;
1140 std::cout <<
" m2 " <<identify_if4_m2_e <<
" " << identify_if4_m2_o <<
" P " << ((identify_if4_m2_o & 0x7000)>>12) <<
" S " << (identify_if4_m2_o & 0xFFF) << std::endl;
1141 std::cout <<
" m3 " <<identify_if4_m3_e <<
" " << identify_if4_m3_o <<
" P " << ((identify_if4_m3_o & 0x7000)>>12) <<
" S " << (identify_if4_m3_o & 0xFFF) << std::endl;
1142 std::cout <<
" m4 " <<identify_if4_m4_e <<
" " << identify_if4_m4_o <<
" P " << ((identify_if4_m4_o & 0x7000)>>12) <<
" S " << (identify_if4_m4_o & 0xFFF) << std::endl;
1143 std::cout <<
" m5 " <<identify_if4_m5_e <<
" " << identify_if4_m5_o <<
" P " << ((identify_if4_m5_o & 0x7000)>>12) <<
" S " << (identify_if4_m5_o & 0xFFF) << std::endl;
1144 std::cout <<
" m6 " <<identify_if4_m6_e <<
" " << identify_if4_m6_o <<
" P " << ((identify_if4_m6_o & 0x7000)>>12) <<
" S " << (identify_if4_m6_o & 0xFFF) << std::endl;
1145 std::cout <<
" m7 " <<identify_if4_m7_e <<
" " << identify_if4_m7_o <<
" P " << ((identify_if4_m7_o & 0x7000)>>12) <<
" S " << (identify_if4_m7_o & 0xFFF) << std::endl;
1146 std::cout <<
" m8 " <<identify_if4_m8_e <<
" " << identify_if4_m8_o <<
" P " << ((identify_if4_m8_o & 0x7000)>>12) <<
" S " << (identify_if4_m8_o & 0xFFF) << std::endl;
1147 std::cout <<
" m9 " <<identify_if4_m9_e <<
" " << identify_if4_m9_o <<
" P " << ((identify_if4_m9_o & 0x7000)>>12) <<
" S " << (identify_if4_m9_o & 0xFFF) << std::endl;
1148 std::cout <<
" m10 " <<identify_if4_m10_e <<
" " << identify_if4_m10_o<<
" P " << ((identify_if4_m10_o & 0x7000)>>12) <<
" S " << (identify_if4_m10_o & 0xFFF) << std::endl;
1149 std::cout <<
" m11 " <<identify_if4_m11_e <<
" " << identify_if4_m11_o <<
" P " << ((identify_if4_m11_o & 0x7000)>>12) <<
" S " << (identify_if4_m11_o & 0xFFF) << std::endl;
1150 std::cout <<
" m12 " <<identify_if4_m12_e <<
" " << identify_if4_m12_o <<
" P " << ((identify_if4_m12_o & 0x7000)>>12) <<
" S " << (identify_if4_m12_o & 0xFFF) << std::endl;
1159 std::cout <<
"Constructed Identifiers: " << std::endl;
1160 std::cout <<
" it "<< identify_it_e <<
" " << identify_it_o << std::endl;
1161 std::cout <<
" it if5 "<< identify_if5_it_e <<
" " << identify_if5_it_o <<
" P " << ((identify_if5_it_o & 0x7000)>>12) <<
" S " << (identify_if5_it_o & 0xFFF) <<std::endl;
1162 std::cout <<
" m1 " <<identify_if5_m1_e <<
" " << identify_if5_m1_o <<
" P " << ((identify_if5_m1_o & 0x7000)>>12) <<
" S " << (identify_if5_m1_o & 0xFFF) << std::endl;
1163 std::cout <<
" m2 " <<identify_if5_m2_e <<
" " << identify_if5_m2_o <<
" P " << ((identify_if5_m2_o & 0x7000)>>12) <<
" S " << (identify_if5_m2_o & 0xFFF) << std::endl;
1164 std::cout <<
" m3 " <<identify_if5_m3_e <<
" " << identify_if5_m3_o <<
" P " << ((identify_if5_m3_o & 0x7000)>>12) <<
" S " << (identify_if5_m3_o & 0xFFF) << std::endl;
1165 std::cout <<
" m4 " <<identify_if5_m4_e <<
" " << identify_if5_m4_o <<
" P " << ((identify_if5_m4_o & 0x7000)>>12) <<
" S " << (identify_if5_m4_o & 0xFFF) << std::endl;
1166 std::cout <<
" m5 " <<identify_if5_m5_e <<
" " << identify_if5_m5_o <<
" P " << ((identify_if5_m5_o & 0x7000)>>12) <<
" S " << (identify_if5_m5_o & 0xFFF) << std::endl;
1167 std::cout <<
" m6 " <<identify_if5_m6_e <<
" " << identify_if5_m6_o <<
" P " << ((identify_if5_m6_o & 0x7000)>>12) <<
" S " << (identify_if5_m6_o & 0xFFF) << std::endl;
1168 std::cout <<
" m7 " <<identify_if5_m7_e <<
" " << identify_if5_m7_o <<
" P " << ((identify_if5_m7_o & 0x7000)>>12) <<
" S " << (identify_if5_m7_o & 0xFFF) << std::endl;
1169 std::cout <<
" m8 " <<identify_if5_m8_e <<
" " << identify_if5_m8_o <<
" P " << ((identify_if5_m8_o & 0x7000)>>12) <<
" S " << (identify_if5_m8_o & 0xFFF) << std::endl;
1170 std::cout <<
" m9 " <<identify_if5_m9_e <<
" " << identify_if5_m9_o <<
" P " << ((identify_if5_m9_o & 0x7000)>>12) <<
" S " << (identify_if5_m9_o & 0xFFF) << std::endl;
1171 std::cout <<
" m10 " <<identify_if5_m10_e <<
" " << identify_if5_m10_o<<
" P " << ((identify_if5_m10_o & 0x7000)>>12) <<
" S " << (identify_if5_m10_o & 0xFFF) << std::endl;
1172 std::cout <<
" m11 " <<identify_if5_m11_e <<
" " << identify_if5_m11_o <<
" P " << ((identify_if5_m11_o & 0x7000)>>12) <<
" S " << (identify_if5_m11_o & 0xFFF) << std::endl;
1173 std::cout <<
" m12 " <<identify_if5_m12_e <<
" " << identify_if5_m12_o <<
" P " << ((identify_if5_m12_o & 0x7000)>>12) <<
" S " << (identify_if5_m12_o & 0xFFF) << std::endl;
1175 std::cout <<
" l1 " <<identify_if5_l1_e <<
" " << identify_if5_l1_o<<
" P " << ((identify_if5_l1_o & 0x7000)>>12) <<
" S " << (identify_if5_l1_o & 0xFFF) << std::endl;
1176 std::cout <<
" l2 " <<identify_if5_l2_e <<
" " << identify_if5_l2_o<<
" P " << ((identify_if5_l2_o & 0x7000)>>12) <<
" S " << (identify_if5_l2_o & 0xFFF) <<std::endl;
1177 std::cout <<
" l3 " <<identify_if5_l3_e <<
" " << identify_if5_l3_o<<
" P " << ((identify_if5_l3_o & 0x7000)>>12) <<
" S " << (identify_if5_l3_o & 0xFFF) << std::endl;
1178 std::cout <<
" l4 " <<identify_if5_l4_e <<
" " << identify_if5_l4_o<<
" P " << ((identify_if5_l4_o & 0x7000)>>12) <<
" S " << (identify_if5_l4_o & 0xFFF) << std::endl;
1179 std::cout <<
" l5 " <<identify_if5_l5_e <<
" " << identify_if5_l5_o<<
" P " << ((identify_if5_l5_o & 0x7000)>>12) <<
" S " << (identify_if5_l5_o & 0xFFF) << std::endl;
1180 std::cout <<
" l6 " <<identify_if5_l6_e <<
" " << identify_if5_l6_o<<
" P " << ((identify_if5_l6_o & 0x7000)>>12) <<
" S " << (identify_if5_l6_o & 0xFFF) << std::endl;
1181 std::cout <<
" l7 " <<identify_if5_l7_e <<
" " << identify_if5_l7_o<<
" P " << ((identify_if5_l7_o & 0x7000)>>12) <<
" S " << (identify_if5_l7_o & 0xFFF) << std::endl;
1182 std::cout <<
" l8 " <<identify_if5_l8_e <<
" " << identify_if5_l8_o<<
" P " << ((identify_if5_l8_o & 0x7000)>>12) <<
" S " << (identify_if5_l8_o & 0xFFF) << std::endl;
1183 std::cout <<
" l9 " <<identify_if5_l9_e <<
" " << identify_if5_l9_o<<
" P " << ((identify_if5_l9_o & 0x7000)>>12) <<
" S " << (identify_if5_l9_o & 0xFFF) << std::endl;
1184 std::cout <<
" l10 " <<identify_if5_l10_e <<
" " << identify_if5_l10_o<<
" P " << ((identify_if5_l10_o & 0x7000)>>12) <<
" S " << (identify_if5_l10_o & 0xFFF) << std::endl;
1185 std::cout <<
" l11 " <<identify_if5_l11_e <<
" " << identify_if5_l11_o<<
" P " << ((identify_if5_l11_o & 0x7000)>>12) <<
" S " << (identify_if5_l11_o & 0xFFF) << std::endl;
1186 std::cout <<
" l12 " <<identify_if5_l12_e <<
" " << identify_if5_l12_o<<
" P " << ((identify_if5_l12_o & 0x7000)>>12) <<
" S " << (identify_if5_l12_o & 0xFFF) << std::endl;
1188 std::cout <<
" r1 " <<identify_if5_r1_e <<
" " << identify_if5_r1_o<<
" P " << ((identify_if5_r1_o & 0x7000)>>12) <<
" S " << (identify_if5_r1_o & 0xFFF) << std::endl;
1189 std::cout <<
" r2 " <<identify_if5_r2_e <<
" " << identify_if5_r2_o<<
" P " << ((identify_if5_r2_o & 0x7000)>>12) <<
" S " << (identify_if5_r2_o & 0xFFF) << std::endl;
1190 std::cout <<
" r3 " <<identify_if5_r3_e <<
" " << identify_if5_r3_o<<
" P " << ((identify_if5_r3_o & 0x7000)>>12) <<
" S " << (identify_if5_r3_o & 0xFFF) << std::endl;
1191 std::cout <<
" r4 " <<identify_if5_r4_e <<
" " << identify_if5_r4_o<<
" P " << ((identify_if5_r4_o & 0x7000)>>12) <<
" S " << (identify_if5_r4_o & 0xFFF) << std::endl;
1192 std::cout <<
" r5 " <<identify_if5_r5_e <<
" " << identify_if5_r5_o<<
" P " << ((identify_if5_r5_o & 0x7000)>>12) <<
" S " << (identify_if5_r5_o & 0xFFF) << std::endl;
1193 std::cout <<
" r6 " <<identify_if5_r6_e <<
" " << identify_if5_r6_o<<
" P " << ((identify_if5_r6_o & 0x7000)>>12) <<
" S " << (identify_if5_r6_o & 0xFFF) << std::endl;
1194 std::cout <<
" r7 " <<identify_if5_r7_e <<
" " << identify_if5_r7_o<<
" P " << ((identify_if5_r7_o & 0x7000)>>12) <<
" S " << (identify_if5_r7_o & 0xFFF) << std::endl;
1195 std::cout <<
" r8 " <<identify_if5_r8_e <<
" " << identify_if5_r8_o<<
" P " << ((identify_if5_r8_o & 0x7000)>>12) <<
" S " << (identify_if5_r8_o & 0xFFF) << std::endl;
1196 std::cout <<
" r9 " <<identify_if5_r9_e <<
" " << identify_if5_r9_o<<
" P " << ((identify_if5_r9_o & 0x7000)>>12) <<
" S " << (identify_if5_r9_o & 0xFFF) << std::endl;
1197 std::cout <<
" r10 " <<identify_if5_r10_e <<
" " << identify_if5_r10_o<<
" P " << ((identify_if5_r10_o & 0x7000)>>12) <<
" S " << (identify_if5_r10_o & 0xFFF) << std::endl;
1198 std::cout <<
" r11 " <<identify_if5_r11_e <<
" " << identify_if5_r11_o<<
" P " << ((identify_if5_r11_o & 0x7000)>>12) <<
" S " << (identify_if5_r11_o & 0xFFF) << std::endl;
1199std::cout <<
" r12 " <<identify_if5_r12_e <<
" " << identify_if5_r12_o<<
" P " << ((identify_if5_r12_o & 0x7000)>>12) <<
" S " << (identify_if5_r12_o & 0xFFF) << std::endl;
1207 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_it > 0 count_it = " << count_it << std::endl;
1209 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_it_e );
1211 for(
unsigned int i = 0; i < count_it_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 1 );
1213 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_it_o );
1215 for(
unsigned int i = 0; i < count_it_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 1 );
1222 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_u > 0 count_u = " << count_u << std::endl;
1226 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_u_e );
1228 for(
unsigned int i = 0; i < count_u_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1230 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_u_o );
1232 for(
unsigned int i = 0; i < count_u_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1237 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_b > 0 count_b = " << count_b << std::endl;
1240 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_b_e );
1242 for(
unsigned int i = 0; i < count_b_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1244 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_b_o );
1246 for(
unsigned int i = 0; i < count_b_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1252 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_l > 0 count_l = " << count_l << std::endl;
1255 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_l_e );
1257 for(
unsigned int i = 0; i < count_l_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1259 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_l_o );
1261 for(
unsigned int i = 0; i < count_l_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1267 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_r > 0 count_r = " << count_r << std::endl;
1269 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_r_e );
1271 for(
unsigned int i = 0; i < count_r_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1273 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_r_o );
1275 for(
unsigned int i = 0; i < count_r_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1281 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_lu > 0 count_lu = " << count_lu << std::endl;
1285 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_lu_e );
1287 for(
unsigned int i = 0; i < count_lu_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1289 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_lu_o );
1291 for(
unsigned int i = 0; i < count_lu_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1297 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_ru > 0 count_ru = " << count_ru << std::endl;
1300 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_ru_e );
1302 for(
unsigned int i = 0; i < count_ru_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1304 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_ru_o );
1306 for(
unsigned int i = 0; i < count_ru_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1312 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_lb > 0 count_lb = " << count_lb << std::endl;
1315 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_lb_e );
1317 for(
unsigned int i = 0; i < count_lb_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1319 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_lb_o );
1321 for(
unsigned int i = 0; i < count_lb_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1327 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_rb > 0 count_rb = " << count_rb << std::endl;
1330 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_rb_e );
1332 for(
unsigned int i = 0; i < count_rb_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1334 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_rb_o );
1336 for(
unsigned int i = 0; i < count_rb_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1344 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m1 > 0 count_if4_m1 = " << count_if4_m1 << std::endl;
1346 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m1_e );
1348 for(
unsigned int i = 0; i < count_if4_m1_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1350 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m1_o );
1352 for(
unsigned int i = 0; i < count_if4_m1_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1357 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m2 > 0 count_if4_m2 = " << count_if4_m2 << std::endl;
1360 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m2_e );
1362 for(
unsigned int i = 0; i < count_if4_m2_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1364 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m2_o );
1366 for(
unsigned int i = 0; i < count_if4_m2_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1374 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m3 > 0 count_if4_m3 = " << count_if4_m3 << std::endl;
1377 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m3_e );
1379 for(
unsigned int i = 0; i < count_if4_m3_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1381 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m3_o );
1383 for(
unsigned int i = 0; i < count_if4_m3_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1389 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m4 > 0 count_if4_m4 = " << count_if4_m4 << std::endl;
1392 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m4_e );
1394 for(
unsigned int i = 0; i < count_if4_m4_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1396 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m4_o );
1398 for(
unsigned int i = 0; i < count_if4_m4_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1404 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m5 > 0 count_if4_m5 = " << count_if4_m5 << std::endl;
1407 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m5_e );
1409 for(
unsigned int i = 0; i < count_if4_m5_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1411 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m5_o );
1413 for(
unsigned int i = 0; i < count_if4_m5_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1421 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m6 > 0 count_if4_m6 = " << count_if4_m6 << std::endl;
1425 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m6_e );
1427 for(
unsigned int i = 0; i < count_if4_m6_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1429 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m6_o );
1431 for(
unsigned int i = 0; i < count_if4_m6_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1438 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m7 > 0 count_if4_m7 = " << count_if4_m7 << std::endl;
1441 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m7_e );
1443 for(
unsigned int i = 0; i < count_if4_m7_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1445 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m7_o );
1447 for(
unsigned int i = 0; i < count_if4_m7_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1455 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m8 > 0 count_if4_m8 = " << count_if4_m8 << std::endl;
1459 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m8_e );
1461 for(
unsigned int i = 0; i < count_if4_m8_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1463 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m8_o );
1465 for(
unsigned int i = 0; i < count_if4_m8_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1473 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m9 > 0 count_if4_m9 = " << count_if4_m9 << std::endl;
1476 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m9_e );
1478 for(
unsigned int i = 0; i < count_if4_m9_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1480 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m9_o );
1482 for(
unsigned int i = 0; i < count_if4_m9_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1490 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m10 > 0 count_if4_m10 = " << count_if4_m10 << std::endl;
1493 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m10_e );
1495 for(
unsigned int i = 0; i < count_if4_m10_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1497 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m10_o );
1499 for(
unsigned int i = 0; i < count_if4_m10_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1508 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m11 > 0 count_if4_m11 = " << count_if4_m11 << std::endl;
1512 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m11_e );
1514 for(
unsigned int i = 0; i < count_if4_m11_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1516 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m11_o );
1518 for(
unsigned int i = 0; i < count_if4_m11_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1526 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if4_m12 > 0 count_if4_m12 = " << count_if4_m12 << std::endl;
1529 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if4_m12_e );
1531 for(
unsigned int i = 0; i < count_if4_m12_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1533 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if4_m12_o );
1535 for(
unsigned int i = 0; i < count_if4_m12_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1543 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m1 > 0 count_if5_m1 = " << count_if5_m1 << std::endl;
1545 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m1_e );
1547 for(
unsigned int i = 0; i < count_if5_m1_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1549 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m1_o );
1551 for(
unsigned int i = 0; i < count_if5_m1_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1556 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m2 > 0 count_if5_m2 = " << count_if5_m2 << std::endl;
1558 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m2_e );
1560 for(
unsigned int i = 0; i < count_if5_m2_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1562 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m2_o );
1564 for(
unsigned int i = 0; i < count_if5_m2_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1570 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m3 > 0 count_if5_m3 = " << count_if5_m3 << std::endl;
1573 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m3_e );
1575 for(
unsigned int i = 0; i < count_if5_m3_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1577 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m3_o );
1579 for(
unsigned int i = 0; i < count_if5_m3_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1585 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m4 > 0 count_if5_m4 = " << count_if5_m4 << std::endl;
1588 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m4_e );
1590 for(
unsigned int i = 0; i < count_if5_m4_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1592 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m4_o );
1594 for(
unsigned int i = 0; i < count_if5_m4_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1600 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m5 > 0 count_if5_m5 = " << count_if5_m5 << std::endl;
1602 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m5_e );
1604 for(
unsigned int i = 0; i < count_if5_m5_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1606 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m5_o );
1608 for(
unsigned int i = 0; i < count_if5_m5_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1614 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m6 > 0 count_if5_m6 = " << count_if5_m6 << std::endl;
1617 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m6_e );
1619 for(
unsigned int i = 0; i < count_if5_m6_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1621 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m6_o );
1623 for(
unsigned int i = 0; i < count_if5_m6_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1629 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m7 > 0 count_if5_m7 = " << count_if5_m7 << std::endl;
1632 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m7_e );
1634 for(
unsigned int i = 0; i < count_if5_m7_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1636 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m7_o );
1638 for(
unsigned int i = 0; i < count_if5_m7_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1644 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m8 > 0 count_if5_m8 = " << count_if5_m8 << std::endl;
1647 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m8_e );
1649 for(
unsigned int i = 0; i < count_if5_m8_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1651 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m8_o );
1653 for(
unsigned int i = 0; i < count_if5_m8_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1658 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m9 > 0 count_if5_m9 = " << count_if5_m9 << std::endl;
1661 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m9_e );
1663 for(
unsigned int i = 0; i < count_if5_m9_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1665 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m9_o );
1667 for(
unsigned int i = 0; i < count_if5_m9_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1673 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m10 > 0 count_if5_m10 = " << count_if5_m10 << std::endl;
1676 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m10_e );
1678 for(
unsigned int i = 0; i < count_if5_m10_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1680 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m10_o );
1682 for(
unsigned int i = 0; i < count_if5_m10_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1687 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m11 > 0 count_if5_m11 = " << count_if5_m11 << std::endl;
1690 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m11_e );
1692 for(
unsigned int i = 0; i < count_if5_m11_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1694 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m11_o );
1696 for(
unsigned int i = 0; i < count_if5_m11_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1701 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_m12 > 0 count_if5_m12 = " << count_if5_m12 << std::endl;
1704 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_m12_e );
1706 for(
unsigned int i = 0; i < count_if5_m12_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1708 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_m12_o );
1710 for(
unsigned int i = 0; i < count_if5_m12_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1715 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l1 > 0 count_if5_l1 = " << count_if5_l1 << std::endl;
1717 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l1_e );
1719 for(
unsigned int i = 0; i < count_if5_l1_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1721 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l1_o );
1723 for(
unsigned int i = 0; i < count_if5_l1_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1729 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l2 > 0 count_if5_l2 = " << count_if5_l2 << std::endl;
1731 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l2_e );
1733 for(
unsigned int i = 0; i < count_if5_l2_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1735 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l2_o );
1737 for(
unsigned int i = 0; i < count_if5_l2_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1742 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l3 > 0 count_if5_l3 = " << count_if5_l3 << std::endl;
1744 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l3_e );
1746 for(
unsigned int i = 0; i < count_if5_l3_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1748 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l3_o );
1750 for(
unsigned int i = 0; i < count_if5_l3_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1755 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l4 > 0 count_if5_l4 = " << count_if5_l4 << std::endl;
1757 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l4_e );
1759 for(
unsigned int i = 0; i < count_if5_l4_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1761 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l4_o );
1763 for(
unsigned int i = 0; i < count_if5_l4_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1768 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l5 > 0 count_if5_l5 = " << count_if5_l5 << std::endl;
1771 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l5_e );
1773 for(
unsigned int i = 0; i < count_if5_l5_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1775 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l5_o );
1777 for(
unsigned int i = 0; i < count_if5_l5_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1782 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l6 > 0 count_if5_l6 = " << count_if5_l6 << std::endl;
1784 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l6_e );
1786 for(
unsigned int i = 0; i < count_if5_l6_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1788 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l6_o );
1790 for(
unsigned int i = 0; i < count_if5_l6_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1795 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l7 > 0 count_if5_l7 = " << count_if5_l7 << std::endl;
1797 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l7_e );
1799 for(
unsigned int i = 0; i < count_if5_l7_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1801 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l7_o );
1803 for(
unsigned int i = 0; i < count_if5_l7_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1808 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l8 > 0 count_if5_l8 = " << count_if5_l8 << std::endl;
1810 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l8_e );
1812 for(
unsigned int i = 0; i < count_if5_l8_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1814 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l8_o );
1816 for(
unsigned int i = 0; i < count_if5_l8_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1821 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l9 > 0 count_if5_l9 = " << count_if5_l9 << std::endl;
1823 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l9_e );
1825 for(
unsigned int i = 0; i < count_if5_l9_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1827 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l9_o );
1829 for(
unsigned int i = 0; i < count_if5_l9_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1834 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l10 > 0 count_if5_l10 = " << count_if5_l10 << std::endl;
1837 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l10_e );
1839 for(
unsigned int i = 0; i < count_if5_l10_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1841 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l10_o );
1843 for(
unsigned int i = 0; i < count_if5_l10_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1849 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l11 > 0 count_if5_l11 = " << count_if5_l11 << std::endl;
1852 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l11_e );
1854 for(
unsigned int i = 0; i < count_if5_l11_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1856 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l11_o );
1858 for(
unsigned int i = 0; i < count_if5_l11_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1864 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_l12 > 0 count_if5_l12 = " << count_if5_l12 << std::endl;
1867 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_l12_e );
1869 for(
unsigned int i = 0; i < count_if5_l12_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1871 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_l12_o );
1873 for(
unsigned int i = 0; i < count_if5_l12_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1880 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r1 > 0 count_if5_r1 = " << count_if5_r1 << std::endl;
1882 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r1_e );
1884 for(
unsigned int i = 0; i < count_if5_r1_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1886 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r1_o );
1888 for(
unsigned int i = 0; i < count_if5_r1_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1894 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r2 > 0 count_if5_r2 = " << count_if5_r2 << std::endl;
1897 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r2_e );
1899 for(
unsigned int i = 0; i < count_if5_r2_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1901 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r2_o );
1903 for(
unsigned int i = 0; i < count_if5_r2_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1910 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r3 > 0 count_if5_r3 = " << count_if5_r3 << std::endl;
1913 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r3_e );
1915 for(
unsigned int i = 0; i < count_if5_r3_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1917 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r3_o );
1919 for(
unsigned int i = 0; i < count_if5_r3_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1925 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r4 > 0 count_if5_r4 = " << count_if5_r4 << std::endl;
1928 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r4_e );
1930 for(
unsigned int i = 0; i < count_if5_r4_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1932 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r4_o );
1934 for(
unsigned int i = 0; i < count_if5_r4_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1941 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r5 > 0 count_if5_r5 = " << count_if5_r5 << std::endl;
1944 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r5_e );
1946 for(
unsigned int i = 0; i < count_if5_r5_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1948 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r5_o );
1950 for(
unsigned int i = 0; i < count_if5_r5_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1956 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r6 > 0 count_if5_r6 = " << count_if5_r6 << std::endl;
1958 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r6_e );
1960 for(
unsigned int i = 0; i < count_if5_r6_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1962 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r6_o );
1964 for(
unsigned int i = 0; i < count_if5_r6_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1970 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r7 > 0 count_if5_r7 = " << count_if5_r7 << std::endl;
1973 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r7_e );
1975 for(
unsigned int i = 0; i < count_if5_r7_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1977 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r7_o );
1979 for(
unsigned int i = 0; i < count_if5_r7_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1984 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r8 > 0 count_if5_r8 = " << count_if5_r8 << std::endl;
1987 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r8_e );
1989 for(
unsigned int i = 0; i < count_if5_r8_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
1991 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r8_o );
1993 for(
unsigned int i = 0; i < count_if5_r8_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
1999 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r9 > 0 count_if5_r9 = " << count_if5_r9 << std::endl;
2002 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r9_e );
2004 for(
unsigned int i = 0; i < count_if5_r9_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
2006 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r9_o );
2008 for(
unsigned int i = 0; i < count_if5_r9_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
2014 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r10 > 0 count_if5_r10 = " << count_if5_r10 << std::endl;
2017 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r10_e );
2019 for(
unsigned int i = 0; i < count_if5_r10_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
2021 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r10_o );
2023 for(
unsigned int i = 0; i < count_if5_r10_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
2030 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r11 > 0 count_if5_r11 = " << count_if5_r11 << std::endl;
2033 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r11_e );
2035 for(
unsigned int i = 0; i < count_if5_r11_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
2037 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r11_o );
2039 for(
unsigned int i = 0; i < count_if5_r11_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
2046 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData -match count_if5_r12 > 0 count_if5_r12 = " << count_if5_r12 << std::endl;
2049 pair< IterTofDataMap, IterTofDataMap > range_e = tofDataMap.equal_range( identify_if5_r12_e );
2051 for(
unsigned int i = 0; i < count_if5_r12_e; i++, iter_e++ )
tofDataAnalysis( (*iter_e).second, 2 );
2053 pair< IterTofDataMap, IterTofDataMap > range_o = tofDataMap.equal_range( identify_if5_r12_o );
2055 for(
unsigned int i = 0; i < count_if5_r12_o; i++, iter_o++ )
tofDataAnalysis( (*iter_o).second, 2 );
2070 count0 = tofDataMap.count( identify0 );
2071 int tofid1 = tofid0 - 1;
2072 if( tofid1 == -1 ) { tofid1 = 87; }
2074 count1 = tofDataMap.count( identify1 );
2075 int tofid2 = tofid0 + 1;
2076 if( tofid2 == 88 ) { tofid2 = 0; }
2078 count2 = tofDataMap.count( identify2 );
2082 if( ( m_hitCase ==
EastEndcap ) && ( m_id1 > -1 ) ) {
2085 count0 = tofDataMap.count( identify0 );
2086 int tofid1 = tofid0 - 1;
2087 if( tofid1 == -1 ) { tofid1 = 47; }
2089 count1 = tofDataMap.count( identify1 );
2090 int tofid2 = tofid0 + 1;
2091 if( tofid2 == 48 ) { tofid2 = 0; }
2093 count2 = tofDataMap.count( identify2 );
2098 if( ( m_hitCase ==
WestEndcap ) && ( m_id1 > -1 ) ) {
2099 int tofid0 = m_id1 - 48;
2101 count0 = tofDataMap.count( identify0 );
2102 int tofid1 = tofid0 - 1;
2103 if( tofid1 == -1 ) { tofid1 = 47; }
2105 count1 = tofDataMap.count( identify1 );
2106 int tofid2 = tofid0 + 1;
2107 if( tofid2 == 48 ) { tofid2 = 0; }
2109 count2 = tofDataMap.count( identify2 );
2115 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify0 );
2117 for(
unsigned int i = 0; i < count0; i++,
iter++ ) {
2122 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify1 );
2124 for(
unsigned int i = 0; i < count1; i++,
iter++ ) {
2129 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify2 );
2131 for(
unsigned int i = 0; i < count2; i++,
iter++ ) {
2136 if( ( count0 == 0 ) && ( count1 == 0 ) && ( count2 == 0 )
2140 && (count_u==0) && (count_b==0)
2142 && (count_l==0) && (count_lu==0) && (count_lb==0) && (count_r==0) && (count_ru==0) && (count_rb==0)
2144 && (count_if4_m1==0) && (count_if4_m2==0) && (count_if4_m3==0) && (count_if4_m4==0) && (count_if4_m5==0) && (count_if4_m6==0) && (count_if4_m7==0) && (count_if4_m8==0)
2145 && (count_if4_m9==0) && (count_if4_m10==0) && (count_if4_m11==0) && (count_if4_m11==0) && (count_if4_m12==0)
2147 && (count_if5_m1 ==0) && (count_if5_m2 ==0) && (count_if5_m3 ==0) && (count_if5_m4 ==0) && (count_if5_m5 ==0) && (count_if5_m6 ==0) && (count_if5_m7 ==0) && (count_if5_m8 ==0) && (count_if5_m9 ==0)
2148 && (count_if5_m10 ==0) && (count_if5_m11 ==0) && (count_if5_m12 ==0)
2149 && (count_if5_l1 ==0) && (count_if5_l2 ==0) && (count_if5_l3 ==0)&& (count_if5_l4 ==0) && (count_if5_l5 ==0) && (count_if5_l6 ==0) && (count_if5_l7 ==0)&& (count_if5_l8 ==0) && (count_if5_l9 ==0)
2150 && (count_if5_l10 ==0) && (count_if5_l11 ==0) && (count_if5_l12 ==0)
2151 && (count_if5_r1 ==0) && (count_if5_r2 ==0) && (count_if5_r3 ==0)&& (count_if5_r4 ==0) && (count_if5_r5 ==0) && (count_if5_r6 ==0) && (count_if5_r7 ==0)&& (count_if5_r8 ==0) && (count_if5_r9 ==0)
2152 && (count_if5_r10 ==0) && (count_if5_r11 ==0) && (count_if5_r12 ==0)
2155 if(
mrpc_dbs_debug_counter) std::cout <<
"MrpcDBSTrack setTofData - All count variables are equal 0. m_hitCase | m_id1 " << m_hitCase <<
" | " << m_id1 << std::endl;
2167 int tofid0 = m_id2 - 88;
2169 count0 = tofDataMap.count( identify0 );
2170 int tofid1 = tofid0 - 1;
2171 if( tofid1 == -1 ) { tofid1 = 87; }
2173 count1 = tofDataMap.count( identify1 );
2174 int tofid2 = tofid0 + 1;
2175 if( tofid2 == 88 ) { tofid2 = 0; }
2177 count2 = tofDataMap.count( identify2 );
2180 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify0 );
2182 for(
unsigned int i = 0; i < count0; i++,
iter++ ) {
2187 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify1 );
2189 for(
unsigned int i = 0; i < count1; i++,
iter++ ) {
2194 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify2 );
2196 for(
unsigned int i = 0; i < count2; i++,
iter++ ) {
2201 if( ( count0 == 0 ) && ( count1 == 0 ) && ( count2 == 0 ) ) {
2213 if(
mrpc_dbs_debug_counter) std::cout <<
"---------------- END EVENT -> mrpc_dbs_debug_counter ------------------------" << std::endl;
2224 unsigned int qual =
tof->quality();
2226 if( ( qual & 0x10 ) == 0 )
2229 qual = ( qual | 0x10 );
2234 if( (
tof->quality() == 0x7 ) || (
tof->quality() == 0xd ) ) {qual = ( qual | 0x20 );}
2236 if( (
tof->quality() == 0xb ) || (
tof->quality() == 0xe ) ) { qual = ( qual | 0x40 );}
2238 if( (
tof->quality() == 0x3 ) || (
tof->quality() == 0xc ) ) {qual = ( qual | 0x80 ); }
2240 if( (
tof->quality() & 0x5 ) == 0x5 )
2243 tof->setZTdc( ztdc );
2246 if( (
tof->quality() & 0xa ) == 0xa )
2249 tof->setZAdc( zadc );
2253 tof->setQuality( qual );
2256 if( iflag == 1 ) m_tofData1.push_back(
tof );
2257 else if( iflag == 2 ) m_tofData2.push_back(
tof );
2258 else if( iflag == 3 ) m_tofData3.push_back(
tof );
2259 else if( iflag == 4 ) m_tofData4.push_back(
tof );
2261 cout <<
"MrpcRecDBS::MrpcDBSTrack::TofDataAnalylsis: the Flag should be 1-4, out of the Range!" << endl;
2275 if( m_hitCase ==
NoHit )
return;
2279 if( ( m_quality1 & 0x10 ) == 0 ) { m_hitCase =
NoHit; }
2283 if( ( m_quality2 & 0x10 ) == 0 ) { m_hitCase =
NoHit; }
2287 if( ( m_quality1 & 0x10 ) == 0 ) { m_hitCase =
OuterLayer; }
2289 if( ( m_quality2 & 0x10 ) == 0 ) {
2297 cout <<
"MrpcRecDBS::MrpcDBSTrack::match: 2- Impossible!" << endl;
2309 cout <<
"MrpcRecDBS::MrpcDBSTrack::match: 1- Impossible!" << endl;
2320void MrpcDBSTrack::findTofDataBarrel( std::vector<TofData*> tofDataVec1, std::vector<TofData*> tofDataVec2,
double zrhit,
unsigned int iflag, std::vector<MrpcDBSTrack*>*& tofTrackVec ) {
2322 unsigned int qual = 0xf;
2324 if( tofDataVec2.size() == 0 ) {
2325 if( tofDataVec1.size() == 0 ) {
2328 else if( tofDataVec1.size() == 1 ) {
2329 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
2333 else if( tofDataVec1.size() > 1 ) {
2338 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataBarrel: 1- Impossible!" << endl;
2341 else if( ( tofDataVec2.size() == 1 ) ) {
2342 if( tofDataVec1.size() == 0 ) {
2343 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
2347 else if( tofDataVec1.size() == 1 ) {
2348 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
2349 if( ((*iter1)->quality()&0x1ff)==0x01f &&
abs((*iter1)->ztdc()-zrhit)<
ztdc_Cut ) {
2353 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
2358 else if( tofDataVec1.size() > 1 ) {
2364 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
2370 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataBarrel: 2- Impossible!" << endl;
2373 else if( ( tofDataVec2.size() > 1 ) ) {
2374 if( tofDataVec1.size() == 0 ) {
2378 else if( tofDataVec1.size() == 1 ) {
2379 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
2380 if( ((*iter1)->quality()&0x1ff)==0x01f &&
abs((*iter1)->ztdc()-zrhit)<
ztdc_Cut ) {
2389 else if( tofDataVec1.size() > 1 ) {
2401 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataBarrel: 3- Impossible!" << endl;
2406 if( !(
tof->used()) ) {
2410 bool z1=
false, z2=
false;
2411 bool zc1=
false, zc2=
false;
2415 zc1 = ( m_zrhit1 >
tof->ztdc() );
2416 std::vector<MrpcDBSTrack*>::iterator
iter = tofTrackVec->begin();
2417 for( ;
iter!=tofTrackVec->end();
iter++ ) {
2418 if(
tof->tofId()==(*iter)->tofId1() ) {
2421 zc2 = ( (*iter)->zrhit1() >
tof->ztdc() );
2425 else if( iflag==2 ) {
2427 zc1 = ( m_zrhit2 >
tof->ztdc() );
2428 std::vector<MrpcDBSTrack*>::iterator
iter = tofTrackVec->begin();
2429 for( ;
iter!=tofTrackVec->end();
iter++ ) {
2430 if(
tof->tofId()==(*iter)->tofId2() ) {
2433 zc2 = ( (*iter)->zrhit2() >
tof->ztdc() );
2438 if( ( z1 && z2 )||( (!z1) && (!z2) ) ) {
2443 else if( !zc1 && zc2 ) {
2448 else if( z1 && !z2 ) {
2451 cout << iflag <<
" " << track->
quality1() <<
" " << track->
quality2() << endl;
2453 else if( !z1 && z2 ) {
2460 if( ( iflag == 1 ) || ( iflag == 3 ) ) {
2461 m_quality1 = ( m_quality1 | 0x300 );
2463 else if( iflag == 2 ) {
2464 m_quality2 = ( m_quality2 | 0x300 );
2467 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataBarrel: the 1- IFLAG is Out of Range!" << endl;
2471 qual = ( qual << 12 );
2472 if( ( iflag == 1 ) || ( iflag == 3 ) ) {
2473 m_quality1 = ( m_quality1 | qual );
2475 else if( iflag == 2 ) {
2476 m_quality2 = ( m_quality2 | qual );
2479 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataBarrel: the 2- IFLAG is Out of Range!" << endl;
2493 unsigned int qual = 0xf;
2494 if( tofDataVec2.size() == 0 )
2496 if( tofDataVec1.size() == 0 ) {
2499 else if( tofDataVec1.size() == 1 ) {
2500 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
2503 t_trans_with_extrap=
true;
2504 t_trans_with_dbs=
false;
2506 else if( tofDataVec1.size() == 2 ) {
2512 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
2516 std::vector<TofData*>::iterator
iter = tofDataVec1.begin();
2517 for( ;
iter != tofDataVec1.end();
iter++ )
2519 if( (*iter1)->tofId() == (*iter)->tofId() )
continue;
2520 m_corresponding_time=(*iter)->tdc();
2524 t_trans_with_dbs=
true;
2525 t_trans_with_extrap=
true;
2532 t_trans_with_extrap=
true;
2533 t_trans_with_dbs=
false;
2537 else if( tofDataVec1.size() > 2 ) {
2548 std::vector<TofData*>::iterator
iter = tofDataVec1.begin();
2549 for( ;
iter != tofDataVec1.end();
iter++ )
2551 if(
tofData1->tofId() == (*iter)->tofId())
continue;
2557 if( ((strip_2-1)==strip_1) && module_1==module_2)
2559 t_trans_with_dbs=
true;
2560 t_trans_with_extrap=
true;
2561 m_corresponding_time=(*iter)->tdc();
2566 if( ((strip_1-1)==strip_2) && module_1==module_2)
2568 t_trans_with_dbs=
true;
2569 t_trans_with_extrap=
true;
2570 m_corresponding_time=(*iter)->tdc();
2580 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofData: 1- Impossible!" << endl;
2585 else if( ( tofDataVec2.size() == 1 ) ) {
2587 if( tofDataVec1.size() == 0 )
2589 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
2592 t_trans_with_extrap=
false;
2593 t_trans_with_dbs=
false;
2595 else if( tofDataVec1.size() == 1 ) {
2596 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
2597 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
2602 else t_trans_with_extrap=
false;
2603 t_trans_with_dbs=
false;
2605 else if( tofDataVec1.size() == 2 ) {
2608 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
2612 t_trans_with_extrap=
false;
2613 t_trans_with_dbs=
false;
2620 t_trans_with_extrap=
true;
2621 t_trans_with_dbs=
true;
2623 std::vector<TofData*>::iterator
iter = tofDataVec1.begin();
2624 for( ;
iter != tofDataVec1.end();
iter++ )
2626 if(
tofData1->tofId() == (*iter)->tofId())
continue;
2627 m_corresponding_time=(*iter)->tdc();
2633 t_trans_with_extrap=
true;
2634 t_trans_with_dbs=
false;
2642 else if( tofDataVec1.size() > 2 )
2646 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
2649 t_trans_with_extrap=
false;
2650 t_trans_with_dbs=
false;
2654 t_trans_with_extrap=
true;
2662 std::vector<TofData*>::iterator
iter = tofDataVec1.begin();
2663 for( ;
iter != tofDataVec1.end();
iter++ )
2665 if(
tofData1->tofId() == (*iter)->tofId())
continue;
2671 if( ((strip_2-1)==strip_1) && module_1==module_2)
2673 t_trans_with_dbs=
true;
2674 m_corresponding_time=(*iter)->tdc();
2679 if( ((strip_1-1)==strip_2) && module_1==module_2)
2681 t_trans_with_dbs=
true;
2682 m_corresponding_time=(*iter)->tdc();
2694 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofData: 2- Impossible!" << endl;
2697 else if( ( tofDataVec2.size() > 1 ) )
2699 if( tofDataVec1.size() == 0 )
2710 std::vector<TofData*>::iterator
iter = tofDataVec2.begin();
2711 for( ;
iter != tofDataVec2.end();
iter++ )
2713 if(
tofData2->tofId() == (*iter)->tofId())
continue;
2719 if( ((strip_2-1)==strip_1) && module_1==module_2)
2721 t_trans_with_dbs=
true;
2722 m_corresponding_time=(*iter)->tdc();;
2727 if( ((strip_1-1)==strip_2) && module_1==module_2)
2729 t_trans_with_dbs=
true;
2730 m_corresponding_time=(*iter)->tdc();
2737 else if( tofDataVec1.size() == 1 )
2739 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
2744 t_trans_with_extrap=
true;
2745 t_trans_with_dbs=
false;
2757 std::vector<TofData*>::iterator
iter = tofDataVec2.begin();
2758 for( ;
iter != tofDataVec2.end();
iter++ )
2760 if(
tofData2->tofId() == (*iter)->tofId())
continue;
2766 if( ((strip_2-1)==strip_1) && module_1==module_2)
2768 t_trans_with_dbs=
true;
2769 m_corresponding_time=(*iter)->tdc();
2774 if( ((strip_1-1)==strip_2) && module_1==module_2)
2776 t_trans_with_dbs=
true;
2777 m_corresponding_time=(*iter)->tdc();
2787 else if( tofDataVec1.size() > 1 )
2795 t_trans_with_extrap=
true;
2802 std::vector<TofData*>::iterator
iter = tofDataVec1.begin();
2803 for( ;
iter != tofDataVec1.end();
iter++ )
2805 if(
tofData1->tofId() == (*iter)->tofId())
continue;
2811 if( ((strip_2-1)==strip_1) && module_1==module_2)
2813 t_trans_with_dbs=
true;
2814 m_corresponding_time=(*iter)->tdc();
2819 if( ((strip_1-1)==strip_2) && module_1==module_2)
2821 t_trans_with_dbs=
true;
2822 m_corresponding_time=(*iter)->tdc();
2836 std::vector<TofData*>::iterator
iter = tofDataVec2.begin();
2837 for( ;
iter != tofDataVec2.end();
iter++ )
2839 if(
tofData2->tofId() == (*iter)->tofId())
continue;
2845 if( ((strip_2-1)==strip_1) && module_1==module_2)
2847 t_trans_with_dbs=
true;
2848 m_corresponding_time=(*iter)->tdc();
2853 if( ((strip_1-1)==strip_2) && module_1==module_2)
2855 t_trans_with_dbs=
true;
2856 m_corresponding_time=(*iter)->tdc();
2866 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofData: 3- Impossible!" << endl;
2876 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofData: the 1- IFLAG is Out of Range!" << endl;
2881 qual = ( qual << 12 );
2882 if( ( iflag == 3 ) )
2884 m_quality1 = ( m_quality1 | qual );
2888 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofData: the 2- IFLAG is Out of Range!" << endl;
2898 std::vector<TofData*>::iterator
iter = tofDataVec.begin();
2902 for( ;
iter != tofDataVec.end();
iter++ )
2905 tof_id[j]=(*iter)->tofId();
2916 if( ((strip_1-1)==strip_2) && module_1==module_2)
return true;
2918 else if(strip_2%2==0)
2920 if( ((strip_2-1)==strip_1) && module_1==module_2)
return true;
2930 if( tofDataVec.size() == 0 ) {
2931 cout <<
"MrpcRecDBS::MrpcDBSTrack::ChooseTofDataMRPC: Size of TofData Vector is Zero!" << endl;
2934 std::vector<TofData*>::iterator igood = tofDataVec.begin();
2935 if( tofDataVec.size() > 1 ) {
2936 std::vector<TofData*>::iterator
iter = tofDataVec.begin();
2939 for( ;
iter != tofDataVec.end();
iter++ )
2941 if( (*iter)->adc() > maxQ ) {
2942 maxQ = (*iter)->adc();
2976 if( tofDataVec.size() == 0 ) {
2977 cout <<
"MrpcRecDBS::MrpcDBSTrack::ChooseTofData: Size of TofData Vector is Zero!" << endl;
2980 std::vector<TofData*>::iterator igood = tofDataVec.begin();
2981 if( tofDataVec.size() > 1 ) {
2983 double deltaZ = 1000.0;
2984 std::vector<TofData*>::iterator
iter = tofDataVec.begin();
2986 for( ;
iter != tofDataVec.end();
iter++ ) {
2987 if( ( (*iter)->quality() & 0x5 ) == 0x5 ) {
2988 if(
abs( (*iter)->ztdc() - zrhit ) < deltaZ ) {
2989 deltaZ =
abs( (*iter)->ztdc() - zrhit );
2995 if( deltaZ > 999.0 ) {
2996 iter = tofDataVec.begin();
2997 for( ;
iter != tofDataVec.end();
iter++ ) {
2998 if( ( (*iter)->quality() & 0xa ) == 0xa ) {
2999 if(
abs( (*iter)->zadc() - zrhit ) < deltaZ ) {
3000 deltaZ =
abs( (*iter)->zadc() - zrhit );
3008 if( deltaZ > 999.0 ) {
3009 unsigned int ibad = 0xf0;
3010 iter = tofDataVec.begin();
3011 for( ;
iter != tofDataVec.end();
iter++ ) {
3012 if( ( (*iter)->quality() & 0xf0 ) < ibad ) {
3014 ibad = ( (*iter)->quality() & 0xf0 );
3016 else if( ( (*iter)->quality() & 0xf0 ) == ibad ) {
3017 if( ( (*iter)->adc1() + (*iter)->adc2() ) > ( (*igood)->adc1() + (*igood)->adc2() ) ) {
3019 ibad = ( (*iter)->quality() & 0xf0 );
3059 unsigned int iflag = 3;
3060 unsigned int qual = 0xf;
3062 if( tofDataVec2.size() == 0 ) {
3063 if( tofDataVec1.size() == 0 ) {
3066 else if( tofDataVec1.size() == 1 ) {
3067 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
3071 else if( tofDataVec1.size() > 1 ) {
3076 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataEndcap: 1- Impossible!" << endl;
3079 else if( ( tofDataVec2.size() == 1 ) ) {
3080 if( tofDataVec1.size() == 0 ) {
3081 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
3085 else if( tofDataVec1.size() == 1 ) {
3086 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
3087 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
3091 else if( tofDataVec1.size() > 1 ) {
3093 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
3098 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataBarrel: 2- Impossible!" << endl;
3101 else if( ( tofDataVec2.size() > 1 ) ) {
3102 if( tofDataVec1.size() == 0 ) {
3106 else if( tofDataVec1.size() == 1 ) {
3107 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
3112 else if( tofDataVec1.size() > 1 ) {
3119 cout <<
"MrpcRecDBS::MrpcDBSTrack::findTofDataBarrel: 3- Impossible!" << endl;
3124 m_quality1 = ( m_quality1 | 0x300 );
3127 qual = ( qual << 12 );
3128 m_quality1 = ( m_quality1 | qual );
3139 if( tofDataVec.size() == 0 ) {
3140 cout <<
"MrpcRecDBS::MrpcDBSTrack::ChooseTofData: Size of TofData Vector is Zero!" << endl;
3143 std::vector<TofData*>::iterator igood = tofDataVec.begin();
3144 if( tofDataVec.size() > 1 ) {
3145 bool multihit =
false;
3146 std::vector<TofData*>::iterator
iter = tofDataVec.begin();
3147 for( ;
iter != tofDataVec.end();
iter++ ) {
3148 if( (*iter)->qtimes1()>1 ) { multihit =
true; }
3151 iter = tofDataVec.begin();
3153 double tcorr = -999.0;
3154 double deltaTMin = 999.0;
3155 for( ;
iter != tofDataVec.end();
iter++ ) {
3156 tcorr =
tofCaliSvc->
ETime( (*iter)->adc(), (*iter)->tdc()-m_estime, zr1[2], (*iter)->tofId() );
3157 for(
unsigned int i=0; i<5; i++ ) {
3158 if(
abs(tcorr-m_texpInner[i]) < deltaTMin ) {
3159 deltaTMin =
abs(tcorr-m_texpInner[i]);
3167 for( ;
iter != tofDataVec.end();
iter++ ) {
3168 if( (*iter)->adc() > maxQ ) {
3169 maxQ = (*iter)->adc();
3197 m_tofId1 =
tof->tofId();
3198 m_qch1 =
tof->adcChannelEast();
3199 m_adc1 =
tof->adc1();
3200 m_tdc1 =
tof->tdc1();
3201 m_qch2 =
tof->adcChannelWest();
3202 m_adc2 =
tof->adc2();
3203 m_tdc2 =
tof->tdc2();
3204 m_ztdc1 =
tof->ztdc();
3205 m_zadc1 =
tof->zadc();
3206 m_quality1 = ( m_quality1 | ( 0x1f &
tof->quality() ) );
3207 if( ( (
tof->quality() & 0x5 ) != 0x5 ) || ( ( (
tof->quality() & 0x5 ) == 0x5 ) && (
abs(
tof->ztdc() - m_zrhit1 ) >
ztdc_Cut ) ) ) {
3208 m_quality1 = ( m_quality1 | 0x100 );
3210 if( ( (
tof->quality() & 0xa ) != 0xa ) || ( ( (
tof->quality() & 0xa ) == 0xa ) && (
abs(
tof->zadc() - m_zrhit1 ) >
zadc_Cut ) ) ) {
3211 m_quality1 = ( m_quality1 | 0x200 );
3214 else if( iflag == 2 ) {
3215 m_tofId2 =
tof->tofId();
3216 m_qch3 =
tof->adcChannelEast();
3217 m_adc3 =
tof->adc1();
3218 m_tdc3 =
tof->tdc1();
3219 m_qch4 =
tof->adcChannelWest();
3220 m_adc4 =
tof->adc2();
3221 m_tdc4 =
tof->tdc2();
3222 m_ztdc2 =
tof->ztdc();
3223 m_zadc2 =
tof->zadc();
3224 m_quality2 = ( m_quality2 | ( 0x1f &
tof->quality() ) );
3225 if( ( (
tof->quality() & 0x5 ) != 0x5 ) || ( ( (
tof->quality() & 0x5 ) == 0x5 ) && (
abs(
tof->ztdc() - m_zrhit2 ) >
ztdc_Cut ) ) ) {
3226 m_quality2 = ( m_quality2 | 0x100 );
3228 if( ( (
tof->quality() & 0xa ) != 0xa ) || ( ( (
tof->quality() & 0xa ) == 0xa ) && (
abs(
tof->zadc() - m_zrhit2 ) >
zadc_Cut ) ) ) {
3229 m_quality2 = ( m_quality2 | 0x200 );
3232 else if( iflag == 3 ) {
3233 m_tofId1 =
tof->tofId();
3234 m_qch1 =
tof->adcChannel();
3235 m_adc1 =
tof->adc();
3236 m_tdc1 =
tof->tdc();
3237 m_quality1 = ( m_quality1 | ( 0x1f &
tof->quality() ) );
3238 m_quality1 = ( m_quality1 | 0x300 );
3241 cout <<
"MrpcRecDBS::MrpcDBSTrack::getTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
3254 m_tofId1 =
tof->tofId();
3255 m_adc1 =
tof->adc();
3256 m_tdc1 =
tof->tdc();
3257 m_quality1 =
tof->quality();
3258 m_quality1 = ( m_quality1 | 0x300 );
3270 cout <<
"MrpcRecDBS::MrpcDBSTrack::setTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
3284 m_tofId1 =
tof->tofId();
3285 m_qch1 =
tof->adcChannelEast();
3286 m_adc1 =
tof->adc1();
3287 m_tdc1 =
tof->tdc1();
3291 m_ztdc1 =
tof->ztdc();
3292 m_zadc1 =
tof->zadc();
3293 m_quality1 = ( ( m_quality1 & 0xfffffff0 ) | ( 0x1c &
tof->quality() ) );
3294 if( ( (
tof->quality() & 0x5 ) != 0x5 ) || ( ( (
tof->quality() & 0x5 ) == 0x5 ) && (
abs(
tof->ztdc() - m_zrhit1 ) >
ztdc_Cut ) ) ) {
3295 m_quality1 = ( m_quality1 | 0x100 );
3297 if( ( (
tof->quality() & 0xa ) != 0xa ) || ( ( (
tof->quality() & 0xa ) == 0xa ) && (
abs(
tof->zadc() - m_zrhit1 ) >
zadc_Cut ) ) ) {
3298 m_quality1 = ( m_quality1 | 0x200 );
3301 else if( iflag == 2 ) {
3302 m_tofId2 =
tof->tofId();
3303 m_qch3 =
tof->adcChannelEast();
3304 m_adc3 =
tof->adc1();
3305 m_tdc3 =
tof->tdc1();
3309 m_ztdc2 =
tof->ztdc();
3310 m_zadc2 =
tof->zadc();
3311 m_quality2 = ( ( m_quality2 & 0xfffffff0 ) | ( 0x1c &
tof->quality() ) );
3312 if( ( (
tof->quality() & 0x5 ) != 0x5 ) || ( ( (
tof->quality() & 0x5 ) == 0x5 ) && (
abs(
tof->ztdc() - m_zrhit2 ) >
ztdc_Cut ) ) ) {
3313 m_quality2 = ( m_quality2 | 0x100 );
3315 if( ( (
tof->quality() & 0xa ) != 0xa ) || ( ( (
tof->quality() & 0xa ) == 0xa ) && (
abs(
tof->zadc() - m_zrhit2 ) >
zadc_Cut ) ) ) {
3316 m_quality2 = ( m_quality2 | 0x200 );
3320 cout <<
"MrpcRecDBS::MrpcDBSTrack::getTofDataEast: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
3333 m_tofId1 =
tof->tofId();
3337 m_qch2 =
tof->adcChannelWest();
3338 m_adc2 =
tof->adc2();
3339 m_tdc2 =
tof->tdc2();
3340 m_ztdc1 =
tof->ztdc();
3341 m_zadc1 =
tof->zadc();
3342 m_quality1 = ( ( m_quality1 & 0xfffffff0 ) | ( 0x13 &
tof->quality() ) );
3343 if( ( (
tof->quality() & 0x5 ) != 0x5 ) || ( ( (
tof->quality() & 0x5 ) == 0x5 ) && (
abs(
tof->ztdc() - m_zrhit1 ) >
ztdc_Cut ) ) ) {
3344 m_quality1 = ( m_quality1 | 0x100 );
3346 if( ( (
tof->quality() & 0xa ) != 0xa ) || ( ( (
tof->quality() & 0xa ) == 0xa ) && (
abs(
tof->zadc() - m_zrhit1 ) >
zadc_Cut ) ) ) {
3347 m_quality1 = ( m_quality1 | 0x200 );
3350 else if( iflag == 2 ) {
3351 m_tofId2 =
tof->tofId();
3355 m_qch4 =
tof->adcChannelWest();
3356 m_adc4 =
tof->adc2();
3357 m_tdc4 =
tof->tdc2();
3358 m_ztdc2 =
tof->ztdc();
3359 m_zadc2 =
tof->zadc();
3360 m_quality2 = ( ( m_quality2 & 0xfffffff0 ) | ( 0x13 &
tof->quality() ) );
3361 if( ( (
tof->quality() & 0x5 ) != 0x5 ) || ( ( (
tof->quality() & 0x5 ) == 0x5 ) && (
abs(
tof->ztdc() - m_zrhit2 ) >
ztdc_Cut ) ) ) {
3362 m_quality2 = ( m_quality2 | 0x100 );
3364 if( ( (
tof->quality() & 0xa ) != 0xa ) || ( ( (
tof->quality() & 0xa ) == 0xa ) && (
abs(
tof->zadc() - m_zrhit2 ) >
zadc_Cut ) ) ) {
3365 m_quality2 = ( m_quality2 | 0x200 );
3369 cout <<
"MrpcRecDBS::MrpcDBSTrack::getTofDataWest: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
3391 m_quality1 = ( m_quality1 & 0x700 );
3395 else if( iflag == 2 ) {
3405 m_quality2 = ( m_quality2 & 0x700 );
3410 cout <<
"MrpcRecDBS::MrpcDBSTrack::getTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
3428 bool innerEast = ( ( m_quality1 & 0xc ) == 0xc );
3429 bool innerWest = ( ( m_quality1 & 0x3 ) == 0x3 );
3430 bool outerEast = ( ( m_quality2 & 0xc ) == 0xc );
3431 bool outerWest = ( ( m_quality2 & 0x3 ) == 0x3 );
3432 bool innerLayer = ( ( m_quality1 & 0xf ) == 0xf );
3433 bool outerLayer = ( ( m_quality2 & 0xf ) == 0xf );
3435 bool endcapData = ( ( m_quality1 & 0xc ) == 0xc );
3436 bool newmrpcendcapData = ( ( m_quality1 & 0xc ) == 0xc );
3439 for(
unsigned int i=0; i<5; i++ ) {
3440 m_texp[i] =
tofCaliSvc->
BTimeCluster( m_texpInner[i], m_texpOuter[i], m_zr1[i], m_zr2[i], m_tofId1, m_tofId2 );
3447 for(
unsigned int i=0; i<5; i++ ) {
3448 m_tof11[i] =
tofCaliSvc->
BTime1( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1,m_estime );
3457 for(
unsigned int i=0; i<5; i++ ) {
3458 m_tof12[i] =
tofCaliSvc->
BTime2( m_adc2, m_tdc2-m_estime, m_zr1[i], m_tofId1,m_estime );
3466 for(
unsigned int i=0; i<5; i++ ) {
3482 for(
unsigned int i=0; i<5; i++ ) {
3483 m_tof21[i] =
tofCaliSvc->
BTime1( m_adc3, m_tdc3-m_estime, m_zr2[i], m_tofId2,m_estime );
3491 for(
unsigned int i=0; i<5; i++ ) {
3492 m_tof22[i] =
tofCaliSvc->
BTime2( m_adc4, m_tdc4-m_estime, m_zr2[i], m_tofId2,m_estime );
3500 for(
unsigned int i=0; i<5; i++ ) {
3516 for(
unsigned int i=0; i<5; i++ ) {
3526 for(
unsigned int i=0; i<5; i++ ) {
3527 m_tof11[i] =
tofCaliSvc->
ETime( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1 );
3532 if( (m_quality1&0xa000)!=0 ) { m_quality = 4; }
3536 if( newmrpcendcap ) {
3537 if( newmrpcendcapData ) {
3548 double transmission_time=0;
3551 for(
unsigned int i=0; i<5; i++ )
3562 if(t_trans_with_extrap==
true)
3568 else if(t_trans_with_dbs==
true && t_trans_with_extrap==
false)
3572 double delta_t=(m_tdc1-m_corresponding_time);
3577 if(transmission_time<0.)
3579 t_trans_with_dbs=
false;
3584 if(t_trans_with_dbs==
false && t_trans_with_extrap==
false)
3590 m_tof11[i] = m_tdc1-m_estime-transmission_time;
3595 if(t_trans_with_extrap==
true){m_mrpc_dbs=0; m_mrpc_extrap=1; m_mrpc_ave=0;}
3596 else if(t_trans_with_dbs==
true && t_trans_with_extrap==
false){m_mrpc_dbs=1; m_mrpc_extrap=0; m_mrpc_ave=0;}
3597 else if(t_trans_with_dbs==
false && t_trans_with_extrap==
false){m_mrpc_dbs=0; m_mrpc_extrap=0; m_mrpc_ave=1;}
3601 m_stripidentifier=m_tofId1;
3604 m_trans_time=transmission_time;
3618 if( (m_quality1&0xa000)!=0 ) { m_quality = 4; }
3637 if( innerEast || innerWest || outerEast || outerWest ) {
3644 if( ( (m_quality1&0xa000)!=0 ) || ( (m_quality2&0xa000)!=0 ) ) {
3645 m_quality = m_quality + 3;
3649 if( ( (m_quality1&0x100)==0x100 ) || ( (m_quality2&0x100)==0x100 ) ) {
3650 if( ( m_quality == 1 ) || ( m_quality == 4 ) ) { m_quality = 7; }
3651 else if( ( m_quality == 2 ) || ( m_quality == 5 ) ) { m_quality = 8; }
3652 else if( ( m_quality == 3 ) || ( m_quality == 6 ) ) { m_quality = 9; }
3654 cout <<
"MrpcRecDBS::MrpcDBSTrack::setCalibration: Impossible!" << endl;
3671 bool innerEast = ( ( m_quality1 & 0xc ) == 0xc );
3672 bool innerWest = ( ( m_quality1 & 0x3 ) == 0x3 );
3673 bool outerEast = ( ( m_quality2 & 0xc ) == 0xc );
3674 bool outerWest = ( ( m_quality2 & 0x3 ) == 0x3 );
3690 if( outerEast && outerWest ) {
3698 cout <<
"MrpcRecDBS::MrpcDBSTrack:convert2RecTofTrackCol: 11- Impossible!" << endl;
3703 recTofTrackCol->push_back( atrack11 );
3718 if( outerEast && outerWest ) {
3726 cout <<
"MrpcRecDBS::MrpcDBSTrack:convert2RecTofTrackCol: 12- Impossible!" << endl;
3731 recTofTrackCol->push_back( atrack12 );
3734 if( innerEast && innerWest ) {
3742 if( outerEast && outerWest ) {
3750 cout <<
"MrpcRecDBS::TofTrack:convert2RecTofTrackCol: 1- Impossible!" << endl;
3754 recTofTrackCol->push_back( atrack1 );
3769 if( innerEast || innerWest ) {
3777 cout <<
"MrpcRecDBS::MrpcDBSTrack:convert2RecTofTrackCol: 21- Impossible!" << endl;
3782 recTofTrackCol->push_back( atrack21 );
3797 if( innerEast || innerWest ) {
3805 cout <<
"MrpcRecDBS::MrpcDBSTrack:convert2RecTofTrackCol: 22- Impossible!" << endl;
3810 recTofTrackCol->push_back( atrack22 );
3813 if( outerEast && outerWest ) {
3821 if( innerEast && innerWest ) {
3829 cout <<
"MrpcRecDBS::MrpcDBSTrack:convert2RecTofTrackCol: 2- Impossible!" << endl;
3833 recTofTrackCol->push_back( atrack2 );
3836 if( innerEast && innerWest && outerEast && outerWest ) {
3843 recTofTrackCol->push_back( atrack );
3863 cout <<
"MrpcRecDBS::MrpcDBSTrack:convert2RecTofTrackCol: endcap- Impossible!" << endl;
3869 recTofTrackCol->push_back( atrack );
3872 if( m_hitCase ==
NoHit ) {
3879 recTofTrackCol->push_back( atrack );
3899 for(
int i=0; i<6; i++ ) {
3904 track->
setT0( m_estime );
3912 if( ( layerorend == 11 ) || ( layerorend == 12 ) || ( layerorend == 1 ) ) {
3925 m_tofId1 = m_tofId1 + 100;
3931 m_tofId1 = m_tofId1 + 100 + 474;
3939 track->
setTexp( m_texpInner );
3950 if( ( layerorend==21 ) || ( layerorend==22 ) || ( layerorend==2 ) ) {
3955 track->
setTexp( m_texpOuter );
3960 if( layerorend==0 ) {
3971 if( layerorend == 3 ) {
3976 track->
setTexp( m_texpInner );
3988 for(
unsigned int i=0; i<6; i++ ) {
3992 if( layerorend == 0 ) {
3993 track->
setPh( m_ph );
3994 track->
setTof( m_tof[0] );
3996 for(
unsigned int i=0; i<5; i++ ) {
3997 toffset[i] = m_tof[0] - m_tof[i];
4000 track->
setBeta( m_path/m_tof[0]/30.0 );
4002 else if( layerorend == 1 ) {
4003 track->
setPh( m_ph1 );
4004 track->
setTof( m_tof1[0] );
4006 for(
unsigned int i=0; i<5; i++ ) {
4007 toffset[i] = m_tof1[0] - m_tof1[i];
4010 track->
setBeta( m_path1/m_tof1[0]/30.0 );
4012 else if( layerorend == 2 ) {
4013 track->
setPh( m_ph2 );
4014 track->
setTof( m_tof2[0] );
4016 for(
unsigned int i=0; i<5; i++ ) {
4017 toffset[i] = m_tof2[0] - m_tof2[i];
4020 track->
setBeta( m_path2/m_tof2[0]/30.0 );
4022 else if( layerorend == 11 ) {
4023 track->
setPh( m_ph11 );
4024 track->
setTof( m_tof11[0] );
4041 for(
unsigned int i=0; i<5; i++ ) {
4042 toffset[i] = m_tof11[0] - m_tof11[i];
4045 track->
setBeta( m_path1/m_tof11[0]/30.0 );
4049 else if( layerorend == 12 ) {
4050 track->
setPh( m_ph12 );
4051 track->
setTof( m_tof12[0] );
4053 for(
unsigned int i=0; i<5; i++ ) {
4054 toffset[i] = m_tof12[0] - m_tof12[i];
4057 track->
setBeta( m_path1/m_tof12[0]/30.0 );
4059 else if( layerorend == 21 ) {
4060 track->
setPh( m_ph21 );
4061 track->
setTof( m_tof21[0] );
4063 for(
unsigned int i=0; i<5; i++ ) {
4064 toffset[i] = m_tof21[0] - m_tof21[i];
4067 track->
setBeta( m_path2/m_tof21[0]/30.0 );
4069 else if( layerorend == 22 ) {
4070 track->
setPh( m_ph22 );
4071 track->
setTof( m_tof22[0] );
4073 for(
unsigned int i=0; i<5; i++ ) {
4074 toffset[i] = m_tof22[0] - m_tof22[i];
4077 track->
setBeta( m_path2/m_tof22[0]/30.0 );
4080 cout <<
"MrpcRecDBS MrpcDBSTrack::SetRecTofTrack layerorend = " << layerorend << endl;
4093 int neighbourmodule=0;
4097 if(strip==0)
return 0;
4104 if(layer==3 || layer== 5)
4106 neighbourmodule=module;
4110 neighbourmodule=module+1;
4111 if(neighbourmodule==19){neighbourmodule=1;}
4114 returnvalue= neighbourmodule;
4120 if(layer==4 || layer== 6)
4121 {neighbourmodule=module;}
4123 {neighbourmodule=module-1;
4124 if(neighbourmodule==0){neighbourmodule=18;}
4127 returnvalue=neighbourmodule;
4132 if(strip==23 || strip==24) {neighbourmodule=0;}
4135 neighbourmodule=module;
4137 returnvalue=neighbourmodule;
4142 if(strip==1 || strip==2) {neighbourmodule=0;}
4145 neighbourmodule=module;
4147 returnvalue=neighbourmodule;
4164 if( (which==
"l") || (which==
"r"))
4166 if(layer==3) returnvalue = 4;
4167 if(layer==4) returnvalue = 3;
4168 if(layer==5) returnvalue = 6;
4169 if(layer==6) returnvalue = 5;
4172 if(which==
"u")returnvalue = layer;
4173 if(which==
"b")returnvalue = layer;
4185 if(strip_base_24==0)
return 0;
4188 if((strip_base_24%2)==0)
4190 strip_base_24=strip_base_24/2;
4194 strip_base_24=(strip_base_24+1)/2;
4201 returnvalue= strip_base_24+1;
4202 if(returnvalue>12) returnvalue=0;
4207 returnvalue= strip_base_24-1;
4208 if(returnvalue<1) returnvalue=0;
4211 if( (which==
"l") || (which==
"r"))
4213 returnvalue= strip_base_24;
double sin(const BesAngle a)
double cos(const BesAngle a)
double abs(const EvtComplex &c)
bool innerLayer(HoughHit hit1, HoughHit hit2)
bool mrpc_dbs_debug_counter
ObjectVector< RecTofTrack > RecTofTrackCol
std::multimap< unsigned int, TofData * > TofDataMap
std::multimap< unsignedint, TofData * >::iterator IterTofDataMap
static double GetTransitionTime_dbsmatch(double delta_t, int my_strip)
static G4int Get_module_mrpc_from_unique_identifier(G4int unique_identifier_f)
static double Average_transition_time_dbs(G4int my_module)
static G4int Produce_unique_identifier(G4int module_mrpc_f, G4int readoutstripnumber_f)
static double GetTransitionTime_extrap_track(G4double x_mm, G4double y_mm, int partId_f, int module_mrpc_f, int my_strip)
static G4int Get_stripnumber_from_unique_identifier(G4int unique_identifier_f)
const double tof1Path() const
const Hep3Vector tof1Position() const
const string tof1VolumeName() const
const int tof1VolumeNumber() const
const double tof1() const
const Hep3Vector tof2Momentum() const
const Hep3Vector tof1Momentum() const
const double tof2() const
const double tof2PosSigmaAlongZ() const
const double tof1PosSigmaAlongX() const
const double tof2Path() const
const string tof2VolumeName() const
const int trackId() const
const double tof1PosSigmaAlongY() const
const double tof1PosSigmaAlongZ() const
const int tof2VolumeNumber() const
const Hep3Vector tof2Position() const
void setStatus(unsigned int status)
void setSigma(double sigma[6])
void setToffset(double toffset[6])
void setEnergy(double energy)
void setPath(double path)
void setTofTrackID(int tofTrackID)
void setSigmaMuon(double smu)
void setQuality(int quality)
void setZrHit(double zrhit)
void setSigmaProton(double sp)
void setErrTof(double etof)
void setErrT0(double errt0)
void setTexp(double texp[5])
void setBeta(double beta)
void setSigmaKaon(double sk)
void setErrEnergy(double errenergy)
void setTrackID(int trackID)
void setErrZ(double errz)
void setErrPhi(double errphi)
void setSigmaPion(double spi)
void setSigmaElectron(double se)
virtual const double BSigmaCounter(double zHit, unsigned id)=0
virtual const double BSigma2(double zHit, unsigned id)=0
virtual const double BTimeCluster(double tlayer1, double tlayer2, double z1, double z2, unsigned id1, unsigned int id2)=0
virtual const double EPulseHeight(double ADC, double rHit, double cost, unsigned int id)=0
virtual const double BTime2(double ADC, double TDC, double zHit, unsigned id, double t0)=0
virtual const double BTime1(double ADC, double TDC, double zHit, unsigned id, double t0)=0
virtual const double BTimeCounter(double tleft, double tright, double z, unsigned id)=0
virtual const double ZTDC(double tleft, double tright, unsigned id)=0
virtual const double BSigmaCluster(double zHit1, double zHit2, unsigned id1, unsigned id2)=0
virtual const double BPulseHeight(double ADC1, double ADC2, double zHit, double sint, unsigned int id)=0
virtual const double BSigma1(double zHit, unsigned id)=0
virtual const double ESigma(double rHit, unsigned id)=0
virtual const double ZADC(double qleft, double qright, unsigned id)=0
virtual const double ETime(double ADC, double TDC, double rHit, unsigned id)=0
double GetSigma(double, unsigned, int, bool)
void findTofDataEndcap(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
unsigned int quality1() const
ExtTrackCase hitCase() const
unsigned int barrel() const
void setRecTofTrack(RecTofTrack *track, int layerorend)
TofData * compareTofData(TofData *tofData1, TofData *tofData2, double zrhit)
void getTofDataNohit(unsigned int iflag)
MrpcCalibSvc * mrpcCaliSvc
unsigned int quality2() const
int kal(unsigned int i) const
TofData * chooseTofData(std::vector< TofData * > tofDataVec, double zrhit)
void setExtTrack(RecExtTrack *extTrack, int kal[5], double t0, int t0Stat)
void getTofData(TofData *tof, unsigned int iflag)
void getTofDataWest(TofData *tof, unsigned int iflag)
void setQuality1(int qual1)
void findTofDataMRPC(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag)
void setQuality2(int qual2)
std::vector< TofData * > tofData1() const
int get_mrpc_module_id_neighbour(string which, int stripid, int layer)
double tof(unsigned int i) const
int get_strip_number_neighbour_base_12(string which, int strip_base_24)
void getMultiHit(MrpcDBSTrack *&)
TofData * compareTofDataMRPC(TofData *tofData1, TofData *tofData2)
void getTofDataEast(TofData *tof, unsigned int iflag)
void getTofDataMRPC(TofData *, unsigned int)
void buildRecTofTrack(RecTofTrack *track, int layerorend)
TofData * chooseTofDataMRPC(std::vector< TofData *, std::allocator< TofData * > >)
void setTofData(TofDataMap tofDataMap, int)
TofData * chooseTofDataEndcap(std::vector< TofData * > tofDataVec, double zr1[5])
void findTofDataBarrel(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< MrpcDBSTrack * > *&tofTrackVec)
void tofDataAnalysis(TofData *tof, unsigned int iflag)
int get_mrpc_partid_neighbour(std::string, int)
std::vector< TofData * > tofData2() const
void match(std::vector< MrpcDBSTrack * > *&tofTrackVec)
void convert2RecTofTrackCol(RecTofTrackCol *recTofTrackCol)
bool two_digis_from_same_strip(std::vector< TofData * > tofDataVec)
TofData * compareTofDataEndcap(TofData *tofData1, TofData *tofData2)
unsigned int value() const
void setBarrelReadout(unsigned int layer, bool east)
void setEndcapCluster(bool east)
void setBarrelCounter(unsigned int layer)
void setBarrelCluster(unsigned int layer)
static value_type getIntID_mrpc(int partID, int scinNum)
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)