/[PAMELA software]/tof/ground/common_tofroutine.f
ViewVC logotype

Annotation of /tof/ground/common_tofroutine.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Thu Mar 9 12:31:47 2006 UTC (18 years, 9 months ago) by pam-de
Branch: v_tag, MAIN
CVS Tags: r_tag, HEAD
Changes since 1.1: +0 -0 lines
Initial Release

1 pam-de 1.1 * DATA ZTOF/55.,25.,-23/
2     *
3     * TOF data
4     * first index : 1 = A, 2 = B
5     * second index : 1.. number of paddle
6     * third index : 1 = TDC, 2 = ADC
7    
8     c INTEGER tof11(2,8,2),tof12(2,6,2)
9     c INTEGER tof21(2,2,2),tof22(2,2,2)
10     c INTEGER tof31(2,3,2),tof32(2,3,2)
11     REAL tof11(2,8,2),tof12(2,6,2)
12     REAL tof21(2,2,2),tof22(2,2,2)
13     REAL tof31(2,3,2),tof32(2,3,2)
14    
15     c Normalized ADC value
16     REAL adc_c(4,12)
17    
18     c k1 constans for calculation of beta
19     REAL k1_s11s31(24),k1_s12s32(18),k1_S21S31(6),k1_S22S32(6)
20    
21     c middle y (or x) position of the upper and middle ToF-Paddle
22     c to calculate theta-angle without track information
23     REAL tof11_x(8), tof21_y(2), tof31_x(3)
24     REAL tof12_y(6), tof22_x(2), tof32_y(3)
25    
26     c relation of time differences in a tof paddle and the location of the
27     c passage of the particle
28     c first index : 1... number of paddle
29     c second index : 1 = offset, 2 = slope
30     REAL y_coor_lin11(8,2),x_coor_lin12(6,2)
31     REAL x_coor_lin21(2,2),y_coor_lin22(2,2)
32     REAL y_coor_lin31(3,2),x_coor_lin32(3,2)
33    
34     c ADC(x) - correction
35     c first index : 1 = left, 2 = right
36     c second index : 1..8 number of paddle
37     c third index: parameter as follows
38     c left: xkorr=par(1)*exp(-x/par(2))
39     c right:xkorr=par(1)*exp(x/par(2))
40     c then:adc(x,right/left)=adc(x,right/left)/xkorr
41     c normalize to x=0 (middle of paddle)
42     REAL adcx11(2,8,2),adcx12(2,6,2)
43     REAL adcx21(2,2,2),adcx22(2,2,2)
44     REAL adcx31(2,3,2),adcx32(2,3,2)
45    
46    
47     c Time Walk - correction
48     c first index : 1 = left, 2 = right
49     c second index : 1..8 number of paddle
50     REAL tw11(2,8),tw12(2,6)
51     REAL tw21(2,2),tw22(2,2)
52     REAL tw31(2,3),tw32(2,3)
53    
54    
55     c value for status of each PM-data
56     c first index : 1 = left, 2 = right
57     c second index : 1... number of paddle
58     INTEGER tof11_event(2,8),tof12_event(2,6)
59     INTEGER tof21_event(2,2),tof22_event(2,2)
60     INTEGER tof31_event(2,3),tof32_event(2,3)
61    
62     C----
63    
64     INTEGER left,right,top,bot,mid,itdc,iadc
65     INTEGER tdc_ev, adc_ev, none_ev, none_find
66     INTEGER offset, slope
67     INTEGER tof11_i,tof21_i,tof31_i,tof11_j,tof21_j,tof31_j
68     INTEGER tof12_i,tof22_i,tof32_i,tof12_j,tof22_j,tof32_j
69     * REAL adcoff(4,2,52),a,b
70     c REAL delta_x12,delta_y12,delta_x23,delta_y23,delta_x13,delta_y13
71     REAL xtofpos(3),ytofpos(3)
72     REAL xkorr, secure
73     INTEGER i, j, ihelp
74     LOGICAL check
75     REAL theta12,theta13,theta23
76    
77     REAL beta_a(5)
78    
79     INTEGER tof_i_flag(6),tof_j_flag(6)
80    
81    
82     DATA TOFfst / 0/
83    
84     PARAMETER (tofarm23 = 45.)
85     PARAMETER (tofarm13 = 81.)
86     PARAMETER (c2_13=108.) ! = 2.*tofarm13*0.01/(3.E08*50.E-12)
87     PARAMETER (c2_23=60.) ! = 2.*tofarm23*0.01/(3.E08*50.E-12)
88    
89    
90     * S11 8 paddles 33.0 x 5.1 cm
91     * S12 6 paddles 40.8 x 5.5 cm
92     * S21 2 paddles 18.0 x 7.5 cm
93     * S22 2 paddles 15.0 x 9.0 cm
94     * S31 3 paddles 15.0 x 6.0 cm
95     * S32 3 paddles 18.0 x 5.0 cm
96    
97     DATA tof11_x/ -17.85,-12.75,-7.65,-2.55,2.55,7.65,12.75,17.85/
98     DATA tof12_y/ -13.75,-8.25,-2.75,2.75,8.25,13.75/
99     DATA tof21_y/ -3.75,3.75/
100     DATA tof22_x/ -4.5,4.5/
101     DATA tof31_x/ -6.0,0.,6.0/
102     DATA tof32_y/ -5.0,0.0,5.0/
103    
104     integer ch11a(8),hb11a(8),ch11b(8),hb11b(8)
105     integer ch12a(6),hb12a(6),ch12b(6),hb12b(6)
106     integer ch21a(2),hb21a(2),ch21b(2),hb21b(2)
107     integer ch22a(2),hb22a(2),ch22b(2),hb22b(2)
108     integer ch31a(3),hb31a(3),ch31b(3),hb31b(3)
109     integer ch32a(3),hb32a(3),ch32b(3),hb32b(3)
110    
111    
112     data ch11a / 4, 4, 4, 4, 1, 1, 2, 2/
113     data hb11a / 1, 3, 5, 7, 10, 12, 2, 4/
114     data ch11b / 2, 2, 2, 2, 1, 1, 1, 1/
115     data hb11b / 6, 8, 12, 10, 8, 6, 4, 2/
116    
117     data ch12a / 3, 3, 3, 3, 3, 3/
118     data hb12a / 2, 4, 6, 8, 10, 12/
119     data ch12b / 4, 4, 4, 4, 4, 4/
120     data hb12b / 12, 10, 8, 6, 4, 2/
121    
122     data ch21a / 1, 1/
123     data hb21a / 1, 5/
124     data ch21b / 2, 1/
125     data hb21b / 9, 7/
126    
127     data ch22a / 1, 1/
128     data hb22a / 3, 9/
129     data ch22b / 2, 1/
130     data hb22b / 11, 11/
131    
132     data ch31a / 2, 3, 3/
133     data hb31a / 7, 9, 11/
134     data ch31b / 2, 2, 2/
135     data hb31b / 5, 3, 1/
136    
137     data ch32a / 3, 3, 4/
138     data hb32a / 1, 5, 9/
139     data ch32b / 3, 3, 4/
140     data hb32b / 3, 7, 11/
141    
142     common / tofcalc /k1_s11s31,k1_s12s32,k1_S21S31,
143     & k1_S22S32,beta_a,
144     & adcx11,adcx12,adcx21,adcx22,adcx31,adcx32,
145     & tw11,tw12,tw21,tw22,tw31,tw32,
146     & y_coor_lin11,x_coor_lin12,x_coor_lin21,
147     & y_coor_lin22,y_coor_lin31,x_coor_lin32,
148     & xtofpos,ytofpos,adc_c,tof_i_flag,tof_j_flag

  ViewVC Help
Powered by ViewVC 1.1.23