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.10 |
if(fin.eq.0)PFA='ETA' |
47 |
|
|
if(fin.eq.2)PFA='ETA2' |
48 |
|
|
if(fin.eq.3)PFA='ETA3' |
49 |
|
|
if(fin.eq.4)PFA='ETA4' |
50 |
|
|
if(fin.eq.10)PFA='COG' |
51 |
|
|
if(fin.eq.11)PFA='COG1' |
52 |
|
|
if(fin.eq.12)PFA='COG2' |
53 |
|
|
if(fin.eq.13)PFA='COG3' |
54 |
|
|
if(fin.eq.14)PFA='COG4' |
55 |
|
|
|
56 |
|
|
c$$$ PFA='ETA' |
57 |
|
|
c$$$ DEBUG=.true. |
58 |
|
|
|
59 |
|
|
if(DEBUG)PRINT*,'P.F.A. --> ',fin,PFA |
60 |
mocchiut |
1.1 |
|
61 |
|
|
if(DEBUG)then |
62 |
|
|
print*,'----------------------------------' |
63 |
pam-fi |
1.3 |
c print*,'START... ',good1,nclstr1,nclstrmax_level2 |
64 |
mocchiut |
1.1 |
endif |
65 |
|
|
|
66 |
|
|
*------------------------------------------------------ |
67 |
|
|
call init_level2 |
68 |
pam-fi |
1.9 |
call init_hough |
69 |
mocchiut |
1.1 |
*------------------------------------------------------ |
70 |
|
|
|
71 |
|
|
*------------------------------------------------------ |
72 |
|
|
* cut on maximum number of clusters |
73 |
|
|
*------------------------------------------------------ |
74 |
pam-fi |
1.4 |
c$$$ if(nclstr1.gt.nclstrmax_level2)then |
75 |
|
|
c$$$ goto 8800 !fill nt-uple and go to next event |
76 |
|
|
c$$$ endif |
77 |
mocchiut |
1.1 |
|
78 |
|
|
do i=1,nclstr1 |
79 |
|
|
cl_used(i)=0 !init mask of clusters associated to a track |
80 |
|
|
enddo |
81 |
|
|
|
82 |
|
|
if(DEBUG)then |
83 |
|
|
print*,'----------------------------------' |
84 |
|
|
print*,iev,' ** ',nev2 |
85 |
|
|
endif |
86 |
|
|
|
87 |
|
|
* /////////////////////////////////////////////// |
88 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
89 |
|
|
|
90 |
|
|
iflag=0 |
91 |
|
|
call track_finding(iflag) |
92 |
|
|
if(iflag.eq.1)then !bad event |
93 |
|
|
goto 880 !fill ntp and go to next event |
94 |
|
|
endif |
95 |
|
|
|
96 |
pam-fi |
1.9 |
call fill_hough |
97 |
pam-fi |
1.7 |
|
98 |
mocchiut |
1.1 |
iflag=0 |
99 |
|
|
call track_fitting(iflag) |
100 |
|
|
if(iflag.eq.1)then !bad event |
101 |
|
|
goto 880 !fill ntp and go to next event |
102 |
|
|
endif |
103 |
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
|
|
880 continue |
107 |
|
|
|
108 |
|
|
* ********************************************************** |
109 |
|
|
* stores info about clusters not associated with any track |
110 |
|
|
* ********************************************************** |
111 |
|
|
|
112 |
|
|
call fill_level2_siglets |
113 |
|
|
|
114 |
|
|
if(DEBUG)then |
115 |
|
|
|
116 |
|
|
print*,'' |
117 |
|
|
print*,'DONE!' |
118 |
|
|
print*,'' |
119 |
|
|
print*,'* summary *' |
120 |
|
|
print*,'tracks ',ntrk |
121 |
|
|
print*,'cl used ',(cl_used(i),i=1,nclstr1) |
122 |
|
|
print*,'' |
123 |
|
|
print*,'' |
124 |
|
|
endif |
125 |
pam-fi |
1.5 |
|
126 |
|
|
ngood = 0 |
127 |
|
|
do iv = 1,nviews |
128 |
|
|
ngood = ngood + good1(iv) |
129 |
|
|
enddo |
130 |
pam-fi |
1.6 |
c$$$ if(ngood.ne.0)print*,'* WARNING * Event ' |
131 |
|
|
c$$$ $ ,':LEVEL2 event status: ' |
132 |
|
|
c$$$ $ ,(good2(i),i=1,nviews) |
133 |
mocchiut |
1.1 |
|
134 |
|
|
8800 continue |
135 |
|
|
|
136 |
|
|
|
137 |
|
|
* /////////////////////////////////////////////// |
138 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
139 |
|
|
|
140 |
|
|
100 continue |
141 |
|
|
|
142 |
|
|
return |
143 |
|
|
end |
144 |
|
|
|
145 |
|
|
|
146 |
|
|
************************************************************ |
147 |
|
|
|
148 |
|
|
|