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