13 |
include 'level1.f' |
include 'level1.f' |
14 |
include 'common_reduction.f' |
include 'common_reduction.f' |
15 |
include 'calib.f' |
include 'calib.f' |
16 |
|
|
17 |
|
|
18 |
integer errflag !error flag to mark no signal free VA1 |
integer errflag !error flag to mark no signal free VA1 |
19 |
integer clstr_old(nstrips_va1) !flag storage vector |
integer clstr_old(nstrips_va1) !flag storage vector |
20 |
real signal(nstrips_va1) !"signal" (=adc-ped) value storage vector |
c EM GCC4.7 - trying to avoind implicit conversion from REAL(8) to REAL(4) so use double everywhere in routines and cast to float only when |
21 |
real smean, ssigma !"signal" mean and sigma |
c variables from common includes are used |
22 |
real cut !"strange" strip exclusion cut |
real(8) signal(nstrips_va1) !"signal" (=adc-ped) value storage vector |
23 |
|
real(8) smean, ssigma !"signal" mean and sigma |
24 |
|
real(8) cut !"strange" strip exclusion cut |
25 |
|
c END EM |
26 |
integer newclstr !flag to warn about new found clusters to be |
integer newclstr !flag to warn about new found clusters to be |
27 |
c ! excluded from common noise computation |
c ! excluded from common noise computation |
28 |
|
|
183 |
do k=1,nstrips_va1 !loops on strips |
do k=1,nstrips_va1 !loops on strips |
184 |
* tags strange, bad or signal-affected strips |
* tags strange, bad or signal-affected strips |
185 |
iok = strange(i,j,k)*bad(i,j,k)*clstr(i,j,k) |
iok = strange(i,j,k)*bad(i,j,k)*clstr(i,j,k) |
186 |
cn(i,j) = cn(i,j) + (DBLE(adc(i,j,k)) - pedestal(i,j,k))*iok |
cn(i,j) = cn(i,j) |
187 |
cnrms(i,j) = cnrms(i,j) |
$ + REAL((adc(i,j,k)) - pedestal(i,j,k))*REAL(iok) ! EM GCC4.7 CN IS DEFINED AS REAL NOT DOUBLE |
188 |
$ + (DBLE(adc(i,j,k)) - pedestal(i,j,k)) |
cnrms(i,j) = cnrms(i,j) !EM GCC4.7 CNRMS IS DEFINED AS REAL NOT DOUBLE |
189 |
$ *(DBLE(adc(i,j,k)) - pedestal(i,j,k))*iok |
$ + (REAL(adc(i,j,k)) - pedestal(i,j,k)) !EM GCC4.7 CNRMS IS DEFINED AS REAL NOT DOUBLE |
190 |
|
$ *(REAL(adc(i,j,k)) - pedestal(i,j,k))*REAL(iok) !EM GCC4.7 CNRMS IS DEFINED AS REAL NOT DOUBLE |
191 |
ncn = ncn + iok !counts number of strips in cn computation |
ncn = ncn + iok !counts number of strips in cn computation |
192 |
enddo |
enddo |
193 |
|
|
205 |
gulp=1 |
gulp=1 |
206 |
cnn(i,j) = 0 |
cnn(i,j) = 0 |
207 |
else |
else |
208 |
cn(i,j)=cn(i,j)/DBLE(ncn) !<<<< computes common noise |
cn(i,j)=cn(i,j)/REAL(ncn) !<<<< computes common noise EM GCC4.7 CN IS REAL NOT DOUBLE |
209 |
cnrms(i,j)= SQRT( cnrms(i,j)/DBLE(ncn) - cn(i,j)**2 ) |
cnrms(i,j)= SQRT( cnrms(i,j)/REAL(ncn) - cn(i,j)**2 ) ! EM GCC4.7 CN IS REAL NOT DOUBLE |
210 |
cnn(i,j) = ncn |
cnn(i,j) = ncn |
211 |
gulp=0 |
gulp=0 |
212 |
c$$$ print*,'Event ',eventn(1) |
c$$$ print*,'Event ',eventn(1) |
253 |
! seed |
! seed |
254 |
integer ir, il !flags to exit loop on reaching VA1 extremes |
integer ir, il !flags to exit loop on reaching VA1 extremes |
255 |
|
|
256 |
real valuec !cluster seed signal |
real(8) valuec !cluster seed signal EM GCC4.7 |
257 |
real cut,stripcut !cluster seed cut |
real cut,stripcut !cluster seed cut |
258 |
|
|
259 |
real valuel, valuer !left and right strips signal |
real(8) valuel, valuer !left and right strips signal EM GCC4.7 |
260 |
real stripcnincut !strip include cut |
real stripcnincut !strip include cut |
261 |
|
|
262 |
skip = 0 !initializes skip |
skip = 0 !initializes skip |