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.15 |
subroutine analysisflight |
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 |
pam-fi |
1.15 |
c integer fin |
23 |
pam-fi |
1.10 |
|
24 |
mocchiut |
1.1 |
* 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 |
pam-fi |
1.15 |
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 |
pam-fi |
1.10 |
|
61 |
pam-fi |
1.16 |
c if(DEBUG.EQ.1)PRINT*,'P.F.A. --> ',fin,PFA |
62 |
mocchiut |
1.1 |
|
63 |
pam-fi |
1.16 |
if(DEBUG.EQ.1)then |
64 |
mocchiut |
1.1 |
print*,'----------------------------------' |
65 |
pam-fi |
1.15 |
print*,'Settings: ' |
66 |
pam-fi |
1.16 |
print*,'PFA ',pfaid,' ---> ',PFA |
67 |
pam-fi |
1.15 |
print*,'tracking mode ',trackmode |
68 |
|
|
print*,'fit-tolerance factor ',fact |
69 |
|
|
print*,'minimum n.step ',istepmin |
70 |
pam-fi |
1.16 |
|
71 |
mocchiut |
1.1 |
endif |
72 |
|
|
|
73 |
|
|
*------------------------------------------------------ |
74 |
|
|
call init_level2 |
75 |
pam-fi |
1.9 |
call init_hough |
76 |
mocchiut |
1.1 |
*------------------------------------------------------ |
77 |
|
|
|
78 |
|
|
*------------------------------------------------------ |
79 |
|
|
* cut on maximum number of clusters |
80 |
|
|
*------------------------------------------------------ |
81 |
pam-fi |
1.4 |
c$$$ if(nclstr1.gt.nclstrmax_level2)then |
82 |
|
|
c$$$ goto 8800 !fill nt-uple and go to next event |
83 |
|
|
c$$$ endif |
84 |
mocchiut |
1.1 |
|
85 |
|
|
do i=1,nclstr1 |
86 |
|
|
cl_used(i)=0 !init mask of clusters associated to a track |
87 |
|
|
enddo |
88 |
|
|
|
89 |
pam-fi |
1.16 |
c$$$ if(DEBUG.EQ.1)then |
90 |
|
|
c$$$ print*,'----------------------------------' |
91 |
|
|
c$$$ print*,iev,' ** ',nev2 |
92 |
|
|
c$$$ endif |
93 |
mocchiut |
1.1 |
|
94 |
|
|
* /////////////////////////////////////////////// |
95 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
96 |
|
|
|
97 |
|
|
iflag=0 |
98 |
|
|
call track_finding(iflag) |
99 |
|
|
if(iflag.eq.1)then !bad event |
100 |
|
|
goto 880 !fill ntp and go to next event |
101 |
|
|
endif |
102 |
|
|
|
103 |
pam-fi |
1.9 |
call fill_hough |
104 |
pam-fi |
1.7 |
|
105 |
mocchiut |
1.1 |
iflag=0 |
106 |
|
|
call track_fitting(iflag) |
107 |
|
|
if(iflag.eq.1)then !bad event |
108 |
|
|
goto 880 !fill ntp and go to next event |
109 |
|
|
endif |
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
880 continue |
114 |
|
|
|
115 |
|
|
* ********************************************************** |
116 |
|
|
* stores info about clusters not associated with any track |
117 |
|
|
* ********************************************************** |
118 |
|
|
|
119 |
|
|
call fill_level2_siglets |
120 |
|
|
|
121 |
pam-fi |
1.16 |
if(DEBUG.EQ.1)then |
122 |
mocchiut |
1.1 |
|
123 |
|
|
print*,'' |
124 |
|
|
print*,'DONE!' |
125 |
|
|
print*,'' |
126 |
|
|
print*,'* summary *' |
127 |
|
|
print*,'tracks ',ntrk |
128 |
|
|
print*,'cl used ',(cl_used(i),i=1,nclstr1) |
129 |
|
|
print*,'' |
130 |
|
|
print*,'' |
131 |
|
|
endif |
132 |
pam-fi |
1.5 |
|
133 |
|
|
ngood = 0 |
134 |
|
|
do iv = 1,nviews |
135 |
|
|
ngood = ngood + good1(iv) |
136 |
|
|
enddo |
137 |
pam-fi |
1.6 |
c$$$ if(ngood.ne.0)print*,'* WARNING * Event ' |
138 |
|
|
c$$$ $ ,':LEVEL2 event status: ' |
139 |
|
|
c$$$ $ ,(good2(i),i=1,nviews) |
140 |
mocchiut |
1.1 |
|
141 |
|
|
8800 continue |
142 |
|
|
|
143 |
|
|
|
144 |
|
|
* /////////////////////////////////////////////// |
145 |
|
|
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
146 |
|
|
|
147 |
|
|
100 continue |
148 |
|
|
|
149 |
|
|
return |
150 |
|
|
end |
151 |
|
|
|
152 |
|
|
|
153 |
|
|
************************************************************ |
154 |
|
|
|
155 |
|
|
|