149 |
real cog2,angle |
real cog2,angle |
150 |
integer iview,lad |
integer iview,lad |
151 |
|
|
152 |
logical DEBUG |
c logical DEBUG |
153 |
common/dbg/DEBUG |
c common/dbg/DEBUG |
154 |
|
|
155 |
iview = VIEW(ic) !(1) |
iview = VIEW(ic) !(1) |
156 |
lad = nld(MAXS(ic),VIEW(ic)) !(1) |
lad = nld(MAXS(ic),VIEW(ic)) !(1) |
273 |
real cog3,angle |
real cog3,angle |
274 |
integer iview,lad |
integer iview,lad |
275 |
|
|
276 |
logical DEBUG |
c logical DEBUG |
277 |
common/dbg/DEBUG |
c common/dbg/DEBUG |
278 |
|
|
279 |
|
|
280 |
iview = VIEW(ic) !(1) |
iview = VIEW(ic) !(1) |
396 |
real cog4,angle |
real cog4,angle |
397 |
integer iview,lad |
integer iview,lad |
398 |
|
|
399 |
logical DEBUG |
c logical DEBUG |
400 |
common/dbg/DEBUG |
c common/dbg/DEBUG |
401 |
|
|
402 |
iview = VIEW(ic) !(1) |
iview = VIEW(ic) !(1) |
403 |
lad = nld(MAXS(ic),VIEW(ic)) !(1) |
lad = nld(MAXS(ic),VIEW(ic)) !(1) |
613 |
include 'calib.f' |
include 'calib.f' |
614 |
include 'level1.f' |
include 'level1.f' |
615 |
|
|
616 |
logical DEBUG |
c logical DEBUG |
617 |
common/dbg/DEBUG |
c common/dbg/DEBUG |
618 |
|
|
619 |
|
|
620 |
if (ncog.gt.0) then |
if (ncog.gt.0) then |
686 |
if(mod(iv,2).eq.1)incut=incuty |
if(mod(iv,2).eq.1)incut=incuty |
687 |
if(mod(iv,2).eq.0)incut=incutx |
if(mod(iv,2).eq.0)incut=incutx |
688 |
|
|
689 |
istart=INDSTART(IC) |
istart = INDSTART(IC) |
690 |
istop=TOTCLLENGTH |
istop = TOTCLLENGTH |
691 |
if(ic.lt.NCLSTR1)istop=INDSTART(IC+1)-1 |
if(ic.lt.NCLSTR1)istop=INDSTART(IC+1)-1 |
692 |
COG=0 |
COG = 0 |
693 |
mu=0 |
mu = 0 |
694 |
do i=istart,istop |
do i = istart,istop |
695 |
ipos=i-INDMAX(ic) |
ipos = i-INDMAX(ic) |
696 |
ivk=nvk(MAXS(ic)+ipos) |
ivk = nvk(MAXS(ic)+ipos) |
697 |
is=nst(MAXS(ic)+ipos) |
is = nst(MAXS(ic)+ipos) |
698 |
* print*,'******************',istart,istop,ipos |
* print*,'******************',istart,istop,ipos |
699 |
* $ ,MAXS(ic)+ipos,iv,ivk,is |
* $ ,MAXS(ic)+ipos,iv,ivk,is |
700 |
cut=incut*SIGMA(iv,ivk,is) |
cut = incut*SIGMA(iv,ivk,is) |
701 |
|
if(SIGMA(iv,ivk,is).ne.CLSIGMA(i)) |
702 |
|
$ print*,'cog(0,ic) --> hai fatto qualche cazzata' |
703 |
if(CLSIGNAL(i).ge.cut)then |
if(CLSIGNAL(i).ge.cut)then |
704 |
COG = COG + ipos*CLSIGNAL(i) |
COG = COG + ipos*CLSIGNAL(i) |
705 |
mu = mu + 1 |
mu = mu + 1 |
706 |
c print*,ipos,CLSIGNAL(i),incut,cut |
c print*,ipos,CLSIGNAL(i),incut,cut |
707 |
endif |
endif |
708 |
enddo |
enddo |
709 |
COG=COG/DEDX(ic) |
if(DEDX(ic).le.0)then |
710 |
|
print*,'cog(0,ic) --> ic, dedx ',ic,DEDX(ic) |
711 |
|
print*,(CLSIGNAL(i)/CLSIGMA(i),i=istart,istop) |
712 |
|
print*,(CLSIGNAL(i),i=istart,istop) |
713 |
|
print*,'cog(0,ic) --> NOT EVALUATED ' |
714 |
|
else |
715 |
|
COG=COG/DEDX(ic) |
716 |
|
endif |
717 |
c if(DEBUG)print*,'COG (ic ',ic,' m',mu,')' |
c if(DEBUG)print*,'COG (ic ',ic,' m',mu,')' |
718 |
c $ ,cog |
c $ ,cog |
719 |
|
|