233 |
c$$$ enddo |
c$$$ enddo |
234 |
c$$$ if(ibest.eq.0)goto 880 !>> no good candidates |
c$$$ if(ibest.eq.0)goto 880 !>> no good candidates |
235 |
|
|
236 |
rchi2best=1000000000. |
* ------------------------------------------------------- |
237 |
|
* order track-candidates according to: |
238 |
|
* 1st) decreasing n.points |
239 |
|
* 2nd) increasing chi**2 |
240 |
|
* ------------------------------------------------------- |
241 |
|
rchi2best=1000000000. |
242 |
ndofbest=0 !(1) |
ndofbest=0 !(1) |
243 |
do i=1,ntracks |
do i=1,ntracks |
244 |
if(RCHI2_STORE(i).lt.rchi2best.and. |
ndof=0 !(1) |
245 |
$ RCHI2_STORE(i).gt.0)then |
do ii=1,nplanes !(1) |
246 |
ndof=0 !(1) |
ndof=ndof !(1) |
247 |
do ii=1,nplanes !(1) |
$ +int(xgood_store(ii,i)) !(1) |
248 |
ndof=ndof !(1) |
$ +int(ygood_store(ii,i)) !(1) |
249 |
$ +int(xgood_store(ii,i)) !(1) |
enddo !(1) |
250 |
$ +int(ygood_store(ii,i)) !(1) |
if(ndof.gt.ndofbest)then !(1) |
251 |
enddo !(1) |
ibest=i |
252 |
if(ndof.ge.ndofbest)then !(1) |
rchi2best=RCHI2_STORE(i) |
253 |
|
ndofbest=ndof !(1) |
254 |
|
elseif(ndof.eq.ndofbest)then !(1) |
255 |
|
if(RCHI2_STORE(i).lt.rchi2best.and. |
256 |
|
$ RCHI2_STORE(i).gt.0)then |
257 |
ibest=i |
ibest=i |
258 |
rchi2best=RCHI2_STORE(i) |
rchi2best=RCHI2_STORE(i) |
259 |
ndofbest=ndof !(1) |
ndofbest=ndof !(1) |
260 |
endif !(1) |
endif !(1) |
261 |
endif |
endif |
262 |
enddo |
enddo |
263 |
|
|
264 |
|
c$$$ rchi2best=1000000000. |
265 |
|
c$$$ ndofbest=0 !(1) |
266 |
|
c$$$ do i=1,ntracks |
267 |
|
c$$$ if(RCHI2_STORE(i).lt.rchi2best.and. |
268 |
|
c$$$ $ RCHI2_STORE(i).gt.0)then |
269 |
|
c$$$ ndof=0 !(1) |
270 |
|
c$$$ do ii=1,nplanes !(1) |
271 |
|
c$$$ ndof=ndof !(1) |
272 |
|
c$$$ $ +int(xgood_store(ii,i)) !(1) |
273 |
|
c$$$ $ +int(ygood_store(ii,i)) !(1) |
274 |
|
c$$$ enddo !(1) |
275 |
|
c$$$ if(ndof.ge.ndofbest)then !(1) |
276 |
|
c$$$ ibest=i |
277 |
|
c$$$ rchi2best=RCHI2_STORE(i) |
278 |
|
c$$$ ndofbest=ndof !(1) |
279 |
|
c$$$ endif !(1) |
280 |
|
c$$$ endif |
281 |
|
c$$$ enddo |
282 |
|
|
283 |
if(ibest.eq.0)goto 880 !>> no good candidates |
if(ibest.eq.0)goto 880 !>> no good candidates |
284 |
*------------------------------------------------------------------------------- |
*------------------------------------------------------------------------------- |
285 |
* The best track candidate (ibest) is selected and a new fitting is performed. |
* The best track candidate (ibest) is selected and a new fitting is performed. |
314 |
do i=1,5 |
do i=1,5 |
315 |
AL_GUESS(i)=AL(i) |
AL_GUESS(i)=AL(i) |
316 |
enddo |
enddo |
317 |
|
c print*,'## guess: ',al |
318 |
|
|
319 |
do i=1,5 |
do i=1,5 |
320 |
AL(i)=dble(AL_STORE(i,icand)) |
AL(i)=dble(AL_STORE(i,icand)) |
327 |
iprint=0 |
iprint=0 |
328 |
c if(DEBUG)iprint=1 |
c if(DEBUG)iprint=1 |
329 |
if(VERBOSE)iprint=1 |
if(VERBOSE)iprint=1 |
330 |
|
if(DEBUG)iprint=2 |
331 |
call mini2(jstep,ifail,iprint) |
call mini2(jstep,ifail,iprint) |
332 |
if(ifail.ne.0) then |
if(ifail.ne.0) then |
333 |
if(.true.)then |
if(VERBOSE)then |
334 |
print *, |
print *, |
335 |
$ '*** MINIMIZATION FAILURE *** (after refinement) ' |
$ '*** MINIMIZATION FAILURE *** (after refinement) ' |
336 |
$ ,iev |
$ ,iev |
477 |
* PFAy - Position Finding Algorithm in y (COG2,ETA2,...) |
* PFAy - Position Finding Algorithm in y (COG2,ETA2,...) |
478 |
* angx - Projected angle in x |
* angx - Projected angle in x |
479 |
* angy - Projected angle in y |
* angy - Projected angle in y |
480 |
|
* bfx - x-component of magnetci field |
481 |
|
* bfy - y-component of magnetic field |
482 |
* |
* |
483 |
* --------- COUPLES ------------------------------------------------------- |
* --------- COUPLES ------------------------------------------------------- |
484 |
* The couple defines a point in the space. |
* The couple defines a point in the space. |
517 |
* |
* |
518 |
* |
* |
519 |
|
|
520 |
subroutine xyz_PAM(icx,icy,sensor,PFAx,PFAy,angx,angy) |
subroutine xyz_PAM(icx,icy,sensor,PFAx,PFAy,ax,ay,bfx,bfy) |
521 |
|
|
|
c***************************************************** |
|
|
c 07/10/2005 modified by elena vannuccini --> (1) |
|
|
c 01/02/2006 modified by elena vannuccini --> (2) |
|
|
c 02/02/2006 modified by Elena Vannuccini --> (3) |
|
|
c (implemented new p.f.a.) |
|
|
c 03/02/2006 modified by Elena Vannuccini --> (4) |
|
|
c (implemented variable resolution) |
|
|
c***************************************************** |
|
522 |
|
|
523 |
include 'commontracker.f' |
include 'commontracker.f' |
524 |
include 'level1.f' |
include 'level1.f' |
536 |
integer sensor |
integer sensor |
537 |
integer viewx,viewy |
integer viewx,viewy |
538 |
character*4 PFAx,PFAy !PFA to be used |
character*4 PFAx,PFAy !PFA to be used |
539 |
real angx,angy !X-Y angle |
real ax,ay !X-Y geometric angle |
540 |
|
real angx,angy !X-Y effective angle |
541 |
|
real bfx,bfy !X-Y b-field components |
542 |
|
|
543 |
real stripx,stripy |
real stripx,stripy |
544 |
|
|
564 |
xPAM_B = 0. |
xPAM_B = 0. |
565 |
yPAM_B = 0. |
yPAM_B = 0. |
566 |
zPAM_B = 0. |
zPAM_B = 0. |
567 |
|
c print*,'## xyz_PAM: ',icx,icy,sensor,PFAx,PFAy,angx,angy |
568 |
* ----------------- |
* ----------------- |
569 |
* CLUSTER X |
* CLUSTER X |
570 |
* ----------------- |
* ----------------- |
571 |
|
|
572 |
if(icx.ne.0)then |
if(icx.ne.0)then |
573 |
|
|
574 |
viewx = VIEW(icx) |
viewx = VIEW(icx) |
575 |
nldx = nld(MAXS(icx),VIEW(icx)) |
nldx = nld(MAXS(icx),VIEW(icx)) |
576 |
nplx = npl(VIEW(icx)) |
nplx = npl(VIEW(icx)) |
577 |
resxPAM = RESXAV !!!!!!!TEMPORANEO!!!!!!!!!!!!!!!! |
resxPAM = RESXAV |
|
|
|
578 |
stripx = float(MAXS(icx)) |
stripx = float(MAXS(icx)) |
579 |
if(PFAx.eq.'COG1')then !(1) |
* -------------------------- |
580 |
stripx = stripx !(1) |
* magnetic-field corrections |
581 |
resxPAM = resxPAM !(1) |
* -------------------------- |
582 |
|
c$$$ print*,nplx,ax,bfy/10. |
583 |
|
angtemp = ax |
584 |
|
bfytemp = bfy |
585 |
|
if(nplx.eq.6) angtemp = -1. * ax |
586 |
|
if(nplx.eq.6) bfytemp = -1. * bfy |
587 |
|
tgtemp = tan(angtemp*acos(-1.)/180.) + pmuH_h*bfytemp*0.00001 |
588 |
|
angx = 180.*atan(tgtemp)/acos(-1.) |
589 |
|
stripx = stripx - 0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX |
590 |
|
c$$$ print*,angx,0.5*pmuH_h*bfytemp*0.00001*SiDimZ/pitchX |
591 |
|
c$$$ print*,'========================' |
592 |
|
* -------------------------- |
593 |
|
|
594 |
|
if(PFAx.eq.'COG1')then |
595 |
|
stripx = stripx |
596 |
|
resxPAM = resxPAM |
597 |
elseif(PFAx.eq.'COG2')then |
elseif(PFAx.eq.'COG2')then |
598 |
stripx = stripx + cog(2,icx) |
stripx = stripx + cog(2,icx) |
599 |
resxPAM = resxPAM*fbad_cog(2,icx) |
resxPAM = resxPAM*fbad_cog(2,icx) |
600 |
|
elseif(PFAx.eq.'COG3')then |
601 |
|
stripx = stripx + cog(3,icx) |
602 |
|
resxPAM = resxPAM*fbad_cog(3,icx) |
603 |
|
elseif(PFAx.eq.'COG4')then |
604 |
|
c print*,'COG4' |
605 |
|
stripx = stripx + cog(4,icx) |
606 |
|
resxPAM = resxPAM*fbad_cog(4,icx) |
607 |
elseif(PFAx.eq.'ETA2')then |
elseif(PFAx.eq.'ETA2')then |
608 |
c cog2 = cog(2,icx) |
stripx = stripx + pfaeta2(icx,angx) |
609 |
c etacorr = pfaeta2(cog2,viewx,nldx,angx) |
resxPAM = risx_eta2(abs(angx)) |
|
c stripx = stripx + etacorr |
|
|
stripx = stripx + pfaeta2(icx,angx) !(3) |
|
|
resxPAM = risx_eta2(angx) ! (4) |
|
610 |
if(DEBUG.and.fbad_cog(2,icx).ne.1) |
if(DEBUG.and.fbad_cog(2,icx).ne.1) |
611 |
$ print*,'BAD icx >>> ',viewx,fbad_cog(2,icx) |
$ print*,'BAD icx >>> ',viewx,fbad_cog(2,icx) |
612 |
resxPAM = resxPAM*fbad_cog(2,icx) |
resxPAM = resxPAM*fbad_cog(2,icx) |
613 |
elseif(PFAx.eq.'ETA3')then !(3) |
elseif(PFAx.eq.'ETA3')then |
614 |
stripx = stripx + pfaeta3(icx,angx) !(3) |
stripx = stripx + pfaeta3(icx,angx) |
615 |
resxPAM = risx_eta3(angx) ! (4) |
resxPAM = risx_eta3(abs(angx)) |
616 |
if(DEBUG.and.fbad_cog(3,icx).ne.1) !(3) |
if(DEBUG.and.fbad_cog(3,icx).ne.1) |
617 |
$ print*,'BAD icx >>> ',viewx,fbad_cog(3,icx)!(3) |
$ print*,'BAD icx >>> ',viewx,fbad_cog(3,icx) |
618 |
resxPAM = resxPAM*fbad_cog(3,icx) !(3) |
resxPAM = resxPAM*fbad_cog(3,icx) |
619 |
elseif(PFAx.eq.'ETA4')then !(3) |
elseif(PFAx.eq.'ETA4')then |
620 |
stripx = stripx + pfaeta4(icx,angx) !(3) |
stripx = stripx + pfaeta4(icx,angx) |
621 |
resxPAM = risx_eta4(angx) ! (4) |
resxPAM = risx_eta4(abs(angx)) |
622 |
if(DEBUG.and.fbad_cog(4,icx).ne.1) !(3) |
if(DEBUG.and.fbad_cog(4,icx).ne.1) |
623 |
$ print*,'BAD icx >>> ',viewx,fbad_cog(4,icx)!(3) |
$ print*,'BAD icx >>> ',viewx,fbad_cog(4,icx) |
624 |
resxPAM = resxPAM*fbad_cog(4,icx) !(3) |
resxPAM = resxPAM*fbad_cog(4,icx) |
625 |
elseif(PFAx.eq.'ETA')then !(3) |
elseif(PFAx.eq.'ETA')then |
626 |
stripx = stripx + pfaeta(icx,angx) !(3) |
c print*,'ETA' |
627 |
resxPAM = ris_eta(icx,angx) ! (4) |
stripx = stripx + pfaeta(icx,angx) |
628 |
if(DEBUG.and.fbad_cog(2,icx).ne.1) !(3) |
resxPAM = ris_eta(icx,angx) |
629 |
$ print*,'BAD icx >>> ',viewx,fbad_cog(2,icx)!(3) |
if(DEBUG.and.fbad_cog(2,icx).ne.1) |
630 |
c resxPAM = resxPAM*fbad_cog(2,icx) !(3)TEMPORANEO |
$ print*,'BAD icx >>> ',viewx,fbad_cog(2,icx) |
631 |
resxPAM = resxPAM*fbad_eta(icx,angx) !(3)(4) |
resxPAM = resxPAM*fbad_eta(icx,angx) |
632 |
elseif(PFAx.eq.'COG')then !(2) |
elseif(PFAx.eq.'COG')then |
633 |
stripx = stripx + cog(0,icx) !(2) |
stripx = stripx + cog(0,icx) |
634 |
resxPAM = risx_cog(angx) ! (4) |
resxPAM = risx_cog(abs(angx)) |
635 |
resxPAM = resxPAM*fbad_cog(0,icx)!(2) |
resxPAM = resxPAM*fbad_cog(0,icx) |
636 |
else |
else |
637 |
print*,'*** Non valid p.f.a. (x) --> ',PFAx |
print*,'*** Non valid p.f.a. (x) --> ',PFAx |
638 |
endif |
endif |
639 |
|
|
640 |
|
c print*,'%%%%%%%%%%%%' |
641 |
|
|
642 |
endif |
endif |
|
c if(icy.eq.0.and.icx.ne.0) |
|
|
c $ print*,PFAx,icx,angx,stripx,resxPAM,'***' |
|
643 |
|
|
644 |
* ----------------- |
* ----------------- |
645 |
* CLUSTER Y |
* CLUSTER Y |
646 |
* ----------------- |
* ----------------- |
647 |
|
|
648 |
if(icy.ne.0)then |
if(icy.ne.0)then |
649 |
|
|
650 |
viewy = VIEW(icy) |
viewy = VIEW(icy) |
651 |
nldy = nld(MAXS(icy),VIEW(icy)) |
nldy = nld(MAXS(icy),VIEW(icy)) |
652 |
nply = npl(VIEW(icy)) |
nply = npl(VIEW(icy)) |
653 |
resyPAM = RESYAV !!!!!!!TEMPORANEO!!!!!!!!!!!!!!!! |
resyPAM = RESYAV |
654 |
|
stripy = float(MAXS(icy)) |
655 |
|
|
656 |
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 |
657 |
print*,'xyz_PAM ***ERROR*** invalid cluster couple!!! ' |
print*,'xyz_PAM ***ERROR*** invalid cluster couple!!! ' |
658 |
$ ,icx,icy |
$ ,icx,icy |
659 |
goto 100 |
goto 100 |
660 |
endif |
endif |
661 |
|
* -------------------------- |
662 |
|
* magnetic-field corrections |
663 |
|
* -------------------------- |
664 |
|
tgtemp = tan(ay*acos(-1.)/180.)+pmuH_e*bfx*0.00001 |
665 |
|
angy = 180.*atan(tgtemp)/acos(-1.) |
666 |
|
stripy = stripy + 0.5*pmuH_e*bfx*0.00001*SiDimZ/pitchY |
667 |
|
* -------------------------- |
668 |
|
|
|
stripy = float(MAXS(icy)) |
|
669 |
if(PFAy.eq.'COG1')then !(1) |
if(PFAy.eq.'COG1')then !(1) |
670 |
stripy = stripy !(1) |
stripy = stripy !(1) |
671 |
resyPAM = resyPAM !(1) |
resyPAM = resyPAM !(1) |
672 |
elseif(PFAy.eq.'COG2')then |
elseif(PFAy.eq.'COG2')then |
673 |
stripy = stripy + cog(2,icy) |
stripy = stripy + cog(2,icy) |
674 |
resyPAM = resyPAM*fbad_cog(2,icy) |
resyPAM = resyPAM*fbad_cog(2,icy) |
675 |
|
elseif(PFAy.eq.'COG3')then |
676 |
|
stripy = stripy + cog(3,icy) |
677 |
|
resyPAM = resyPAM*fbad_cog(3,icy) |
678 |
|
elseif(PFAy.eq.'COG4')then |
679 |
|
stripy = stripy + cog(4,icy) |
680 |
|
resyPAM = resyPAM*fbad_cog(4,icy) |
681 |
elseif(PFAy.eq.'ETA2')then |
elseif(PFAy.eq.'ETA2')then |
682 |
c cog2 = cog(2,icy) |
c cog2 = cog(2,icy) |
683 |
c etacorr = pfaeta2(cog2,viewy,nldy,angy) |
c etacorr = pfaeta2(cog2,viewy,nldy,angy) |
684 |
c stripy = stripy + etacorr |
c stripy = stripy + etacorr |
685 |
stripy = stripy + pfaeta2(icy,angy) !(3) |
stripy = stripy + pfaeta2(icy,angy) !(3) |
686 |
resyPAM = risy_eta2(angy) ! (4) |
resyPAM = risy_eta2(abs(angy)) ! (4) |
687 |
resyPAM = resyPAM*fbad_cog(2,icy) |
resyPAM = resyPAM*fbad_cog(2,icy) |
688 |
if(DEBUG.and.fbad_cog(2,icy).ne.1) |
if(DEBUG.and.fbad_cog(2,icy).ne.1) |
689 |
$ print*,'BAD icy >>> ',viewy,fbad_cog(2,icy) |
$ print*,'BAD icy >>> ',viewy,fbad_cog(2,icy) |
706 |
$ print*,'BAD icy >>> ',viewy,fbad_cog(2,icy)!(3) |
$ print*,'BAD icy >>> ',viewy,fbad_cog(2,icy)!(3) |
707 |
elseif(PFAy.eq.'COG')then |
elseif(PFAy.eq.'COG')then |
708 |
stripy = stripy + cog(0,icy) |
stripy = stripy + cog(0,icy) |
709 |
resyPAM = risy_cog(angy) ! (4) |
resyPAM = risy_cog(abs(angy)) ! (4) |
710 |
c resyPAM = ris_eta(icy,angy) ! (4) |
c resyPAM = ris_eta(icy,angy) ! (4) |
711 |
resyPAM = resyPAM*fbad_cog(0,icy) |
resyPAM = resyPAM*fbad_cog(0,icy) |
712 |
else |
else |
715 |
|
|
716 |
endif |
endif |
717 |
|
|
718 |
|
c print*,'## stripx,stripy ',stripx,stripy |
719 |
|
|
720 |
c=========================================================== |
c=========================================================== |
721 |
C COUPLE |
C COUPLE |
722 |
C=========================================================== |
C=========================================================== |
918 |
|
|
919 |
endif |
endif |
920 |
|
|
921 |
|
|
922 |
|
c print*,'## xPAM,yPAM,zPAM ',xPAM,yPAM,zPAM |
923 |
|
c print*,'## xPAM_A,yPAM_A,zPAM_A ',xPAM_A,yPAM_A,zPAM_A |
924 |
|
c print*,'## xPAM_B,yPAM_B,zPAM_B ',xPAM_B,yPAM_B,zPAM_B |
925 |
|
|
926 |
100 continue |
100 continue |
927 |
end |
end |
928 |
|
|
1413 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1414 |
* cut on charge (X VIEW) |
* cut on charge (X VIEW) |
1415 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1416 |
if(dedx(icx).lt.dedx_x_min)then |
if(sgnl(icx).lt.dedx_x_min)then |
1417 |
cl_single(icx)=0 |
cl_single(icx)=0 |
1418 |
goto 10 |
goto 10 |
1419 |
endif |
endif |
1463 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1464 |
* cut on charge (Y VIEW) |
* cut on charge (Y VIEW) |
1465 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1466 |
if(dedx(icy).lt.dedx_y_min)then |
if(sgnl(icy).lt.dedx_y_min)then |
1467 |
cl_single(icy)=0 |
cl_single(icy)=0 |
1468 |
goto 20 |
goto 20 |
1469 |
endif |
endif |
1509 |
* charge correlation |
* charge correlation |
1510 |
* (modified to be applied only below saturation... obviously) |
* (modified to be applied only below saturation... obviously) |
1511 |
|
|
1512 |
if( .not.(dedx(icy).gt.chsaty.and.dedx(icx).gt.chsatx) |
if( .not.(sgnl(icy).gt.chsaty.and.sgnl(icx).gt.chsatx) |
1513 |
$ .and. |
$ .and. |
1514 |
$ .not.(dedx(icy).lt.chmipy.and.dedx(icx).lt.chmipx) |
$ .not.(sgnl(icy).lt.chmipy.and.sgnl(icx).lt.chmipx) |
1515 |
$ .and. |
$ .and. |
1516 |
$ (badclx.eq.1.and.badcly.eq.1) |
$ (badclx.eq.1.and.badcly.eq.1) |
1517 |
$ .and. |
$ .and. |
1518 |
$ .true.)then |
$ .true.)then |
1519 |
|
|
1520 |
ddd=(dedx(icy) |
ddd=(sgnl(icy) |
1521 |
$ -kch(nplx,nldx)*dedx(icx)-cch(nplx,nldx)) |
$ -kch(nplx,nldx)*sgnl(icx)-cch(nplx,nldx)) |
1522 |
ddd=ddd/sqrt(kch(nplx,nldx)**2+1) |
ddd=ddd/sqrt(kch(nplx,nldx)**2+1) |
1523 |
|
|
1524 |
c cut = chcut * sch(nplx,nldx) |
c cut = chcut * sch(nplx,nldx) |
1525 |
|
|
1526 |
sss=(kch(nplx,nldx)*dedx(icy)+dedx(icx) |
sss=(kch(nplx,nldx)*sgnl(icy)+sgnl(icx) |
1527 |
$ -kch(nplx,nldx)*cch(nplx,nldx)) |
$ -kch(nplx,nldx)*cch(nplx,nldx)) |
1528 |
sss=sss/sqrt(kch(nplx,nldx)**2+1) |
sss=sss/sqrt(kch(nplx,nldx)**2+1) |
1529 |
cut = chcut * (16 + sss/50.) |
cut = chcut * (16 + sss/50.) |
1532 |
goto 20 !charge not consistent |
goto 20 !charge not consistent |
1533 |
endif |
endif |
1534 |
endif |
endif |
|
|
|
|
* ------------------> COUPLE <------------------ |
|
|
ncp_plane(nplx) = ncp_plane(nplx) + 1 |
|
|
clx(nplx,ncp_plane(nplx))=icx |
|
|
cly(nply,ncp_plane(nplx))=icy |
|
|
cl_single(icx)=0 |
|
|
cl_single(icy)=0 |
|
1535 |
|
|
1536 |
if(ncp_plane(nplx).eq.ncouplemax)then |
if(ncp_plane(nplx).gt.ncouplemax)then |
1537 |
if(verbose)print*, |
if(verbose)print*, |
1538 |
$ '** warning ** number of identified '// |
$ '** warning ** number of identified '// |
1539 |
$ 'couples on plane ',nplx, |
$ 'couples on plane ',nplx, |
1541 |
$ ,'( ',ncouplemax,' ) --> masked!' |
$ ,'( ',ncouplemax,' ) --> masked!' |
1542 |
mask_view(nviewx(nplx)) = 2 |
mask_view(nviewx(nplx)) = 2 |
1543 |
mask_view(nviewy(nply)) = 2 |
mask_view(nviewy(nply)) = 2 |
1544 |
|
goto 10 |
1545 |
endif |
endif |
1546 |
|
|
1547 |
|
* ------------------> COUPLE <------------------ |
1548 |
|
ncp_plane(nplx) = ncp_plane(nplx) + 1 |
1549 |
|
clx(nplx,ncp_plane(nplx))=icx |
1550 |
|
cly(nply,ncp_plane(nplx))=icy |
1551 |
|
cl_single(icx)=0 |
1552 |
|
cl_single(icy)=0 |
1553 |
* ---------------------------------------------- |
* ---------------------------------------------- |
1554 |
|
|
1555 |
endif |
endif |
1658 |
icx1=clx(ip1,icp1) |
icx1=clx(ip1,icp1) |
1659 |
icy1=cly(ip1,icp1) |
icy1=cly(ip1,icp1) |
1660 |
c call xyz_PAM(icx1,icy1,is1,'COG2','COG2',0.,0.)!(1) |
c call xyz_PAM(icx1,icy1,is1,'COG2','COG2',0.,0.)!(1) |
1661 |
call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.) !(1) |
c call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.) !(1) |
1662 |
|
call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.,0.,0.) |
1663 |
xm1=xPAM |
xm1=xPAM |
1664 |
ym1=yPAM |
ym1=yPAM |
1665 |
zm1=zPAM |
zm1=zPAM |
1675 |
icy2=cly(ip2,icp2) |
icy2=cly(ip2,icp2) |
1676 |
c call xyz_PAM |
c call xyz_PAM |
1677 |
c $ (icx2,icy2,is2,'COG2','COG2',0.,0.)!(1) |
c $ (icx2,icy2,is2,'COG2','COG2',0.,0.)!(1) |
1678 |
|
c call xyz_PAM |
1679 |
|
c $ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.) !(1) |
1680 |
call xyz_PAM |
call xyz_PAM |
1681 |
$ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.) !(1) |
$ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.,0.,0.) |
1682 |
xm2=xPAM |
xm2=xPAM |
1683 |
ym2=yPAM |
ym2=yPAM |
1684 |
zm2=zPAM |
zm2=zPAM |
1742 |
icy3=cly(ip3,icp3) |
icy3=cly(ip3,icp3) |
1743 |
c call xyz_PAM |
c call xyz_PAM |
1744 |
c $ (icx3,icy3,is3,'COG2','COG2',0.,0.)!(1) |
c $ (icx3,icy3,is3,'COG2','COG2',0.,0.)!(1) |
1745 |
|
c call xyz_PAM |
1746 |
|
c $ (icx3,icy3,is3,PFAdef,PFAdef,0.,0.) !(1) |
1747 |
call xyz_PAM |
call xyz_PAM |
1748 |
$ (icx3,icy3,is3,PFAdef,PFAdef,0.,0.) !(1) |
$ (icx3,icy3,is3,PFAdef,PFAdef |
1749 |
|
$ ,0.,0.,0.,0.) |
1750 |
xm3=xPAM |
xm3=xPAM |
1751 |
ym3=yPAM |
ym3=yPAM |
1752 |
zm3=zPAM |
zm3=zPAM |
2395 |
nplused=nplused+ hit_plane(ip) |
nplused=nplused+ hit_plane(ip) |
2396 |
enddo |
enddo |
2397 |
|
|
2398 |
if(nplused.lt.nplxz_min)goto 888 !next doublet |
c if(nplused.lt.nplxz_min)goto 888 !next doublet |
2399 |
|
if(nplused.lt.nplyz_min)goto 888 !next doublet |
2400 |
if(ncp_ok.lt.ncpok)goto 888 !next cloud |
if(ncp_ok.lt.ncpok)goto 888 !next cloud |
2401 |
|
|
2402 |
if(DEBUG)then |
if(DEBUG)then |
2500 |
* ************************* |
* ************************* |
2501 |
c call xyz_PAM(icx,icy,is, |
c call xyz_PAM(icx,icy,is, |
2502 |
c $ 'COG2','COG2',0.,0.) |
c $ 'COG2','COG2',0.,0.) |
2503 |
|
c call xyz_PAM(icx,icy,is, !(1) |
2504 |
|
c $ PFAdef,PFAdef,0.,0.) !(1) |
2505 |
call xyz_PAM(icx,icy,is, !(1) |
call xyz_PAM(icx,icy,is, !(1) |
2506 |
$ PFAdef,PFAdef,0.,0.) !(1) |
$ PFAdef,PFAdef,0.,0.,0.,0.) |
2507 |
* ************************* |
* ************************* |
2508 |
* ----------------------------- |
* ----------------------------- |
2509 |
xgood(nplanes-ip+1)=1. |
xgood(nplanes-ip+1)=1. |
2531 |
jstep=0 !number of minimization steps |
jstep=0 !number of minimization steps |
2532 |
iprint=0 |
iprint=0 |
2533 |
c if(DEBUG)iprint=1 |
c if(DEBUG)iprint=1 |
2534 |
if(DEBUG)iprint=1 |
if(DEBUG)iprint=2 |
2535 |
call mini2(jstep,ifail,iprint) |
call mini2(jstep,ifail,iprint) |
2536 |
if(ifail.ne.0) then |
if(ifail.ne.0) then |
2537 |
if(DEBUG)then |
if(DEBUG)then |
2675 |
c include 'level1.f' |
c include 'level1.f' |
2676 |
include 'calib.f' |
include 'calib.f' |
2677 |
|
|
|
|
|
2678 |
* flag to chose PFA |
* flag to chose PFA |
2679 |
character*10 PFA |
character*10 PFA |
2680 |
common/FINALPFA/PFA |
common/FINALPFA/PFA |
2681 |
|
|
2682 |
|
real xp,yp,zp |
2683 |
|
real xyzp(3),bxyz(3) |
2684 |
|
equivalence (xp,xyzp(1)),(yp,xyzp(2)),(zp,xyzp(3)) |
2685 |
|
|
2686 |
* ================================================= |
* ================================================= |
2687 |
* new estimate of positions using ETA algorithm |
* new estimate of positions using ETA algorithm |
2688 |
* and |
* and |
2691 |
call track_init |
call track_init |
2692 |
do ip=1,nplanes !loop on planes |
do ip=1,nplanes !loop on planes |
2693 |
|
|
2694 |
|
xP=XV_STORE(nplanes-ip+1,ibest) |
2695 |
|
yP=YV_STORE(nplanes-ip+1,ibest) |
2696 |
|
zP=ZV_STORE(nplanes-ip+1,ibest) |
2697 |
|
call gufld(xyzp,bxyz) |
2698 |
|
c$$$ bxyz(1)=0 |
2699 |
|
c$$$ bxyz(2)=0 |
2700 |
|
c$$$ bxyz(3)=0 |
2701 |
* ||||||||||||||||||||||||||||||||||||||||||||||||| |
* ||||||||||||||||||||||||||||||||||||||||||||||||| |
2702 |
* ------------------------------------------------- |
* ------------------------------------------------- |
2703 |
* If the plane has been already included, it just |
* If the plane has been already included, it just |
2718 |
$ ,ip_cp(id),ip |
$ ,ip_cp(id),ip |
2719 |
icx=clx(ip,icp) |
icx=clx(ip,icp) |
2720 |
icy=cly(ip,icp) |
icy=cly(ip,icp) |
2721 |
|
c call xyz_PAM(icx,icy,is, |
2722 |
|
c $ PFA,PFA, |
2723 |
|
c $ AXV_STORE(nplanes-ip+1,ibest), |
2724 |
|
c $ AYV_STORE(nplanes-ip+1,ibest)) |
2725 |
call xyz_PAM(icx,icy,is, |
call xyz_PAM(icx,icy,is, |
|
c $ 'ETA2','ETA2', |
|
2726 |
$ PFA,PFA, |
$ PFA,PFA, |
2727 |
$ AXV_STORE(nplanes-ip+1,ibest), |
$ AXV_STORE(nplanes-ip+1,ibest), |
2728 |
$ AYV_STORE(nplanes-ip+1,ibest)) |
$ AYV_STORE(nplanes-ip+1,ibest), |
2729 |
|
$ bxyz(1), |
2730 |
|
$ bxyz(2) |
2731 |
|
$ ) |
2732 |
c$$$ call xyz_PAM(icx,icy,is, |
c$$$ call xyz_PAM(icx,icy,is, |
2733 |
c$$$ $ 'COG2','COG2', |
c$$$ $ 'COG2','COG2', |
2734 |
c$$$ $ 0., |
c$$$ $ 0., |
2741 |
resx(nplanes-ip+1) = resxPAM |
resx(nplanes-ip+1) = resxPAM |
2742 |
resy(nplanes-ip+1) = resyPAM |
resy(nplanes-ip+1) = resyPAM |
2743 |
|
|
2744 |
c dedxtrk(nplanes-ip+1) = (dedx(icx)+dedx(icy))/2. !(1) |
c dedxtrk(nplanes-ip+1) = (sgnl(icx)+sgnl(icy))/2. !(1) |
2745 |
dedxtrk_x(nplanes-ip+1)=dedx(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
dedxtrk_x(nplanes-ip+1)=sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
2746 |
dedxtrk_y(nplanes-ip+1)=dedx(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
dedxtrk_y(nplanes-ip+1)=sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
2747 |
|
|
2748 |
* ||||||||||||||||||||||||||||||||||||||||||||||||| |
* ||||||||||||||||||||||||||||||||||||||||||||||||| |
2749 |
* ------------------------------------------------- |
* ------------------------------------------------- |
2758 |
|
|
2759 |
* -------------------------------------------------------------- |
* -------------------------------------------------------------- |
2760 |
* determine which ladder and sensor are intersected by the track |
* determine which ladder and sensor are intersected by the track |
2761 |
xP=XV_STORE(nplanes-ip+1,ibest) |
c$$$ xP=XV_STORE(nplanes-ip+1,ibest) |
2762 |
yP=YV_STORE(nplanes-ip+1,ibest) |
c$$$ yP=YV_STORE(nplanes-ip+1,ibest) |
2763 |
zP=ZV_STORE(nplanes-ip+1,ibest) |
c$$$ zP=ZV_STORE(nplanes-ip+1,ibest) |
2764 |
call whichsensor(ip,xP,yP,nldt,ist) |
call whichsensor(ip,xP,yP,nldt,ist) |
2765 |
* if the track hit the plane in a dead area, go to the next plane |
* if the track hit the plane in a dead area, go to the next plane |
2766 |
if(nldt.eq.0.or.ist.eq.0)goto 133 |
if(nldt.eq.0.or.ist.eq.0)goto 133 |
2798 |
$ cl_used(icy).ne.0.or. !or the Y cluster is already used !(3) |
$ cl_used(icy).ne.0.or. !or the Y cluster is already used !(3) |
2799 |
$ .false.)goto 1188 !then jump to next couple. |
$ .false.)goto 1188 !then jump to next couple. |
2800 |
* |
* |
2801 |
|
c call xyz_PAM(icx,icy,ist, |
2802 |
|
c $ PFA,PFA, |
2803 |
|
c $ AXV_STORE(nplanes-ip+1,ibest), |
2804 |
|
c $ AYV_STORE(nplanes-ip+1,ibest)) |
2805 |
call xyz_PAM(icx,icy,ist, |
call xyz_PAM(icx,icy,ist, |
2806 |
$ PFA,PFA, |
$ PFA,PFA, |
|
c $ 'ETA2','ETA2', |
|
2807 |
$ AXV_STORE(nplanes-ip+1,ibest), |
$ AXV_STORE(nplanes-ip+1,ibest), |
2808 |
$ AYV_STORE(nplanes-ip+1,ibest)) |
$ AYV_STORE(nplanes-ip+1,ibest), |
2809 |
|
$ bxyz(1), |
2810 |
|
$ bxyz(2) |
2811 |
|
$ ) |
2812 |
|
|
2813 |
distance = distance_to(XP,YP) |
distance = distance_to(XP,YP) |
2814 |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
2823 |
rymm = resyPAM |
rymm = resyPAM |
2824 |
distmin = distance |
distmin = distance |
2825 |
idm = id |
idm = id |
2826 |
c dedxmm = (dedx(icx)+dedx(icy))/2. !(1) |
c dedxmm = (sgnl(icx)+sgnl(icy))/2. !(1) |
2827 |
dedxmmx = dedx(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
dedxmmx = sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
2828 |
dedxmmy = dedx(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
dedxmmy = sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
2829 |
endif |
endif |
2830 |
1188 continue |
1188 continue |
2831 |
enddo !end loop on couples on plane icp |
enddo !end loop on couples on plane icp |
2877 |
c if(cl_used(icx).eq.1)goto 11881 !if the X cluster is already used |
c if(cl_used(icx).eq.1)goto 11881 !if the X cluster is already used |
2878 |
if(cl_used(icx).ne.0)goto 11881 !if the X cluster is already used !(3) |
if(cl_used(icx).ne.0)goto 11881 !if the X cluster is already used !(3) |
2879 |
* !jump to the Y cluster |
* !jump to the Y cluster |
2880 |
|
c call xyz_PAM(icx,0,ist, |
2881 |
|
c $ PFA,PFA, |
2882 |
|
c $ AXV_STORE(nplanes-ip+1,ibest),0.) |
2883 |
call xyz_PAM(icx,0,ist, |
call xyz_PAM(icx,0,ist, |
|
c $ 'ETA2','ETA2', |
|
2884 |
$ PFA,PFA, |
$ PFA,PFA, |
2885 |
$ AXV_STORE(nplanes-ip+1,ibest),0.) |
$ AXV_STORE(nplanes-ip+1,ibest),0., |
2886 |
|
$ bxyz(1), |
2887 |
|
$ bxyz(2) |
2888 |
|
$ ) |
2889 |
distance = distance_to(XP,YP) |
distance = distance_to(XP,YP) |
2890 |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
2891 |
if(DEBUG)print*,'( cl-X ',icx |
if(DEBUG)print*,'( cl-X ',icx |
2901 |
rymm = resyPAM |
rymm = resyPAM |
2902 |
distmin = distance |
distmin = distance |
2903 |
iclm = icx |
iclm = icx |
2904 |
c dedxmm = dedx(icx) !(1) |
c dedxmm = sgnl(icx) !(1) |
2905 |
dedxmmx = dedx(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
dedxmmx = sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) |
2906 |
dedxmmy = 0. !(1) |
dedxmmy = 0. !(1) |
2907 |
endif |
endif |
2908 |
11881 continue |
11881 continue |
2910 |
c if(cl_used(icy).eq.1)goto 11882 !if the Y cluster is already used |
c if(cl_used(icy).eq.1)goto 11882 !if the Y cluster is already used |
2911 |
if(cl_used(icy).ne.0)goto 11882 !if the Y cluster is already used !(3) |
if(cl_used(icy).ne.0)goto 11882 !if the Y cluster is already used !(3) |
2912 |
* !jump to the next couple |
* !jump to the next couple |
2913 |
|
c call xyz_PAM(0,icy,ist, |
2914 |
|
c $ PFA,PFA, |
2915 |
|
c $ 0.,AYV_STORE(nplanes-ip+1,ibest)) |
2916 |
call xyz_PAM(0,icy,ist, |
call xyz_PAM(0,icy,ist, |
|
c $ 'ETA2','ETA2', |
|
2917 |
$ PFA,PFA, |
$ PFA,PFA, |
2918 |
$ 0.,AYV_STORE(nplanes-ip+1,ibest)) |
$ 0.,AYV_STORE(nplanes-ip+1,ibest), |
2919 |
|
$ bxyz(1), |
2920 |
|
$ bxyz(2) |
2921 |
|
$ ) |
2922 |
distance = distance_to(XP,YP) |
distance = distance_to(XP,YP) |
2923 |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
2924 |
if(DEBUG)print*,'( cl-Y ',icy |
if(DEBUG)print*,'( cl-Y ',icy |
2934 |
rymm = resyPAM |
rymm = resyPAM |
2935 |
distmin = distance |
distmin = distance |
2936 |
iclm = icy |
iclm = icy |
2937 |
c dedxmm = dedx(icy) !(1) |
c dedxmm = sgnl(icy) !(1) |
2938 |
dedxmmx = 0. !(1) |
dedxmmx = 0. !(1) |
2939 |
dedxmmy = dedx(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
dedxmmy = sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) |
2940 |
endif |
endif |
2941 |
11882 continue |
11882 continue |
2942 |
enddo !end loop on cluster inside couples |
enddo !end loop on cluster inside couples |
2943 |
*----- single clusters ----------------------------------------------- |
*----- single clusters ----------------------------------------------- |
2944 |
|
c print*,'## ncls(',ip,') ',ncls(ip) |
2945 |
do ic=1,ncls(ip) !loop on single clusters |
do ic=1,ncls(ip) !loop on single clusters |
2946 |
icl=cls(ip,ic) |
icl=cls(ip,ic) |
2947 |
|
c print*,'## ic ',ic,' ist ',ist |
2948 |
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 |
2949 |
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) |
2950 |
$ LADDER(icl).ne.nldt.or. !or the ladder number does not match |
$ LADDER(icl).ne.nldt.or. !or the ladder number does not match |
2951 |
$ .false.)goto 18882 !jump to the next singlet |
$ .false.)goto 18882 !jump to the next singlet |
2952 |
if(mod(VIEW(icl),2).eq.0)then!<---- X view |
if(mod(VIEW(icl),2).eq.0)then!<---- X view |
2953 |
|
c call xyz_PAM(icl,0,ist, |
2954 |
|
c $ PFA,PFA, |
2955 |
|
c $ AXV_STORE(nplanes-ip+1,ibest),0.) |
2956 |
call xyz_PAM(icl,0,ist, |
call xyz_PAM(icl,0,ist, |
|
c $ 'ETA2','ETA2', |
|
2957 |
$ PFA,PFA, |
$ PFA,PFA, |
2958 |
$ AXV_STORE(nplanes-ip+1,ibest),0.) |
$ AXV_STORE(nplanes-ip+1,ibest),0., |
2959 |
|
$ bxyz(1), |
2960 |
|
$ bxyz(2) |
2961 |
|
$ ) |
2962 |
else !<---- Y view |
else !<---- Y view |
2963 |
|
c call xyz_PAM(0,icl,ist, |
2964 |
|
c $ PFA,PFA, |
2965 |
|
c $ 0.,AYV_STORE(nplanes-ip+1,ibest)) |
2966 |
call xyz_PAM(0,icl,ist, |
call xyz_PAM(0,icl,ist, |
|
c $ 'ETA2','ETA2', |
|
2967 |
$ PFA,PFA, |
$ PFA,PFA, |
2968 |
$ 0.,AYV_STORE(nplanes-ip+1,ibest)) |
$ 0.,AYV_STORE(nplanes-ip+1,ibest), |
2969 |
|
$ bxyz(1), |
2970 |
|
$ bxyz(2) |
2971 |
|
$ ) |
2972 |
endif |
endif |
2973 |
|
|
2974 |
distance = distance_to(XP,YP) |
distance = distance_to(XP,YP) |
2975 |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
distance = distance / RCHI2_STORE(ibest)!<<< MS |
2976 |
if(DEBUG)print*,'( cl-s ',icl |
if(DEBUG)print*,'( cl-s ',icl |
2977 |
$ ,' ) normalized distance ',distance |
$ ,' ) normalized distance ',distance,'<',distmin,' ?' |
2978 |
if(distance.lt.distmin)then |
if(distance.lt.distmin)then |
2979 |
|
if(DEBUG)print*,'YES' |
2980 |
xmm_A = xPAM_A |
xmm_A = xPAM_A |
2981 |
ymm_A = yPAM_A |
ymm_A = yPAM_A |
2982 |
zmm_A = zPAM_A |
zmm_A = zPAM_A |
2987 |
rymm = resyPAM |
rymm = resyPAM |
2988 |
distmin = distance |
distmin = distance |
2989 |
iclm = icl |
iclm = icl |
2990 |
c dedxmm = dedx(icl) !(1) |
c dedxmm = sgnl(icl) !(1) |
2991 |
if(mod(VIEW(icl),2).eq.0)then !<---- X view |
if(mod(VIEW(icl),2).eq.0)then !<---- X view |
2992 |
dedxmmx = dedx(icl)/mip(VIEW(icl),LADDER(icl)) !(1)(2) |
dedxmmx = sgnl(icl)/mip(VIEW(icl),LADDER(icl)) !(1)(2) |
2993 |
dedxmmy = 0. !(1) |
dedxmmy = 0. !(1) |
2994 |
else !<---- Y view |
else !<---- Y view |
2995 |
dedxmmx = 0. !(1) |
dedxmmx = 0. !(1) |
2996 |
dedxmmy = dedx(icl)/mip(VIEW(icl),LADDER(icl)) !(1)(2) |
dedxmmy = sgnl(icl)/mip(VIEW(icl),LADDER(icl)) !(1)(2) |
2997 |
endif |
endif |
2998 |
endif |
endif |
2999 |
18882 continue |
18882 continue |
3000 |
enddo !end loop on single clusters |
enddo !end loop on single clusters |
3001 |
|
c print*,'## distmin ', distmin,' clinc ',clinc |
3002 |
if(distmin.le.clinc)then |
if(distmin.le.clinc)then |
3003 |
|
|
3004 |
CLS_STORE(nplanes-ip+1,ibest)=iclm !<<<< |
CLS_STORE(nplanes-ip+1,ibest)=iclm !<<<< |
3338 |
yv_nt(ip,ntr) = sngl(yv(ip)) |
yv_nt(ip,ntr) = sngl(yv(ip)) |
3339 |
zv_nt(ip,ntr) = sngl(zv(ip)) |
zv_nt(ip,ntr) = sngl(zv(ip)) |
3340 |
axv_nt(ip,ntr) = sngl(axv(ip)) |
axv_nt(ip,ntr) = sngl(axv(ip)) |
3341 |
ayv_nt(ip,ntr) = sngl(ayv(ip)) |
ayv_nt(ip,ntr) = sngl(ayv(ip)) |
3342 |
dedx_x(ip,ntr) = sngl(dedxtrk_x(ip)) !(2) |
c l'avevo dimenticato!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
3343 |
dedx_y(ip,ntr) = sngl(dedxtrk_y(ip)) !(2) |
factor = sqrt( |
3344 |
|
$ tan( acos(-1.) * sngl(axv(ip)) /180. )**2 + |
3345 |
|
$ tan( acos(-1.) * sngl(ayv(ip)) /180. )**2 + |
3346 |
|
$ 1. ) |
3347 |
|
c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
3348 |
|
dedx_x(ip,ntr) = sngl(dedxtrk_x(ip)/factor) |
3349 |
|
dedx_y(ip,ntr) = sngl(dedxtrk_y(ip)/factor) |
3350 |
|
|
3351 |
id = CP_STORE(ip,IDCAND) |
id = CP_STORE(ip,IDCAND) |
3352 |
icl = CLS_STORE(ip,IDCAND) |
icl = CLS_STORE(ip,IDCAND) |
3396 |
if(mod(VIEW(icl),2).eq.0)then !=== X views |
if(mod(VIEW(icl),2).eq.0)then !=== X views |
3397 |
nclsx = nclsx + 1 |
nclsx = nclsx + 1 |
3398 |
planex(nclsx) = ip |
planex(nclsx) = ip |
3399 |
sgnlxs(nclsx) = dedx(icl)/mip(VIEW(icl),LADDER(icl))!(2) |
sgnlxs(nclsx) = sgnl(icl)/mip(VIEW(icl),LADDER(icl))!(2) |
3400 |
clsx(nclsx) = icl |
clsx(nclsx) = icl |
3401 |
do is=1,2 |
do is=1,2 |
3402 |
c call xyz_PAM(icl,0,is,'COG1',' ',0.,0.) |
c call xyz_PAM(icl,0,is,'COG1',' ',0.,0.) |
3403 |
call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.) |
c call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.) |
3404 |
|
call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.,0.,0.) |
3405 |
xs(is,nclsx) = (xPAM_A+xPAM_B)/2 |
xs(is,nclsx) = (xPAM_A+xPAM_B)/2 |
3406 |
enddo |
enddo |
3407 |
c$$$ print*,'nclsx ',nclsx |
c$$$ print*,'nclsx ',nclsx |
3412 |
else !=== Y views |
else !=== Y views |
3413 |
nclsy = nclsy + 1 |
nclsy = nclsy + 1 |
3414 |
planey(nclsy) = ip |
planey(nclsy) = ip |
3415 |
sgnlys(nclsy) = dedx(icl)/mip(VIEW(icl),LADDER(icl))!(2) |
sgnlys(nclsy) = sgnl(icl)/mip(VIEW(icl),LADDER(icl))!(2) |
3416 |
clsy(nclsy) = icl |
clsy(nclsy) = icl |
3417 |
do is=1,2 |
do is=1,2 |
3418 |
c call xyz_PAM(0,icl,is,' ','COG1',0.,0.) |
c call xyz_PAM(0,icl,is,' ','COG1',0.,0.) |
3419 |
call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.) |
c call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.) |
3420 |
|
call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.,0.,0.) |
3421 |
ys(is,nclsy) = (yPAM_A+yPAM_B)/2 |
ys(is,nclsy) = (yPAM_A+yPAM_B)/2 |
3422 |
enddo |
enddo |
3423 |
c$$$ print*,'nclsy ',nclsy |
c$$$ print*,'nclsy ',nclsy |