/[PAMELA software]/DarthVader/TrackerLevel2/inc/F77/common_momanhough.f
ViewVC logotype

Contents of /DarthVader/TrackerLevel2/inc/F77/common_momanhough.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri May 19 13:15:53 2006 UTC (18 years, 6 months ago) by mocchiut
Branch: MAIN
Branch point for: DarthVader
Initial revision

1
2 C These are the common blocks used in
3 C
4 C momanhough.f
5 C
6 C Author: Vannuccini Elena
7 C Date: 2004/2005
8 C
9 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
10 c SPEP 1 CLUSTERS ----> COUPLES and SINGLETS
11 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
12 c
13 c Variables to associate X and Y clusters in each plane
14 c according to
15 c * geometrical criteria
16 c * charge correlation
17 c
18 c------------------------------------------------------------------------
19 * cut on maximum number of cluster allowed for track finding
20 c parameter (nclstrmax_level2=10*nplanes)
21 parameter (nclstrmax_level2=5*nplanes)
22 * -----------------------------------------------------------
23 * maximum number of couples per plane and total
24 * (only to dimension the vectors)
25 parameter (ncouplemax=(nclstrmax_level2/nplanes)**2)
26 parameter (ncouplemaxtot=ncouplemax*nplanes)
27 * -----------------------------------------------------------
28 * maximum number of STORED couples
29 * (if the identified couples exceeds this number the
30 * track identification is not performed and the event is
31 * tagged as not good)
32 parameter (ncp_max=10*nplanes)
33 c parameter (ncp_max=ncouplemaxtot)
34
35 * -----------------------------------------------------------
36 * --- CLUSTERS ----------------------------------------------
37 * -----------------------------------------------------------
38 * mask for GOOD cluster
39 * 1 = good
40 * 0 = bad
41 * (- the three central strips should have BAD=0) NOT ANY MORE!
42 * - the charge should be greater than
43 * DEDX_X_MIN and DEDX_Y_MIN respectivelly
44 integer cl_good(nclstrmax_level2)
45 * -----------------------------------------------------------
46 * mask for clusters associated to a track
47 * 1 = used
48 * 0 = not used
49 integer cl_used(nclstrmax_level2)
50 * -----------------------------------------------------------
51 common/clusters/cl_good,cl_used
52
53 * -----------------------------------------------------------
54 * --- COUPLES -----------------------------------------------
55 * -----------------------------------------------------------
56 * Clusters are associated to form couples.
57 * The j-th couple on i-th plane is formed by
58 * clusters numbers CLX(i,j) and CLY(i,j)
59 integer clx(nplanes,ncouplemax),cly(nplanes,ncouplemax)
60 * number of couples
61 integer ncp_plane(nplanes) !per plane
62 integer ncp_tot !total
63 * -----------------------------------------------------------
64 * COMMENT:
65 * the REAL number of couples is NCP_TOT, however the VIRTUAL
66 * number of couples is 2*NCP_TOT becouse of the
67 * ambiguity in Y view (2 sensors)
68 * Each real couples has two images: one on sensor 1,
69 * the other on sensor 2
70 * -----------------------------------------------------------
71 common/couples/clx,cly,ncp_plane,ncp_tot
72 * -----------------------------------------------------------
73 * FUNCTIONS to retrieve couple info
74 *
75 * id_cp(ip,icp,is) -- returns a GLOBAL couple ID,
76 * given the plane, the sensor,
77 * and the couple id relative to the plane
78 * ID < 0 if sensor =1
79 * ID > 0 if sensor =2
80 *
81 * Given the global couple ID:
82 *
83 * ip_cp(id) -- returns the plane number
84 * is_cp(id) -- returns the plane number
85 * icp_cp(id) -- returns the id number relative to the plane
86 * -----------------------------------------------------------
87
88
89 * -----------------------------------------------------------
90 * --- SINGLETS ----------------------------------------------
91 * -----------------------------------------------------------
92 * single clusters, not associated in any couple
93 integer ncls(nplanes)
94 integer cls(nplanes,nclstrmax_level2)
95 * -----------------------------------------------------------
96 * mask for clusters not inlcuded in a couple
97 * 1 = single
98 * 0 = non single
99 integer cl_single(nclstrmax_level2)
100 * -----------------------------------------------------------
101 common/singlets/ncls,cls,cl_single
102
103
104 c+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
105 c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
106 c------------------------------------------------------------------------
107 c HOUGH-TRANSFORM parameters
108 c------------------------------------------------------------------------
109 c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
110 c+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
111
112 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
113 c SPEP 2 COUPLES ----> DOUBLETS and TRIPLETS
114 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
115 c
116 c Variables to associate couples in
117 C
118 c DOUBLETS for Y-Z view
119 c TRIPLETS for X-Z view
120 c
121 c The 3D particle track can be approximated with a straight line
122 c in the Y-Z view and with a circle sector in the X-Z view.
123 c The Hough trasform is applied independently to the two views.
124 c The parameters of the projected tracks are evaluated for each
125 c combination of points (doublets in YZ and triplets in XZ).
126 c
127 c Hence track candidates will be identified by looking for
128 c "clusters" of points (CLOUDS) in the parameter space.
129 c
130 c------------------------------------------------------------------------
131 parameter (ndblt_max=5000) !maximum number of doublets
132 parameter (ntrpt_max=10*ndblt_max) !maximum number of triplets
133 * -----------------------------------------------------------
134 * number of doublets and triplets
135 integer ndblt,ntrpt
136 * -----------------------------------------------------------
137 * List of couple absolute IDs that form doublets and triplets
138 integer cpyz1(ndblt_max),cpyz2(ndblt_max)
139 integer cpxz1(ntrpt_max),cpxz2(ntrpt_max),cpxz3(ntrpt_max)
140 * -----------------------------------------------------------
141 * parameters of the projected tracks
142 real
143 $ alfayz1(ndblt_max), !Y0
144 $ alfayz2(ndblt_max) !tg theta-yz
145 real
146 $ alfaxz1(ntrpt_max), !X0
147 $ alfaxz2(ntrpt_max), !tg theta-xz
148 $ alfaxz3(ntrpt_max) !1/r
149 * -----------------------------------------------------------
150 common/hough_param/
151 $ alfayz1, !Y0
152 $ alfayz2, !tg theta-yz
153 $ alfaxz1, !X0
154 $ alfaxz2, !tg theta-xz
155 $ alfaxz3 !1/r
156 common/doublets/ndblt,cpyz1,cpyz2
157 common/triplets/ntrpt,cpxz1,cpxz2,cpxz3
158
159 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
160 c SPEP 3 DOUBLETS and TRIPLETS ----> YZ and XZ-CLOUDS
161 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
162 c
163 c Variables to group doublets and triplets in CLOUDS, according to
164 c their relative distance in parameter space.
165 c The association is done indipendently on YZ and XZ views.
166 c
167 c------------------------------------------------------------------------
168 parameter (ncloyz_max=200)!maximum number of clouds
169 parameter (ncloxz_max=200)! "
170 * -----------------------------------------------------------
171 * Number of YZ and XZ clouds
172 integer nclouds_yz,nclouds_xz
173 * -----------------------------------------------------------
174 * mask to store combinations of couples selected as clouds
175 * NOTATION:
176 * 0 = not selected
177 * 1 = selected couple image in SENSOR 1
178 * 2 = selected couple image in SENSOR 2
179 * 3 = selected both images
180 integer cpcloud_yz(ncloyz_max,ncouplemaxtot)
181 integer cpcloud_xz(ncloxz_max,ncouplemaxtot)
182 * -----------------------------------------------------------
183 * doublet and triplet ID in the selected clouds
184 integer db_cloud(ndblt_max)
185 integer tr_cloud(ntrpt_max)
186 * -----------------------------------------------------------
187 * number of points in the cloud
188 integer ptcloud_yz(ncloyz_max)
189 integer ptcloud_xz(ncloxz_max)
190 * -----------------------------------------------------------
191 * average parameters
192 real alfayz1_av(ncloyz_max),alfayz2_av(ncloyz_max)
193 real alfaxz1_av(ncloxz_max),alfaxz2_av(ncloxz_max)
194 $ ,alfaxz3_av(ncloxz_max)
195 common/clouds_yz/
196 $ nclouds_yz
197 $ ,alfayz1_av,alfayz2_av
198 $ ,ptcloud_yz,db_cloud,cpcloud_yz
199 common/clouds_xz/
200 $ nclouds_xz
201 $ ,alfaxz1_av,alfaxz2_av,alfaxz3_av
202 $ ,ptcloud_xz,tr_cloud,cpcloud_xz
203
204 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
205 c SPEP 4 YZ and XZ-CLOUDS ----> TRACK CANDIDATES
206 c+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
207 c
208 c Variables to store information about track-candidates,
209 c evaluated by combining YZ and XZ clouds.
210 c
211 c NB ! ! !
212 c
213 c While until now the plane number followed the mechanical notation
214 c (1 to 6, from bottom to top), variables related to the tracks
215 c are referred to the mini notation (1 to 6, from top to bottom)
216 c
217 c------------------------------------------------------------------------
218
219
220 character*5 PFAdef
221 c common/PFAdefault/PFAdef
222 parameter (PFAdef='COG')
223
224 c------------------------------------------------------------------------
225 c variable related to track selection and fitting
226 c------------------------------------------------------------------------
227
228 * track candidates
229 PARAMETER (NTRACKSMAX=ncloyz_max*ncloxz_max)
230 INTEGER NTRACKS !number of track candidates
231 REAL AL_STORE(5,NTRACKSMAX)
232 REAL XM_STORE(NPLANES,NTRACKSMAX)
233 REAL YM_STORE(NPLANES,NTRACKSMAX)
234 REAL ZM_STORE(NPLANES,NTRACKSMAX)
235 REAL RESX_STORE(NPLANES,NTRACKSMAX)
236 REAL RESY_STORE(NPLANES,NTRACKSMAX)
237 REAL XV_STORE(NPLANES,NTRACKSMAX)
238 REAL YV_STORE(NPLANES,NTRACKSMAX)
239 REAL ZV_STORE(NPLANES,NTRACKSMAX)
240 REAL AXV_STORE(NPLANES,NTRACKSMAX)
241 REAL AYV_STORE(NPLANES,NTRACKSMAX)
242 REAL XGOOD_STORE(NPLANES,NTRACKSMAX)
243 REAL YGOOD_STORE(NPLANES,NTRACKSMAX)
244 INTEGER CP_STORE(NPLANES,NTRACKSMAX)
245 INTEGER CLS_STORE(NPLANES,NTRACKSMAX)
246 REAL RCHI2_STORE(NTRACKSMAX)
247 common/track_candidates/NTRACKS,AL_STORE
248 $ ,XV_STORE,YV_STORE,ZV_STORE
249 $ ,XM_STORE,YM_STORE,ZM_STORE
250 $ ,RESX_STORE,RESY_STORE
251 $ ,AXV_STORE,AYV_STORE
252 $ ,XGOOD_STORE,YGOOD_STORE
253 $ ,CP_STORE,CLS_STORE,RCHI2_STORE
254
255
256 * best-candidate selection
257 PARAMETER (CHI2MAX=15)
258
259
260
261
262

  ViewVC Help
Powered by ViewVC 1.1.23