/[PAMELA software]/eventviewer/flight/src/ptlevel1.for
ViewVC logotype

Contents of /eventviewer/flight/src/ptlevel1.for

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Mon Mar 20 10:36:48 2006 UTC (18 years, 8 months ago) by mocchiut
Branch: FEventViewer
CVS Tags: v1r02, v1r03, v1r00, start
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
First flight release (limited capabilities)

1 subroutine ptlevel1()
2
3 c LOGICAL CHAIN
4 c CHARACTER*128 CFILE
5 c INTEGER IDNEVT,NCHEVT,ICHEVT
6 c REAL OBS(13)
7 *
8 c COMMON /PAWIDN/ IDNEVT,OBS
9 c COMMON /PAWCHN/ CHAIN, NCHEVT, ICHEVT
10 c COMMON /PAWCHC/ CFILE
11 *
12 *-- Ntuple Variable Declarations
13 *
14 REAL DEDX(500),CLSIGNAL(8500),CNEV(12,24)
15 INTEGER NEV1,NCLSTR1,VIEW(500),LADDER(500),MAXS(500),MULT(500)
16 & ,INDSTART(500),INDMAX(500),TOTCLLENGTH
17 LOGICAL GOOD1
18 *
19 integer ncl(2)
20 real clp(3,500)
21 real cls(2,500)
22 real clz(2,500)
23 real sigma_matrix(12,3072)
24 c
25 Integer pkt_type1;
26 Integer pkt_num1;
27 Integer obt1;
28 Integer which_calib1;
29
30 c
31 c parameter(NWPAWC=8)
32 c common/pawc/hmem(NWPAWC)
33 c save/pawc/
34 c common/quest/iquest(1)
35 c save/quest/
36 c
37 c
38
39 COMMON /PWCR4/ GOOD1,NEV1,
40 & pkt_type1,pkt_num1,obt1,which_calib1,
41 & NCLSTR1,VIEW,LADDER,MAXS,MULT,DEDX
42 & ,INDSTART,INDMAX,TOTCLLENGTH,CLSIGNAL,CNEV,
43 & ncl,clp,cls,clz,sigma_matrix
44 SAVE /PWCR4/
45
46 *
47
48 *-- Enter user code here
49 *
50 c integer ,nstripsview(12)
51 integer ind,ic,cllength,lows,highs,nstrips,is
52 c integer sflag(12,3072) !to avoid putting more than one time a
53 c strip in a histogram when a cluster is more than one time contained in
54 c clsignal array (usually these are the double peaked clusters)
55 real sign,noise,clinclcut
56
57 real zlevel(12)
58 data zlevel/22.28,22.28,13.38,13.38,4.48,4.48,
59 + -4.42,-4.42,-13.32,-13.32,-22.23,-22.23/
60
61 parameter(incut=5)
62 parameter(signcut=50.)
63
64 c parameter(traslys=2151)
65 parameter(traslys=2115) !INVERSIONE?????????????
66
67 c call hlimit(nwpawc)
68
69
70 * ***********
71
72 c PRINT *,'TRACKER: evento ',nev1
73 c event_num_trk(1) = nev1
74 c event_num_trk(1) = mod(nev1,1000000)
75 c
76 c do i = 1, 12
77 c do j = 1, 3072
78 c if ( sigma_matrix(i,j).ne.0. )
79 c & print *,'sigma(',i,',',j,') = ',sigma_matrix(i,j)
80 c enddo
81 c enddo
82 c print *,' nclstr = ',nclstr1
83 c do i = 1, nclstr1
84 c print *,' view(',i,') ',view(i)
85 c print *,' ladder(',i,') ',ladder(i)
86 c enddo
87 c
88
89 ind=0
90
91 nclx = 0
92 ncly = 0
93
94 c print*,'acidenti a me ',event_num_trk(1),nclstr1
95
96 do ic=1,nclstr1
97
98 if(ic.ne.nclstr1) then
99 cllength=indstart(ic+1)-indstart(ic)
100 else
101 cllength=(totCLlength+1)-indstart(ic)
102 endif
103
104 lows=maxs(ic)-(indmax(ic)-indstart(ic))
105 highs=lows+cllength-1
106
107 sign=0.
108 noise=0.
109 nstrips=0
110 posx = 0.
111 posy1 = 0.
112 posy2 = 0.
113 posz = 0.
114 pposx = 0.
115 pposy1 = 0.
116 pposy2 = 0.
117 pposz = 0.
118
119 C print *,'qua ',ic
120 do is=lows,highs
121 ind=ind+1
122 C print *,'qui view(ic) ',view(ic),' is ',is
123 C print *,'qui clsignal(ind) ',clsignal(ind),' ind ',is
124 clinclcut=incut*sigma_matrix(view(ic),is)
125 if (clsignal(ind).gt.clinclcut) then
126 C print *,'qua ci arrivo'
127 sign=sign+clsignal(ind)
128 noise=noise+sigma_matrix(view(ic),is)
129 nstrips=nstrips+1
130 posz = zlevel(view(ic))
131 C print *,'qua anche sign ',sign,' noise ',noise
132 if (mod(view(ic),2).eq.1) then !!! Y Y Y Y
133 if (view(ic).ne.11) then
134 str=float(mod(is-1,1024)+1) !Y
135 posy1 = -6.9541 + (str-1)*0.00665
136 posy2 = 0.1 + (str-1)*0.00665
137 else !??????????????????INVERSIONE??????????
138 str=float(mod(is-1,1024)+1) !Y11
139 c str=traslys-str
140 str=1024-str + 67
141 posy1 = -6.9541 + (str-1)*0.00665 !-0.5
142 posy2 = 0.1 + (str-1)*0.00665 !-0.5
143 endif
144 pposy1 = pposy1 + posy1*clsignal(ind)
145 pposy2 = pposy2 + posy2*clsignal(ind)
146 else
147 str=float(is) !X
148 srt = mod(is-1,1024)+1
149 lad = int((is-1)/1024) + 1
150 if(lad.eq.1) posx=-7.8798+(srt-1)*0.005
151 if(lad.eq.2) posx=-2.5575+(srt-1)*0.005
152 if(lad.eq.3) posx= 2.7648+(srt-1)*0.005
153 pposx = pposx + posx*clsignal(ind)
154 endif
155 endif
156 enddo
157 if(mod(view(ic),2).eq.1)then
158 C print *,'qui ci sono e pposy1 ',pposy1,' pposy2 ',pposy2,' sign ',sign
159 ncly = ncly + 1
160 clp(2,ncly) = pposy1/sign
161 clp(3,ncly) = pposy2/sign
162 clz(2,ncly) = posz
163 cls(2,ncly) = sign
164 else
165 nclx = nclx + 1
166 clp(1,nclx) = pposx/sign
167 clz(1,nclx) = posz
168 cls(1,nclx) = sign
169 c call hfill(99,posx,posz,sign)
170 endif
171 enddo
172 c do i = 1, 19
173 c print *,'cls(2,',i,') = ',cls(2,i)
174 c print *,'cls(1,',i,') = ',cls(1,i)
175 c enddo
176 ncl(1) = nclx
177 ncl(2) = ncly
178 c project_trk_level1 = 1
179 C print *,'****'
180 return
181 end

  ViewVC Help
Powered by ViewVC 1.1.23