Re: не работает прога на фортране

webnaska


program gtum
implicit none
*-----------------------------------------------------------------------/
*-----------------------------------------------------------------------/
include "gtum_read_blck.inc"
include "gtum_anal_blck.inc"
*-----------------------------------------------------------------------/
real Einv, CosA
real Mp
real pas(2pa(3)
integer Tru, Nph, Ng

logical read_event
character*(256) gtu_file, gtu_dir
integer get_free_lun, gtu_lun,
& iargc, icycle, iev, istat, h, maxmem
character*(4) tags1(20 tags4(4)
data tags1 /'m','pt','spar','ivtx','iof',
& 'agj','aty','meta','eeta','deta','dm0','epi0',
& 'ebl0','ebl1','eg1','eg2','rich','neta','npi0',
& 'ngam'/
data tags4 /'n','e1','e2','m'/
*-----------------------------------------------------------------------/
*-----------------------------------------------------------------------/
parameter (maxmem = 2000000)
common /pawc/ h(maxmem)
call hlimit(maxmem)
*-----------------------------------------------------------------------/
*
gtu_dir = 'c:\belarus\belarus1\Fortran\selex\'!//------Path of the Data File----------/
gtu_file= 'gtu_ilarin_ex1_10403_10858'!//----Data File------------/
gtu_lun = 5 !get_free_lun!//--------Number of open File------------/
*--------------------open File with DATA--------------------------------/
open(UNIT = gtu_lun, FORM = 'unformatted', status = 'old',
& FILE = gtu_dir (:len_trim(gtu_dir) ) // '/' //
& gtu_file(:len_trim(gtu_file err = 90)
*-----------------------------------------------------------------------/
*
if(index(gtu_file,'.').eq.0) then
call hropen(9, 'HBKDIR', gtu_file(:len_trim(gtu_file//'.hbk',
& 'N', 1024, istat)
else
call hropen(9, 'HBKDIR', gtu_file(:index(gtu_file,'.'//'hbk',
& 'N', 1024, istat)
endif
*----------------Include call Histograms--------------------------------/
*-----------------------------------------------------------------------/
* call hbook1(101,'read ev Eadd', 100, 0.,100.,0.)
* call hbook1(102,'read ev Nadd', 10, -0.5, 9.5,0.)
* call hbook1(103,'read ev Eneu', 200, 0.,400.,0.)
* call hbook1(104,'read ev Nneu', 10, -0.5, 9.5,0.)
* call hbook1(105,'read ev Epht1', 50, 0., 5.,0.)
* call hbook1(106,'read ev Npht1', 20, -0.5, 9.5,0.)
* call hbook1(114,'read ev Nh1', 7, 0., 7.,0.)
call hbook1(108,'read ev Nh2', 60, 0., 2.,0.)
* call hbook1(115,'do"-#vtx"j# Z vtx', 50, -8., 2., 0.)

*------------------FILLING----------------------------------------------/
*-----------------------------------------------------------------------/
iev = 0

Mp=0.14 !// mass pion
Tru=0 !// logical
do while(read_event(gtu_lun!//--Read Vaues from file while err--/
iev = iev + 1 !//-----------Schetchik sobitiy-------------------/
call do_vtx!//-----------Vosstanavlivaem vershinu---------------/
if(ivtx.eq.7.and.f_ric1(1).gt.0.7.and.f_ric2(1).
& gt.0.7.and.f_ric3(1).gt.0.7.and.Tru.eq.1) then
CosA=(f_x1*f_x2+f_y1*f_y2+
& xyz(3)*xyz(3/(sqrtf_x1*f_x1+f_y1*
& f_y1+xyz(3)*xyz(3*(f_x2*f_x2+
& f_y2*f_y2+xyz(3)*xyz(3
Einv=sqrt(2*f_p1*f_p2*(1-CosA) + 2*Mp*Mp)
call hf1(108,Einv,1.)
CosA=(f_x1*f_x3+f_y1*f_y3+
& xyz(3)*xyz(3/(sqrtf_x1*f_x1+f_y1*
& f_y1+xyz(3)*xyz(3*(f_x3*f_x3+
& f_y3*f_y3+xyz(3)*xyz(3
Einv=sqrt(2*f_p1*f_p3*(1-CosA) + 2*Mp*Mp)
call hf1(108,Einv,1.)

endif
*-----------------------------------------------------------------
if(Tru.eq.0) then
call gamm
endif
enddo
*------------------------------------------------------------------------/

print*, '----------------------------------'
print*, 2*Ng
print*, '----------------------------------'
*------------------------------
10 continue
print*, iev, ' events have been read from ', gtu_file
call hcdir('//HBKDIR',' ')
call hrout(0, icycle, 'N')
call hrend('HBKDIR')
call histdo
close(0)
call exit(0)
*--------------------------Exit in Err----------------------------------/
90 continue
print*, 'Error opening gtu file ', gtu_file
call exit(1)
end
*


помогите плз

durka82

А это "ivtx", например, что за переменная в 80-й строке?
Эти файлы есть:

include "gtum_read_blck.inc"
include "gtum_anal_blck.inc"


?

ava3443

Программу ты не полностью запостил. Нужны ещё два файла *.inc, которые вставляются в начале кода
Оставить комментарий
Имя или ник:
Комментарий: