1 |
mocchiut |
1.1 |
************************************************************************* |
2 |
|
|
* Program analysis.f |
3 |
|
|
* |
4 |
|
|
* - reads cluster information (LEVEL1, reduction.f output ntuple) |
5 |
|
|
* - perform track identification and fit |
6 |
|
|
* - create LEVEL2 ntuple |
7 |
|
|
* |
8 |
|
|
************************************************************************* |
9 |
pam-fi |
1.10 |
subroutine analysisflight(fin) |
10 |
mocchiut |
1.1 |
|
11 |
|
|
include 'commontracker.f' |
12 |
pam-fi |
1.4 |
include 'level1.f' |
13 |
mocchiut |
1.1 |
include 'common_momanhough.f' |
14 |
|
|
include 'common_mech.f' |
15 |
|
|
include 'common_xyzPAM.f' |
16 |
|
|
include 'common_mini_2.f' |
17 |
|
|
include 'calib.f' |
18 |
|
|
include 'level2.f' |
19 |
|
|
|
20 |
pam-fi |
1.10 |
* input flag |
21 |
|
|
* |
22 |
|
|
* 0 - PFA = ETA |
23 |
|
|
* 1 - PFA = COG4 |
24 |
|
|
integer fin |
25 |
|
|
|
26 |
mocchiut |
1.1 |
* flag to chose PFA |
27 |
|
|
character*10 PFA |
28 |
|
|
common/FINALPFA/PFA |
29 |
|
|
|
30 |
|
|
c parameter (inf=1.e8) !just a huge number... |
31 |
|
|
|
32 |
|
|
* external functions |
33 |
|
|
external npl |
34 |
|
|
external acoordsi,coordsi,nld,coord,dcoord |
35 |
|
|
|
36 |
|
|
************************************************************ |
37 |
|
|
************************************************************ |
38 |
|
|
************************************************************ |
39 |
|
|
* |
40 |
|
|
* track analysis |
41 |
|
|
* |
42 |
|
|
************************************************************ |
43 |
|
|
************************************************************ |
44 |
|
|
************************************************************ |
45 |
|
|
PFA='ETA' |
46 |
pam-fi |
1.11 |
TRACKMODE = 0 |
47 |
pam-fi |
1.13 |
FACT = 100. |
48 |
|
|
ISTEPMIN = 3 |
49 |
pam-fi |
1.10 |
if(fin.eq.0)PFA='ETA' |
50 |
|
|
if(fin.eq.2)PFA='ETA2' |
51 |
|
|
if(fin.eq.3)PFA='ETA3' |
52 |
|
|
if(fin.eq.4)PFA='ETA4' |
53 |
|
|
if(fin.eq.10)PFA='COG' |
54 |
|
|
if(fin.eq.11)PFA='COG1' |
55 |
|
|
if(fin.eq.12)PFA='COG2' |
56 |
|
|
if(fin.eq.13)PFA='COG3' |
57 |
|
|
if(fin.eq.14)PFA='COG4' |
58 |
|
|
|
59 |
|
|
c$$$ PFA='ETA' |
60 |
|
|
c$$$ DEBUG=.true. |
61 |
pam-fi |
1.12 |
c$$$ DEBUG=.false. |
62 |
pam-fi |
1.10 |
|
63 |
|
|
if(DEBUG)PRINT*,'P.F.A. --> ',fin,PFA |
64 |
mocchiut |
1.1 |
|
65 |
|
|
if(DEBUG)then |
66 |
|
|
print*,'----------------------------------' |
67 |
pam-fi |
1.3 |
c print*,'START... ',good1,nclstr1,nclstrmax_level2 |
68 |
mocchiut |
1.1 |
endif |
69 |
|
|
|
70 |
|
|
*------------------------------------------------------ |
71 |
|
|
call init_level2 |
72 |
pam-fi |
1.9 |
call init_hough |
73 |
mocchiut |
1.1 |
*------------------------------------------------------ |
74 |
|
|
|
75 |
|
|
*------------------------------------------------------ |
76 |
|
|
* cut on maximum number of clusters |
77 |
|
|
*------------------------------------------------------ |
78 |
pam-fi |
1.4 |
c$$$ if(nclstr1.gt.nclstrmax_level2)then |
79 |
|
|
c$$$ goto 8800 !fill nt-uple and go to next event |
80 |
|
|
c$$$ endif |
81 |
mocchiut |
1.1 |
|
82 |
|
|
do i=1,nclstr1 |
83 |
|
|
cl_used(i)=0 !init mask of clusters associated to a track |
84 |
|
|
enddo |
85 |
|
|
|
86 |
|
|
if(DEBUG)then |
87 |
|
|
print*,'----------------------------------' |
88 |
|
|
print*,iev,' ** ',nev2 |
89 |
|
|
endif |
90 |
|
|
|
91 |
|
|
* /////////////////////////////////////////////// |
92 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
93 |
|
|
|
94 |
|
|
iflag=0 |
95 |
|
|
call track_finding(iflag) |
96 |
|
|
if(iflag.eq.1)then !bad event |
97 |
|
|
goto 880 !fill ntp and go to next event |
98 |
|
|
endif |
99 |
|
|
|
100 |
pam-fi |
1.9 |
call fill_hough |
101 |
pam-fi |
1.7 |
|
102 |
mocchiut |
1.1 |
iflag=0 |
103 |
|
|
call track_fitting(iflag) |
104 |
|
|
if(iflag.eq.1)then !bad event |
105 |
|
|
goto 880 !fill ntp and go to next event |
106 |
|
|
endif |
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
880 continue |
111 |
|
|
|
112 |
|
|
* ********************************************************** |
113 |
|
|
* stores info about clusters not associated with any track |
114 |
|
|
* ********************************************************** |
115 |
|
|
|
116 |
|
|
call fill_level2_siglets |
117 |
|
|
|
118 |
|
|
if(DEBUG)then |
119 |
|
|
|
120 |
|
|
print*,'' |
121 |
|
|
print*,'DONE!' |
122 |
|
|
print*,'' |
123 |
|
|
print*,'* summary *' |
124 |
|
|
print*,'tracks ',ntrk |
125 |
|
|
print*,'cl used ',(cl_used(i),i=1,nclstr1) |
126 |
|
|
print*,'' |
127 |
|
|
print*,'' |
128 |
|
|
endif |
129 |
pam-fi |
1.5 |
|
130 |
|
|
ngood = 0 |
131 |
|
|
do iv = 1,nviews |
132 |
|
|
ngood = ngood + good1(iv) |
133 |
|
|
enddo |
134 |
pam-fi |
1.6 |
c$$$ if(ngood.ne.0)print*,'* WARNING * Event ' |
135 |
|
|
c$$$ $ ,':LEVEL2 event status: ' |
136 |
|
|
c$$$ $ ,(good2(i),i=1,nviews) |
137 |
mocchiut |
1.1 |
|
138 |
|
|
8800 continue |
139 |
|
|
|
140 |
|
|
|
141 |
|
|
* /////////////////////////////////////////////// |
142 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
143 |
|
|
|
144 |
|
|
100 continue |
145 |
|
|
|
146 |
|
|
return |
147 |
|
|
end |
148 |
|
|
|
149 |
|
|
|
150 |
|
|
************************************************************ |
151 |
|
|
|
152 |
|
|
|