1046 |
ipy=npl(VIEW(icy)) |
ipy=npl(VIEW(icy)) |
1047 |
|
|
1048 |
if( (nplanes-ipx+1).ne.ip )then |
if( (nplanes-ipx+1).ne.ip )then |
1049 |
print*,'xyzpam: ***WARNING*** cluster ',icx |
print*,'xyzpam: ***WARNING*** cluster icx=',icx |
1050 |
$ ,' does not belong to plane: ',ip |
$ ,' belongs to plane ',(nplanes-ipx+1) |
1051 |
|
$ ,' and not ',ip |
1052 |
icx = -1*icx |
icx = -1*icx |
1053 |
return |
return |
1054 |
endif |
endif |
1055 |
if( (nplanes-ipy+1).ne.ip )then |
if( (nplanes-ipy+1).ne.ip )then |
1056 |
print*,'xyzpam: ***WARNING*** cluster ',icy |
print*,'xyzpam: ***WARNING*** cluster icy=',icy |
1057 |
$ ,' does not belong to plane: ',ip |
$ ,' belongs to plane ',(nplanes-ipy+1) |
1058 |
icy = -1*icy |
$ ,' and not ',ip |
1059 |
|
icy = -1*icy |
1060 |
return |
return |
1061 |
endif |
endif |
1062 |
|
|
1072 |
zm(ip) = zPAM |
zm(ip) = zPAM |
1073 |
xm_A(ip) = 0.D0 |
xm_A(ip) = 0.D0 |
1074 |
ym_A(ip) = 0.D0 |
ym_A(ip) = 0.D0 |
1075 |
|
zm_A(ip) = 0.D0 |
1076 |
xm_B(ip) = 0.D0 |
xm_B(ip) = 0.D0 |
1077 |
ym_B(ip) = 0.D0 |
ym_B(ip) = 0.D0 |
1078 |
|
zm_B(ip) = 0.D0 |
1079 |
|
|
1080 |
c zv(ip) = zPAM |
c zv(ip) = zPAM |
1081 |
|
|
1083 |
|
|
1084 |
ipy=npl(VIEW(icy)) |
ipy=npl(VIEW(icy)) |
1085 |
if( (nplanes-ipy+1).ne.ip )then |
if( (nplanes-ipy+1).ne.ip )then |
1086 |
print*,'xyzpam: ***WARNING*** cluster ',icy |
print*,'xyzpam: ***WARNING*** cluster icy=',icy |
1087 |
$ ,' does not belong to plane: ',ip |
$ ,' belongs to plane ',(nplanes-ipy+1) |
1088 |
|
$ ,' and not ',ip |
1089 |
icy = -1*icy |
icy = -1*icy |
1090 |
return |
return |
1091 |
endif |
endif |
1105 |
zm(ip) = zPAM |
zm(ip) = zPAM |
1106 |
xm_A(ip) = xPAM_A |
xm_A(ip) = xPAM_A |
1107 |
ym_A(ip) = yPAM_A |
ym_A(ip) = yPAM_A |
1108 |
|
zm_A(ip) = zPAM_A |
1109 |
xm_B(ip) = xPAM_B |
xm_B(ip) = xPAM_B |
1110 |
ym_B(ip) = yPAM_B |
ym_B(ip) = yPAM_B |
1111 |
|
zm_B(ip) = zPAM_B |
1112 |
|
|
1113 |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
1114 |
|
|
1117 |
ipx=npl(VIEW(icx)) |
ipx=npl(VIEW(icx)) |
1118 |
|
|
1119 |
if( (nplanes-ipx+1).ne.ip )then |
if( (nplanes-ipx+1).ne.ip )then |
1120 |
print*,'xyzpam: ***WARNING*** cluster ',icx |
print*,'xyzpam: ***WARNING*** cluster icx=',icx |
1121 |
$ ,' does not belong to plane: ',ip |
$ ,' belongs to plane ',(nplanes-ipx+1) |
1122 |
|
$ ,' and not ',ip |
1123 |
icx = -1*icx |
icx = -1*icx |
1124 |
return |
return |
1125 |
endif |
endif |
1139 |
zm(ip) = zPAM |
zm(ip) = zPAM |
1140 |
xm_A(ip) = xPAM_A |
xm_A(ip) = xPAM_A |
1141 |
ym_A(ip) = yPAM_A |
ym_A(ip) = yPAM_A |
1142 |
|
zm_A(ip) = zPAM_A |
1143 |
xm_B(ip) = xPAM_B |
xm_B(ip) = xPAM_B |
1144 |
ym_B(ip) = yPAM_B |
ym_B(ip) = yPAM_B |
1145 |
|
zm_B(ip) = zPAM_B |
1146 |
|
|
1147 |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
1148 |
|
|
1163 |
zm(ip) = z_mech_sensor(nplanes-ip+1,il,is)*1000./1.d4 |
zm(ip) = z_mech_sensor(nplanes-ip+1,il,is)*1000./1.d4 |
1164 |
xm_A(ip) = 0. |
xm_A(ip) = 0. |
1165 |
ym_A(ip) = 0. |
ym_A(ip) = 0. |
1166 |
|
zm_A(ip) = 0. |
1167 |
xm_B(ip) = 0. |
xm_B(ip) = 0. |
1168 |
ym_B(ip) = 0. |
ym_B(ip) = 0. |
1169 |
|
zm_B(ip) = 0. |
1170 |
|
|
1171 |
c zv(ip) = z_mech_sensor(nplanes-ip+1,il,is)*1000./1.d4 |
c zv(ip) = z_mech_sensor(nplanes-ip+1,il,is)*1000./1.d4 |
1172 |
|
|
2054 |
* tg(th_yz) |
* tg(th_yz) |
2055 |
alfayz2(ndblt)=(ym1-ym2)/(zm1-zm2) |
alfayz2(ndblt)=(ym1-ym2)/(zm1-zm2) |
2056 |
* y0 (cm) |
* y0 (cm) |
2057 |
alfayz1(ndblt)=alfayz2(ndblt)*(REAL(zini)-zm1)+ym1 ! EM GCC4.7 zm1, ym1 and alfayz1/2 are REAL |
alfayz1(ndblt)=alfayz2(ndblt)*(REAL(zini)-zm1)+ym1! EM GCC4.7 zm1, ym1 and alfayz1/2 are REAL |
2058 |
|
|
2059 |
**** -----------------------------------------------**** |
**** -----------------------------------------------**** |
2060 |
**** reject non phisical couples **** |
**** reject non phisical couples **** |
3411 |
dedxmmx = sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
dedxmmx = sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
3412 |
dedxmmy = sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
dedxmmy = sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
3413 |
clincnewc=10.*dsqrt(rymm**2+rxmm**2 |
clincnewc=10.*dsqrt(rymm**2+rxmm**2 |
3414 |
$ +DBLE(RCHI2_STORE(ibest)*k(ip)*(cov(1,1)+cov(2,2)))) ! EM GCC4.7 |
$ +DBLE(RCHI2_STORE(ibest)*k(ip)*(cov(1,1)+cov(2,2))))! EM GCC4.7 |
3415 |
endif |
endif |
3416 |
1188 continue |
1188 continue |
3417 |
enddo !end loop on couples on plane icp |
enddo !end loop on couples on plane icp |