| 713 |
xPAM_B = 0.D0 |
xPAM_B = 0.D0 |
| 714 |
yPAM_B = 0.D0 |
yPAM_B = 0.D0 |
| 715 |
zPAM_B = 0.D0 |
zPAM_B = 0.D0 |
| 716 |
c print*,'## xyz_PAM: ',icx,icy,sensor,PFAx,PFAy,angx,angy |
cc 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 |
| 719 |
print*,'xyz_PAM ***ERROR*** wrong input ' |
print*,'xyz_PAM ***ERROR*** wrong input ' |
| 805 |
|
|
| 806 |
20 endif |
20 endif |
| 807 |
|
|
| 808 |
c$$$ print*,'## stripx,stripy ',stripx,stripy |
cc print*,'## stripx,stripy ',stripx,stripy |
| 809 |
|
|
| 810 |
c=========================================================== |
c=========================================================== |
| 811 |
C COUPLE |
C COUPLE |
| 1127 |
resx(ip) = 1000. |
resx(ip) = 1000. |
| 1128 |
resy(ip) = resyPAM |
resy(ip) = resyPAM |
| 1129 |
|
|
| 1130 |
|
cPP --- old --- |
| 1131 |
|
c$$$ xm(ip) = -100. |
| 1132 |
|
c$$$ ym(ip) = -100. |
| 1133 |
|
c$$$ zm(ip) = (zPAM_A+zPAM_B)/2. |
| 1134 |
|
c$$$ xm_A(ip) = xPAM_A |
| 1135 |
|
c$$$ ym_A(ip) = yPAM_A |
| 1136 |
|
c$$$ xm_B(ip) = xPAM_B |
| 1137 |
|
c$$$ ym_B(ip) = yPAM_B |
| 1138 |
|
cPP --- new --- |
| 1139 |
xm(ip) = -100. |
xm(ip) = -100. |
| 1140 |
ym(ip) = -100. |
ym(ip) = -100. |
| 1141 |
zm(ip) = (zPAM_A+zPAM_B)/2. |
zm(ip) = z_mech_sensor(nplanes-ip+1,il,is)*1000./1.d4 |
| 1142 |
xm_A(ip) = xPAM_A |
xm_A(ip) = xPAM_A |
| 1143 |
ym_A(ip) = yPAM_A |
ym_A(ip) = yPAM_A |
| 1144 |
|
zm_A(ip) = zPAM_A |
| 1145 |
xm_B(ip) = xPAM_B |
xm_B(ip) = xPAM_B |
| 1146 |
ym_B(ip) = yPAM_B |
ym_B(ip) = yPAM_B |
| 1147 |
|
zm_B(ip) = zPAM_B |
| 1148 |
|
cPP ----------- |
| 1149 |
|
|
| 1150 |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
| 1151 |
|
|
| 1170 |
resx(ip) = resxPAM |
resx(ip) = resxPAM |
| 1171 |
resy(ip) = 1000. |
resy(ip) = 1000. |
| 1172 |
|
|
| 1173 |
|
cPP --- old --- |
| 1174 |
|
c$$$ xm(ip) = -100. |
| 1175 |
|
c$$$ ym(ip) = -100. |
| 1176 |
|
c$$$ zm(ip) = (zPAM_A+zPAM_B)/2. |
| 1177 |
|
c$$$ xm_A(ip) = xPAM_A |
| 1178 |
|
c$$$ ym_A(ip) = yPAM_A |
| 1179 |
|
c$$$ xm_B(ip) = xPAM_B |
| 1180 |
|
c$$$ ym_B(ip) = yPAM_B |
| 1181 |
|
cPP --- new --- |
| 1182 |
xm(ip) = -100. |
xm(ip) = -100. |
| 1183 |
ym(ip) = -100. |
ym(ip) = -100. |
| 1184 |
zm(ip) = (zPAM_A+zPAM_B)/2. |
zm(ip) = z_mech_sensor(nplanes-ip+1,il,is)*1000./1.d4 |
| 1185 |
xm_A(ip) = xPAM_A |
xm_A(ip) = xPAM_A |
| 1186 |
ym_A(ip) = yPAM_A |
ym_A(ip) = yPAM_A |
| 1187 |
|
zm_A(ip) = zPAM_A |
| 1188 |
xm_B(ip) = xPAM_B |
xm_B(ip) = xPAM_B |
| 1189 |
ym_B(ip) = yPAM_B |
ym_B(ip) = yPAM_B |
| 1190 |
|
zm_B(ip) = zPAM_B |
| 1191 |
|
cPP ----------- |
| 1192 |
|
|
| 1193 |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
c zv(ip) = (zPAM_A+zPAM_B)/2. |
| 1194 |
|
|
| 1195 |
else |
else |
| 3076 |
call track_init |
call track_init |
| 3077 |
do ip=1,nplanes !loop on planes |
do ip=1,nplanes !loop on planes |
| 3078 |
|
|
| 3079 |
|
if(DEBUG.EQ.1)print*,' ........... plane ',ip,' ........... ' |
| 3080 |
|
|
| 3081 |
xP=XV_STORE(nplanes-ip+1,ibest) |
xP=XV_STORE(nplanes-ip+1,ibest) |
| 3082 |
yP=YV_STORE(nplanes-ip+1,ibest) |
yP=YV_STORE(nplanes-ip+1,ibest) |
| 3083 |
zP=ZV_STORE(nplanes-ip+1,ibest) |
zP=ZV_STORE(nplanes-ip+1,ibest) |
| 3326 |
*----- single clusters ----------------------------------------------- |
*----- single clusters ----------------------------------------------- |
| 3327 |
c print*,'## ncls(',ip,') ',ncls(ip) |
c print*,'## ncls(',ip,') ',ncls(ip) |
| 3328 |
do ic=1,ncls(ip) !loop on single clusters |
do ic=1,ncls(ip) !loop on single clusters |
| 3329 |
|
c print*,'-',ic,'-' |
| 3330 |
icl=cls(ip,ic) |
icl=cls(ip,ic) |
| 3331 |
c if(cl_used(icl).eq.1.or. !if the cluster is already used |
c if(cl_used(icl).eq.1.or. !if the cluster is already used |
| 3332 |
if(cl_used(icl).ne.0.or. !if the cluster is already used !(3) |
if(cl_used(icl).ne.0.or. !if the cluster is already used !(3) |
| 3415 |
* ---------------------------- |
* ---------------------------- |
| 3416 |
xm_A(nplanes-ip+1) = xmm_A |
xm_A(nplanes-ip+1) = xmm_A |
| 3417 |
ym_A(nplanes-ip+1) = ymm_A |
ym_A(nplanes-ip+1) = ymm_A |
| 3418 |
|
zm_A(nplanes-ip+1) = zmm_A |
| 3419 |
xm_B(nplanes-ip+1) = xmm_B |
xm_B(nplanes-ip+1) = xmm_B |
| 3420 |
ym_B(nplanes-ip+1) = ymm_B |
ym_B(nplanes-ip+1) = ymm_B |
| 3421 |
|
zm_B(nplanes-ip+1) = zmm_B |
| 3422 |
zm(nplanes-ip+1) = (zmm_A+zmm_B)/2. |
zm(nplanes-ip+1) = (zmm_A+zmm_B)/2. |
| 3423 |
|
c$$$ zm(nplanes-ip+1) = |
| 3424 |
|
c$$$ $ z_mech_sensor(nplanes-ip+1,il,is)*1000./1.d4 |
| 3425 |
dedxtrk_x(nplanes-ip+1) = dedxmmx !<<< |
dedxtrk_x(nplanes-ip+1) = dedxmmx !<<< |
| 3426 |
dedxtrk_y(nplanes-ip+1) = dedxmmy !<<< |
dedxtrk_y(nplanes-ip+1) = dedxmmy !<<< |
| 3427 |
* ---------------------------- |
* ---------------------------- |
| 3590 |
ys(1,ip)=0 |
ys(1,ip)=0 |
| 3591 |
ys(2,ip)=0 |
ys(2,ip)=0 |
| 3592 |
sgnlys(ip)=0 |
sgnlys(ip)=0 |
| 3593 |
|
sxbad(ip)=0 |
| 3594 |
|
sybad(ip)=0 |
| 3595 |
|
multmaxsx(ip)=0 |
| 3596 |
|
multmaxsy(ip)=0 |
| 3597 |
enddo |
enddo |
| 3598 |
end |
end |
| 3599 |
|
|
| 3907 |
ip=nplanes-npl(VIEW(icl))+1 |
ip=nplanes-npl(VIEW(icl))+1 |
| 3908 |
|
|
| 3909 |
if(cl_used(icl).eq.0)then !cluster not included in any track |
if(cl_used(icl).eq.0)then !cluster not included in any track |
| 3910 |
|
|
| 3911 |
|
cc print*,' ic ',icl,' --- stored ' |
| 3912 |
|
|
| 3913 |
if(mod(VIEW(icl),2).eq.0)then !=== X views |
if(mod(VIEW(icl),2).eq.0)then !=== X views |
| 3914 |
|
|
| 3915 |
nclsx = nclsx + 1 |
nclsx = nclsx + 1 |
| 3916 |
planex(nclsx) = ip |
planex(nclsx) = ip |
| 3917 |
sgnlxs(nclsx) = sgnl(icl)/mip(VIEW(icl),LADDER(icl)) |
sgnlxs(nclsx) = sgnl(icl)/mip(VIEW(icl),LADDER(icl)) |
| 3918 |
if(nsatstrips(icl).gt.0)sgnlxs(nclsx)=-sgnlxs(nclsx) |
if(nsatstrips(icl).gt.0)sgnlxs(nclsx)=-sgnlxs(nclsx) |
| 3919 |
clsx(nclsx) = icl |
clsx(nclsx) = icl |
| 3920 |
|
sxbad(nclsx) = nbadstrips(1,icl) |
| 3921 |
|
multmaxsx(nclsx) = maxs(icl)+10000*mult(icl) |
| 3922 |
|
|
| 3923 |
|
cc print*,icl,' >>>> ',sxbad(nclsx) |
| 3924 |
|
|
| 3925 |
do is=1,2 |
do is=1,2 |
| 3926 |
c call xyz_PAM(icl,0,is,'COG1',' ',0.,0.) |
c call xyz_PAM(icl,0,is,'COG1',' ',0.,0.) |
| 3927 |
c call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.) |
c call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.) |
| 3939 |
sgnlys(nclsy) = sgnl(icl)/mip(VIEW(icl),LADDER(icl)) |
sgnlys(nclsy) = sgnl(icl)/mip(VIEW(icl),LADDER(icl)) |
| 3940 |
if(nsatstrips(icl).gt.0)sgnlys(nclsy)=-sgnlys(nclsy) |
if(nsatstrips(icl).gt.0)sgnlys(nclsy)=-sgnlys(nclsy) |
| 3941 |
clsy(nclsy) = icl |
clsy(nclsy) = icl |
| 3942 |
|
sybad(nclsy) = nbadstrips(1,icl) |
| 3943 |
|
multmaxsy(nclsy) = maxs(icl)+10000*mult(icl) |
| 3944 |
|
|
| 3945 |
|
cc print*,icl,' >>>> ',sybad(nclsy) |
| 3946 |
|
|
| 3947 |
do is=1,2 |
do is=1,2 |
| 3948 |
c call xyz_PAM(0,icl,is,' ','COG1',0.,0.) |
c call xyz_PAM(0,icl,is,' ','COG1',0.,0.) |
| 3949 |
c call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.) |
c call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.) |