--- DarthVader/TrackerLevel2/src/F77/reductionflight.f 2006/06/27 13:57:41 1.3 +++ DarthVader/TrackerLevel2/src/F77/reductionflight.f 2006/08/04 08:18:06 1.4 @@ -25,10 +25,10 @@ * STRIP MASK * ------------------------------------------------------- - call stripmask +c call stripmask !called later, after CN computation call init_level1 - good1=good0 + good1 = good0 c-------------------------------------------------- c read the variable DATATRACKER from LEVEL0 c and fill the variable ADC (inverting view 11) @@ -37,7 +37,7 @@ if(iflag.ne.0)then good1=0 c if(DEBUG)print*,'event ',eventn(1),' >>>>> decode ERROR' - ierror = 220 + ierror = 220 goto 200 endif @@ -48,18 +48,22 @@ c-------------------------------------------------- do iv=1,nviews do ik=1,nva1_view - cn(iv,ik)=0 !initializes cn variable + cn(iv,ik)=0 + mask_vk_ev(iv,ik)=1 iflag=0 if(mask_vk(iv,ik).eq.1)call cncomp(iv,ik,iflag) - if(iflag.ne.0)good1=0 +c if(iflag.ne.0)good1=0 + if(iflag.ne.0)then + mask_vk_ev(iv,ik)=0 + ierror = 220 + endif enddo enddo - if(good1.eq.0)then - ierror = 220 -c if(WARNING) -c $ print*,' WARNING - cncomp: CN computation failure ' - endif +c if(good1.eq.0)then +c ierror = 220 +c endif + call stripmask !compute mask(i,j,k) c--------------------------------------------- c loops on views, VA1 and strips, c and computes strips signals using @@ -90,6 +94,11 @@ clinclcut(is)=incutx*sigma(iv,nvk(is),nst(is)) $ *mask(iv,nvk(is),nst(is)) endif +c$$$ print*,iv,is,' --- ',adc(iv,nvk(is),nst(is)),cn(iv,nvk(is)) +c$$$ $ ,pedestal(iv,nvk(is),nst(is)),value(is) +c$$$ $ ,sigma(iv,nvk(is),nst(is)) +c if(value(is).gt.clseedcut(is)) +c $ print*,iv,is,' --- (ADC_PED_CN) ',value(is),clseedcut(is) enddo !end loop on strips (1) call search_cluster(iv) if(flag_shower.eqv..true.)then @@ -101,6 +110,7 @@ do iv=1,nviews do ik=1,nva1_view cnev(iv,ik)=cn(iv,ik) !assigns computed CN to ntuple variables + cnevflag(iv,ik)=cnflag(iv,ik) !assigns computed CN to ntuple variables ccc print*,"cnev(",iv,",",ik,")(reduction)= ",cnev(iv,ik) enddo enddo @@ -461,17 +471,17 @@ 250 continue c-------------------------------------------------------- -c fills ntuple variables +c fills cluster variables c-------------------------------------------------------- nclstr1=nclstr1+1 !cluster number ccc print*,nclstr1,multtemp if(nclstr1.gt.nclstrmax) then !too many clusters for the event: + if(verbose)print*,'Event ',eventn(1), + $ ': more than ',nclstrmax,' clusters' good1=0 ! event nclstr1=0 totCLlength=0 flag_shower = .true. - if(verbose)print*,'Event ',eventn(1), - $ ': more than ',nclstrmax,' clusters' goto 2000 endif view(nclstr1)=iv !vista del cluster @@ -525,14 +535,16 @@ * mask_vk(nviews,nva1_view) !VA1 mask * include 'commontracker.f' - include 'level1.f' +c include 'level1.f' + include 'common_reduction.f' include 'calib.f' * init mask do iv=1,nviews do ivk=1,nva1_view do is=1,nstrips_va1 - mask(iv,ivk,is) = mask_vk(iv,ivk) +c mask(iv,ivk,is) = mask_vk(iv,ivk) + mask(iv,ivk,is) = mask_vk(iv,ivk) * mask_vk_ev(iv,ivk) enddo enddo enddo