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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Oct 26 16:22:37 2006 UTC (18 years, 1 month ago) by pam-fi
Branch: MAIN
Changes since 1.2: +6 -4 lines
fitting methods

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

  ViewVC Help
Powered by ViewVC 1.1.23