/[PAMELA software]/DarthVader/ToFLevel2/src/rdtofcal.for
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/rdtofcal.for

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Sat Jun 17 12:14:56 2006 UTC revision 1.2 by pam-de, Fri Oct 20 12:22:18 2006 UTC
# Line 16  c--------------------------------------- Line 16  c---------------------------------------
16        character*250 calname        character*250 calname
17        character*250 calname1        character*250 calname1
18        character ch        character ch
19          character*2 ch2
20  c------------------------------------------------------------------  c------------------------------------------------------------------
21    
22        COMMON/QUEST/IQUEST(100)        COMMON/QUEST/IQUEST(100)
# Line 41  c---------------    open ToF calib rz fi Line 42  c---------------    open ToF calib rz fi
42  c------------------------------------------------------------------------  c------------------------------------------------------------------------
43    
44         do ii=1,250         do ii=1,250
45           ch=calname(ii:ii)  c         ch=calname(ii:ii)
46           if (ch.eq.'.') goto 100           ch2=calname(ii:ii+1)
47    c         write(*,*) ii,ch
48    c         if (ch.eq.'.') goto 100
49             if (ch2.eq.'rz') goto 100
50         enddo           enddo  
51  100   continue  100   continue
52        calname1 = calname(1:ii)//'rz'  c      calname1 = calname(1:ii)//'rz'
53           calname1 = calname(1:ii+1)
54    
55    c      print*,'__________ opening TOF calib rz file __________'
56    c      print*,calname
57    c      print*,calname1
58    
59         CALL HROPEN(59,'TOFK1131',calname1,'QP',4096,istat)         CALL HROPEN(59,'TOF K1A',calname1,'QP',4096,istat)
60    
61          if (istat.ne.0) then  ! check if HROPEN was OK          if (istat.ne.0) then  ! check if HROPEN was OK
62                write(*,*) 'Can''t open correct ToF calibration File !!!'                write(*,*) 'Can''t open correct ToF calibration File !!!'
63          stop          stop
64          endif          endif
65    
66    c        print*,' reading TOF CALIB n-tuple...'
67    
68          call HRIN(ntp_tofcalib,9999,0)          call HRIN(ntp_tofcalib,9999,0)
69    
70          call HBNAME(ntp_tofcalib,' ',0,'$CLEAR')          call HBNAME(ntp_tofcalib,' ',0,'$CLEAR')
71    
72          call HBNAME(ntp_tofcalib,'TOFK1131',k_s11s31,'$SET')          call HBNAME(ntp_tofcalib,'TOFKA',k_s11s31,'$SET')
73          call HBNAME(ntp_tofcalib,'TOFK1132',k_s11s32,'$SET')          call HBNAME(ntp_tofcalib,'TOFKB',k_s12s32,'$SET')
74          call HBNAME(ntp_tofcalib,'TOFK1231',k_s12s31,'$SET')          call HBNAME(ntp_tofcalib,'TOFKC',k_s21s31,'$SET')
75          call HBNAME(ntp_tofcalib,'TOFK1232',k_s12s32,'$SET')          call HBNAME(ntp_tofcalib,'TOFKD',k_s22s32,'$SET')
   
         call HBNAME(ntp_tofcalib,'TOFK2131',k_s21s31,'$SET')  
         call HBNAME(ntp_tofcalib,'TOFK2132',k_s21s32,'$SET')  
         call HBNAME(ntp_tofcalib,'TOFK2231',k_s22s31,'$SET')  
         call HBNAME(ntp_tofcalib,'TOFK2232',k_s22s32,'$SET')  
   
         call HBNAME(ntp_tofcalib,'TOFK1121',k_s11s21,'$SET')  
         call HBNAME(ntp_tofcalib,'TOFK1122',k_s11s22,'$SET')  
         call HBNAME(ntp_tofcalib,'TOFK1221',k_s12s21,'$SET')  
         call HBNAME(ntp_tofcalib,'TOFK1222',k_s12s22,'$SET')  
   
 C--------------  
76    
77          call HBNAME(ntp_tofcalib,'TOFLIN11',y_coor_lin11,'$SET')          call HBNAME(ntp_tofcalib,'TOFLIN11',y_coor_lin11,'$SET')
78          call HBNAME(ntp_tofcalib,'TOFLIN12',x_coor_lin12,'$SET')          call HBNAME(ntp_tofcalib,'TOFLIN12',x_coor_lin12,'$SET')
# Line 99  C-------------- Line 98  C--------------
98  c        call HPRNTU(ntp_tofcalib)  c        call HPRNTU(ntp_tofcalib)
99    
100          call HNOENT(ntp_tofcalib,iemax_cal)          call HNOENT(ntp_tofcalib,iemax_cal)
101    c        write(*,*) 'Number of Events CALIB ',iemax_cal
102    
103          do iev=1,iemax_cal          do iev=1,iemax_cal
104             call HGNT(ntp_tofcalib,iev,ierr) !reads an event             call HGNT(ntp_tofcalib,iev,ierr) !reads an event
105    c           write(34,*)iev,k1_s11s31,y_coor_lin11,tw11
106          enddo          enddo
107    
108          call hrout(ntp_tofcalib,icycle,' ')          call hrout(ntp_tofcalib,icycle,' ')
109          call hrend('TOFK1131')          call hrend('TOF K1A')
110          close(0)          close(0)
111    
112           return           return

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23