| 1 |
subroutine readalignparam |
| 2 |
|
| 3 |
include '../common/commontracker.f' |
| 4 |
include '../common/common_align.f' |
| 5 |
|
| 6 |
character*50 fname_param |
| 7 |
integer sensor |
| 8 |
c character*120 cmd1 |
| 9 |
c character*120 cmd2 |
| 10 |
|
| 11 |
c 100 format('../common/align_param/parameters_l',i1,'s',i1,'.dat') |
| 12 |
100 format('parameters_l',i1,'s',i1,'.dat') |
| 13 |
|
| 14 |
do ilad=1,nladders_view |
| 15 |
do is=1,2 |
| 16 |
|
| 17 |
write(fname_param,100)ilad,is |
| 18 |
c$$$ cmd1='cp $TRK_GRND/source/common/align_param/' |
| 19 |
c$$$ $ //fname_param(1:LNBLNK(fname_param))//' .' |
| 20 |
c$$$ call system(cmd1) |
| 21 |
print *,'Opening file: ',fname_param |
| 22 |
|
| 23 |
open(10, |
| 24 |
$ FILE='./bin-aux/'//fname_param(1:LNBLNK(fname_param)) |
| 25 |
$ ,STATUS='UNKNOWN' |
| 26 |
$ ) |
| 27 |
|
| 28 |
do ip=1,nplanes |
| 29 |
* |
| 30 |
* NB! NB! NB! NB! NB! |
| 31 |
* The file labelled for example "l1s1" include the alignment |
| 32 |
* parameters of the column of sensors: |
| 33 |
* |
| 34 |
* PLANE LADDER SENSOR |
| 35 |
* ------------------- |
| 36 |
* 1 1 2 |
| 37 |
* 2 1 1 |
| 38 |
* 3 1 1 |
| 39 |
* 4 1 1 |
| 40 |
* 5 1 1 |
| 41 |
* 6 1 1 |
| 42 |
* |
| 43 |
* This is becouse the plane 1 (bottom plane) is up-side-down |
| 44 |
* |
| 45 |
sensor=is |
| 46 |
if(ip.eq.1)sensor=mod(is,2)+1 |
| 47 |
read(10,*)omega(ip,ilad,sensor) |
| 48 |
read(10,*)beta(ip,ilad,sensor) |
| 49 |
read(10,*)gamma(ip,ilad,sensor) |
| 50 |
|
| 51 |
c N.B. I convert angles from microradiants to radiant |
| 52 |
omega(ip,ilad,sensor)=omega(ip,ilad,sensor)/1.d6 |
| 53 |
beta(ip,ilad,sensor)=beta(ip,ilad,sensor)/1.d6 |
| 54 |
gamma(ip,ilad,sensor)=gamma(ip,ilad,sensor)/1.d6 |
| 55 |
|
| 56 |
read(10,*)dx(ip,ilad,sensor) |
| 57 |
read(10,*)dy(ip,ilad,sensor) |
| 58 |
read(10,*)dz(ip,ilad,sensor) |
| 59 |
enddo |
| 60 |
|
| 61 |
close(10) |
| 62 |
c$$$ cmd2='rm -f ' |
| 63 |
c$$$ $ //fname_param(1:LNBLNK(fname_param)) |
| 64 |
c$$$ call system(cmd2) |
| 65 |
enddo |
| 66 |
enddo |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
end |