subroutine fortconsts implicit none #include "skhead.h" #include "skparm.h" #include "sktq.h" #include "skbadc.h" #include "skmisch.h" #include "geopmt.h" integer icab integer n0, n1, n2, ipmt, isk23(maxpm) real qefactor(maxpm),qetable common/pmtinfcmn/isk23,qefactor character*132 fname_qe character*132 fname_PMTtyp data fname_PMTtyp/'/skam/const/pmtinf.dat'/ c*** Read PMT type, QE table *=== SK-III & IV === if(SK_GEOMETRY.ge.3) then call findconsts(fname_PMTtyp,'pmtinf','pmtinf.dat',0) open(99,file=fname_PMTtyp,status='old') 3 continue read(99,*,END=4) n0, n1, n2 isk23(n0) = n1 c write(*,*) n0,isk23(n0) goto 3 4 continue close(99) *=== SK-I & II ===== else do icab=1,maxpm isk23(icab)=2 enddo endif c*** Mask missing PMTs do icab=1,maxpm if (imis(icab).ne.0) isk23(icab)=0 enddo *=== SK-II, III & IV === if(SK_GEOMETRY.ge.2) then ipmt=0 if(SK_GEOMETRY.eq.2) then call findconsts(fname_qe,'QE table','qetable_1.dat',0) else if(SK_GEOMETRY.eq.3.or.SK_GEOMETRY.eq.4) then call findconsts(fname_qe,'QE table','qetable3_0.dat',0) endif open(unit=91,file=fname_qe,status='old',form='formatted') 410 continue read(91,*,end=411) icab, qetable ipmt=ipmt+1 qefactor(icab)=qetable goto 410 411 continue close(91) if(ipmt.ne.maxpm) then write(6,*) 'Entry of QE table is wrong !' stop endif *=== SK-I === else do icab=1,maxpm qefactor(icab)=1.0 enddo endif return end