| 688 |
|
|
| 689 |
real stripx,stripy |
real stripx,stripy |
| 690 |
|
|
| 691 |
|
double precision xi,yi,zi |
| 692 |
|
double precision xi_A,yi_A,zi_A |
| 693 |
|
double precision xi_B,yi_B,zi_B |
| 694 |
double precision xrt,yrt,zrt |
double precision xrt,yrt,zrt |
| 695 |
double precision xrt_A,yrt_A,zrt_A |
double precision xrt_A,yrt_A,zrt_A |
| 696 |
double precision xrt_B,yrt_B,zrt_B |
double precision xrt_B,yrt_B,zrt_B |
| 704 |
resxPAM = 0 |
resxPAM = 0 |
| 705 |
resyPAM = 0 |
resyPAM = 0 |
| 706 |
|
|
| 707 |
xPAM = 0. |
xPAM = 0.D0 |
| 708 |
yPAM = 0. |
yPAM = 0.D0 |
| 709 |
zPAM = 0. |
zPAM = 0.D0 |
| 710 |
xPAM_A = 0. |
xPAM_A = 0.D0 |
| 711 |
yPAM_A = 0. |
yPAM_A = 0.D0 |
| 712 |
zPAM_A = 0. |
zPAM_A = 0.D0 |
| 713 |
xPAM_B = 0. |
xPAM_B = 0.D0 |
| 714 |
yPAM_B = 0. |
yPAM_B = 0.D0 |
| 715 |
zPAM_B = 0. |
zPAM_B = 0.D0 |
| 716 |
c print*,'## xyz_PAM: ',icx,icy,sensor,PFAx,PFAy,angx,angy |
c print*,'## xyz_PAM: ',icx,icy,sensor,PFAx,PFAy,angx,angy |
| 717 |
|
|
| 718 |
if(sensor.lt.1.or.sensor.gt.2)then |
if(sensor.lt.1.or.sensor.gt.2)then |
| 822 |
$ ' WARNING: false X strip: strip ',stripx |
$ ' WARNING: false X strip: strip ',stripx |
| 823 |
endif |
endif |
| 824 |
endif |
endif |
| 825 |
xi = acoordsi(stripx,viewx) |
xi = dcoordsi(stripx,viewx) |
| 826 |
yi = acoordsi(stripy,viewy) |
yi = dcoordsi(stripy,viewy) |
| 827 |
zi = 0. |
zi = 0.D0 |
| 828 |
|
|
| 829 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 830 |
c (xrt,yrt,zrt) = rototranslated coordinates in the silicon sensor frame |
c (xrt,yrt,zrt) = rototranslated coordinates in the silicon sensor frame |
| 859 |
yPAM = dcoord(yrt,viewy,nldy,sensor) / 1.d4 |
yPAM = dcoord(yrt,viewy,nldy,sensor) / 1.d4 |
| 860 |
zPAM = ( zrt + z_mech_sensor(nplx,nldx,sensor)*1000. ) / 1.d4 |
zPAM = ( zrt + z_mech_sensor(nplx,nldx,sensor)*1000. ) / 1.d4 |
| 861 |
|
|
| 862 |
xPAM_A = 0. |
xPAM_A = 0.D0 |
| 863 |
yPAM_A = 0. |
yPAM_A = 0.D0 |
| 864 |
zPAM_A = 0. |
zPAM_A = 0.D0 |
| 865 |
|
|
| 866 |
xPAM_B = 0. |
xPAM_B = 0.D0 |
| 867 |
yPAM_B = 0. |
yPAM_B = 0.D0 |
| 868 |
zPAM_B = 0. |
zPAM_B = 0.D0 |
| 869 |
|
|
| 870 |
elseif( |
elseif( |
| 871 |
$ (icx.ne.0.and.icy.eq.0).or. |
$ (icx.ne.0.and.icy.eq.0).or. |
| 885 |
nldx = nldy |
nldx = nldy |
| 886 |
viewx = viewy + 1 |
viewx = viewy + 1 |
| 887 |
|
|
| 888 |
yi = acoordsi(stripy,viewy) |
yi = dcoordsi(stripy,viewy) |
| 889 |
|
|
| 890 |
xi_A = edgeY_d - SiDimX/2 |
xi_A = edgeY_d - SiDimX/2 |
| 891 |
yi_A = yi |
yi_A = yi |
| 916 |
$ ' WARNING: false X strip: strip ',stripx |
$ ' WARNING: false X strip: strip ',stripx |
| 917 |
endif |
endif |
| 918 |
endif |
endif |
| 919 |
xi = acoordsi(stripx,viewx) |
xi = dcoordsi(stripx,viewx) |
| 920 |
|
|
| 921 |
xi_A = xi |
xi_A = xi |
| 922 |
yi_A = edgeX_d - SiDimY/2 |
yi_A = edgeX_d - SiDimY/2 |
| 989 |
c in PAMELA reference system |
c in PAMELA reference system |
| 990 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 991 |
|
|
| 992 |
xPAM = 0. |
xPAM = 0.D0 |
| 993 |
yPAM = 0. |
yPAM = 0.D0 |
| 994 |
zPAM = 0. |
zPAM = 0.D0 |
| 995 |
|
|
| 996 |
xPAM_A = dcoord(xrt_A,viewx,nldx,sensor) / 1.d4 |
xPAM_A = dcoord(xrt_A,viewx,nldx,sensor) / 1.d4 |
| 997 |
yPAM_A = dcoord(yrt_A,viewy,nldy,sensor) / 1.d4 |
yPAM_A = dcoord(yrt_A,viewy,nldy,sensor) / 1.d4 |
| 1100 |
xm(ip) = xPAM |
xm(ip) = xPAM |
| 1101 |
ym(ip) = yPAM |
ym(ip) = yPAM |
| 1102 |
zm(ip) = zPAM |
zm(ip) = zPAM |
| 1103 |
xm_A(ip) = 0. |
xm_A(ip) = 0.D0 |
| 1104 |
ym_A(ip) = 0. |
ym_A(ip) = 0.D0 |
| 1105 |
xm_B(ip) = 0. |
xm_B(ip) = 0.D0 |
| 1106 |
ym_B(ip) = 0. |
ym_B(ip) = 0.D0 |
| 1107 |
|
|
| 1108 |
c zv(ip) = zPAM |
c zv(ip) = zPAM |
| 1109 |
|
|
| 1223 |
* |
* |
| 1224 |
******************************************************************************** |
******************************************************************************** |
| 1225 |
|
|
| 1226 |
real function distance_to(XPP,YPP) |
real function distance_to(rXPP,rYPP) |
| 1227 |
|
|
| 1228 |
include 'common_xyzPAM.f' |
include 'common_xyzPAM.f' |
| 1229 |
|
|
| 1232 |
* ( i.e. distance/resolution ) |
* ( i.e. distance/resolution ) |
| 1233 |
* ----------------------------------- |
* ----------------------------------- |
| 1234 |
|
|
| 1235 |
|
real rXPP,rYPP |
| 1236 |
|
double precision XPP,YPP |
| 1237 |
double precision distance,RE |
double precision distance,RE |
| 1238 |
double precision BETA,ALFA,xmi,ymi |
double precision BETA,ALFA,xmi,ymi |
| 1239 |
|
|
| 1240 |
|
XPP=DBLE(rXPP) |
| 1241 |
|
YPP=DBLE(rYPP) |
| 1242 |
|
|
| 1243 |
* ---------------------- |
* ---------------------- |
| 1244 |
if ( |
if ( |
| 1245 |
+ xPAM.eq.0.and. |
+ xPAM.eq.0.and. |
| 1366 |
data c1/1.,0.,0.,1./ |
data c1/1.,0.,0.,1./ |
| 1367 |
data c2/1.,-1.,-1.,1./ |
data c2/1.,-1.,-1.,1./ |
| 1368 |
data c3/1.,1.,0.,0./ |
data c3/1.,1.,0.,0./ |
| 1369 |
real*8 yvvv,xvvv |
double precision yvvv,xvvv |
| 1370 |
double precision xi,yi,zi |
double precision xi,yi,zi |
| 1371 |
double precision xrt,yrt,zrt |
double precision xrt,yrt,zrt |
| 1372 |
real AA,BB |
real AA,BB |
| 1373 |
real yvv(4),xvv(4) |
double precision yvv(4),xvv(4) |
| 1374 |
|
|
| 1375 |
* tollerance to consider the track inside the sensitive area |
* tollerance to consider the track inside the sensitive area |
| 1376 |
real ptoll |
real ptoll |
| 1377 |
data ptoll/150./ !um |
data ptoll/150./ !um |
| 1378 |
|
|
| 1379 |
external nviewx,nviewy,acoordsi,dcoord |
external nviewx,nviewy,dcoordsi,dcoord |
| 1380 |
|
|
| 1381 |
nplpt = nplPAM !plane |
nplpt = nplPAM !plane |
| 1382 |
viewx = nviewx(nplpt) |
viewx = nviewx(nplpt) |
| 1391 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 1392 |
c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame |
c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame |
| 1393 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 1394 |
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
c if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
| 1395 |
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
c $ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
| 1396 |
c if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips... |
c if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips... |
| 1397 |
c print*,'whichsensor: ', |
c print*,'whichsensor: ', |
| 1398 |
c $ ' WARNING: false X strip: strip ',stripx |
c $ ' WARNING: false X strip: strip ',stripx |
| 1399 |
endif |
c endif |
| 1400 |
xi = acoordsi(stripx,viewx) |
xi = dcoordsi(stripx,viewx) |
| 1401 |
yi = acoordsi(stripy,viewy) |
yi = dcoordsi(stripy,viewy) |
| 1402 |
zi = 0. |
zi = 0.D0 |
| 1403 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
| 1404 |
c (xrt,yrt,zrt) = rototranslated coordinates in the silicon sensor frame |
c (xrt,yrt,zrt) = rototranslated coordinates in the silicon sensor frame |
| 1405 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |