32 |
INTEGER icount |
INTEGER icount |
33 |
|
|
34 |
REAL beta_mean |
REAL beta_mean |
35 |
|
INTEGER j |
36 |
|
|
37 |
REAL theta12,theta13,theta23 |
REAL theta12,theta13,theta23 |
38 |
C-- DATA ZTOF/53.74,53.04,23.94,23.44,-23.49,-24.34/ !Sergio 9.05.2006 |
C-- DATA ZTOF/53.74,53.04,23.94,23.44,-23.49,-24.34/ !Sergio 9.05.2006 |
81 |
beta_a(i) = 100. |
beta_a(i) = 100. |
82 |
enddo |
enddo |
83 |
|
|
84 |
|
do i=1,4 |
85 |
|
do j=1,12 |
86 |
|
adc_c(i,j) = 1000. |
87 |
|
enddo |
88 |
|
enddo |
89 |
|
|
90 |
|
do i=1,12 |
91 |
|
do j=1,4 |
92 |
|
tofmask(j,i) = 0 |
93 |
|
enddo |
94 |
|
enddo |
95 |
|
|
96 |
C------ read tracking routine |
C------ read tracking routine |
97 |
* igoodevent = igoodevent+1 |
* igoodevent = igoodevent+1 |
98 |
* assigned input parameters for track routine |
* assigned input parameters for track routine |
241 |
enddo |
enddo |
242 |
endif |
endif |
243 |
|
|
244 |
|
C------------------------------------------------------------------ |
245 |
|
C--- calculate track position in paddle using timing difference |
246 |
|
C------------------------------------------------------------------ |
247 |
|
|
248 |
|
do i=1,3 |
249 |
|
xtofpos(i)=100. |
250 |
|
ytofpos(i)=100. |
251 |
|
enddo |
252 |
|
C-----------------------------S1 -------------------------------- |
253 |
|
|
254 |
|
IF (tof11_i.GT.none_find) THEN |
255 |
|
ytofpos(1) = ((tof11(1,tof11_i,itdc)-tof11(2,tof11_i,itdc))/2. |
256 |
|
+ -y_coor_lin11(tof11_i,offset))/y_coor_lin11(tof11_i,slope) |
257 |
|
endif |
258 |
|
|
259 |
|
IF (tof12_i.GT.none_find) THEN |
260 |
|
xtofpos(1) = ((tof12(1,tof12_i,itdc)-tof12(2,tof12_i,itdc))/2. |
261 |
|
+ -x_coor_lin12(tof12_i,offset))/x_coor_lin12(tof12_i,slope) |
262 |
|
endif |
263 |
|
|
264 |
|
|
265 |
|
C-----------------------------S2 -------------------------------- |
266 |
|
|
267 |
|
IF (tof21_i.GT.none_find) THEN |
268 |
|
xtofpos(2) = ((tof21(1,tof21_i,itdc)-tof21(2,tof21_i,itdc))/2. |
269 |
|
+ -x_coor_lin21(tof21_i,offset))/x_coor_lin21(tof21_i,slope) |
270 |
|
endif |
271 |
|
|
272 |
|
IF (tof22_i.GT.none_find) THEN |
273 |
|
ytofpos(2) = ((tof22(1,tof22_i,itdc)-tof22(2,tof22_i,itdc))/2. |
274 |
|
+ -y_coor_lin22(tof22_i,offset))/y_coor_lin22(tof22_i,slope) |
275 |
|
endif |
276 |
|
|
277 |
|
|
278 |
|
C-----------------------------S3 -------------------------------- |
279 |
|
|
280 |
|
IF (tof31_i.GT.none_find) THEN |
281 |
|
ytofpos(3) = ((tof31(1,tof31_i,itdc)-tof31(2,tof31_i,itdc))/2. |
282 |
|
+ -y_coor_lin31(tof31_i,offset))/y_coor_lin31(tof31_i,slope) |
283 |
|
endif |
284 |
|
|
285 |
|
IF (tof32_i.GT.none_find) THEN |
286 |
|
xtofpos(3) = ((tof32(1,tof32_i,itdc)-tof32(2,tof32_i,itdc))/2. |
287 |
|
+ -x_coor_lin32(tof32_i,offset))/x_coor_lin32(tof32_i,slope) |
288 |
|
endif |
289 |
|
|
290 |
|
|
291 |
|
do i=1,3 |
292 |
|
if (abs(xtofpos(i)).gt.100.) then |
293 |
|
xtofpos(i)=101. |
294 |
|
endif |
295 |
|
if (abs(ytofpos(i)).gt.100.) then |
296 |
|
ytofpos(i)=101. |
297 |
|
endif |
298 |
|
enddo |
299 |
|
|
300 |
C---------------------------------------------------------------------- |
C---------------------------------------------------------------------- |
301 |
C--------------------Corrections on ADC-data ------------------------- |
C--------------------Corrections on ADC-data ------------------------- |
302 |
C---------------------zenith angle theta --------------------------- |
C---------------------zenith angle theta --------------------------- |
463 |
c2 = k_S11S31(2,ihelp) |
c2 = k_S11S31(2,ihelp) |
464 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
465 |
& beta_a(1) = c2/(cos(theta13)*(ds-c1)) |
& beta_a(1) = c2/(cos(theta13)*(ds-c1)) |
466 |
|
|
467 |
|
C------- ToF Mask - S11 - S31 |
468 |
|
|
469 |
|
tofmask(ch11a(tof11_i),hb11a(tof11_i)) = |
470 |
|
$ tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1 |
471 |
|
tofmask(ch11b(tof11_i),hb11b(tof11_i)) = |
472 |
|
$ tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1 |
473 |
|
|
474 |
|
tofmask(ch31a(tof31_i),hb31a(tof31_i)) = |
475 |
|
$ tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1 |
476 |
|
tofmask(ch31b(tof31_i),hb31b(tof31_i)) = |
477 |
|
$ tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1 |
478 |
|
|
479 |
|
C------- |
480 |
|
|
481 |
ENDIF |
ENDIF |
482 |
|
|
483 |
C S11 - S32 |
C S11 - S32 |
490 |
c2 = k_S11S32(2,ihelp) |
c2 = k_S11S32(2,ihelp) |
491 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
492 |
& beta_a(2) = c2/(cos(theta13)*(ds-c1)) |
& beta_a(2) = c2/(cos(theta13)*(ds-c1)) |
493 |
|
|
494 |
|
C------- ToF Mask - S11 - S32 |
495 |
|
|
496 |
|
tofmask(ch11a(tof11_i),hb11a(tof11_i)) = |
497 |
|
$ tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1 |
498 |
|
tofmask(ch11b(tof11_i),hb11b(tof11_i)) = |
499 |
|
$ tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1 |
500 |
|
|
501 |
|
tofmask(ch32a(tof32_i),hb32a(tof32_i)) = |
502 |
|
$ tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1 |
503 |
|
tofmask(ch32b(tof32_i),hb32b(tof32_i)) = |
504 |
|
$ tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1 |
505 |
|
|
506 |
|
C------- |
507 |
|
|
508 |
ENDIF |
ENDIF |
509 |
|
|
510 |
C S12 - S31 |
C S12 - S31 |
517 |
c2 = k_S12S31(2,ihelp) |
c2 = k_S12S31(2,ihelp) |
518 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
519 |
& beta_a(3) = c2/(cos(theta13)*(ds-c1)) |
& beta_a(3) = c2/(cos(theta13)*(ds-c1)) |
520 |
|
|
521 |
|
C------- ToF Mask - S12 - S31 |
522 |
|
|
523 |
|
tofmask(ch12a(tof12_i),hb12a(tof12_i)) = |
524 |
|
$ tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1 |
525 |
|
tofmask(ch12b(tof12_i),hb12b(tof12_i)) = |
526 |
|
$ tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1 |
527 |
|
|
528 |
|
tofmask(ch31a(tof31_i),hb31a(tof31_i)) = |
529 |
|
$ tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1 |
530 |
|
tofmask(ch31b(tof31_i),hb31b(tof31_i)) = |
531 |
|
$ tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1 |
532 |
|
|
533 |
|
C------- |
534 |
|
|
535 |
ENDIF |
ENDIF |
536 |
|
|
537 |
C S12 - S32 |
C S12 - S32 |
544 |
c2 = k_S12S32(2,ihelp) |
c2 = k_S12S32(2,ihelp) |
545 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
546 |
& beta_a(4) = c2/(cos(theta13)*(ds-c1)) |
& beta_a(4) = c2/(cos(theta13)*(ds-c1)) |
547 |
|
|
548 |
|
C------- ToF Mask - S12 - S32 |
549 |
|
|
550 |
|
tofmask(ch12a(tof12_i),hb12a(tof12_i)) = |
551 |
|
$ tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1 |
552 |
|
tofmask(ch12b(tof12_i),hb12b(tof12_i)) = |
553 |
|
$ tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1 |
554 |
|
|
555 |
|
tofmask(ch32a(tof32_i),hb32a(tof32_i)) = |
556 |
|
$ tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1 |
557 |
|
tofmask(ch32b(tof32_i),hb32b(tof32_i)) = |
558 |
|
$ tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1 |
559 |
|
|
560 |
|
C------- |
561 |
|
|
562 |
ENDIF |
ENDIF |
563 |
|
|
564 |
C S21 - S31 |
C S21 - S31 |
571 |
c2 = k_S21S31(2,ihelp) |
c2 = k_S21S31(2,ihelp) |
572 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
573 |
& beta_a(5) = c2/(cos(theta23)*(ds-c1)) |
& beta_a(5) = c2/(cos(theta23)*(ds-c1)) |
574 |
|
|
575 |
|
C------- ToF Mask - S21 - S31 |
576 |
|
|
577 |
|
tofmask(ch21a(tof21_i),hb21a(tof21_i)) = |
578 |
|
$ tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1 |
579 |
|
tofmask(ch21b(tof21_i),hb21b(tof21_i)) = |
580 |
|
$ tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1 |
581 |
|
|
582 |
|
tofmask(ch31a(tof31_i),hb31a(tof31_i)) = |
583 |
|
$ tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1 |
584 |
|
tofmask(ch31b(tof31_i),hb31b(tof31_i)) = |
585 |
|
$ tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1 |
586 |
|
|
587 |
|
C------- |
588 |
|
|
589 |
ENDIF |
ENDIF |
590 |
|
|
591 |
C S21 - S32 |
C S21 - S32 |
598 |
c2 = k_S21S32(2,ihelp) |
c2 = k_S21S32(2,ihelp) |
599 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
600 |
& beta_a(6) = c2/(cos(theta23)*(ds-c1)) |
& beta_a(6) = c2/(cos(theta23)*(ds-c1)) |
601 |
|
|
602 |
|
C------- ToF Mask - S21 - S32 |
603 |
|
|
604 |
|
tofmask(ch21a(tof21_i),hb21a(tof21_i)) = |
605 |
|
$ tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1 |
606 |
|
tofmask(ch21b(tof21_i),hb21b(tof21_i)) = |
607 |
|
$ tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1 |
608 |
|
|
609 |
|
tofmask(ch32a(tof32_i),hb32a(tof32_i)) = |
610 |
|
$ tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1 |
611 |
|
tofmask(ch32b(tof32_i),hb32b(tof32_i)) = |
612 |
|
$ tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1 |
613 |
|
|
614 |
|
C------- |
615 |
|
|
616 |
ENDIF |
ENDIF |
617 |
|
|
618 |
C S22 - S31 |
C S22 - S31 |
625 |
c2 = k_S22S31(2,ihelp) |
c2 = k_S22S31(2,ihelp) |
626 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
627 |
& beta_a(7) = c2/(cos(theta13)*(ds-c1)) |
& beta_a(7) = c2/(cos(theta13)*(ds-c1)) |
628 |
|
|
629 |
|
C------- ToF Mask - S22 - S31 |
630 |
|
|
631 |
|
tofmask(ch22a(tof22_i),hb22a(tof22_i)) = |
632 |
|
$ tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1 |
633 |
|
tofmask(ch22b(tof22_i),hb22b(tof22_i)) = |
634 |
|
$ tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1 |
635 |
|
|
636 |
|
tofmask(ch31a(tof31_i),hb31a(tof31_i)) = |
637 |
|
$ tofmask(ch31a(tof31_i),hb31a(tof31_i)) + 1 |
638 |
|
tofmask(ch31b(tof31_i),hb31b(tof31_i)) = |
639 |
|
$ tofmask(ch31b(tof31_i),hb31b(tof31_i)) + 1 |
640 |
|
|
641 |
|
C------- |
642 |
|
|
643 |
ENDIF |
ENDIF |
644 |
|
|
645 |
C S22 - S32 |
C S22 - S32 |
652 |
c2 = k_S22S32(2,ihelp) |
c2 = k_S22S32(2,ihelp) |
653 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
654 |
& beta_a(8) = c2/(cos(theta13)*(ds-c1)) |
& beta_a(8) = c2/(cos(theta13)*(ds-c1)) |
655 |
|
|
656 |
|
C------- ToF Mask - S22 - S32 |
657 |
|
|
658 |
|
tofmask(ch22a(tof22_i),hb22a(tof22_i)) = |
659 |
|
$ tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1 |
660 |
|
tofmask(ch22b(tof22_i),hb22b(tof22_i)) = |
661 |
|
$ tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1 |
662 |
|
|
663 |
|
tofmask(ch32a(tof32_i),hb32a(tof32_i)) = |
664 |
|
$ tofmask(ch32a(tof32_i),hb32a(tof32_i)) + 1 |
665 |
|
tofmask(ch32b(tof32_i),hb32b(tof32_i)) = |
666 |
|
$ tofmask(ch32b(tof32_i),hb32b(tof32_i)) + 1 |
667 |
|
|
668 |
|
C------- |
669 |
|
|
670 |
ENDIF |
ENDIF |
671 |
|
|
672 |
C S11 - S21 |
C S11 - S21 |
679 |
c2 = k_S11S21(2,ihelp) |
c2 = k_S11S21(2,ihelp) |
680 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
681 |
& beta_a(9) = c2/(cos(theta12)*(ds-c1)) |
& beta_a(9) = c2/(cos(theta12)*(ds-c1)) |
682 |
|
|
683 |
|
C------- ToF Mask - S11 - S21 |
684 |
|
|
685 |
|
tofmask(ch11a(tof11_i),hb11a(tof11_i)) = |
686 |
|
$ tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1 |
687 |
|
tofmask(ch11b(tof11_i),hb11b(tof11_i)) = |
688 |
|
$ tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1 |
689 |
|
|
690 |
|
tofmask(ch21a(tof21_i),hb21a(tof21_i)) = |
691 |
|
$ tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1 |
692 |
|
tofmask(ch21b(tof21_i),hb21b(tof21_i)) = |
693 |
|
$ tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1 |
694 |
|
|
695 |
|
C------- |
696 |
|
|
697 |
ENDIF |
ENDIF |
698 |
|
|
699 |
C S11 - S22 |
C S11 - S22 |
706 |
c2 = k_S11S22(2,ihelp) |
c2 = k_S11S22(2,ihelp) |
707 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
708 |
& beta_a(10) = c2/(cos(theta12)*(ds-c1)) |
& beta_a(10) = c2/(cos(theta12)*(ds-c1)) |
709 |
|
|
710 |
|
C------- ToF Mask - S11 - S22 |
711 |
|
|
712 |
|
tofmask(ch11a(tof11_i),hb11a(tof11_i)) = |
713 |
|
$ tofmask(ch11a(tof11_i),hb11a(tof11_i)) + 1 |
714 |
|
tofmask(ch11b(tof11_i),hb11b(tof11_i)) = |
715 |
|
$ tofmask(ch11b(tof11_i),hb11b(tof11_i)) + 1 |
716 |
|
|
717 |
|
tofmask(ch22a(tof22_i),hb22a(tof22_i)) = |
718 |
|
$ tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1 |
719 |
|
tofmask(ch22b(tof22_i),hb22b(tof22_i)) = |
720 |
|
$ tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1 |
721 |
|
|
722 |
|
C------- |
723 |
|
|
724 |
ENDIF |
ENDIF |
725 |
|
|
726 |
C S12 - S21 |
C S12 - S21 |
733 |
c2 = k_S12S21(2,ihelp) |
c2 = k_S12S21(2,ihelp) |
734 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
735 |
& beta_a(11) = c2/(cos(theta12)*(ds-c1)) |
& beta_a(11) = c2/(cos(theta12)*(ds-c1)) |
736 |
|
|
737 |
|
C------- ToF Mask - S12 - S21 |
738 |
|
|
739 |
|
tofmask(ch12a(tof12_i),hb12a(tof12_i)) = |
740 |
|
$ tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1 |
741 |
|
tofmask(ch12b(tof12_i),hb12b(tof12_i)) = |
742 |
|
$ tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1 |
743 |
|
|
744 |
|
tofmask(ch21a(tof21_i),hb21a(tof21_i)) = |
745 |
|
$ tofmask(ch21a(tof21_i),hb21a(tof21_i)) + 1 |
746 |
|
tofmask(ch21b(tof21_i),hb21b(tof21_i)) = |
747 |
|
$ tofmask(ch21b(tof21_i),hb21b(tof21_i)) + 1 |
748 |
|
|
749 |
|
C------- |
750 |
|
|
751 |
ENDIF |
ENDIF |
752 |
|
|
753 |
C S12 - S22 |
C S12 - S22 |
760 |
c2 = k_S12S22(2,ihelp) |
c2 = k_S12S22(2,ihelp) |
761 |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
if ((xhelp1.lt.8000.).and.(xhelp2.lt.8000)) |
762 |
& beta_a(12) = c2/(cos(theta12)*(ds-c1)) |
& beta_a(12) = c2/(cos(theta12)*(ds-c1)) |
763 |
|
|
764 |
|
C------- ToF Mask - S12 - S22 |
765 |
|
|
766 |
|
tofmask(ch12a(tof12_i),hb12a(tof12_i)) = |
767 |
|
$ tofmask(ch12a(tof12_i),hb12a(tof12_i)) + 1 |
768 |
|
tofmask(ch12b(tof12_i),hb12b(tof12_i)) = |
769 |
|
$ tofmask(ch12b(tof12_i),hb12b(tof12_i)) + 1 |
770 |
|
|
771 |
|
tofmask(ch22a(tof22_i),hb22a(tof22_i)) = |
772 |
|
$ tofmask(ch22a(tof22_i),hb22a(tof22_i)) + 1 |
773 |
|
tofmask(ch22b(tof22_i),hb22b(tof22_i)) = |
774 |
|
$ tofmask(ch22b(tof22_i),hb22b(tof22_i)) + 1 |
775 |
|
|
776 |
|
C------- |
777 |
|
|
778 |
ENDIF |
ENDIF |
779 |
|
|
780 |
C------- |
C------- |