331 |
iimage=0 |
iimage=0 |
332 |
endif |
endif |
333 |
if(icand.eq.0)then |
if(icand.eq.0)then |
334 |
print*,'HAI FATTO UN CASINO!!!!!! icand = ',icand |
if(VERBOSE)then |
335 |
$ ,ibest,iimage |
print*,'HAI FATTO UN CASINO!!!!!! icand = ',icand |
336 |
|
$ ,ibest,iimage |
337 |
|
endif |
338 |
return |
return |
339 |
endif |
endif |
340 |
|
|
609 |
* -------------------------- |
* -------------------------- |
610 |
angtemp = ax |
angtemp = ax |
611 |
bfytemp = bfy |
bfytemp = bfy |
612 |
if(nplx.eq.6) angtemp = -1. * ax |
* ///////////////////////////////// |
613 |
if(nplx.eq.6) bfytemp = -1. * bfy |
* AAAAHHHHHHHH!!!!!!!!!!!!!!!!!!!!! |
614 |
|
* *grvzkkjsdgjhhhgngbn###>:( |
615 |
|
* ///////////////////////////////// |
616 |
|
c if(nplx.eq.6) angtemp = -1. * ax |
617 |
|
c if(nplx.eq.6) bfytemp = -1. * bfy |
618 |
|
if(viewx.eq.12) angtemp = -1. * ax |
619 |
|
if(viewx.eq.12) bfytemp = -1. * bfy |
620 |
tgtemp = tan(angtemp*acos(-1.)/180.) + pmuH_h*bfytemp*0.00001 |
tgtemp = tan(angtemp*acos(-1.)/180.) + pmuH_h*bfytemp*0.00001 |
621 |
angx = 180.*atan(tgtemp)/acos(-1.) |
angx = 180.*atan(tgtemp)/acos(-1.) |
622 |
stripx = stripx - 0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX |
stripx = stripx - 0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX |
623 |
c$$$ print*,nplx,ax,bfy/10. |
c$$$ print*,nplx,ax,bfy/10. |
624 |
c$$$ print*,angx,0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX |
c$$$ print*,angx,0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX |
625 |
c$$$ print*,'========================' |
c$$$ print*,'========================' |
626 |
|
c$$$ if(bfy.ne.0.)print*,viewx,'-x- ' |
627 |
|
c$$$ $ ,bfy,-1*0.5*pmuH_h*bfytemp*0.00001*SiDimZ |
628 |
* -------------------------- |
* -------------------------- |
629 |
|
|
630 |
c$$$ print*,'--- x-cl ---' |
c$$$ print*,'--- x-cl ---' |
700 |
resxPAM = resxPAM*fbad_cog(0,icx) |
resxPAM = resxPAM*fbad_cog(0,icx) |
701 |
|
|
702 |
else |
else |
703 |
print*,'*** Non valid p.f.a. (x) --> ',PFAx |
if(DEBUG) print*,'*** Non valid p.f.a. (x) --> ',PFAx |
704 |
endif |
endif |
705 |
|
|
706 |
|
|
730 |
stripy = float(MAXS(icy)) |
stripy = float(MAXS(icy)) |
731 |
|
|
732 |
if(icx.ne.0.and.(nply.ne.nplx.or.nldy.ne.nldx))then |
if(icx.ne.0.and.(nply.ne.nplx.or.nldy.ne.nldx))then |
733 |
print*,'xyz_PAM ***ERROR*** invalid cluster couple!!! ' |
if(DEBUG) then |
734 |
$ ,icx,icy |
print*,'xyz_PAM ***ERROR*** invalid cluster couple!!! ' |
735 |
|
$ ,icx,icy |
736 |
|
endif |
737 |
goto 100 |
goto 100 |
738 |
endif |
endif |
739 |
* -------------------------- |
* -------------------------- |
742 |
tgtemp = tan(ay*acos(-1.)/180.)+pmuH_e*bfx*0.00001 |
tgtemp = tan(ay*acos(-1.)/180.)+pmuH_e*bfx*0.00001 |
743 |
angy = 180.*atan(tgtemp)/acos(-1.) |
angy = 180.*atan(tgtemp)/acos(-1.) |
744 |
stripy = stripy + 0.5*pmuH_e*bfx*0.00001*SiDimZ/pitchY |
stripy = stripy + 0.5*pmuH_e*bfx*0.00001*SiDimZ/pitchY |
745 |
|
c$$$ if(bfx.ne.0.)print*,viewy,'-y- ' |
746 |
|
c$$$ $ ,bfx,0.5*pmuH_e*bfx*0.00001*SiDimZ |
747 |
* -------------------------- |
* -------------------------- |
748 |
|
|
749 |
c$$$ print*,'--- y-cl ---' |
c$$$ print*,'--- y-cl ---' |
816 |
resyPAM = resyPAM*fbad_cog(0,icy) |
resyPAM = resyPAM*fbad_cog(0,icy) |
817 |
|
|
818 |
else |
else |
819 |
print*,'*** Non valid p.f.a. (x) --> ',PFAx |
if(DEBUG) print*,'*** Non valid p.f.a. (x) --> ',PFAx |
820 |
endif |
endif |
821 |
|
|
822 |
|
|
846 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
847 |
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
848 |
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
849 |
print*,'xyz_PAM (couple):', |
if(DEBUG) then |
850 |
$ ' WARNING: false X strip: strip ',stripx |
print*,'xyz_PAM (couple):', |
851 |
|
$ ' WARNING: false X strip: strip ',stripx |
852 |
|
endif |
853 |
endif |
endif |
854 |
xi = acoordsi(stripx,viewx) |
xi = acoordsi(stripx,viewx) |
855 |
yi = acoordsi(stripy,viewy) |
yi = acoordsi(stripy,viewy) |
941 |
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... |
942 |
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
943 |
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
944 |
print*,'xyz_PAM (X-singlet):', |
if(DEBUG) then |
945 |
$ ' WARNING: false X strip: strip ',stripx |
print*,'xyz_PAM (X-singlet):', |
946 |
|
$ ' WARNING: false X strip: strip ',stripx |
947 |
|
endif |
948 |
endif |
endif |
949 |
xi = acoordsi(stripx,viewx) |
xi = acoordsi(stripx,viewx) |
950 |
|
|
966 |
c print*,yi_A,' <--> ',yi_B |
c print*,yi_A,' <--> ',yi_B |
967 |
|
|
968 |
else |
else |
969 |
|
if(DEBUG) then |
970 |
print *,'routine xyz_PAM ---> not properly used !!!' |
print *,'routine xyz_PAM ---> not properly used !!!' |
971 |
print *,'icx = ',icx |
print *,'icx = ',icx |
972 |
print *,'icy = ',icy |
print *,'icy = ',icy |
973 |
|
endif |
974 |
goto 100 |
goto 100 |
975 |
|
|
976 |
endif |
endif |
1035 |
c print*,'A-(',xPAM_A,yPAM_A,') B-(',xPAM_B,yPAM_B,')' |
c print*,'A-(',xPAM_A,yPAM_A,') B-(',xPAM_B,yPAM_B,')' |
1036 |
|
|
1037 |
else |
else |
1038 |
|
if(DEBUG) then |
1039 |
print *,'routine xyz_PAM ---> not properly used !!!' |
print *,'routine xyz_PAM ---> not properly used !!!' |
1040 |
print *,'icx = ',icx |
print *,'icx = ',icx |
1041 |
print *,'icy = ',icy |
print *,'icy = ',icy |
1042 |
|
endif |
1043 |
endif |
endif |
1044 |
|
|
1045 |
|
|
1165 |
|
|
1166 |
else |
else |
1167 |
|
|
1168 |
print* |
c print* |
1169 |
$ ,' function distance_to ---> wrong usage!!!' |
c $ ,' function distance_to ---> wrong usage!!!' |
1170 |
print*,' xPAM,yPAM,zPAM ',xPAM,yPAM,zPAM |
c print*,' xPAM,yPAM,zPAM ',xPAM,yPAM,zPAM |
1171 |
print*,' xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b ' |
c print*,' xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b ' |
1172 |
$ ,xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b |
c $ ,xPAM_A,yPAM_A,zPAM_A,xPAM_b,yPAM_b,zPAM_b |
1173 |
endif |
endif |
1174 |
|
|
1175 |
distance_to = sngl(distance) |
distance_to = sngl(distance) |
1237 |
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
if(((mod(int(stripx+0.5)-1,1024)+1).le.3) |
1238 |
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
$ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... |
1239 |
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... |
1240 |
print*,'whichsensor: ', |
c print*,'whichsensor: ', |
1241 |
$ ' WARNING: false X strip: strip ',stripx |
c $ ' WARNING: false X strip: strip ',stripx |
1242 |
endif |
endif |
1243 |
xi = acoordsi(stripx,viewx) |
xi = acoordsi(stripx,viewx) |
1244 |
yi = acoordsi(stripy,viewy) |
yi = acoordsi(stripy,viewy) |
1393 |
is_cp=0 |
is_cp=0 |
1394 |
if(id.lt.0)is_cp=1 |
if(id.lt.0)is_cp=1 |
1395 |
if(id.gt.0)is_cp=2 |
if(id.gt.0)is_cp=2 |
1396 |
if(id.eq.0)print*,'IS_CP ===> wrong couple id !!!' |
c if(id.eq.0)print*,'IS_CP ===> wrong couple id !!!' |
1397 |
|
|
1398 |
return |
return |
1399 |
end |
end |