--- DarthVader/TrackerLevel2/src/F77/analysisflight.f 2006/09/28 14:04:40 1.3 +++ DarthVader/TrackerLevel2/src/F77/analysisflight.f 2007/02/16 14:56:02 1.10 @@ -6,17 +6,23 @@ * - create LEVEL2 ntuple * ************************************************************************* - subroutine analysisflight + subroutine analysisflight(fin) include 'commontracker.f' + include 'level1.f' include 'common_momanhough.f' include 'common_mech.f' include 'common_xyzPAM.f' include 'common_mini_2.f' include 'calib.f' - include 'level1.f' include 'level2.f' +* input flag +* +* 0 - PFA = ETA +* 1 - PFA = COG4 + integer fin + * flag to chose PFA character*10 PFA common/FINALPFA/PFA @@ -37,6 +43,20 @@ ************************************************************ ************************************************************ PFA='ETA' + if(fin.eq.0)PFA='ETA' + if(fin.eq.2)PFA='ETA2' + if(fin.eq.3)PFA='ETA3' + if(fin.eq.4)PFA='ETA4' + if(fin.eq.10)PFA='COG' + if(fin.eq.11)PFA='COG1' + if(fin.eq.12)PFA='COG2' + if(fin.eq.13)PFA='COG3' + if(fin.eq.14)PFA='COG4' + +c$$$ PFA='ETA' +c$$$ DEBUG=.true. + + if(DEBUG)PRINT*,'P.F.A. --> ',fin,PFA if(DEBUG)then print*,'----------------------------------' @@ -44,20 +64,16 @@ endif *------------------------------------------------------ -* LEVEL2 N-TUPLE INITIALIZATIONS call init_level2 -c if(.not.good1)then -c if(good1.eq.0)then -c goto 8800 !fill nt-uple and go to next event -c endif + call init_hough *------------------------------------------------------ *------------------------------------------------------ * cut on maximum number of clusters *------------------------------------------------------ - if(nclstr1.gt.nclstrmax_level2)then - goto 8800 !fill nt-uple and go to next event - endif +c$$$ if(nclstr1.gt.nclstrmax_level2)then +c$$$ goto 8800 !fill nt-uple and go to next event +c$$$ endif do i=1,nclstr1 cl_used(i)=0 !init mask of clusters associated to a track @@ -77,6 +93,8 @@ goto 880 !fill ntp and go to next event endif + call fill_hough + iflag=0 call track_fitting(iflag) if(iflag.eq.1)then !bad event @@ -104,6 +122,14 @@ print*,'' print*,'' endif + + ngood = 0 + do iv = 1,nviews + ngood = ngood + good1(iv) + enddo +c$$$ if(ngood.ne.0)print*,'* WARNING * Event ' +c$$$ $ ,':LEVEL2 event status: ' +c$$$ $ ,(good2(i),i=1,nviews) 8800 continue