1 jones 1.1 subroutine me_fitter
2
3
4 implicit none
5
6 include 'sieve.inc'
7 include 'target.inc'
8
9 integer ntid
10 integer max_events, fit_index
|
11 jones 1.2 integer histid /200/
|
12 jones 1.1 character*3 fittyp
13 logical retcode
14 write(*,*) ' in me_fitter'
15 fit_index = 0
16 fittyp=' '
17 call kugeti(ntid) ! get ntuple id
18 write(*,*) ' call kugeti',ntid
19 call kugeti(max_events) ! get # of events to process
20 write(*,*) ' call kugeti',max_events
21 call kugeti(fit_index)
22 write(*,*) ' call kugets',fit_index
23 c if(fittyp(1:3).eq.' ')fit_index = 1
24 c if(fittyp(1:3).eq.'y_t')fit_index = 3
25 c if(fittyp(1:3).eq.'Phi')fit_index = 4
26 c if(fittyp(1:3).eq.'The')fit_index = 2
27 c if(fittyp(1:3).eq.'Del')fit_index = 5
28 write(*,*) 'fit_index= ',fit_index
|
29 jones 1.2 write(*,*) ' calling me_fit_histos histid =',histid
|
30 jones 1.1 call me_fit_histos(histid) ! define histograms
31 write(*,*) ' calling me_fit_init',ntid, max_events
32 call me_fit_init(ntid, max_events, retcode, fit_index) ! read in ntuple
|
33 jones 1.2 if (.not. retcode) then
34 write(*,*) ' bad return code = ',retcode
35 return
36 endif
|
37 jones 1.1 npass = 1
|
38 jones 1.2 write(*,*) ' npass,ipass',npass,ipass
|
39 jones 1.1 do while (npass.le.ipass)
40 write(*,*) ' calling me_fit_setup'
41 call me_fit_setup(fit_index) ! set up minuit for fitting
42 npass = npass + 1
43 enddo
|
44 jones 1.2 write(*,*) ' call me_fit_fill id = ',histid
|
45 jones 1.1 call me_fit_fill(histid) ! fill histograms and ntuple
46 write(*,*) ' '
47 write(*,*) ' DONE !!! '
48 end
|