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 |
|
|
subroutine analysisflight |
10 |
|
|
|
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 |
|
|
* flag to chose PFA |
21 |
|
|
character*10 PFA |
22 |
|
|
common/FINALPFA/PFA |
23 |
|
|
|
24 |
|
|
c parameter (inf=1.e8) !just a huge number... |
25 |
|
|
|
26 |
|
|
* external functions |
27 |
|
|
external npl |
28 |
|
|
external acoordsi,coordsi,nld,coord,dcoord |
29 |
|
|
|
30 |
|
|
************************************************************ |
31 |
|
|
************************************************************ |
32 |
|
|
************************************************************ |
33 |
|
|
* |
34 |
|
|
* track analysis |
35 |
|
|
* |
36 |
|
|
************************************************************ |
37 |
|
|
************************************************************ |
38 |
|
|
************************************************************ |
39 |
|
|
PFA='ETA' |
40 |
|
|
|
41 |
|
|
if(DEBUG)then |
42 |
|
|
print*,'----------------------------------' |
43 |
pam-fi |
1.3 |
c print*,'START... ',good1,nclstr1,nclstrmax_level2 |
44 |
mocchiut |
1.1 |
endif |
45 |
|
|
|
46 |
|
|
*------------------------------------------------------ |
47 |
|
|
call init_level2 |
48 |
pam-fi |
1.8 |
c call init_hough |
49 |
mocchiut |
1.1 |
*------------------------------------------------------ |
50 |
|
|
|
51 |
|
|
*------------------------------------------------------ |
52 |
|
|
* cut on maximum number of clusters |
53 |
|
|
*------------------------------------------------------ |
54 |
pam-fi |
1.4 |
c$$$ if(nclstr1.gt.nclstrmax_level2)then |
55 |
|
|
c$$$ goto 8800 !fill nt-uple and go to next event |
56 |
|
|
c$$$ endif |
57 |
mocchiut |
1.1 |
|
58 |
|
|
do i=1,nclstr1 |
59 |
|
|
cl_used(i)=0 !init mask of clusters associated to a track |
60 |
|
|
enddo |
61 |
|
|
|
62 |
|
|
if(DEBUG)then |
63 |
|
|
print*,'----------------------------------' |
64 |
|
|
print*,iev,' ** ',nev2 |
65 |
|
|
endif |
66 |
|
|
|
67 |
|
|
* /////////////////////////////////////////////// |
68 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
69 |
|
|
|
70 |
|
|
iflag=0 |
71 |
|
|
call track_finding(iflag) |
72 |
|
|
if(iflag.eq.1)then !bad event |
73 |
|
|
goto 880 !fill ntp and go to next event |
74 |
|
|
endif |
75 |
|
|
|
76 |
pam-fi |
1.8 |
c call fill_hough |
77 |
pam-fi |
1.7 |
|
78 |
mocchiut |
1.1 |
iflag=0 |
79 |
|
|
call track_fitting(iflag) |
80 |
|
|
if(iflag.eq.1)then !bad event |
81 |
|
|
goto 880 !fill ntp and go to next event |
82 |
|
|
endif |
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
880 continue |
87 |
|
|
|
88 |
|
|
* ********************************************************** |
89 |
|
|
* stores info about clusters not associated with any track |
90 |
|
|
* ********************************************************** |
91 |
|
|
|
92 |
|
|
call fill_level2_siglets |
93 |
|
|
|
94 |
|
|
if(DEBUG)then |
95 |
|
|
|
96 |
|
|
print*,'' |
97 |
|
|
print*,'DONE!' |
98 |
|
|
print*,'' |
99 |
|
|
print*,'* summary *' |
100 |
|
|
print*,'tracks ',ntrk |
101 |
|
|
print*,'cl used ',(cl_used(i),i=1,nclstr1) |
102 |
|
|
print*,'' |
103 |
|
|
print*,'' |
104 |
|
|
endif |
105 |
pam-fi |
1.5 |
|
106 |
|
|
ngood = 0 |
107 |
|
|
do iv = 1,nviews |
108 |
|
|
ngood = ngood + good1(iv) |
109 |
|
|
enddo |
110 |
pam-fi |
1.6 |
c$$$ if(ngood.ne.0)print*,'* WARNING * Event ' |
111 |
|
|
c$$$ $ ,':LEVEL2 event status: ' |
112 |
|
|
c$$$ $ ,(good2(i),i=1,nviews) |
113 |
mocchiut |
1.1 |
|
114 |
|
|
8800 continue |
115 |
|
|
|
116 |
|
|
|
117 |
|
|
* /////////////////////////////////////////////// |
118 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
119 |
|
|
|
120 |
|
|
100 continue |
121 |
|
|
|
122 |
|
|
return |
123 |
|
|
end |
124 |
|
|
|
125 |
|
|
|
126 |
|
|
************************************************************ |
127 |
|
|
|
128 |
|
|
|