63 INTEGER(mpi),
PARAMETER ::
nlyr=10
64 INTEGER(mpi),
PARAMETER ::
nmlyr=14
65 INTEGER(mpi),
PARAMETER ::
nmx=10
66 INTEGER(mpi),
PARAMETER ::
ncx=5
67 INTEGER(mpi),
PARAMETER ::
nmy=5
80 INTEGER(mpi),
DIMENSION(nmlyr) ::
islyr
81 INTEGER(mpi),
DIMENSION(nmlyr) ::
ihits
130 INTEGER(mpi) :: icount
137 INTEGER(mpi) :: labelt
138 INTEGER(mpi) :: layer
146 INTEGER(mpi) :: ncount
148 INTEGER(mpi) :: nrecds
149 INTEGER(mpi) :: nthits
151 INTEGER(mpi),
INTENT(IN) :: imodel
153 REAL(mps) :: derlc(nmlyr*2+3)
154 REAL(mps) :: dergl(nmlyr*2+3)
155 INTEGER(mpi) :: label(2)
160 dimension nbrl(2),lbrl(nmlyr,2),sbrl(nmlyr,2),wbrl(nmlyr,2), cmbbrl(2)
161 DATA cmbbrl / 0.0, 1.0 /
164 INQUIRE(file=
'mp2str.txt',iostat=ios,exist=ex1)
165 INQUIRE(file=
'mp2con.txt',iostat=ios,exist=ex2)
167 INQUIRE(file=
'mp2tst.bin',iostat=ios,exist=ex3)
170 WRITE(*,*)
'Generating test data for MP-II ...', imodel
173 IF(ex3)
CALL system(
'rm mp2tst.bin')
175 IF(.NOT.ex1)
OPEN(unit=7,access=
'SEQUENTIAL',form=
'FORMATTED', &
177 IF(.NOT.ex2)
OPEN(unit=9,access=
'SEQUENTIAL',form=
'FORMATTED', &
179 OPEN(unit=51,access=
'SEQUENTIAL',form=
'UNFORMATTED', file=
'mp2tst.bin')
191 IF (mod(layer,3) == 1)
THEN
211 IF (abs(
sarc(i)-sold) > cmbbrl(k)) nbrl(k)=nbrl(k)+1
214 sbrl(lb,k)=sbrl(lb,k)+
sarc(i)
215 wbrl(lb,k)=wbrl(lb,k)+1.0
219 sbrl(i,k)=sbrl(i,k)/wbrl(i,k)
220 wbrl(i,k)=sqrt(wbrl(i,k))
242 WRITE(luns,101)
'* *** Default test steering file ***'
244 WRITE(luns,101)
'* Additinal files'
245 WRITE(luns,101)
'fortranfiles ! following bin files are fortran'
246 WRITE(luns,101)
'mp2con.txt ! constraints text file '
247 WRITE(luns,101)
'mp2tst.bin ! binary data file'
248 WRITE(luns,101)
'Cfiles ! following bin files are Cfiles'
250 WRITE(luns,101)
'* Selection of variable global parameters'
251 WRITE(luns,101)
'*entries 10 ! lower limit on number of entries/parameter'
252 WRITE(luns,101)
'*entries 25 ! default limit on number of entries/parameter'
253 WRITE(luns,101)
'*entries 50 ! higher limit on number of entries/parameter'
255 WRITE(luns,101)
'* Initial parameter values, presigmas'
256 WRITE(luns,101)
'*Parameter ! define parameter attributes (start of list)'
257 WRITE(luns,101)
'*205 -0.01 0. ! start value'
258 WRITE(luns,101)
'*206 0.01 0. ! start value'
259 WRITE(luns,101)
'*215 0.01 -1. ! fix parameter at value'
260 WRITE(luns,101)
'*216 0. -1. ! fix parameter at value'
262 WRITE(luns,101)
'* Handling of outliers, tails etc'
263 WRITE(luns,101)
'*hugecut 50.0 !cut factor in iteration 0'
264 WRITE(luns,101)
'*chisqcut 30.0 6.0 ! cut factor in iterations 1 and 2'
265 WRITE(luns,101)
'*outlierdownweighting 2 ! number of internal iterations (> 1)'
266 WRITE(luns,101)
'*dwfractioncut 0.2 ! 0 < value < 0.5'
267 WRITE(luns,101)
'*presigma 0.01 ! default value for presigma'
268 WRITE(luns,101)
'*regularisation 1.0 ! regularisation factor'
269 WRITE(luns,101)
'*regularisation 1.0 0.01 ! regularisation factor, pre-sigma'
271 WRITE(luns,101)
'* Solution methods'
272 WRITE(luns,101)
'method fullMINRES 3 0.01 ! (approximate) MINRES, full storage'
273 WRITE(luns,101)
'method sparseMINRES 3 0.01 ! (approximate) MINRES, sparse storage'
274 WRITE(luns,101)
'*mrestol 1.0D-8 ! epsilon for MINRES convergence'
275 WRITE(luns,101)
'*bandwidth 0 ! width of MINRES precond. band matrix'
276 WRITE(luns,101)
'method diagonalization 3 0.001 ! diagonalization (-> millepede.eve)'
277 WRITE(luns,101)
'method decomposition 3 0.001 ! Cholesky decomposition'
278 WRITE(luns,101)
'method inversion 3 0.001 ! Gauss matrix inversion'
279 WRITE(luns,101)
'* last method is applied'
281 WRITE(luns,101)
'* Additional output. monitoring'
282 WRITE(luns,101)
'printcounts ! print number of entries'
283 WRITE(luns,101)
'*monitorresiduals ! poor man''s DMR (-> millepede.mon)'
284 WRITE(luns,101)
'*printrecord 1 2 ! debug printout for records'
285 WRITE(luns,101)
'*printrecord -1 -1 ! debug printout for bad data records'
287 WRITE(luns,101)
'end ! optional for end-of-data'
296 IF(.NOT.ex2)
WRITE(lunt,*)
'Constraint 0.0'
299 IF(.NOT.ex2)
WRITE(lunt,103) labelt,one
302 IF(.NOT.ex2)
WRITE(lunt,*)
'Constraint 0.0'
305 IF(.NOT.ex2)
WRITE(lunt,103) labelt,one
328 im =mod(
ihits(i),nmxy)
336 label(1)=im+nmxy*
islyr(lyr)
337 label(2)=im+nmxy*
islyr(lyr)+1000
339 IF (imodel == 1)
THEN
345 IF (imodel == 2.AND.i > 1)
THEN
355 IF (imodel >= 3)
THEN
362 derlc(lb*2-1)=
spro(1,lyr)
363 derlc(lb*2 )=
spro(2,lyr)
370 IF (imodel == 2)
THEN
377 CALL mille(nalc,derlc,0,dergl,label,0.0,
the0)
381 IF (imodel >= 3)
THEN
383 dp=1.0/(sbrl(i,ibrl)-sbrl(i-1,ibrl))
384 dn=1.0/(sbrl(i+1,ibrl)-sbrl(i,ibrl))
391 derlc(2* i +l)=-dp-dn
393 CALL mille(nalc,derlc,0,dergl,label,0.0,
the0*wbrl(i,ibrl))
423 WRITE(*,*) ncount,
' tracks generated with ',nthits,
' hits.'
424 WRITE(*,*) nrecds,
' records written.'
464 INTEGER(mpi),
INTENT(IN) :: ip
467 xnull=
sizel*(uran()-0.5)
468 ynull=
sizel*(uran()-0.5)
469 xexit=
sizel*(uran()-0.5)
470 yexit=
sizel*(uran()-0.5)
475 WRITE(*,*)
' Track ', xnull, ynull, xslop, yslop
489 xs=xnull+
sarc(i)*xslop
490 ys=ynull+
sarc(i)*yslop
499 IF (imx < 0.OR.imx >=
nmx) cycle
501 IF (imy < 0.OR.imy >=
nmy) cycle
503 ihit=((i-1)*
nmy+imy)*
nmx+imx
subroutine mille(nlc, derlc, ngl, dergl, label, rmeas, sigma)
Add data block to record.
subroutine endle
End-of-record.
subroutine mptst2(imodel)
Generate test files.
subroutine genln2(ip)
Generate line and measurements.
integer, parameter mps
single precision
real(mps), dimension(nmlyr) ssig
resolution
integer(mpi), parameter nmx
number of modules in x direction
real(mps), parameter sizel
size of layers
real(mps), dimension(ntot) sdevx
shift in x (alignment parameter)
real(mps), dimension(ntot) sdevy
shift in y (alignment parameter)
integer(mpi), parameter ncx
center (vertical/x) row (used in cons.)
integer(mpi) nhits
number of hits
integer(mpi), dimension(nmlyr) ihits
module number
integer(mpi), parameter nmlyr
number of measurement layers
real(mps), parameter stereo
stereo angle
integer(mpi), parameter nmy
number of modules in y direction
real(mps) the0
multiple scattering error
real(mps), dimension(nmlyr) sarc
arc length
integer(mpi), dimension(nmlyr) islyr
(detector) layer
integer(mpi), parameter nlyr
number of detector layers
real(mps), parameter sigl
real(mps), parameter offs
offset of stereo modules
integer(mpi), parameter ntot
total number of modules
real(mps), parameter thck
thickness of plane (X0)
real(mps), dimension(2, nmlyr) spro
projection of measurent direction in (XY)
real(mps), dimension(nmlyr) yhits
measured position in plane (hit)
real(mps), dimension(nmlyr) sigma
measurement sigma (hit)
real(mps), dimension(nmlyr) xhits
position perp.
real(mps), parameter dets
arclength of first plane
real(mps), parameter diss
distance between planes