c A sample program that uses ojf_015 (optimal jet finder ver. 015) c ( works also with the obsolete version ojf_014 ) c by D.Yu.Grigoriev, E.Jankowski and F.V.Tkachov. c PROGRAM simplest_example INCLUDE 'ojf_kin.fh' DOUBLE PRECISION Radius DOUBLE PRECISION e, theta, phi DOUBLE PRECISION o_fin, y_fin, e_fin INTEGER a, seed, nparts, njets, kinematics LOGICAL success c number of jets is chosen njets = 3 c seed for random generation of the recombination matrix seed = 13 c R parameter from equation (16), section 2.2 Radius = 1.0 c choose spherical (lepton collisions) kinematics kinematics = sphere c file with input data is opened OPEN(10, FILE='example.in', FORM='formatted', STATUS = 'old') c input event setup starts CALL event_setup_begin ( kinematics ) c loop over all particles in the event nparts = 0 DO a = 1, 1999 READ(10,*, end=1000, err=1000) e, theta, phi CALL add_particle ( e, theta, phi ) nparts = nparts + 1 ENDDO 1000 CLOSE(10) c input of the event ends CALL event_setup_end c set up random the initial value of the recombination matrix CALL jets_setup_begin ( njets, Radius ) CALL set_seed ( seed ) CALL init_z_random_all CALL jets_setup_end c minimize Omega CALL Q_minimize ( success ) IF (.NOT. success) STOP 'minimum not found' c get and print the values of Omega, Y and E_soft c for the final jet configuration CALL get_criterion ( o_fin, y_fin, e_fin ) WRITE(*,*) 'Omega =', o_fin WRITE(*,*) 'Y =', y_fin WRITE(*,*) 'E_soft =', e_fin c prints properties of the resulting jets call print_jets END