subroutine me_fitter implicit none include 'sieve.inc' include 'target.inc' integer ntid integer max_events, fit_index integer histid /100/ character*3 fittyp logical retcode write(*,*) ' in me_fitter' fit_index = 0 fittyp=' ' call kugeti(ntid) ! get ntuple id write(*,*) ' call kugeti',ntid call kugeti(max_events) ! get # of events to process write(*,*) ' call kugeti',max_events call kugeti(fit_index) write(*,*) ' call kugets',fit_index c if(fittyp(1:3).eq.' ')fit_index = 1 c if(fittyp(1:3).eq.'y_t')fit_index = 3 c if(fittyp(1:3).eq.'Phi')fit_index = 4 c if(fittyp(1:3).eq.'The')fit_index = 2 c if(fittyp(1:3).eq.'Del')fit_index = 5 write(*,*) 'fit_index= ',fit_index write(*,*) ' calling me_fit_histos' call me_fit_histos(histid) ! define histograms write(*,*) ' calling me_fit_init',ntid, max_events call me_fit_init(ntid, max_events, retcode, fit_index) ! read in ntuple if (.not. retcode) return npass = 1 do while (npass.le.ipass) write(*,*) ' calling me_fit_setup' call me_fit_setup(fit_index) ! set up minuit for fitting npass = npass + 1 enddo call me_fit_fill(histid) ! fill histograms and ntuple write(*,*) ' ' write(*,*) ' DONE !!! ' end