Routines needed for radiation scoring. (B. Pastircak)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Jun 2007 15:12:25 +0000 (15:12 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Jun 2007 15:12:25 +0000 (15:12 +0000)
Use COMSCW and FLUSCW environment variable to chose weighting routines. (AM)

TFluka/comscw.cxx [new file with mode: 0755]
TFluka/comscw_activity.f [new file with mode: 0644]
TFluka/fluscw_1mevn.f [new file with mode: 0644]
TFluka/fluscw_deq99c.f [new file with mode: 0644]
TFluka/libTFluka.pkg

diff --git a/TFluka/comscw.cxx b/TFluka/comscw.cxx
new file mode 100755 (executable)
index 0000000..44b3338
--- /dev/null
@@ -0,0 +1,33 @@
+#include "Fdimpar.h"  //(DIMPAR) fluka include
+#include "Fdblprc.h"  //(DBLPRC) fluka include
+#include "Fiounit.h"  //(IOUNIT) fluka common
+#include "Fflkmat.h"  //(FLKMAT) fluka common
+#include "Fscohlp.h"  //(SCOHLP) fluka common
+#include "Fsouevt.h"  //(SOUEVT) fluka common
+#ifndef WIN32
+#define comscw comscw_
+#define type_of_call
+#else
+#define comscw COMSCW 
+#define type_of_call  _stdcall
+#endif
+const Double_t  oned  = 1.00000e+00;
+const Double_t  factr = 1.60217e-07;
+extern "C" double type_of_call comscw(int& ij, double& xa, double& ya, double& za,
+                                   int& mreg, double& rull, int& llo, int& icall)
+
+{
+//
+//  Return comscw 
+//
+   SCOHLP.lsczer = kFALSE;
+   if (FLKMAT.rho[FLKMAT.medium[mreg]] <  1.0e-15) 
+{   
+   return 1.;
+}
+   if (SCOHLP.iscrng == 1 ) {
+//    printf("comscw  %f %f %f %f %f \n", FLKMAT.rho[FLKMAT.medium[mreg]], 4.1e+15*rull*factr/FLKMAT.rho[FLKMAT.medium[mreg]], xa, ya, za);
+      return factr/FLKMAT.rho[FLKMAT.medium[mreg]];
+}
+      return 1.;
+}
diff --git a/TFluka/comscw_activity.f b/TFluka/comscw_activity.f
new file mode 100644 (file)
index 0000000..3012723
--- /dev/null
@@ -0,0 +1,366 @@
+*$ CREATE COMSCW.FOR
+*COPY COMSCW
+*
+*=== comscw  ===========================================================*
+*
+      DOUBLE PRECISION FUNCTION COMSCW ( IJ    , XA    , YA    , ZA    ,
+     &                                   MREG  , RULL  , LLO   , ICALL )
+
+      INCLUDE '(DBLPRC)'
+      INCLUDE '(DIMPAR)'
+      INCLUDE '(IOUNIT)'
+*                                                                      *
+*----------------------------------------------------------------------*
+*                                                                      *
+* Special multiplication factors for activity scoring.                 *
+*                                                                      *
+* Note: Data files 'LE-CH.dat' and 'LE-EC.dat' read on unit 20.        *
+*                                                                      *
+*                                                                      *
+* SDUM = 'abcdefgh'                                              Lesco *
+*                                                                      *
+*   'ab' = 'LE'  division by exemption limits activated                *
+*                                                                      *
+*        'c' = 'C' : division by CERN zonage limits                    *
+*            'def' = '10 '    : division by 1/10 of the value      10  *
+*            'def' = '100'    : division by 1/100 of the value    100  *
+*                    otherwise: division by the value itself        1  *
+*        'c' = 'S' : division by Swiss LE values                    2  *
+*        'c' = 'E' : division by European concentration limits      3  *
+*                                                                      *
+*                Comscw = 1. for selected isotope                      *
+*                       = 0. otherwise                                 *
+*                                                                      *
+*   'ab' = 'IS'  selection of individual isotops activated       9999  *
+*                                                                      *
+*        'cd'  = symbol of isotope                                     *
+*        'efg' = mass number of isotope                                *
+*        'h'   = 'm' : metastable state                                *
+*                                                                      *
+*                Comscw = 1. for selected isotope                      *
+*                       = 0. otherwise                                 *
+*                                                                      *
+*   otherwise    Comscw = 1.                                       -1  *
+*                                                                      *
+*   Example(s):                                                        *
+*                                                                      *
+*    SDUM = 'LEC10xxx' : division by 1/10 of LE(EU) or by Swiss LE     *
+*         = 'LESxxxxx' : division by Swiss LE                          *
+*         = 'ISV  48x' : scoring of activity for V48                   *
+*         = 'ISMn 52m' : scoring of activity for mMn52                 *
+*                                                                      *
+*    Note: 'x' refers to characters without specific meaning           *
+*                                                                      *
+*     Input variables:                                                 *
+*                                                                      *
+*           Ij = (generalized) particle code                           *
+*     Xa,Ya,Za = position                                              *
+*         Mreg = region number                                         *
+*         Rull = amount to be deposited                                *
+*          Llo = particle generation                                   *
+*        Icall = call id                                               *
+*                                                                      *
+*     Output variables:                                                *
+*                                                                      *
+*       Comscw = factor the scored amount will be multiplied by        *
+*       Lsczer = logical flag, if true no amount will be scored        *
+*                regardless of Comscw                                  *
+*                                                                      *
+*     Useful variables (common SCOHLP):                                *
+*                                                                      *
+*     Energy/Star binnings/scorings (Comscw):                          *
+*          ISCRNG = 1 --> Energy density  binning                      *
+*          ISCRNG = 2 --> Star   density  binning                      *
+*          ISCRNG = 3 --> Residual nuclei scoring                      *
+*          ISCRNG = 4 --> Momentum transfer density binning            *
+*          ISCRNG = 5 --> Activity density binning                     *
+*          JSCRNG = # of the binning                                   *
+*                                                                      *
+*     Useful variables (common SOUEVT):                                *
+*                                                                      *
+*          X,Y,Zsoevt(i) = position    of the i_th source particle     *
+*          TX,Y,Zsoev(i) = direction   of the i_th source particle     *
+*              Wtsoev(i) = weight      of the i_th source particle     *
+*              Pmsoev(i) = momentum    of the i_th source particle     *
+*              Tksoev(i) = kin. energy of the i_th source particle     *
+*              Agsoev(i) = age         of the i_th source particle     *
+*              Aksoev(i) = Kaon ampl.  of the i_th source particle     *
+*              Ussoev(i) = user var.   of the i_th source particle     *
+*              Ijsoev(i) = identity    of the i_th source particle     *
+*              Nrsoev(i) = region      of the i_th source particle     *
+*              Nlsoev(i) = lattice     of the i_th source particle     *
+*                Npsoev  = number of the source particles              *
+*----------------------------------------------------------------------*
+*
+      INCLUDE '(FLKMAT)'
+      INCLUDE '(SCOHLP)'
+      INCLUDE '(SOUEVT)'
+*
+      INCLUDE '(RSNCCM)'
+      INCLUDE '(USRBIN)'
+      DIMENSION IZSCO(MXUSBN),IASCO(MXUSBN),ISSCO(MXUSBN),
+     &          LESCO(MXUSBN)
+*
+      CHARACTER CISOIN*2,CISO*2,CSET*10,CDUM*4,CA*3
+      PARAMETER (IZMAX  = 109,
+     &           IAZMIN = 2,
+     &           IAZMAX = 160)
+      DIMENSION CISO(IZMAX)
+      DIMENSION XLESWS(IZMAX,IAZMIN:IAZMAX,2),
+     &          XLEECO(IZMAX,IAZMIN:IAZMAX,2),
+     &          XLEO10(IZMAX,IAZMIN:IAZMAX,2)
+      DATA CISO /
+     &    'H ','He','Li','Be','B ','C ','N ','O ','F ','Ne','Na',
+     &    'Mg','Al','Si','P ','S ','Cl','Ar','K ','Ca','Sc','Ti',
+     &    'V ','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As',
+     &    'Se','Br','Kr','Rb','Sr','Y ','Zr','Nb','Mo','Tc','Ru',
+     &    'Rh','Pd','Ag','Cd','In','Sn','Sb','Te','I ','Xe','Cs',
+     &    'Ba','La','Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy',
+     &    'Ho','Er','Tm','Yb','Lu','Hf','Ta','W ','Re','Os','Ir',
+     &    'Pt','Au','Hg','Tl','Pb','Bi','Po','At','Rn','Fr','Ra',
+     &    'Ac','Th','Pa','U ','Np','Pu','Am','Cm','Bk','Cf','Es',
+     &    'Fm','Md','No','Lr','Rf','Ha','Sg','Ns','Hs','Mt'/
+*
+      LOGICAL LFIRST,LFOUND
+      DATA LFIRST /.TRUE./
+*
+      LSCZER = .FALSE.
+      COMSCW = ONEONE
+
+      IF (LFIRST) THEN
+
+         WRITE(LUNOUT,'(A)') ' COMSCW: activity weighting activated'
+         LFIRST = .FALSE.
+*
+*----------------------------------------------------------------------*
+* Initialization                               
+*
+* LE data taken from Appendix 3 column 9,
+* Ordonnance sur la radioprotection (ORaP) du 22 juin 1994 
+* (etat au 4 avril 2000)
+*
+* (data file in Bq/kg!)
+*
+         DO 104 IZ=1,IZMAX
+            DO 105 IAZ=IAZMIN,IAZMAX
+               XLESWS(IZ,IAZ,1) = ZERZER
+               XLESWS(IZ,IAZ,2) = ZERZER
+  105       CONTINUE
+  104    CONTINUE
+*
+         OPEN(20,FILE='LE-CH.dat',STATUS='UNKNOWN')
+         NISO   = 0
+         IZ0    = 1
+  100    CONTINUE
+         READ(20,*,END=101) CISOIN,IA,XLIMIT
+* convert from Bq/kg into Bq/g
+         XLIMIT = 1.0D-3*XLIMIT
+         LFOUND = .FALSE.
+         DO 102 IZ=IZ0,IZMAX
+            IF (CISOIN.EQ.CISO(IZ)) THEN
+               IF (IA.LT.0) THEN
+                  IS = 2
+                  IA = ABS(IA)
+               ELSE
+                  IS = 1
+               ENDIF
+               IAZ = IA-IZ
+               IF ((IAZ.LT.IAZMIN).OR.(IAZ.GT.IAZMAX)) THEN
+                  WRITE(LUNOUT,*)
+     &               ' COMSCW: warning! Iaz out of allowed range: ',
+     &               IAZ, IAZMIN,IAZMAX
+                  STOP
+               ENDIF
+               IF (XLESWS(IZ,IAZ,IS).GT.ZERZER) THEN
+                  WRITE(LUNOUT,*) 
+     &               ' COMSCW: warning! two entries for this isotope: ',
+     &               CISOIN,IA,XLIMIT
+                  STOP
+               ELSE
+                  XLESWS(IZ,IAZ,IS) = XLIMIT
+               ENDIF
+               NISO = NISO+1
+               IZ0  = IZ
+               LFOUND = .TRUE.
+               GOTO 103
+            ENDIF
+  102    CONTINUE
+         WRITE(LUNOUT,*) 
+     &      ' COMSCW: isotope not recognized: ',CISOIN,IA,XLIMIT
+         STOP
+  103    CONTINUE
+         GOTO 100
+  101    CONTINUE
+         CLOSE(20)
+*
+* LE data taken from 
+* Official journal of the European Communities L159, 29 June 1996
+* Council Directive 96/29/Euratom
+*
+* (data file in Bq/g!)
+*
+         DO 204 IZ=1,IZMAX
+            DO 205 IAZ=IAZMIN,IAZMAX
+               XLEECO(IZ,IAZ,1) = ZERZER
+               XLEECO(IZ,IAZ,2) = ZERZER
+  205       CONTINUE
+  204    CONTINUE
+*
+         OPEN(20,FILE='LE-EC.dat',STATUS='UNKNOWN')
+         NISO   = 0
+         IZ0    = 1
+  200    CONTINUE
+         READ(20,*,END=201) CISOIN,IA,XLIMIT,IFLAG
+         LFOUND = .FALSE.
+         DO 202 IZ=IZ0,IZMAX
+            IF (CISOIN.EQ.CISO(IZ)) THEN
+               IF (IA.LT.0) THEN
+                  IS = 2
+                  IA = ABS(IA)
+               ELSE
+                  IS = 1
+               ENDIF
+               IAZ = IA-IZ
+               IF ((IAZ.LT.IAZMIN).OR.(IAZ.GT.IAZMAX)) THEN
+                  WRITE(LUNOUT,*)
+     &               ' COMSCW: warning! Iaz out of allowed range: ',
+     &               IAZ, IAZMIN,IAZMAX
+                  STOP
+               ENDIF
+               IF (XLEECO(IZ,IAZ,IS).GT.ZERZER) THEN
+                  WRITE(LUNOUT,*) 
+     &               ' COMSCW: warning! two entries for this isotope: ',
+     &               CISOIN,IA,XLIMIT
+                  STOP
+               ELSE
+                  XLEECO(IZ,IAZ,IS) = XLIMIT
+* zero entries with Swiss values
+                  IF (IFLAG.EQ.1) XLEECO(IZ,IAZ,IS) = ZERZER
+               ENDIF
+               NISO = NISO+1
+               IZ0  = IZ
+               LFOUND = .TRUE.
+               GOTO 203
+            ENDIF
+  202    CONTINUE
+         WRITE(LUNOUT,*) 
+     &      ' COMSCW: isotope not recognized: ',CISOIN,IA,XLIMIT
+         STOP
+  203    CONTINUE
+         GOTO 200
+  201    CONTINUE
+         CLOSE(20)
+         DO 404 IZ=1,IZMAX
+            DO 405 IAZ=IAZMIN,IAZMAX
+               DO 406 IS=1,2
+                  XLEO10(IZ,IAZ,IS) = ZERZER
+                  IF (XLEECO(IZ,IAZ,IS).GT.ZERZER) THEN
+                     XLEO10(IZ,IAZ,IS) = XLEECO(IZ,IAZ,IS)/10.0D0
+                  ELSE
+                     XLEO10(IZ,IAZ,IS) = XLESWS(IZ,IAZ,IS)
+                  ENDIF
+  406          CONTINUE
+  405       CONTINUE
+  404    CONTINUE
+*
+         DO 500 I=1,MXUSBN
+            IZSCO(I) = 0
+            IASCO(I) = 0
+            ISSCO(I) = 0
+            LESCO(I) = 0
+  500    CONTINUE
+
+      ENDIF
+*
+*----------------------------------------------------------------------*
+* Online weighting                             
+*
+      IF ( ISCRNG .EQ. 5 ) THEN
+*
+* determine type of weighting
+         IF (LESCO(JSCRNG).EQ.0) THEN
+            CSET = TITUSB(JSCRNG)
+            IF (CSET(1:2).EQ.'IS') THEN
+               LESCO(JSCRNG) = 9999
+               DO 700 IZ=1,IZMAX
+                  IF (CSET(3:4).EQ.CISO(IZ)) THEN
+                     IZSCO(JSCRNG) = IZ
+                     READ(CSET,'(A4,A3)') CDUM,CA
+                     READ(CA,'(I3)') IASCO(JSCRNG)
+                     IF (CSET(8:8).EQ.'m') THEN
+                        ISSCO(JSCRNG) = 2
+                     ELSE
+                        ISSCO(JSCRNG) = 1
+                     ENDIF
+                  ENDIF
+  700          CONTINUE
+               IF ((IZSCO(JSCRNG).LE.0).OR.(IASCO(JSCRNG).LE.0)
+     &                                 .OR.(ISSCO(JSCRNG).LE.0)) THEN
+                  WRITE(LUNOUT,*) ' COMSCW: unknown isotope, Z,A,S = ',
+     &               IZSCO(JSCRNG),IASCO(JSCRNG),ISSCO(JSCRNG)
+                  STOP
+               ENDIF
+            ELSEIF(CSET(1:2).EQ.'LE') THEN
+               IF (CSET(3:3).EQ.'C') THEN
+                  IF (CSET(4:6).EQ.'100') THEN
+                     LESCO(JSCRNG) = 100
+                  ELSEIF (CSET(4:6).EQ.'10') THEN
+                     LESCO(JSCRNG) = 10
+                  ELSE
+                     LESCO(JSCRNG) = 1
+                  ENDIF
+               ELSEIF (CSET(3:3).EQ.'S') THEN
+                  LESCO(JSCRNG) = 2
+               ELSEIF (CSET(3:3).EQ.'E') THEN
+                  LESCO(JSCRNG) = 3
+               ELSE
+                  WRITE(LUNOUT,*) ' COMSCW: unknown LE set ',CSET(3:3)
+                  STOP
+               ENDIF
+            ELSE
+               LESCO(JSCRNG) = -1
+            ENDIF
+            WRITE(LUNOUT,1000) ' COMSCW: scoring ',JSCRNG,CSET,
+     &         ' weighted with properties ',
+     &         LESCO(JSCRNG),IZSCO(JSCRNG),IASCO(JSCRNG),ISSCO(JSCRNG)
+ 1000       FORMAT(A,I3,2A,I5,3I4)
+         ENDIF
+*
+* obtain present isotope from common block
+         JA  = IARSDL(1)
+         JZ  = IZRSDL(1)
+         JS  = ISRSDL(1)+1
+         IF (JS.GT.2) JS = 2
+         JAZ = JA-JZ
+*
+         COMSCW = ZERZER
+         IF (LESCO(JSCRNG).EQ.-1) THEN
+            COMSCW = ONEONE
+         ELSEIF (LESCO(JSCRNG).EQ.9999) THEN
+            IF ((JA.EQ.IASCO(JSCRNG)).AND.(JZ.EQ.IZSCO(JSCRNG)).AND.
+     &                                    (JS.EQ.ISSCO(JSCRNG))) THEN
+               COMSCW = ONEONE
+            ELSE
+               COMSCW = ZERZER
+            ENDIF
+         ELSEIF ((LESCO(JSCRNG).EQ.1).OR.(LESCO(JSCRNG).EQ.10).OR.
+     &           (LESCO(JSCRNG).EQ.100)) THEN
+            FACT = 10.0D0/DBLE(LESCO(JSCRNG))
+            IF (XLEO10(JZ,JAZ,JS).GT.ZERZER) 
+     &         COMSCW = ONEONE/(FACT*XLEO10(JZ,JAZ,JS))
+         ELSEIF (LESCO(JSCRNG).EQ.2) THEN
+            IF (XLESWS(JZ,JAZ,JS).GT.ZERZER)
+     &         COMSCW = ONEONE/XLESWS(JZ,JAZ,JS)
+         ELSEIF (LESCO(JSCRNG).EQ.3) THEN
+            IF (XLEECO(JZ,JAZ,JS).GT.ZERZER)
+     &         COMSCW = ONEONE/XLEECO(JZ,JAZ,JS)
+         ELSE
+            WRITE(LUNOUT,*) ' COMSCW: invalid option ',LESCO(JSCRNG)
+            STOP
+         ENDIF
+
+      ENDIF
+
+      RETURN
+*=== End of function Comscw ===========================================*
+      END
diff --git a/TFluka/fluscw_1mevn.f b/TFluka/fluscw_1mevn.f
new file mode 100644 (file)
index 0000000..e08df1a
--- /dev/null
@@ -0,0 +1,288 @@
+*$ CREATE FLUSCW.FOR
+*COPY FLUSCW
+*                                                                      *
+*=== fluscw ===========================================================*
+*                                                                      *
+      DOUBLE PRECISION FUNCTION FLUSCW
+     #(IJ,PLA,TXX,TYY,TZZ,WEE,XX,YY,ZZ,NREG,IOLREG,LLO,NSURF)
+      INCLUDE '(DBLPRC)'
+      INCLUDE '(DIMPAR)'
+      INCLUDE '(IOUNIT)'
+      SAVE
+      INCLUDE '(PAPROP)'
+      INCLUDE '(USRBIN)'
+      INCLUDE '(USRBDX)'
+      INCLUDE '(USRTRC)'
+      INCLUDE '(SCOHLP)'
+*
+*----------------------------------------------------------------------*
+*                                                                      *
+* This functions returns neutron, proton and pion  displacement damage *
+* weight factors.                                                      *
+*                                                                      *
+*----------------------------------------------------------------------*
+*                                                                      *
+*     Input variables:                                                 *
+*                                                                      *
+*           Ij = (generalized) particle code                           *
+*          Pla = particle momentum (if > 0), or kinetic energy (if <0 )*
+*    Txx,yy,zz = particle direction cosines                            *
+*          Wee = particle weight                                       *
+*     Xx,Yy,Zz = position                                              *
+*         Nreg = (new) region number                                   *
+*       Iolreg = (old) region number                                   *
+*          Llo = particle generation                                   *
+*        Nsurf = transport flag (ignore!)                              *
+*                                                                      *
+*     Output variables:                                                *
+*                                                                      *
+*       Fluscw = factor the scored amount will be multiplied by        *
+*       Lsczer = logical flag, if true no amount will be scored        *
+*                regardless of Fluscw                                  *
+*                                                                      *
+*     Useful variables (common SCOHLP):                                *
+*                                                                      *
+*     Flux like binnings/estimators (Fluscw):                          *
+*          ISCRNG = 1 --> Boundary crossing estimator                  *
+*          ISCRNG = 2 --> Track  length     binning                    *
+*          ISCRNG = 3 --> Track  length     estimator                  *
+*          ISCRNG = 4 --> Collision density estimator                  *
+*          ISCRNG = 5 --> Yield             estimator                  *
+*          JSCRNG = # of the binning/estimator                         *
+*                                                                      *
+*----------------------------------------------------------------------*
+*
+      LOGICAL LFIRST
+
+
+      DATA LFIRST /.TRUE./
+*
+* the default is unit weight
+      FLUSCW = ONEONE
+      LSCZER = .FALSE.
+*
+* skip all scorings other than tracklength
+      IF (ISCRNG.NE.2) RETURN
+* skip all particles other than protons, pions and neutrons
+      IF ((IJ.NE.1).AND.(IJ.NE.13).AND.(IJ.NE.14).AND.(IJ.NE.8)) RETURN
+*
+* read displacement damage factors
+      IF (LFIRST) THEN
+         WRITE(LUNOUT,1000)
+ 1000    FORMAT(1X,'FLUSCW:  direct conversion of neutron fluence to',
+     &       ' 1 MeV neutron equivalent requested')
+         WRITE(LUNOUT,*) ' neutrons'
+         OPEN(19,FILE='disdam_n.dat',STATUS='UNKNOWN')
+         CALL SKIP(19,7)
+         CALL RDXSC(19,LUNOUT,IDNDAM,-3)
+         CLOSE(19)
+         WRITE(LUNOUT,*) ' protons '
+         OPEN(19,FILE='disdam_p.dat',STATUS='UNKNOWN')
+         CALL SKIP(19,7)
+         CALL RDXSC(19,LUNOUT,IDPDAM,-2)
+         CLOSE(19)
+         WRITE(LUNOUT,*) ' pions   '
+         OPEN(19,FILE='disdam_pi.dat',STATUS='UNKNOWN')
+         CALL SKIP(19,7)
+         CALL RDXSC(19,LUNOUT,IDODAM,-2)
+         CLOSE(19)
+         LFIRST = .FALSE.
+      ENDIF
+*
+* should be always called with ekin ( pla < 0 ), 
+* but we leave the check for the moment..
+      IF (PLA.LT.0.0D0) THEN
+         EKIN = ABS(PLA)
+      ELSEIF (PLA.GT.0.0D0) THEN
+         EKIN = SQRT(PLA**2+AM(IJ)**2)-AM(IJ)
+      ELSE
+         RETURN
+      ENDIF
+*
+* calculate the weight
+      IF (IJ.EQ.1) THEN
+         FLUSCW = XSECT(IDPDAM,EKIN,0)
+      ELSEIF ((IJ.EQ.13).OR.(IJ.EQ.14)) THEN
+         FLUSCW = XSECT(IDODAM,EKIN,0)
+      ELSEIF (IJ.EQ.8) THEN
+         FLUSCW = XSECT(IDNDAM,EKIN,0)
+      ELSE
+         STOP ' FLUSCW: inconsistent IJ '
+      ENDIF
+
+      RETURN
+      END
+*
+*===rdxsc==============================================================*
+*
+      SUBROUTINE RDXSC(LINP,LCHK,IDXSEC,MODE)
+
+************************************************************************
+*   LINP           logical input unit                                  *
+*   LCHK    > 0    cross section data are plotted to unit LCHK         *
+*                   in equidistant log. binning using double-log.      *
+*                   interpolation                                      *
+*                   (otherwise they are not plotted)                   *
+*   IDXSEC         index of stored cross section in common             *
+*   |MODE|  = 1    cross section data given as histogram               *
+*                    i.e. E_lo(i)  sigma(i)                            *
+*                         E_hi(i)  sigma(i)                            *
+*                   with increasing energy                             *
+*           = 2    cross section data given for bin averages with      *
+*                   increasing energy                                  *
+*           = 3    cross section data given for bin averages with      *
+*                   decreasing energy                                  *
+*   if MODE < 0 the energy unit is assumed to be MeV (otherwise GeV)   *
+************************************************************************
+
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      SAVE
+
+      PARAMETER (MAXSDT = 10,
+     &           MAXSBI = 1400)
+      COMMON /CSECT/ XSEAV(MAXSDT,MAXSBI),XS(MAXSDT,MAXSBI),
+     &               NXSBIN(MAXSDT),NXSDT
+      DIMENSION TMPXS(2,MAXSBI)
+
+      LOGICAL LFIRST
+      DATA LFIRST /.TRUE./
+
+      IF (LFIRST) THEN
+         NXSDT = 0
+         DO 1 IDT=1,MAXSDT
+            NXSBIN(IDT) = 0
+            DO 2 IBIN=1,MAXSBI
+               XSEAV(IDT,IBIN) = 0.0D0
+               XS(IDT,IBIN)    = 0.0D0
+    2       CONTINUE
+    1    CONTINUE
+         LFIRST = .FALSE.
+      ENDIF
+
+      NXSDT = NXSDT+1
+
+      NEBIN = 0
+   10 CONTINUE
+         NEBIN = NEBIN+1
+         IF (NEBIN.GT.MAXSBI) STOP ' nebin > maxsbi !!!'
+         IF (IABS(MODE).EQ.1) THEN
+            READ(LINP,*,END=9000) ELOW,XS(NXSDT,NEBIN)
+            READ(LINP,*) ELHI,XS(NXSDT,NEBIN)
+            XSEAV(NXSDT,NEBIN) = SQRT(ELOW*ELHI)
+            IF (MODE.LT.0) XSEAV(NXSDT,NEBIN) = 1.D-3*XSEAV(NXSDT,NEBIN)
+         ELSEIF (IABS(MODE).EQ.2) THEN
+            READ(LINP,*,END=9000) XSEAV(NXSDT,NEBIN),XS(NXSDT,NEBIN)
+            IF (MODE.LT.0) XSEAV(NXSDT,NEBIN) = 1.D-3*XSEAV(NXSDT,NEBIN)
+         ELSEIF (IABS(MODE).EQ.3) THEN
+            READ(LINP,*,END=9000) TMPXS(1,NEBIN),TMPXS(2,NEBIN)
+            IF (MODE.LT.0) TMPXS(1,NEBIN) = 1.D-3*TMPXS(1,NEBIN)
+         ELSE
+            STOP ' RDXSC: unsupported mode ! '
+         ENDIF
+         GOTO 10
+ 9000 CONTINUE
+
+      IF (IABS(MODE).EQ.3) THEN
+         DO 3 I=1,NEBIN-1
+            IDX = NEBIN-I
+            XSEAV(NXSDT,IDX) = TMPXS(1,I)
+            XS(NXSDT,IDX) = TMPXS(2,I)
+    3    CONTINUE
+      ENDIF
+
+      NXSBIN(NXSDT) = NEBIN-1
+      IDXSEC = NXSDT
+
+      IF (LCHK.GT.0) THEN
+         AELO = LOG10(XSEAV(IDXSEC,1))
+         AEHI = LOG10(XSEAV(IDXSEC,NXSBIN(IDXSEC)))
+         DAE  = (AEHI-AELO)/DBLE(NXSBIN(IDXSEC))
+         DO 4 I=1,NXSBIN(IDXSEC)+1
+            AE = AELO+DBLE(I-1)*DAE
+            E  = 10.0D0**AE
+            WRITE(LCHK,'(1X,2E15.5)') E,XSECT(IDXSEC,E,0)
+    4    CONTINUE
+      ENDIF
+
+      RETURN
+      END
+*
+*===xsect==============================================================*
+*
+      DOUBLE PRECISION FUNCTION XSECT(IDXSEC,E,MODE)
+
+************************************************************************
+*   IDXSEC         index of stored cross section in common             *
+*   E              energy                                              *
+************************************************************************
+
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      SAVE
+
+      PARAMETER (MAXSDT = 10,
+     &           MAXSBI = 1400)
+      COMMON /CSECT/ XSEAV(MAXSDT,MAXSBI),XS(MAXSDT,MAXSBI),
+     &               NXSBIN(MAXSDT),NXSDT
+
+      IF (E.LE.XSEAV(IDXSEC,1)) THEN
+         CS = 0.0D0
+      ELSEIF (E.GT.XSEAV(IDXSEC,NXSBIN(IDXSEC))) THEN
+         N  = NXSBIN(IDXSEC)-1
+         CS = XSCINT(IDXSEC,E,N)
+      ELSE
+         DO 1 J=1,NXSBIN(IDXSEC)-1
+            IF ((E.GT.XSEAV(IDXSEC,J)).AND.(E.LE.XSEAV(IDXSEC,J+1))) 
+     &                                                          THEN
+               CS = XSCINT(IDXSEC,E,J)
+               GOTO 2
+            ENDIF
+   1     CONTINUE
+         STOP ' xsection value not found '
+   2     CONTINUE
+      ENDIF
+      XSECT = CS
+
+      RETURN
+      END
+*
+*===xscint=============================================================*
+*
+      DOUBLE PRECISION FUNCTION XSCINT(IDXSEC,E,J)
+
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      SAVE
+
+      PARAMETER (MAXSDT = 10,
+     &           MAXSBI = 1400)
+      COMMON /CSECT/ XSEAV(MAXSDT,MAXSBI),XS(MAXSDT,MAXSBI),
+     &               NXSBIN(MAXSDT),NXSDT
+
+      FAC = (LOG10(E)                -LOG10(XSEAV(IDXSEC,J)))/
+     &      (LOG10(XSEAV(IDXSEC,J+1))-LOG10(XSEAV(IDXSEC,J)))
+      XSCINT = LOG10(XS(IDXSEC,J))
+     &         +(LOG10(XS(IDXSEC,J+1))-LOG10(XS(IDXSEC,J)))*FAC
+      XSCINT = 10**(XSCINT)
+
+      RETURN
+      END
+*
+*===skip===============================================================*
+*
+      SUBROUTINE SKIP(LUNIT,NSKIP)
+
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      SAVE
+      PARAMETER (LOUT=6,LLOOK=9)
+
+      CHARACTER*132 ACARD
+
+      IF (NSKIP.EQ.0) RETURN
+
+      DO 1 K=1,NSKIP
+         READ(LUNIT,'(A132)') ACARD
+    1 CONTINUE
+
+      RETURN
+      END
diff --git a/TFluka/fluscw_deq99c.f b/TFluka/fluscw_deq99c.f
new file mode 100644 (file)
index 0000000..2a13210
--- /dev/null
@@ -0,0 +1,2774 @@
+************************************************************************
+*   Energy dependent factors for the conversion of fluence to          *
+*   effective dose and ambient dose equivalent for neutrons, protons,  *
+*   charged pions, muons, photons and electrons.                       *
+*                                                                      *
+*   The following sets are available:                                  *
+*    (for photons and electrons see note below)                        *
+*                                                                      *
+*    1-3: Effective dose from ICRP74 and Pelliccioni data              *
+*         calculated with ICRP radiation weighting factors Wr          *
+*         1: Anterior-Posterior irradiation                            *
+*         2: Rotational irradiation geometry                           *
+*         3: WORST possible geometry for the irradiation               *
+*                                                                      *
+*    4-6: Effective dose from ICRP74 and Pelliccioni data              *
+*         calculated with the Pelliccioni radiation weighting          *
+*         factors Wr                                                   *
+*         4: Anterior-Posterior irradiation                            *
+*         5: Rotational irradiation geometry                           *
+*         6: WORST possible geometry for the irradiation               *
+*                                                                      *
+*    7: Ambient dose equivalent from ICRP74 and Pelliccioni data       *
+*                                                                      *
+*    8: Ambient dose equivalent with old "GRS"-conversion factors      *
+*                                                                      *
+*   The different sets are invoked by EXTRAWEI (WHAT(3)=1) and the     *
+*   first five characters of the SDUM input parameter of the USRBIN,   *
+*   USRTRACK or USRBDX cards (case-insensitive) :                      *
+*                                                                      *
+*     SDUM(1:5) =                                                      *
+*                 'EAP74' = 1     'ERT74' = 2      'EWT74' = 3         *
+*                 'EAPMP' = 4     'ERTMP' = 5      'EWTMP' = 6         *
+*                 'AMB74' = 7     'AMBGS' = 8                          *
+*                                                                      *
+*   The default (any other SDUM) is unit weight factor.                *
+*                                                                      *
+*   Conversion factor sets for hadrons (n,p,pi) and muons can be       *
+*   enabled separately from those for photons and electrons by         *
+*   setting the 6th character of SDUM:                                 *
+*                                                                      *
+*     SDUM(6:6) = 1 only hadrons and muons (zero factor returned for   *
+*                   electrons and photons)                             *
+*               = 2 only electrons/positrons and photons (zero factor  *
+*                   returned for hadrons and muons)                    *
+*               otherwise: all particles considered (default)          *
+*                                                                      *
+*   Note: Photons and electrons:                                       *
+*         Only sets 1-3 and 7 are implemented for photons and electrons*
+*         If sets 4-6 are requested sets 1-3 are used instead.         *
+*         For set 8 zero values are returned.                          *
+*                                                                      *
+*   Note 2: Stand-alone use:                                           *
+*         The function can be used "stand-alone" (i.e. independent     *
+*         from FLUKA). In this case different conversion factor sets   *
+*         are invoked by the first parameter (IIJ)                     *
+*                                                                      *
+*                  IIJ = -(is*10000+id)  where                         *
+*                                                                      *
+*                  is = index of parameter set                         *
+*                  id = particle identity                              *
+*                                                                      *
+*         (example: -80008 = neutron with GRS-conversion factor set)   *
+************************************************************************
+*                                                                      *
+*=== fluscw ===========================================================*
+*                                                                      *
+      DOUBLE PRECISION FUNCTION FLUSCW
+     &          (IIJ,PLA,TXX,TYY,TZZ,WEE,XX,YY,ZZ,NREG,IOLREG,LLO,NSURF)
+
+      INCLUDE '(DBLPRC)'
+      INCLUDE '(DIMPAR)'
+      INCLUDE '(IOUNIT)'
+      SAVE
+
+      INCLUDE '(PAPROP)'
+      INCLUDE '(USRBIN)'
+      INCLUDE '(USRBDX)'
+      INCLUDE '(USRTRC)'
+      INCLUDE '(SCOHLP)'
+
+      LOGICAL LFIRST
+      CHARACTER*10 CSET
+      DIMENSION LFIRST(0:8)
+
+      PARAMETER (NBIN1N=81,NBIN2N=150,
+     &           NBIN1P=64,NBIN2P=61,
+     &           NBIN1I=71,
+     &           NBIN1M=71,NBIN2M=16,
+     &           NBIN1G=81,
+     &           NBIN1E=41,NBIN2E=81)
+
+      DIMENSION ITT(40)
+*  1 - neutron, 2 - proton, 3 - pion+, 4 - pion-, 5 - muon+, 5 - muon-,
+*  7 - photon, 8 - electron, 99 - the rest
+      DATA ITT/ 2, 2, 8, 8,99,99, 7, 1, 1, 5,
+     &          5,99, 3, 4, 3, 4, 1, 1,99, 4,
+     &          3,99,99,99,99,99,99,99,99,99,
+     &         99,99,99,99,99,99,99,99,99,99/
+*
+*-----------------------------------------------------------------------
+*
+* Effective dose for neutrons from ICRP74 and Pelliccioni data
+* calculated with ICRP radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*           
+      DIMENSION EBINN(NBIN1N),AEBINN(NBIN1N)
+      DATA EBINN /
+     1     1.000D-12,  1.000D-11,  2.530D-11,  1.000D-10,  2.000D-10,
+     2     5.000D-10,  1.000D-09,  2.000D-09,  5.000D-09,  1.000D-08,
+     3     2.000D-08,  5.000D-08,  1.000D-07,  2.000D-07,  5.000D-07,
+     4     1.000D-06,  2.000D-06,  5.000D-06,  1.000D-05,  2.000D-05,
+     5     3.000D-05,  5.000D-05,  7.000D-05,  1.000D-04,  1.500D-04,
+     6     2.000D-04,  3.000D-04,  5.000D-04,  7.000D-04,  9.000D-04,
+     7     1.000D-03,  1.200D-03,  2.000D-03,  3.000D-03,  4.000D-03,
+     8     5.000D-03,  6.000D-03,  7.000D-03,  8.000D-03,  9.000D-03,
+     9     1.000D-02,  1.200D-02,  1.400D-02,  1.500D-02,  1.600D-02,
+     *     1.800D-02,  2.000D-02,  3.000D-02,  5.000D-02,  7.500D-02,
+     1     1.000D-01,  1.500D-01,  2.000D-01,  3.000D-01,  5.000D-01,
+     2     7.000D-01,  1.000D+00,  1.500D+00,  2.000D+00,  3.000D+00,
+     3     5.000D+00,  7.000D+00,  1.000D+01,  1.500D+01,  2.000D+01,
+     4     3.000D+01,  5.000D+01,  7.000D+01,  1.000D+02,  1.500D+02,
+     5     2.000D+02,  3.000D+02,  5.000D+02,  7.000D+02,  1.000D+03,
+     6     1.500D+03,  2.000D+03,  3.000D+03,  5.000D+03,  7.000D+03,
+     7     1.000D+04/
+      DIMENSION AP74N(NBIN1N),RT74N(NBIN1N),WT74N(NBIN1N),
+     &          AAP74N(NBIN1N),ART74N(NBIN1N),AWT74N(NBIN1N)
+*  Anterior-Posterior irradiation
+      DATA AP74N /
+     1           5.2D0,      6.6D0,      7.6D0,     10.0D0,     11.2D0,
+     2          12.8D0,     13.8D0,     14.5D0,     15.0D0,     15.1D0,
+     3          15.1D0,     14.8D0,     14.6D0,     14.4D0,     14.2D0,
+     4          14.2D0,     14.4D0,     15.7D0,     18.3D0,     23.8D0,
+     5          29.0D0,     38.5D0,     47.2D0,     59.8D0,     80.2D0,
+     6          99.0D0,    133.0D0,    188.0D0,    231.0D0,    267.0D0, 
+     7         282.0D0,    310.0D0,    383.0D0,    432.0D0,    458.0D0,
+     8         474.0D0,    483.0D0,    490.0D0,    494.0D0,    497.0D0,
+     9         499.0D0,    499.0D0,    496.0D0,    494.0D0,    491.0D0,
+     *         486.0D0,    480.0D0,    458.0D0,    437.0D0,    429.0D0,
+     1         429.0D0,    431.0D0,    447.0D0,    491.0D0,    581.0D0,
+     2         663.0D0,    767.0D0,    905.0D0,   1016.0D0,   1191.0D0,
+     3        1443.0D0,   1628.0D0,   1840.0D0,   2097.0D0,   2291.0D0,
+     4        2581.0D0,   2978.0D0,   3263.0D0,   3590.0D0,   3999.0D0,
+     5        4315.0D0,   4801.0D0,   5484.0D0,   5980.0D0,   6550.0D0,
+     6        7255.0D0,   7794.0D0,   8614.0D0,   9751.0D0,  10569.0D0,
+     7       11500.0D0/
+*  Rotational irradiation geometry
+      DATA RT74N /
+     1          2.99D0,     3.72D0,     4.40D0,     5.75D0,     6.43D0,
+     2          7.27D0,     7.84D0,     8.31D0,     8.72D0,     8.90D0,
+     3          8.92D0,     8.82D0,     8.69D0,     8.56D0,     8.40D0,   
+     4          8.34D0,     8.39D0,     9.06D0,     10.6D0,     13.8D0,
+     5          16.9D0,     22.7D0,     27.8D0,     34.8D0,     45.4D0,
+     6          54.8D0,     71.6D0,     99.4D0,    123.0D0,    144.0D0,  
+     7         154.0D0,    173.0D0,    234.0D0,    283.0D0,    315.0D0,
+     8         335.0D0,    348.0D0,    358.0D0,    366.0D0,    373.0D0,
+     9         378.0D0,    385.0D0,    390.0D0,    391.0D0,    393.0D0,
+     *         394.0D0,    395.0D0,    395.0D0,    404.0D0,    422.0D0,
+     1         443.0D0,    496.0D0,    535.0D0,    594.0D0,    681.0D0,
+     2         754.0D0,    854.0D0,   1008.0D0,   1149.0D0,   1396.0D0,
+     3        1792.0D0,   2102.0D0,   2460.0D0,   2884.0D0,   3192.0D0,
+     4        3639.0D0,   4238.0D0,   4669.0D0,   5180.0D0,   5855.0D0,
+     5        6406.0D0,   7296.0D0,   8634.0D0,   9664.0D0,  10900.0D0,
+     6       12505.0D0,  13788.0D0,  15828.0D0,  18844.0D0,  21145.0D0,
+     7       23900.0D0/
+*  WORST possible geometry for the irradiation
+      DATA WT74N /
+     1           5.2D0,      6.6D0,      7.6D0,     10.0D0,     11.2D0,
+     2          12.8D0,     13.8D0,     14.5D0,     15.0D0,     15.1D0,
+     3          15.1D0,     14.8D0,     14.6D0,     14.4D0,     14.2D0,
+     4          14.2D0,     14.4D0,     15.7D0,     18.3D0,     23.8D0,
+     5          29.0D0,     38.5D0,     47.2D0,     59.8D0,     80.2D0,
+     6          99.0D0,    133.0D0,    188.0D0,    231.0D0,    267.0D0,
+     7         282.0D0,    310.0D0,    383.0D0,    432.0D0,    458.0D0,
+     8         474.0D0,    483.0D0,    490.0D0,    494.0D0,    497.0D0,
+     9         499.0D0,    499.0D0,    496.0D0,    494.0D0,    491.0D0,
+     *         486.0D0,    480.0D0,    458.0D0,    444.0D0,    459.0D0,
+     1         477.0D0,    523.0D0,    559.0D0,    616.0D0,    707.0D0,
+     2         785.0D0,    892.0D0,   1056.0D0,   1205.0D0,   1468.0D0,
+     3        1898.0D0,   2244.0D0,   2660.0D0,   3184.0D0,   3586.0D0,
+     4        4201.0D0,   5065.0D0,   5702.0D0,   6450.0D0,   7415.0D0,
+     5        8184.0D0,   9409.0D0,  11224.0D0,  12618.0D0,  14300.0D0,
+     6       16512.0D0,  18304.0D0,  21196.0D0,  25562.0D0,  28960.0D0,
+     7       33100.0D0/
+*
+* Effective dose for protons from ICRP74 and Pelliccioni data
+* calculated with ICRP radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*           
+      DIMENSION E74P(NBIN1P),AE74P(NBIN1P)
+      DATA E74P /
+     1    5.00D-03,    6.50D-03,    8.00D-03,    1.00D-02,    1.25D-02,
+     2    1.50D-02,    2.00D-02,    2.50D-02,    3.00D-02,    4.00D-02,
+     3    5.00D-02,    6.50D-02,    8.00D-02,    1.00D-01,    1.25D-01,
+     4    1.50D-01,    2.00D-01,    2.50D-01,    3.00D-01,    4.00D-01,
+     5    5.00D-01,    6.50D-01,    8.00D-01,    1.00D+00,    1.25D+00,
+     6    1.50D+00,    2.00D+00,    2.50D+00,    3.00D+00,    4.00D+00,
+     7    5.00D+00,    6.50D+00,    8.00D+00,    1.00D+01,    1.25D+01,
+     8    1.50D+01,    2.00D+01,    2.50D+01,    3.00D+01,    4.00D+01,
+     9    5.00D+01,    6.50D+01,    8.00D+01,    1.00D+02,    1.25D+02,
+     *    1.50D+02,    2.00D+02,    2.50D+02,    3.00D+02,    4.00D+02,
+     1    5.00D+02,    6.50D+02,    8.00D+02,    1.00D+03,    1.25D+03,
+     2    1.50D+03,    2.00D+03,    2.50D+03,    3.00D+03,    4.00D+03,
+     3    5.00D+03,    6.50D+03,    8.00D+03,    1.00D+04/
+      DIMENSION AP74P(NBIN1P),RT74P(NBIN1P),WT74P(NBIN1P),
+     &          AAP74P(NBIN1P),ART74P(NBIN1P),AWT74P(NBIN1P)
+*  Anterior-Posterior irradiation
+      DATA AP74P /
+     1      57.5D0,      65.4D0,      74.3D0,      89.5D0,     116.4D0,
+     2     155.2D0,     289.0D0,     546.5D0,     982.1D0,    2540.0D0,
+     3    4810.0D0,    6969.6D0,    7336.4D0,    6820.0D0,    6080.5D0,
+     4    5467.0D0,    4570.0D0,    3977.7D0,    3573.9D0,    3089.0D0,
+     5    2840.0D0,    2673.7D0,    2597.5D0,    2530.0D0,    2455.9D0,
+     6    2410.1D0,    2420.0D0,    2534.3D0,    2688.1D0,    2996.8D0,
+     7    3240.0D0,    3464.8D0,    3601.1D0,    3730.0D0,    3862.6D0,
+     8    3975.3D0,    4155.7D0,    4292.5D0,    4398.5D0,    4547.2D0,
+     9    4640.0D0,    4722.1D0,    4784.0D0,    4870.0D0,    4995.2D0,
+     *    5128.6D0,    5394.4D0,    5645.8D0,    5879.5D0,    6298.2D0,
+     1    6662.4D0,    7129.9D0,    7525.5D0,    7970.0D0,    8428.5D0,
+     2    8812.8D0,    9438.1D0,    9940.3D0,   10362.6D0,   11053.4D0,
+     3   11611.9D0,   12297.0D0,   12863.8D0,   13500.0D0/
+*  Rotational irradiation geometry
+      DATA RT74P /
+     1      48.2D0,      54.5D0,      61.1D0,      71.4D0,      87.6D0,
+     2     108.5D0,     169.7D0,     266.8D0,     409.7D0,     875.8D0,
+     3    1582.0D0,    2499.1D0,    3087.1D0,    3642.5D0,    4289.0D0,
+     4    4804.9D0,    5160.0D0,    4771.6D0,    4200.7D0,    3304.3D0,
+     5    2832.5D0,    2593.8D0,    2546.2D0,    2540.0D0,    2518.5D0,
+     6    2501.2D0,    2527.5D0,    2630.4D0,    2767.2D0,    3059.7D0,
+     7    3330.0D0,    3664.4D0,    3928.8D0,    4200.0D0,    4446.4D0,
+     8    4629.0D0,    4888.9D0,    5074.6D0,    5222.2D0,    5461.2D0,
+     9    5665.0D0,    5941.3D0,    6192.5D0,    6497.5D0,    6842.1D0,
+     *    7154.8D0,    7708.2D0,    8190.8D0,    8621.5D0,    9370.8D0,
+     1   10013.3D0,   10839.7D0,   11549.4D0,   12367.5D0,   13243.7D0,
+     2   14005.1D0,   15295.5D0,   16377.1D0,   17317.0D0,   18910.3D0,
+     3   20245.9D0,   21937.1D0,   23374.8D0,   25025.0D0/
+*  WORST possible geometry for the irradiation
+      DATA WT74P /
+     1      59.2D0,      66.8D0,      75.5D0,      90.6D0,     117.3D0,
+     2     155.8D0,     289.0D0,     545.6D0,     980.1D0,    2540.0D0,
+     3    4810.0D0,    6860.6D0,    7172.3D0,    6820.0D0,    6501.3D0,
+     4    6255.9D0,    5640.0D0,    4889.3D0,    4237.9D0,    3379.9D0,
+     5    2950.0D0,    2718.2D0,    2661.4D0,    2650.0D0,    2639.8D0,
+     6    2636.5D0,    2670.0D0,    2751.5D0,    2859.1D0,    3109.6D0,
+     7    3380.0D0,    3787.8D0,    4155.1D0,    4550.0D0,    4897.3D0,
+     8    5139.5D0,    5459.3D0,    5672.7D0,    5839.6D0,    6122.3D0,
+     9    6390.0D0,    6794.6D0,    7181.0D0,    7650.0D0,    8163.8D0,
+     *    8616.8D0,    9397.9D0,   10064.3D0,   10651.5D0,   11662.8D0,
+     1   12524.9D0,   13633.2D0,   14589.0D0,   15700.0D0,   16904.4D0,
+     2   17963.1D0,   19781.3D0,   21326.4D0,   22683.3D0,   25011.0D0,
+     3   26986.3D0,   29515.1D0,   31686.5D0,   34200.0D0/
+*
+* Effective dose for charged pions from ICRP74 and Pelliccioni data
+* calculated with ICRP radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION EBINI(NBIN1I),AEBINI(NBIN1I)
+      DATA  EBINI/
+     1    1.00D-03,    1.25D-03,    1.50D-03,    2.00D-03,    2.50D-03,
+     2    3.00D-03,    4.00D-03,    5.00D-03,    6.50D-03,    8.00D-03,
+     3    1.00D-02,    1.25D-02,    1.50D-02,    2.00D-02,    2.50D-02,
+     4    3.00D-02,    4.00D-02,    5.00D-02,    6.50D-02,    8.00D-02,
+     5    1.00D-01,    1.25D-01,    1.50D-01,    2.00D-01,    2.50D-01,
+     6    3.00D-01,    4.00D-01,    5.00D-01,    6.50D-01,    8.00D-01,
+     7    1.00D+00,    1.25D+00,    1.50D+00,    2.00D+00,    2.50D+00,
+     8    3.00D+00,    4.00D+00,    5.00D+00,    6.50D+00,    8.00D+00,
+     9    1.00D+01,    1.25D+01,    1.50D+01,    2.00D+01,    2.50D+01,
+     *    3.00D+01,    4.00D+01,    5.00D+01,    6.50D+01,    8.00D+01,
+     1    1.00D+02,    1.25D+02,    1.50D+02,    2.00D+02,    2.50D+02,
+     2    3.00D+02,    4.00D+02,    5.00D+02,    6.50D+02,    8.00D+02,
+     3    1.00D+03,    1.25D+03,    1.50D+03,    2.00D+03,    2.50D+03,
+     4    3.00D+03,    4.00D+03,    5.00D+03,    6.50D+03,    8.00D+03,
+     5    1.00D+04/
+      DIMENSION AP74I(NBIN1I),RT74I(NBIN1I),WT74I(NBIN1I),
+     &          AP74J(NBIN1I),RT74J(NBIN1I),WT74J(NBIN1I),
+     &          AAP74I(NBIN1I),ART74I(NBIN1I),AWT74I(NBIN1I),
+     &          AAP74J(NBIN1I),ART74J(NBIN1I),AWT74J(NBIN1I)
+*  Anterior-Posterior irradiation
+*  Positive pions
+      DATA AP74I /
+     1      71.3D0,      76.3D0,      80.9D0,      89.3D0,      97.4D0,
+     2     105.6D0,     122.3D0,     140.1D0,     168.8D0,     200.6D0,
+     3     248.0D0,     315.4D0,     389.4D0,     547.5D0,     707.6D0,
+     4     859.7D0,    1117.7D0,    1300.0D0,    1445.7D0,    1498.3D0,
+     5    1498.6D0,    1454.3D0,    1396.7D0,    1290.0D0,    1209.1D0,
+     6    1148.3D0,    1065.0D0,    1013.1D0,     968.2D0,     946.4D0,
+     7     938.0D0,     946.1D0,     962.9D0,    1002.2D0,    1038.6D0,
+     8    1068.4D0,    1107.9D0,    1125.0D0,    1124.7D0,    1115.3D0,
+     9    1105.0D0,    1101.1D0,    1103.4D0,    1116.2D0,    1133.3D0,
+     *    1151.6D0,    1188.2D0,    1222.6D0,    1269.5D0,    1311.1D0,
+     1    1360.0D0,    1412.9D0,    1459.0D0,    1537.5D0,    1603.3D0,
+     2    1660.3D0,    1756.4D0,    1836.3D0,    1936.3D0,    2020.2D0,
+     3    2115.0D0,    2214.8D0,    2300.1D0,    2442.1D0,    2558.6D0,
+     4    2658.2D0,    2823.7D0,    2959.4D0,    3127.6D0,    3267.5D0,
+     5    3425.0D0/
+*  Negative pions
+      DATA AP74J /
+     1     349.0D0,     359.7D0,     369.2D0,     387.2D0,     404.9D0,
+     2     422.9D0,     460.0D0,     499.0D0,     560.9D0,     626.8D0,
+     3     721.0D0,     847.1D0,     975.3D0,    1218.2D0,    1427.1D0,
+     4    1594.6D0,    1806.2D0,    1880.0D0,    1830.5D0,    1712.3D0,
+     5    1546.4D0,    1373.0D0,    1243.0D0,    1080.0D0,     996.1D0,
+     6     950.4D0,     909.5D0,     898.1D0,     902.1D0,     915.7D0,
+     7     938.0D0,     965.9D0,     991.4D0,    1033.7D0,    1065.3D0,
+     8    1088.4D0,    1115.5D0,    1125.0D0,    1121.7D0,    1113.2D0,
+     9    1105.0D0,    1102.9D0,    1106.1D0,    1119.7D0,    1137.0D0,
+     *    1155.2D0,    1191.3D0,    1225.1D0,    1271.0D0,    1311.9D0,
+     1    1360.0D0,    1412.3D0,    1458.1D0,    1536.2D0,    1601.9D0,
+     2    1658.9D0,    1755.2D0,    1835.3D0,    1935.6D0,    2019.8D0,
+     3    2115.0D0,    2215.1D0,    2300.6D0,    2442.7D0,    2559.4D0,
+     4    2659.0D0,    2824.4D0,    2960.0D0,    3128.0D0,    3267.8D0,
+     5    3425.0D0/
+*  Rotational irradiation geometry
+*  Positive pions
+      DATA RT74I /
+     1      37.0D0,      39.1D0,      40.9D0,      44.5D0,      48.0D0,
+     2      51.7D0,      59.5D0,      68.0D0,      82.3D0,      98.6D0,
+     3     123.5D0,     160.1D0,     201.6D0,     294.8D0,     395.2D0,
+     4     496.8D0,     686.5D0,     842.0D0,    1002.6D0,    1099.3D0,
+     5    1167.8D0,    1200.3D0,    1203.6D0,    1177.5D0,    1141.2D0,
+     6    1106.0D0,    1047.8D0,    1005.6D0,     964.7D0,     942.3D0,
+     7     931.0D0,     935.2D0,     949.0D0,     986.7D0,    1027.2D0,
+     8    1065.8D0,    1133.5D0,    1188.0D0,    1249.8D0,    1295.9D0,
+     9    1342.0D0,    1384.2D0,    1416.2D0,    1463.7D0,    1499.2D0,
+     *    1528.4D0,    1576.7D0,    1618.0D0,    1673.5D0,    1724.6D0,
+     1    1789.0D0,    1865.3D0,    1936.9D0,    2067.0D0,    2182.4D0,
+     2    2286.3D0,    2467.4D0,    2622.2D0,    2819.2D0,    2985.8D0,
+     3    3174.0D0,    3370.4D0,    3537.1D0,    3811.8D0,    4035.6D0,
+     4    4225.8D0,    4540.7D0,    4798.2D0,    5117.5D0,    5383.9D0,
+     5    5685.0D0/
+*  Negative pions
+      DATA RT74J /
+     1     194.8D0,     196.1D0,     197.6D0,     201.6D0,     206.9D0,
+     2     213.3D0,     228.3D0,     245.9D0,     275.9D0,     309.7D0,
+     3     360.2D0,     431.1D0,     506.5D0,     659.1D0,     802.8D0,
+     4     930.0D0,    1123.6D0,    1236.5D0,    1292.2D0,    1280.7D0,
+     5    1229.6D0,    1156.7D0,    1093.0D0,    1004.5D0,     956.1D0,
+     6     929.0D0,     904.6D0,     898.4D0,     902.7D0,     913.5D0,
+     7     931.0D0,     953.5D0,     975.4D0,    1015.8D0,    1052.0D0,
+     8    1084.5D0,    1140.7D0,    1188.0D0,    1246.7D0,    1293.6D0,
+     9    1342.0D0,    1386.3D0,    1419.5D0,    1468.1D0,    1503.8D0,
+     *    1532.9D0,    1580.6D0,    1621.1D0,    1675.4D0,    1725.5D0,
+     1    1789.0D0,    1864.5D0,    1935.7D0,    2065.3D0,    2180.6D0,
+     2    2284.4D0,    2465.8D0,    2620.8D0,    2818.3D0,    2985.3D0,
+     3    3174.0D0,    3370.8D0,    3537.7D0,    3812.8D0,    4036.7D0,
+     4    4227.0D0,    4541.7D0,    4799.1D0,    5118.1D0,    5384.2D0,
+     5    5685.0D0/
+*  WORST possible geometry for the irradiation
+*  Positive pions
+      DATA WT74I /
+     1      71.3D0,      76.3D0,      80.8D0,      89.2D0,      97.3D0,
+     2     105.5D0,     122.2D0,     139.9D0,     168.7D0,     200.5D0,
+     3     248.0D0,     315.6D0,     389.9D0,     548.5D0,     709.1D0,
+     4     861.5D0,    1119.2D0,    1300.0D0,    1442.3D0,    1491.8D0,
+     5    1489.9D0,    1445.3D0,    1389.6D0,    1290.0D0,    1217.9D0,
+     6    1165.1D0,    1093.7D0,    1049.0D0,    1008.9D0,     987.0D0,
+     7     974.0D0,     972.3D0,     979.2D0,    1004.7D0,    1037.1D0,
+     8    1072.1D0,    1144.0D0,    1215.0D0,    1315.6D0,    1402.7D0,
+     9    1495.0D0,    1577.3D0,    1635.9D0,    1714.7D0,    1766.7D0,
+     *    1805.1D0,    1862.6D0,    1908.6D0,    1969.8D0,    2028.0D0,
+     1    2105.0D0,    2201.5D0,    2295.6D0,    2472.3D0,    2633.3D0,
+     2    2780.5D0,    3041.0D0,    3265.9D0,    3553.6D0,    3796.8D0,
+     3    4070.0D0,    4351.8D0,    4588.0D0,    4972.1D0,    5280.3D0,
+     4    5539.3D0,    5962.8D0,    6305.5D0,    6726.6D0,    7076.1D0,
+     5    7470.0D0/
+*  Negative pions
+      DATA WT74J /
+     1     349.0D0,     359.6D0,     369.1D0,     386.9D0,     404.5D0,
+     2     422.4D0,     459.5D0,     498.5D0,     560.4D0,     626.5D0,
+     3     721.0D0,     847.7D0,     976.5D0,    1220.5D0,    1430.2D0,
+     4    1597.9D0,    1808.6D0,    1880.0D0,    1826.1D0,    1704.9D0,
+     5    1537.4D0,    1364.6D0,    1236.7D0,    1080.0D0,    1003.4D0,
+     6     964.3D0,     934.0D0,     929.9D0,     939.9D0,     955.0D0,
+     7     974.0D0,     992.6D0,    1008.2D0,    1036.3D0,    1063.9D0,
+     8    1092.2D0,    1151.7D0,    1215.0D0,    1312.1D0,    1400.0D0,
+     9    1495.0D0,    1579.7D0,    1639.9D0,    1720.2D0,    1772.5D0,
+     *    1810.8D0,    1867.4D0,    1912.4D0,    1972.1D0,    2029.2D0,
+     1    2105.0D0,    2200.5D0,    2294.1D0,    2470.1D0,    2631.0D0,
+     2    2778.2D0,    3038.8D0,    3264.1D0,    3552.4D0,    3796.2D0,
+     3    4070.0D0,    4352.4D0,    4589.0D0,    4973.4D0,    5281.8D0,
+     4    5540.9D0,    5964.3D0,    6306.8D0,    6727.5D0,    7076.6D0,
+     5    7470.0D0/
+*
+* Effective dose for photons from ICRP74 and Pelliccioni data
+* calculated with ICRP radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*           
+      DIMENSION E74G(NBIN1G),AE74G(NBIN1G)
+      DATA E74G /
+     1 0.10000D-05, 0.12589D-05, 0.15849D-05, 0.19953D-05, 0.25119D-05,
+     2 0.31623D-05, 0.39811D-05, 0.50119D-05, 0.63096D-05, 0.79433D-05,
+     3 0.10000D-04, 0.12589D-04, 0.15849D-04, 0.19953D-04, 0.25119D-04,
+     4 0.31623D-04, 0.39811D-04, 0.50119D-04, 0.63096D-04, 0.79433D-04,
+     5 0.10000D-03, 0.12589D-03, 0.15849D-03, 0.19953D-03, 0.25119D-03,
+     6 0.31623D-03, 0.39811D-03, 0.50119D-03, 0.63096D-03, 0.79433D-03,
+     7 0.10000D-02, 0.12589D-02, 0.15849D-02, 0.19953D-02, 0.25119D-02,
+     8 0.31623D-02, 0.39811D-02, 0.50119D-02, 0.63096D-02, 0.79433D-02,
+     9 0.10000D-01, 0.12589D-01, 0.15849D-01, 0.19953D-01, 0.25119D-01,
+     * 0.31623D-01, 0.39811D-01, 0.50119D-01, 0.63096D-01, 0.79433D-01,
+     1 0.10000D+00, 0.12589D+00, 0.15849D+00, 0.19953D+00, 0.25119D+00,
+     2 0.31623D+00, 0.39811D+00, 0.50119D+00, 0.63096D+00, 0.79433D+00,
+     3 0.10000D+01, 0.12589D+01, 0.15849D+01, 0.19953D+01, 0.25119D+01,
+     4 0.31623D+01, 0.39811D+01, 0.50119D+01, 0.63096D+01, 0.79433D+01,
+     5 0.10000D+02, 0.12589D+02, 0.15849D+02, 0.19953D+02, 0.25119D+02,
+     6 0.31623D+02, 0.39811D+02, 0.50119D+02, 0.63096D+02, 0.79433D+02,
+     7 0.10000D+03/
+      DIMENSION AP74G(NBIN1G),RT74G(NBIN1G),WT74G(NBIN1G),
+     &          AAP74G(NBIN1G),ART74G(NBIN1G),AWT74G(NBIN1G)
+*  Anterior-Posterior irradiation
+      DATA AP74G /
+     1 0.54559D+03, 0.37003D+03, 0.24945D+03, 0.16496D+03, 0.10888D+03,
+     2 0.71724D+02, 0.46941D+02, 0.29765D+02, 0.18658D+02, 0.11621D+02,
+     3 0.71617D+01, 0.43328D+01, 0.26230D+01, 0.15912D+01, 0.97875D+00,
+     4 0.62511D+00, 0.45300D+00, 0.41541D+00, 0.45697D+00, 0.50270D+00,
+     5 0.55300D+00, 0.68970D+00, 0.86020D+00, 0.10728D+01, 0.13381D+01,
+     6 0.16688D+01, 0.20814D+01, 0.25952D+01, 0.31566D+01, 0.38395D+01,
+     7 0.46700D+01, 0.55604D+01, 0.65903D+01, 0.76977D+01, 0.89735D+01,
+     8 0.10487D+02, 0.12358D+02, 0.13617D+02, 0.15456D+02, 0.17725D+02,
+     9 0.21000D+02, 0.24813D+02, 0.29318D+02, 0.34640D+02, 0.41642D+02,
+     * 0.49614D+02, 0.57329D+02, 0.61958D+02, 0.67831D+02, 0.74261D+02,
+     1 0.81300D+02, 0.85676D+02, 0.90288D+02, 0.95149D+02, 0.98906D+02,
+     2 0.10280D+03, 0.10684D+03, 0.11104D+03, 0.11458D+03, 0.11823D+03,
+     3 0.12200D+03, 0.12364D+03, 0.12530D+03, 0.12698D+03, 0.12798D+03,
+     4 0.12898D+03, 0.12999D+03, 0.13101D+03, 0.13167D+03, 0.13233D+03,
+     5 0.13300D+03, 0.13452D+03, 0.13606D+03, 0.13761D+03, 0.13919D+03,
+     6 0.14078D+03, 0.14239D+03, 0.14401D+03, 0.14467D+03, 0.14533D+03,
+     7 0.14600D+03/
+*  Rotational irradiation geometry
+      DATA RT74G /
+     1 0.54559D+03, 0.37003D+03, 0.24945D+03, 0.16496D+03, 0.10888D+03,
+     2 0.71724D+02, 0.46941D+02, 0.29765D+02, 0.18655D+02, 0.11608D+02,
+     3 0.69154D+01, 0.37516D+01, 0.20643D+01, 0.11725D+01, 0.61014D+00,
+     4 0.35636D+00, 0.27520D+00, 0.26661D+00, 0.30429D+00, 0.34763D+00,
+     5 0.39750D+00, 0.50246D+00, 0.63525D+00, 0.80327D+00, 0.10159D+01,
+     6 0.12851D+01, 0.16259D+01, 0.20570D+01, 0.25456D+01, 0.31506D+01,
+     7 0.39000D+01, 0.46762D+01, 0.56061D+01, 0.67125D+01, 0.79141D+01,
+     8 0.93241D+01, 0.10963D+02, 0.12696D+02, 0.14881D+02, 0.17439D+02,
+     9 0.20700D+02, 0.24597D+02, 0.29229D+02, 0.34738D+02, 0.41889D+02,
+     * 0.50210D+02, 0.59027D+02, 0.68568D+02, 0.78333D+02, 0.89610D+02,
+     1 0.10265D+03, 0.11038D+03, 0.11871D+03, 0.12770D+03, 0.13443D+03,
+     2 0.14150D+03, 0.14896D+03, 0.15681D+03, 0.16272D+03, 0.16887D+03,
+     3 0.17525D+03, 0.18162D+03, 0.18826D+03, 0.19518D+03, 0.19927D+03,
+     4 0.20343D+03, 0.20768D+03, 0.21203D+03, 0.21473D+03, 0.21747D+03,
+     5 0.22025D+03, 0.22378D+03, 0.22737D+03, 0.23102D+03, 0.23474D+03,
+     6 0.23852D+03, 0.24237D+03, 0.24628D+03, 0.24898D+03, 0.25173D+03,
+     7 0.25450D+03/
+*  WORST possible geometry for the irradiation
+      DATA WT74G /
+     1 0.54559D+03, 0.37003D+03, 0.24945D+03, 0.16496D+03, 0.10888D+03,
+     2 0.71724D+02, 0.46941D+02, 0.29765D+02, 0.18658D+02, 0.11621D+02,
+     3 0.71617D+01, 0.43328D+01, 0.26230D+01, 0.15912D+01, 0.97875D+00,
+     4 0.62511D+00, 0.45300D+00, 0.41541D+00, 0.45697D+00, 0.50270D+00,
+     5 0.55300D+00, 0.68970D+00, 0.86020D+00, 0.10728D+01, 0.13381D+01,
+     6 0.16688D+01, 0.20814D+01, 0.25952D+01, 0.31566D+01, 0.38395D+01,
+     7 0.46700D+01, 0.55604D+01, 0.65903D+01, 0.76977D+01, 0.89735D+01,
+     8 0.10487D+02, 0.12358D+02, 0.13724D+02, 0.16218D+02, 0.18813D+02,
+     9 0.23000D+02, 0.27007D+02, 0.31713D+02, 0.37238D+02, 0.45249D+02,
+     * 0.53784D+02, 0.59748D+02, 0.71072D+02, 0.83565D+02, 0.98879D+02,
+     1 0.11700D+03, 0.12735D+03, 0.13861D+03, 0.15087D+03, 0.16030D+03,
+     2 0.17027D+03, 0.18087D+03, 0.19208D+03, 0.20036D+03, 0.20899D+03,
+     3 0.21800D+03, 0.22815D+03, 0.23877D+03, 0.24988D+03, 0.25669D+03,
+     4 0.26363D+03, 0.27076D+03, 0.27805D+03, 0.28262D+03, 0.28897D+03,
+     5 0.30000D+03, 0.30985D+03, 0.32002D+03, 0.33053D+03, 0.34138D+03,
+     6 0.35259D+03, 0.36417D+03, 0.37616D+03, 0.39209D+03, 0.40869D+03,
+     7 0.42600D+03/
+*
+* Effective dose for electrons from ICRP74 and Pelliccioni data
+* calculated with ICRP radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*           
+      DIMENSION E74E(NBIN1E),AE74E(NBIN1E)
+      DATA E74E /
+     1 0.50000D-02, 0.64047D-02, 0.82039D-02, 0.10509D-01, 0.13461D-01,
+     2 0.17242D-01, 0.22086D-01, 0.28291D-01, 0.36239D-01, 0.46420D-01,
+     3 0.59460D-01, 0.76165D-01, 0.97562D-01, 0.12497D+00, 0.16008D+00,
+     4 0.20505D+00, 0.26265D+00, 0.33644D+00, 0.43096D+00, 0.55203D+00,
+     5 0.70711D+00, 0.90576D+00, 0.11602D+01, 0.14861D+01, 0.19037D+01,
+     6 0.24385D+01, 0.31235D+01, 0.40010D+01, 0.51250D+01, 0.65647D+01,
+     7 0.84090D+01, 0.10771D+02, 0.13797D+02, 0.17673D+02, 0.22638D+02,
+     8 0.28998D+02, 0.37145D+02, 0.47580D+02, 0.60946D+02, 0.78068D+02,
+     9 0.10000D+03/
+      DIMENSION AP74E(NBIN1E),RT74E(NBIN1E),WT74E(NBIN1E),
+     &          AAP74E(NBIN1E),ART74E(NBIN1E),AWT74E(NBIN1E)
+*  Anterior-Posterior irradiation
+      DATA AP74E /
+     1 0.11700D+03, 0.14636D+03, 0.18310D+03, 0.22254D+03, 0.24108D+03,
+     2 0.26117D+03, 0.28218D+03, 0.30367D+03, 0.32392D+03, 0.33732D+03,
+     3 0.34585D+03, 0.35438D+03, 0.36312D+03, 0.36782D+03, 0.37210D+03,
+     4 0.37679D+03, 0.38468D+03, 0.39275D+03, 0.40098D+03, 0.40825D+03,
+     5 0.41392D+03, 0.41968D+03, 0.42412D+03, 0.42769D+03, 0.43128D+03,
+     6 0.43436D+03, 0.43732D+03, 0.44030D+03, 0.44373D+03, 0.45113D+03,
+     7 0.45866D+03, 0.46611D+03, 0.47323D+03, 0.48045D+03, 0.48778D+03,
+     8 0.49522D+03, 0.50278D+03, 0.51045D+03, 0.51057D+03, 0.50878D+03,
+     9 0.50700D+03/
+*  Rotational irradiation geometry
+      DATA RT74E /
+     1 0.46000D+02, 0.59898D+02, 0.78750D+02, 0.10262D+03, 0.12495D+03,
+     2 0.15440D+03, 0.19064D+03, 0.23250D+03, 0.26904D+03, 0.29888D+03,
+     3 0.31637D+03, 0.33039D+03, 0.34523D+03, 0.35974D+03, 0.37500D+03,
+     4 0.39072D+03, 0.40301D+03, 0.41573D+03, 0.42889D+03, 0.44070D+03,
+     5 0.45012D+03, 0.45980D+03, 0.47394D+03, 0.49154D+03, 0.50997D+03,
+     6 0.52079D+03, 0.52974D+03, 0.53887D+03, 0.54941D+03, 0.57165D+03,
+     7 0.59498D+03, 0.61689D+03, 0.63350D+03, 0.65061D+03, 0.66823D+03,
+     8 0.68638D+03, 0.70507D+03, 0.72432D+03, 0.72548D+03, 0.72208D+03,
+     9 0.71875D+03/
+*  WORST possible geometry for the irradiation
+      DATA WT74E /
+     1 0.11700D+03, 0.14636D+03, 0.18310D+03, 0.22254D+03, 0.24108D+03,
+     2 0.26117D+03, 0.28218D+03, 0.30367D+03, 0.32392D+03, 0.34459D+03,
+     3 0.35514D+03, 0.36261D+03, 0.37023D+03, 0.37763D+03, 0.38513D+03,
+     4 0.39659D+03, 0.41277D+03, 0.42961D+03, 0.44714D+03, 0.46712D+03,
+     5 0.48808D+03, 0.50997D+03, 0.52813D+03, 0.54373D+03, 0.57298D+03,
+     6 0.58967D+03, 0.60557D+03, 0.63059D+03, 0.65754D+03, 0.69411D+03,
+     7 0.73271D+03, 0.77101D+03, 0.80533D+03, 0.84117D+03, 0.87861D+03,
+     8 0.91771D+03, 0.95856D+03, 0.10012D+04, 0.10295D+04, 0.10545D+04,
+     9 0.10800D+04/
+*
+*-----------------------------------------------------------------------
+*
+* Effective dose for neutrons from ICRP74 and Pelliccioni data
+* calculated with the Pelliccioni radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*           
+      DIMENSION APPLN(NBIN1N),RTPLN(NBIN1N),WTPLN(NBIN1N),
+     &          AAPPLN(NBIN1N),ARTPLN(NBIN1N),AWTPLN(NBIN1N)
+*  Anterior-Posterior irradiation
+      DATA APPLN /
+     1           5.2D0,      6.6D0,      7.6D0,     10.0D0,     11.2D0,
+     2          12.8D0,     13.8D0,     14.5D0,     15.0D0,     15.1D0,
+     3          15.1D0,     14.8D0,     14.6D0,     14.4D0,     14.2D0,
+     4          14.2D0,     14.4D0,     15.7D0,     18.3D0,     23.8D0,
+     5          29.0D0,     38.5D0,     47.2D0,     59.8D0,     80.2D0,
+     6          99.0D0,    133.0D0,    188.0D0,    231.0D0,    267.0D0, 
+     7         282.0D0,    310.0D0,    383.0D0,    432.0D0,    458.0D0,
+     8         474.0D0,    483.0D0,    490.0D0,    494.0D0,    497.0D0,
+     9         499.0D0,    499.0D0,    496.0D0,    494.0D0,    491.0D0,
+     *         486.0D0,    480.0D0,    458.0D0,    437.0D0,    429.0D0,
+     1         409.0D0,    385.0D0,    378.0D0,    379.0D0,    399.0D0,
+     2         422.0D0,    455.0D0,    503.0D0,    544.0D0,    610.0D0,
+     3         707.0D0,    776.0D0,    852.0D0,    937.0D0,    996.0D0,
+     4        1081.0D0,   1197.0D0,   1284.0D0,   1390.0D0,   1536.0D0,
+     5        1658.0D0,   1856.0D0,   2150.0D0,   2368.0D0,   2620.0D0,
+     6        2926.0D0,   3156.0D0,   3495.0D0,   3948.0D0,   4260.0D0,
+     7        4600.0D0/
+*  Rotational irradiation geometry
+      DATA RTPLN /
+     1          2.99D0,     3.72D0,     4.40D0,     5.75D0,     6.43D0,
+     2          7.27D0,     7.84D0,     8.31D0,     8.72D0,     8.90D0,
+     3          8.92D0,     8.82D0,     8.69D0,     8.56D0,     8.40D0,   
+     4          8.34D0,     8.39D0,     9.06D0,     10.6D0,     13.8D0,
+     5          16.9D0,     22.7D0,     27.8D0,     34.8D0,     45.4D0,
+     6          54.8D0,     71.6D0,     99.4D0,    123.0D0,    144.0D0,  
+     7         154.0D0,    173.0D0,    234.0D0,    283.0D0,    315.0D0,
+     8         335.0D0,    348.0D0,    358.0D0,    366.0D0,    373.0D0,
+     9         378.0D0,    385.0D0,    390.0D0,    391.0D0,    393.0D0,
+     *         394.0D0,    395.0D0,    395.0D0,    404.0D0,    422.0D0,
+     1         400.0D0,    417.0D0,    428.0D0,    441.0D0,    462.0D0,
+     2         482.0D0,    513.0D0,    566.0D0,    615.0D0,    702.0D0,
+     3         840.0D0,    947.0D0,   1070.0D0,   1216.0D0,   1324.0D0,
+     4        1484.0D0,   1706.0D0,   1871.0D0,   2070.0D0,   2336.0D0,
+     5        2555.0D0,   2910.0D0,   3447.0D0,   3862.0D0,   4360.0D0,
+     6        5005.0D0,   5520.0D0,   6338.0D0,   7542.0D0,   8458.0D0,
+     7        9550.0D0/
+*  WORST possible geometry for the irradiation
+      DATA WTPLN /
+     1           5.2D0,      6.6D0,      7.6D0,     10.0D0,     11.2D0,
+     2          12.8D0,     13.8D0,     14.5D0,     15.0D0,     15.1D0,
+     3          15.1D0,     14.8D0,     14.6D0,     14.4D0,     14.2D0,
+     4          14.2D0,     14.4D0,     15.7D0,     18.3D0,     23.8D0,
+     5          29.0D0,     38.5D0,     47.2D0,     59.8D0,     80.2D0,
+     6          99.0D0,    133.0D0,    188.0D0,    231.0D0,    267.0D0,
+     7         282.0D0,    310.0D0,    383.0D0,    432.0D0,    458.0D0,
+     8         474.0D0,    483.0D0,    490.0D0,    494.0D0,    497.0D0,
+     9         499.0D0,    499.0D0,    496.0D0,    494.0D0,    491.0D0,
+     *         486.0D0,    480.0D0,    458.0D0,    444.0D0,    459.0D0,
+     1         460.0D0,    460.0D0,    461.0D0,    465.0D0,    481.0D0,
+     2         501.0D0,    535.0D0,    595.0D0,    653.0D0,    757.0D0,
+     3         927.0D0,   1062.0D0,   1220.0D0,   1413.0D0,   1557.0D0,
+     4        1775.0D0,   2080.0D0,   2307.0D0,   2580.0D0,   2944.0D0,
+     5        3242.0D0,   3726.0D0,   4460.0D0,   5030.0D0,   5720.0D0,
+     6        6623.0D0,   7352.0D0,   8520.0D0,  10267.0D0,  11614.0D0,
+     7       13240.0D0/
+*
+* Effective dose for protons from Pelliccioni data
+* calculated with the Pelliccioni radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*           
+      DIMENSION EPLP(NBIN1P),AEPLP(NBIN1P)
+      DATA EPLP /
+     1    5.00D-03,    6.50D-03,    8.00D-03,    1.00D-02,    1.25D-02,
+     2    1.50D-02,    2.00D-02,    2.50D-02,    3.00D-02,    4.00D-02,
+     3    5.00D-02,    6.50D-02,    8.00D-02,    1.00D-01,    1.25D-01,
+     4    1.50D-01,    2.00D-01,    2.50D-01,    3.00D-01,    4.00D-01,
+     5    5.00D-01,    6.50D-01,    8.00D-01,    1.00D+00,    1.25D+00,
+     6    1.50D+00,    2.00D+00,    2.50D+00,    3.00D+00,    4.00D+00,
+     7    5.00D+00,    6.50D+00,    8.00D+00,    1.00D+01,    1.25D+01,
+     8    1.50D+01,    2.00D+01,    2.50D+01,    3.00D+01,    4.00D+01,
+     9    5.00D+01,    6.50D+01,    8.00D+01,    1.00D+02,    1.25D+02,
+     *    1.50D+02,    2.00D+02,    2.50D+02,    3.00D+02,    4.00D+02,
+     1    5.00D+02,    6.50D+02,    8.00D+02,    1.00D+03,    1.25D+03,
+     2    1.50D+03,    2.00D+03,    2.50D+03,    3.00D+03,    4.00D+03,
+     3    5.00D+03,    6.50D+03,    8.00D+03,    1.00D+04/
+      DIMENSION APPLP(NBIN1P),RTPLP(NBIN1P),WTPLP(NBIN1P),
+     &          AAPPLP(NBIN1P),ARTPLP(NBIN1P),AWTPLP(NBIN1P)
+*  Anterior-Posterior irradiation
+      DATA APPLP /
+     1      23.0D0,      26.1D0,      29.7D0,      35.8D0,      46.6D0,
+     2      62.1D0,     115.6D0,     218.6D0,     392.8D0,    1016.0D0,
+     3    1924.0D0,    2787.8D0,    2934.5D0,    2728.0D0,    2432.2D0,
+     4    2186.8D0,    1828.0D0,    1591.1D0,    1429.6D0,    1235.6D0,
+     5    1136.0D0,    1069.5D0,    1039.0D0,    1012.0D0,     982.4D0,
+     6     964.0D0,     968.0D0,    1013.7D0,    1075.3D0,    1198.7D0,
+     7    1296.0D0,    1385.9D0,    1440.4D0,    1492.0D0,    1545.0D0,
+     8    1590.1D0,    1662.3D0,    1717.0D0,    1759.4D0,    1818.9D0,
+     9    1856.0D0,    1888.9D0,    1913.6D0,    1948.0D0,    1998.1D0,
+     *    2051.5D0,    2157.8D0,    2258.3D0,    2351.8D0,    2519.3D0,
+     1    2664.9D0,    2852.0D0,    3010.2D0,    3188.0D0,    3371.4D0,
+     2    3525.1D0,    3775.2D0,    3976.1D0,    4145.1D0,    4421.4D0,
+     3    4644.7D0,    4918.8D0,    5145.5D0,    5400.0D0/
+*  Rotational irradiation geometry
+      DATA RTPLP /
+     1      19.3D0,      21.8D0,      24.4D0,      28.6D0,      35.0D0,
+     2      43.4D0,      67.9D0,     106.7D0,     163.9D0,     350.3D0,
+     3     632.8D0,     999.7D0,    1234.8D0,    1457.0D0,    1715.6D0,
+     4    1921.9D0,    2064.0D0,    1908.6D0,    1680.3D0,    1321.7D0,
+     5    1133.0D0,    1037.5D0,    1018.5D0,    1016.0D0,    1007.4D0,
+     6    1000.5D0,    1011.0D0,    1052.2D0,    1106.9D0,    1223.9D0,
+     7    1332.0D0,    1465.8D0,    1571.5D0,    1680.0D0,    1778.6D0,
+     8    1851.6D0,    1955.6D0,    2029.8D0,    2088.9D0,    2184.5D0,
+     9    2266.0D0,    2376.5D0,    2477.0D0,    2599.0D0,    2736.9D0,
+     *    2861.9D0,    3083.3D0,    3276.3D0,    3448.6D0,    3748.3D0,
+     1    4005.3D0,    4335.9D0,    4619.7D0,    4947.0D0,    5297.5D0,
+     2    5602.0D0,    6118.2D0,    6550.8D0,    6926.8D0,    7564.1D0,
+     3    8098.4D0,    8774.8D0,    9349.9D0,   10010.0D0/
+*  WORST possible geometry for the irradiation
+      DATA WTPLP /
+     1      23.7D0,      26.7D0,      30.2D0,      36.2D0,      46.9D0,
+     2      62.3D0,     115.6D0,     218.2D0,     392.1D0,    1016.0D0,
+     3    1924.0D0,    2744.2D0,    2868.9D0,    2728.0D0,    2600.5D0,
+     4    2502.4D0,    2256.0D0,    1955.7D0,    1695.1D0,    1351.9D0,
+     5    1180.0D0,    1087.3D0,    1064.6D0,    1060.0D0,    1055.9D0,
+     6    1054.6D0,    1068.0D0,    1100.6D0,    1143.6D0,    1243.8D0,
+     7    1352.0D0,    1515.1D0,    1662.0D0,    1820.0D0,    1958.9D0,
+     8    2055.8D0,    2183.7D0,    2269.1D0,    2335.9D0,    2448.9D0,
+     9    2556.0D0,    2717.9D0,    2872.4D0,    3060.0D0,    3265.5D0,
+     *    3446.7D0,    3759.1D0,    4025.7D0,    4260.6D0,    4665.1D0,
+     1    5009.9D0,    5453.3D0,    5835.6D0,    6280.0D0,    6761.8D0,
+     2    7185.2D0,    7912.5D0,    8530.5D0,    9073.3D0,   10004.4D0,
+     3   10794.5D0,   11806.0D0,   12674.6D0,   13680.0D0/
+*
+* Effective dose for charged pions from ICRP74 and Pelliccioni data
+* calculated with the Pelliccioni radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION APPLI(NBIN1I),RTPLI(NBIN1I),WTPLI(NBIN1I),
+     &          APPLJ(NBIN1I),RTPLJ(NBIN1I),WTPLJ(NBIN1I),
+     &          AAPPLI(NBIN1I),ARTPLI(NBIN1I),AWTPLI(NBIN1I),
+     &          AAPPLJ(NBIN1I),ARTPLJ(NBIN1I),AWTPLJ(NBIN1I)
+*  Anterior-Posterior irradiation
+*  Positive pions
+      DATA APPLI /
+     1      71.3D0,      77.4D0,      82.9D0,      92.9D0,     102.3D0,
+     2     111.4D0,     129.4D0,     147.6D0,     175.8D0,     205.5D0,
+     3     248.0D0,     305.6D0,     366.3D0,     491.1D0,     613.9D0,
+     4     729.7D0,     930.0D0,    1083.3D0,    1233.9D0,    1320.6D0,
+     5    1378.7D0,    1401.7D0,    1397.4D0,    1357.9D0,    1308.7D0,
+     6    1262.3D0,    1186.8D0,    1133.1D0,    1082.0D0,    1054.7D0,
+     7    1042.0D0,    1048.9D0,    1066.7D0,    1110.3D0,    1151.5D0,
+     8    1185.4D0,    1230.6D0,    1250.0D0,    1249.3D0,    1238.7D0,
+     9    1228.0D0,    1226.1D0,    1231.9D0,    1253.2D0,    1279.4D0,
+     *    1306.6D0,    1359.6D0,    1408.7D0,    1474.7D0,    1532.7D0,
+     1    1600.0D0,    1671.9D0,    1734.0D0,    1838.2D0,    1924.4D0,
+     2    1998.2D0,    2121.1D0,    2221.8D0,    2346.0D0,    2448.6D0,
+     3    2563.0D0,    2681.5D0,    2781.4D0,    2945.1D0,    3077.4D0,
+     4    3189.2D0,    3372.7D0,    3521.6D0,    3704.2D0,    3855.1D0,
+     5    4024.0D0/
+*  Negative pions
+      DATA APPLJ /
+     1     471.6D0,     506.5D0,     537.4D0,     592.1D0,     641.1D0,
+     2     686.9D0,     772.5D0,     853.8D0,     972.0D0,    1088.3D0,
+     3    1243.1D0,    1435.8D0,    1618.2D0,    1929.9D0,    2159.7D0,
+     4    2310.6D0,    2419.2D0,    2350.0D0,    2095.4D0,    1827.2D0,
+     5    1537.2D0,    1284.1D0,    1118.2D0,     939.1D0,     867.2D0,
+     6     841.0D0,     842.7D0,     871.4D0,     926.9D0,     981.2D0,
+     7    1042.0D0,    1097.6D0,    1137.2D0,    1188.2D0,    1217.5D0,
+     8    1234.5D0,    1249.0D0,    1250.0D0,    1242.0D0,    1233.6D0,
+     9    1228.0D0,    1230.4D0,    1238.5D0,    1262.0D0,    1288.7D0,
+     *    1315.6D0,    1367.4D0,    1414.9D0,    1478.6D0,    1534.6D0,
+     1    1600.0D0,    1670.4D0,    1731.5D0,    1834.7D0,    1920.6D0,
+     2    1994.5D0,    2117.8D0,    2219.1D0,    2344.3D0,    2447.7D0,
+     3    2563.0D0,    2682.2D0,    2782.6D0,    2946.8D0,    3079.3D0,
+     4    3191.2D0,    3374.6D0,    3523.1D0,    3705.3D0,    3855.8D0,
+     5    4024.0D0/
+*  Rotational irradiation geometry
+*  Positive pions
+      DATA RTPLI /
+     1      37.0D0,      39.6D0,      42.0D0,      46.3D0,      50.4D0,
+     2      54.5D0,      62.9D0,      71.7D0,      85.7D0,     101.0D0,
+     3     123.5D0,     155.1D0,     189.7D0,     264.5D0,     342.9D0,
+     4     421.7D0,     571.2D0,     701.7D0,     855.7D0,     969.0D0,
+     5    1074.4D0,    1156.9D0,    1204.2D0,    1239.5D0,    1235.2D0,
+     6    1215.9D0,    1167.8D0,    1124.8D0,    1078.1D0,    1050.2D0,
+     7    1034.3D0,    1036.8D0,    1051.2D0,    1093.1D0,    1138.6D0,
+     8    1182.3D0,    1258.8D0,    1320.0D0,    1388.6D0,    1439.8D0,
+     9    1492.0D0,    1541.8D0,    1581.2D0,    1642.6D0,    1690.9D0,
+     *    1731.9D0,    1801.2D0,    1861.1D0,    1940.9D0,    2013.7D0,
+     1    2104.0D0,    2209.2D0,    2306.8D0,    2482.1D0,    2636.1D0,
+     2    2773.6D0,    3011.0D0,    3211.5D0,    3463.6D0,    3673.6D0,
+     3    3907.0D0,    4145.7D0,    4344.4D0,    4664.8D0,    4919.7D0,
+     4    5132.6D0,    5478.2D0,    5755.7D0,    6094.3D0,    6373.3D0,
+     5    6686.0D0/
+*  Negative pions
+      DATA RTPLJ /
+     1     263.2D0,     276.2D0,     287.6D0,     308.3D0,     327.7D0,
+     2     346.4D0,     383.5D0,     420.8D0,     478.2D0,     537.7D0,
+     3     621.1D0,     730.7D0,     840.4D0,    1044.2D0,    1215.0D0,
+     4    1347.7D0,    1504.9D0,    1545.6D0,    1479.2D0,    1366.5D0,
+     5    1222.2D0,    1081.8D0,     983.3D0,     873.5D0,     832.4D0,
+     6     822.1D0,     838.3D0,     871.8D0,     927.6D0,     978.9D0,
+     7    1034.3D0,    1083.5D0,    1118.8D0,    1167.6D0,    1202.1D0,
+     8    1229.9D0,    1277.1D0,    1320.0D0,    1380.7D0,    1434.0D0,
+     9    1492.0D0,    1547.0D0,    1589.5D0,    1653.8D0,    1702.9D0,
+     *    1743.6D0,    1811.3D0,    1869.0D0,    1945.9D0,    2016.2D0,
+     1    2104.0D0,    2207.2D0,    2303.5D0,    2477.5D0,    2631.1D0,
+     2    2768.5D0,    3006.4D0,    3207.8D0,    3461.2D0,    3672.3D0,
+     3    3907.0D0,    4146.8D0,    4346.2D0,    4667.4D0,    4922.7D0,
+     4    5135.7D0,    5481.2D0,    5758.2D0,    6096.0D0,    6374.3D0,
+     5    6686.0D0/
+*  WORST possible geometry for the irradiation
+*  Positive pions
+      DATA WTPLI /
+     1      71.3D0,      77.4D0,      82.9D0,      92.9D0,     102.2D0,
+     2     111.3D0,     129.2D0,     147.4D0,     175.6D0,     205.4D0,
+     3     248.0D0,     305.8D0,     366.7D0,     492.1D0,     615.2D0,
+     4     731.2D0,     931.3D0,    1083.3D0,    1231.0D0,    1315.0D0,
+     5    1370.7D0,    1393.0D0,    1390.3D0,    1357.9D0,    1318.2D0,
+     6    1280.7D0,    1218.8D0,    1173.2D0,    1127.4D0,    1100.0D0,
+     7    1082.0D0,    1078.0D0,    1084.8D0,    1113.2D0,    1149.9D0,
+     8    1189.6D0,    1270.7D0,    1350.0D0,    1461.3D0,    1557.6D0,
+     9    1661.0D0,    1755.8D0,    1825.8D0,    1924.6D0,    1993.8D0,
+     *    2047.3D0,    2130.6D0,    2198.4D0,    2287.7D0,    2370.2D0,
+     1    2476.0D0,    2604.6D0,    2727.7D0,    2955.3D0,    3160.1D0,
+     2    3345.9D0,    3671.9D0,    3950.9D0,    4305.1D0,    4601.8D0,
+     3    4932.0D0,    5269.1D0,    5548.6D0,    5997.6D0,    6353.0D0,
+     4    6648.7D0,    7126.6D0,    7508.9D0,    7974.2D0,    8357.4D0,
+     5    8787.0D0/
+*  Negative pions
+      DATA WTPLJ /
+     1     471.6D0,     506.4D0,     537.2D0,     591.6D0,     640.5D0,
+     2     686.1D0,     771.6D0,     853.0D0,     971.2D0,    1087.8D0,
+     3    1243.1D0,    1436.7D0,    1620.1D0,    1933.5D0,    2164.4D0,
+     4    2315.4D0,    2422.4D0,    2350.0D0,    2090.4D0,    1819.3D0,
+     5    1528.2D0,    1276.2D0,    1112.5D0,     939.1D0,     873.5D0,
+     6     853.3D0,     865.4D0,     902.3D0,     965.7D0,    1023.3D0,
+     7    1082.0D0,    1128.0D0,    1156.5D0,    1191.3D0,    1215.9D0,
+     8    1238.9D0,    1289.7D0,    1350.0D0,    1452.7D0,    1551.2D0,
+     9    1661.0D0,    1761.9D0,    1835.7D0,    1938.1D0,    2008.2D0,
+     *    2061.5D0,    2142.8D0,    2208.1D0,    2293.7D0,    2373.2D0,
+     1    2476.0D0,    2602.2D0,    2723.8D0,    2949.7D0,    3153.9D0,
+     2    3339.6D0,    3666.1D0,    3946.2D0,    4301.9D0,    4600.1D0,
+     3    4932.0D0,    5270.5D0,    5551.0D0,    6001.1D0,    6357.0D0,
+     4    6652.8D0,    7130.5D0,    7512.2D0,    7976.6D0,    8358.7D0,
+     5    8787.0D0/
+*
+* Effective dose for muons from ICRP74 and Pelliccioni data
+* calculated with the ICRP/Pelliccioni radiation weighting factors Wr
+* Energy in GeV, dose in pSv.cm^2
+*           
+      DIMENSION EBINM(NBIN1M),AEBINM(NBIN1M)
+      DATA  EBINM/
+     1    1.00D-03,    1.25D-03,    1.50D-03,    2.00D-03,    2.50D-03,
+     2    3.00D-03,    4.00D-03,    5.00D-03,    6.50D-03,    8.00D-03,
+     3    1.00D-02,    1.25D-02,    1.50D-02,    2.00D-02,    2.50D-02,
+     4    3.00D-02,    4.00D-02,    5.00D-02,    6.50D-02,    8.00D-02,
+     5    1.00D-01,    1.25D-01,    1.50D-01,    2.00D-01,    2.50D-01,
+     6    3.00D-01,    4.00D-01,    5.00D-01,    6.50D-01,    8.00D-01,
+     7    1.00D+00,    1.25D+00,    1.50D+00,    2.00D+00,    2.50D+00,
+     8    3.00D+00,    4.00D+00,    5.00D+00,    6.50D+00,    8.00D+00,
+     9    1.00D+01,    1.25D+01,    1.50D+01,    2.00D+01,    2.50D+01,
+     *    3.00D+01,    4.00D+01,    5.00D+01,    6.50D+01,    8.00D+01,
+     1    1.00D+02,    1.25D+02,    1.50D+02,    2.00D+02,    2.50D+02,
+     2    3.00D+02,    4.00D+02,    5.00D+02,    6.50D+02,    8.00D+02,
+     3    1.00D+03,    1.25D+03,    1.50D+03,    2.00D+03,    2.50D+03,
+     4    3.00D+03,    4.00D+03,    5.00D+03,    6.50D+03,    8.00D+03,
+     5    1.00D+04/
+      DIMENSION APPLM(NBIN1M),RTPLM(NBIN1M),WTPLM(NBIN1M),
+     &          AAPPLM(NBIN1M),ARTPLM(NBIN1M),AWTPLM(NBIN1M)
+*  Anterior-Posterior irradiation
+      DATA APPLM /
+     1     177.0D0,     178.0D0,     180.0D0,     182.0D0,     184.0D0,
+     2     186.0D0,     188.0D0,     193.0D0,     200.0D0,     211.0D0,
+     3     243.0D0,     337.7D0,     449.7D0,     672.5D0,     830.5D0,
+     4     913.8D0,     921.6D0,     821.5D0,     635.1D0,     495.7D0,
+     5     385.0D0,     353.0D0,     340.0D0,     339.0D0,     337.0D0,
+     6     335.0D0,     334.0D0,     333.0D0,     332.0D0,     332.0D0,
+     7     332.5D0,     333.0D0,     334.0D0,     335.0D0,     336.0D0,
+     8     337.0D0,     338.0D0,     339.0D0,     340.0D0,     341.0D0,
+     9     340.5D0,     337.0D0,     335.0D0,     333.3D0,     332.9D0,
+     *     333.1D0,     334.2D0,     335.5D0,     337.4D0,     338.9D0,
+     1     340.5D0,     341.9D0,     343.0D0,     344.4D0,     345.3D0,
+     2     346.0D0,     346.8D0,     347.4D0,     348.1D0,     348.5D0,
+     3     349.0D0,     349.5D0,     349.9D0,     350.6D0,     351.2D0,
+     4     351.7D0,     352.7D0,     353.7D0,     355.0D0,     356.2D0,
+     5     357.7D0/
+*  Rotational irradiation geometry
+      DATA RTPLM /
+     1      94.0D0,      96.0D0,      98.0D0,      99.0D0,     100.0D0,
+     2     101.0D0,     102.0D0,     105.0D0,     110.0D0,     116.0D0,
+     3     124.2D0,     155.8D0,     192.5D0,     275.5D0,     363.2D0,
+     4     445.4D0,     566.2D0,     614.1D0,     587.3D0,     529.0D0,
+     5     463.8D0,     414.5D0,     385.4D0,     354.2D0,     339.2D0,
+     6     331.4D0,     325.3D0,     324.5D0,     326.5D0,     329.4D0,
+     7     332.8D0,     335.9D0,     338.1D0,     340.8D0,     342.4D0,
+     8     343.5D0,     344.7D0,     345.4D0,     346.0D0,     346.3D0,
+     9     346.6D0,     346.9D0,     347.1D0,     347.4D0,     347.7D0,
+     *     347.9D0,     348.2D0,     348.5D0,     348.8D0,     349.0D0,
+     1     349.3D0,     349.6D0,     349.8D0,     350.1D0,     350.4D0,
+     2     350.6D0,     351.0D0,     351.2D0,     351.6D0,     351.8D0,
+     3     352.1D0,     352.4D0,     352.6D0,     353.0D0,     353.2D0,
+     4     353.5D0,     353.8D0,     354.1D0,     354.4D0,     354.7D0,
+     5     354.9D0/
+*  WORST possible geometry for the irradiation
+      DATA WTPLM /
+     1     177.0D0,     180.0D0,     182.0D0,     184.0D0,     186.0D0,
+     2     188.0D0,     191.0D0,     195.0D0,     204.0D0,     215.0D0,
+     3     243.0D0,     339.2D0,     452.5D0,     672.5D0,     818.9D0,
+     4     892.6D0,     908.7D0,     847.5D0,     728.2D0,     628.6D0,
+     5     537.5D0,     470.8D0,     430.9D0,     386.9D0,     364.4D0,
+     6     351.6D0,     339.2D0,     334.4D0,     332.6D0,     333.1D0,
+     7     334.5D0,     336.2D0,     337.6D0,     339.9D0,     341.6D0,
+     8     343.0D0,     345.2D0,     346.8D0,     348.6D0,     349.8D0,
+     9     351.0D0,     352.0D0,     352.7D0,     353.5D0,     354.0D0,
+     *     354.3D0,     354.7D0,     354.8D0,     355.0D0,     355.0D0,
+     1     355.0D0,     355.0D0,     355.0D0,     354.9D0,     354.9D0,
+     2     354.9D0,     354.8D0,     354.7D0,     354.6D0,     354.6D0,
+     3     354.5D0,     354.4D0,     354.4D0,     354.3D0,     354.2D0,
+     4     354.2D0,     354.1D0,     354.1D0,     354.0D0,     354.0D0,
+     5     354.0D0/
+*
+*-----------------------------------------------------------------------
+*
+* Ambient dose equivalent for neutrons from ICRP74 and Pelliccioni data
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION AMBN(NBIN1N),AAMBN(NBIN1N)
+      DATA AMBN /
+     1           6.6D0,      9.0D0,     10.6D0,     12.9D0,     13.5D0,
+     2          13.6D0,     13.3D0,     12.9D0,     12.0D0,     11.3D0,
+     3          10.6D0,      9.9D0,      9.4D0,      8.9D0,      8.3D0,
+     4           7.9D0,      7.7D0,      8.0D0,     10.5D0,     16.6D0,
+     5          23.7D0,     41.1D0,     60.0D0,     88.0D0,    132.0D0,
+     6         170.0D0,    233.0D0,    322.0D0,    375.0D0,    400.0D0,
+     7         416.0D0,    425.0D0,    420.0D0,    412.0D0,    408.0D0,
+     8         405.0D0,    400.0D0,    405.0D0,    409.0D0,    420.0D0,
+     9         440.0D0,    480.0D0,    520.0D0,    540.0D0,    555.0D0,
+     *         570.0D0,    600.0D0,    515.0D0,    400.0D0,    330.0D0,
+* high-energy extrapolation according to Pelliccioni
+     1         285.0D0,    253.0D0,    247.0D0,    259.0D0,    298.0D0,
+     2         335.0D0,    377.0D0,    421.0D0,    447.0D0,    476.0D0,
+     3         499.0D0,    508.0D0,    511.0D0,    510.0D0,    508.0D0,
+     4         504.0D0,    501.0D0,    504.0D0,    511.0D0,    528.0D0,
+     5         545.0D0,    577.0D0,    629.0D0,    669.0D0,    717.0D0,
+     6         777.0D0,    824.0D0,    896.0D0,    998.0D0,   1073.0D0,
+     7        1160.0D0/
+* high-energy extrapolation according to Sannikov and Savitskaya
+C    1         285.0D0,    253.0D0,    285.0D0,    306.0D0,    420.0D0,
+C    2         500.0D0,    647.0D0,    733.0D0,    789.0D0,    862.0D0,
+C    3         951.0D0,   1000.0D0,   1050.0D0,   1050.0D0,   1046.0D0,
+C    4        1038.0D0,   1031.0D0,   1038.0D0,   1052.0D0,   1087.0D0,
+C    5        1122.0D0,   1188.0D0,   1295.0D0,   1377.0D0,   1476.0D0,
+C    6        1600.0D0,   1696.0D0,   1845.0D0,   2055.0D0,   2209.0D0,
+C    7        2388.0D0/
+* 1cm-Pb-modified Snoopy (A&B) response
+C      DATA AMBN /
+CC    &   0.13272E+01,0.35280E+01,0.44158E+01,0.61860E+01,0.76848E+01,
+CC    &   0.91501E+01,0.10320E+02,0.11686E+02,0.13774E+02,0.15550E+02,
+CC    &   0.17568E+02,0.20671E+02,0.23400E+02,0.26452E+02,0.31107E+02,
+CC    &   0.35200E+02,0.40029E+02,0.47957E+02,0.55050E+02,0.63372E+02,
+CC    &   0.68650E+02,0.76109E+02,0.83508E+02,0.98300E+02,0.12183E+03,
+CC    &   0.14270E+03,0.18229E+03,0.25960E+03,0.33847E+03,0.39849E+03,
+CC    &   0.41700E+03,0.44177E+03,0.46149E+03,0.45284E+03,0.44749E+03,
+CC    &   0.44458E+03,0.43180E+03,0.40909E+03,0.38360E+03,0.36038E+03,
+CC    &   0.34000E+03,0.33184E+03,0.32509E+03,0.32212E+03,0.31936E+03,
+CC    &   0.31438E+03,0.31000E+03,0.34000E+03,0.32675E+03,0.32092E+03,
+CC    &   0.33000E+03,0.33581E+03,0.34000E+03,0.35000E+03,0.42979E+03,
+CC    &   0.47896E+03,0.53000E+03,0.10000E-12,0.10000E-12,0.10000E-12,
+CC    &   0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,
+CC    &   0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,
+CC    &   0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,
+CC    &   0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,0.10000E-12,
+CC    &   0.10000E-12/
+C     &   0.13272E+01,0.35280E+01,0.44158E+01,0.61860E+01,0.76848E+01,
+C     &   0.91501E+01,0.10320E+02,0.11686E+02,0.13774E+02,0.15550E+02,
+C     &   0.17568E+02,0.20671E+02,0.23400E+02,0.26452E+02,0.31107E+02,
+C     &   0.35200E+02,0.40029E+02,0.47957E+02,0.55050E+02,0.63372E+02,
+C     &   0.68650E+02,0.76109E+02,0.83508E+02,0.98300E+02,0.12183E+03,
+C     &   0.14270E+03,0.18229E+03,0.25960E+03,0.33847E+03,0.39849E+03,
+C     &   0.41700E+03,0.44177E+03,0.46149E+03,0.45284E+03,0.44749E+03,
+C     &   0.44458E+03,0.43180E+03,0.40909E+03,0.38360E+03,0.36038E+03,
+C     &   0.34000E+03,0.33184E+03,0.32509E+03,0.32212E+03,0.31936E+03,
+C     &   0.31438E+03,0.31000E+03,0.34000E+03,0.32675E+03,0.32092E+03,
+C     &   0.33000E+03,0.33581E+03,0.34000E+03,0.35000E+03,0.42979E+03,
+C     &   0.47896E+03,0.53000E+03,0.58919E+03,0.63516E+03,0.70610E+03,
+C     &   0.80686E+03,0.88096E+03,0.96695E+03,0.10749E+04,0.11588E+04,
+C     &   0.12882E+04,0.14721E+04,0.16072E+04,0.17641E+04,0.19612E+04,
+C     &   0.21142E+04,0.23503E+04,0.26857E+04,0.29323E+04,0.32185E+04,
+C     &   0.35780E+04,0.38571E+04,0.42879E+04,0.48998E+04,0.53498E+04,
+C     &   0.58720E+04/
+*
+* Ambient dose equivalent for protons from Pelliccioni data
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION EAMBP(NBIN2P),AEAMBP(NBIN2P)
+      DATA  EAMBP /
+     1    1.00D-02,    1.25D-02,    1.50D-02,    2.00D-02,    2.50D-02,
+     2    3.00D-02,    4.00D-02,    5.00D-02,    6.50D-02,    8.00D-02,
+     3    1.00D-01,    1.25D-01,    1.50D-01,    2.00D-01,    2.50D-01,
+     4    3.00D-01,    4.00D-01,    5.00D-01,    6.50D-01,    8.00D-01,
+     5    1.00D+00,    1.25D+00,    1.50D+00,    2.00D+00,    2.50D+00,
+     6    3.00D+00,    4.00D+00,    5.00D+00,    6.50D+00,    8.00D+00,
+     7    1.00D+01,    1.25D+01,    1.50D+01,    2.00D+01,    2.50D+01,
+     8    3.00D+01,    4.00D+01,    5.00D+01,    6.50D+01,    8.00D+01,
+     9    1.00D+02,    1.25D+02,    1.50D+02,    2.00D+02,    2.50D+02,
+     *    3.00D+02,    4.00D+02,    5.00D+02,    6.50D+02,    8.00D+02,
+     1    1.00D+03,    1.25D+03,    1.50D+03,    2.00D+03,    2.50D+03,
+     2    3.00D+03,    4.00D+03,    5.00D+03,    6.50D+03,    8.00D+03,
+     3    1.00D+04/
+      DIMENSION AMBP(NBIN2P),AAMBP(NBIN2P)
+      DATA AMBP /
+     1        .0D0,        .0D0,        .0D0,        .0D0,        .0D0,
+     2        .0D0,    4289.5D0,    2790.0D0,    2000.8D0,    1710.4D0,
+     3    1520.0D0,    1362.6D0,    1247.6D0,    1091.3D0,     991.0D0,
+     4     921.9D0,     835.3D0,     786.0D0,     746.5D0,     726.7D0,
+     5     714.4D0,     709.6D0,     710.3D0,     717.9D0,     727.7D0,
+     6     737.2D0,     753.3D0,     765.0D0,     776.0D0,     782.7D0,
+     7     788.1D0,     792.0D0,     794.4D0,     797.0D0,     798.6D0,
+     8     799.8D0,     802.2D0,     804.9D0,     809.5D0,     814.6D0,
+     9     822.0D0,     831.7D0,     841.2D0,     858.9D0,     874.6D0,
+     *     888.6D0,     912.4D0,     932.0D0,     955.9D0,     975.2D0,
+     1     996.0D0,    1016.4D0,    1032.5D0,    1056.4D0,    1073.1D0,
+     2    1085.2D0,    1100.8D0,    1109.3D0,    1114.7D0,    1115.1D0,
+     3    1111.1D0/
+*
+* Ambient dose equivalent for ch. pions from ICRP74 and Pelliccioni data
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION AMBI(NBIN1I),AMBJ(NBIN1I),
+     &          AAMBI(NBIN1I),AAMBJ(NBIN1I)
+*  Positive pions
+      DATA AMBI /
+     1     224.0D0,     245.3D0,     264.1D0,     296.5D0,     323.8D0,
+     2     347.5D0,     387.2D0,     419.9D0,     459.9D0,     492.5D0,
+     3     528.0D0,     563.6D0,     592.9D0,     640.3D0,     678.9D0,
+     4     712.1D0,     769.2D0,     819.0D0,     884.5D0,     938.6D0,
+     5     994.0D0,    1040.7D0,    1067.6D0,    1080.0D0,    1059.4D0,
+     6    1026.9D0,     958.6D0,     900.6D0,     835.9D0,     792.4D0,
+     7     757.0D0,     735.3D0,     726.0D0,     722.9D0,     727.1D0,
+     8     733.1D0,     743.7D0,     750.0D0,     752.4D0,     751.2D0,
+     9     748.0D0,     743.9D0,     740.2D0,     734.0D0,     729.2D0,
+     *     725.4D0,     720.1D0,     716.7D0,     714.0D0,     712.9D0,
+     1     713.0D0,     714.7D0,     717.1D0,     722.7D0,     728.4D0,
+     2     733.8D0,     743.6D0,     752.1D0,     762.9D0,     772.0D0,
+     3     782.0D0,     792.2D0,     800.7D0,     814.4D0,     825.2D0,
+     4     834.1D0,     848.4D0,     859.8D0,     873.3D0,     884.2D0,
+     5     896.0D0/
+*  Negative pions
+      DATA AMBJ /
+     1    1130.0D0,    1245.2D0,    1345.3D0,    1507.9D0,    1631.0D0,
+     2    1723.7D0,    1843.3D0,    1902.4D0,    1921.2D0,    1890.7D0,
+     3    1810.0D0,    1684.7D0,    1563.7D0,    1368.4D0,    1231.1D0,
+     4    1135.8D0,    1024.1D0,     975.0D0,     960.9D0,     974.3D0,
+     5    1003.4D0,    1038.1D0,    1063.2D0,    1080.0D0,    1062.8D0,
+     6    1031.8D0,     964.1D0,     905.4D0,     839.2D0,     794.2D0,
+     7     757.0D0,     733.4D0,     722.6D0,     717.3D0,     720.2D0,
+     8     725.5D0,     735.8D0,     743.0D0,     747.7D0,     748.8D0,
+     9     748.0D0,     745.7D0,     742.9D0,     737.5D0,     732.8D0,
+     *     728.9D0,     722.9D0,     718.9D0,     715.2D0,     713.5D0,
+     1     713.0D0,     714.2D0,     716.4D0,     721.7D0,     727.4D0,
+     2     732.9D0,     742.8D0,     751.5D0,     762.6D0,     771.8D0,
+     3     782.0D0,     792.4D0,     801.0D0,     814.7D0,     825.5D0,
+     4     834.5D0,     848.8D0,     860.0D0,     873.5D0,     884.3D0,
+     5     896.0D0/
+*
+* Ambient dose equivalent for muons from ICRP74 and Pelliccioni data
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION AMBM(NBIN1M),AAMBM(NBIN1M)
+      DATA AMBM /
+     1     394.0D0,     411.7D0,     426.6D0,     450.7D0,     469.5D0,
+     2     484.8D0,     508.3D0,     525.6D0,     544.3D0,     557.4D0,
+     3     569.5D0,     578.9D0,     583.9D0,     585.1D0,     579.3D0,
+     4     569.5D0,     543.9D0,     515.5D0,     474.1D0,     439.0D0,
+     5     402.6D0,     369.8D0,     347.0D0,     320.0D0,     307.2D0,
+     6     301.2D0,     297.8D0,     298.9D0,     302.8D0,     307.0D0,
+     7     311.5D0,     315.1D0,     317.3D0,     319.7D0,     320.7D0,
+     8     321.1D0,     321.2D0,     320.9D0,     320.5D0,     320.1D0,
+     9     320.0D0,     320.2D0,     320.5D0,     321.3D0,     322.0D0,
+     *     322.7D0,     323.7D0,     324.4D0,     324.9D0,     325.1D0,
+     1     325.0D0,     324.5D0,     323.9D0,     322.5D0,     321.3D0,
+     2     320.2D0,     318.6D0,     317.4D0,     316.2D0,     315.4D0,
+     3     315.0D0,     314.9D0,     315.1D0,     315.9D0,     316.8D0,
+     4     317.7D0,     319.5D0,     321.0D0,     323.0D0,     324.7D0,
+     5     326.5D0/
+*
+* Ambient dose equivalent for photons from ICRP74 and Pelliccioni data
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION AMBG(NBIN1G),AAMBG(NBIN1G)
+      DATA AMBG /
+     1 0.29512E-08, 0.16406E-07, 0.91199E-07, 0.50699E-06, 0.28184E-05,
+     2 0.15667E-04, 0.87096E-04, 0.48417E-03, 0.26915E-02, 0.14962E-01,
+     3 0.83176E-01, 0.46238E+00, 0.93903E+00, 0.10505E+01, 0.93070E+00,
+     4 0.76366E+00, 0.62173E+00, 0.52108E+00, 0.51322E+00, 0.55911E+00,
+     5 0.61958E+00, 0.72946E+00, 0.92815E+00, 0.12264E+01, 0.15403E+01,
+     6 0.19055E+01, 0.23480E+01, 0.27945E+01, 0.36249E+01, 0.42697E+01,
+     7 0.51844E+01, 0.61688E+01, 0.71466E+01, 0.82509E+01, 0.95675E+01,
+     8 0.10544E+02, 0.10715E+02, 0.10375E+02, 0.94276E+01, 0.91033E+01,
+     9 0.87619E+01, 0.84957E+01, 0.83464E+01, 0.82813E+01, 0.82585E+01,
+     * 0.82149E+01, 0.82566E+01, 0.86437E+01, 0.88675E+01, 0.89207E+01,
+     1 0.90012E+01, 0.92640E+01, 0.96872E+01, 0.10186E+02, 0.10715E+02,
+     2 0.11169E+02, 0.11561E+02, 0.11803E+02, 0.11885E+02, 0.11830E+02,
+     3 0.11695E+02, 0.11535E+02, 0.11429E+02, 0.11508E+02, 0.11830E+02,
+     4 0.12331E+02, 0.12882E+02, 0.13305E+02, 0.13428E+02, 0.13092E+02,
+     5 0.12190E+02, 0.12190E+02, 0.12190E+02, 0.12190E+02, 0.12190E+02,
+     6 0.12190E+02, 0.12190E+02, 0.12190E+02, 0.12190E+02, 0.12190E+02,
+     7 0.12190E+02/
+*
+* Ambient dose equivalent for electrons from ICRP74 and Pelliccioni data
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION EAMBE(NBIN2E),AEAMBE(NBIN2E)
+      DATA  EAMBE /
+     1 0.20000E-02, 0.22896E-02, 0.26212E-02, 0.30008E-02, 0.34354E-02,
+     2 0.39329E-02, 0.45025E-02, 0.51545E-02, 0.59010E-02, 0.67556E-02,
+     3 0.77339E-02, 0.88540E-02, 0.10136E-01, 0.11604E-01, 0.13285E-01,
+     4 0.15209E-01, 0.17411E-01, 0.19932E-01, 0.22819E-01, 0.26124E-01,
+     5 0.29907E-01, 0.34238E-01, 0.39196E-01, 0.44873E-01, 0.51371E-01,
+     6 0.58811E-01, 0.67328E-01, 0.77078E-01, 0.88241E-01, 0.10102E+00,
+     7 0.11565E+00, 0.13240E+00, 0.15157E+00, 0.17352E+00, 0.19865E+00,
+     8 0.22742E+00, 0.26036E+00, 0.29806E+00, 0.34122E+00, 0.39064E+00,
+     9 0.44721E+00, 0.51198E+00, 0.58612E+00, 0.67101E+00, 0.76818E+00,
+     * 0.87943E+00, 0.10068E+01, 0.11526E+01, 0.13195E+01, 0.15106E+01,
+     1 0.17294E+01, 0.19798E+01, 0.22665E+01, 0.25948E+01, 0.29705E+01,
+     2 0.34007E+01, 0.38932E+01, 0.44570E+01, 0.51025E+01, 0.58414E+01,
+     3 0.66874E+01, 0.76559E+01, 0.87646E+01, 0.10034E+02, 0.11487E+02,
+     4 0.13151E+02, 0.15055E+02, 0.17235E+02, 0.19731E+02, 0.22589E+02,
+     5 0.25860E+02, 0.29605E+02, 0.33892E+02, 0.38801E+02, 0.44420E+02,
+     6 0.50853E+02, 0.58217E+02, 0.66648E+02, 0.76300E+02, 0.87350E+02,
+     7 0.10000E+03/
+*
+      DIMENSION AMBE(NBIN2E),AAMBE(NBIN2E)
+      DATA AMBE /
+     1 1.00000E-12, 0.16082E+03, 0.19885E+03, 0.32509E+03, 0.41665E+03,
+     2 0.45092E+03, 0.44206E+03, 0.41582E+03, 0.38863E+03, 0.36471E+03,
+     3 0.34608E+03, 0.33323E+03, 0.32465E+03, 0.32115E+03, 0.32097E+03,
+     4 0.32279E+03, 0.32481E+03, 0.32583E+03, 0.32546E+03, 0.32233E+03,
+     5 0.31724E+03, 0.31179E+03, 0.30738E+03, 0.30701E+03, 0.31035E+03,
+     6 0.31401E+03, 0.31705E+03, 0.31769E+03, 0.31635E+03, 0.31477E+03,
+     7 0.31497E+03, 0.31646E+03, 0.31903E+03, 0.32163E+03, 0.32354E+03,
+     8 0.32444E+03, 0.32485E+03, 0.32398E+03, 0.32261E+03, 0.32087E+03,
+     9 0.31913E+03, 0.31669E+03, 0.31472E+03, 0.31256E+03, 0.31087E+03,
+     * 0.30919E+03, 0.30832E+03, 0.30848E+03, 0.30932E+03, 0.31016E+03,
+     1 0.31154E+03, 0.31390E+03, 0.31573E+03, 0.31831E+03, 0.32056E+03,
+     2 0.32277E+03, 0.32480E+03, 0.32730E+03, 0.32833E+03, 0.32986E+03,
+     3 0.33037E+03, 0.33037E+03, 0.32972E+03, 0.32810E+03, 0.32810E+03,
+     4 0.32810E+03, 0.32810E+03, 0.32810E+03, 0.32810E+03, 0.32810E+03,
+     5 0.32810E+03, 0.32810E+03, 0.32810E+03, 0.32810E+03, 0.32810E+03,
+     6 0.32810E+03, 0.32810E+03, 0.32810E+03, 0.32810E+03, 0.32810E+03,
+     7 0.32810E+03/
+*
+*-----------------------------------------------------------------------
+*
+* Ambient dose equivalent for neutrons ("GRS"-conversion factors)
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION H10N(NBIN2N),H10PR(NBIN2N),H10PI(NBIN2N),H10MU(NBIN2M),
+     &          AH10MU(NBIN2M)
+      DATA H10N/
+     1       7.62D0,      7.84D0,      8.06D0,      8.28D0,      8.50D0,
+     2       8.71D0,      8.92D0,      9.12D0,      9.32D0,      9.50D0,
+     3       9.67D0,      9.83D0,      9.97D0,     10.10D0,     10.21D0,
+     4      10.30D0,     10.38D0,     10.43D0,     10.46D0,     10.47D0,
+     5      10.47D0,     10.43D0,     10.38D0,     10.31D0,     10.22D0,
+     6      10.11D0,      9.99D0,      9.85D0,      9.69D0,      9.52D0,
+     7       9.35D0,      9.16D0,      8.96D0,      8.76D0,      8.56D0,
+     8       8.35D0,      8.15D0,      7.94D0,      7.74D0,      7.54D0,
+     9       7.35D0,      7.16D0,      6.99D0,      6.82D0,      6.67D0,
+     *       6.53D0,      6.40D0,      6.30D0,      6.22D0,      6.16D0,
+     1       6.13D0,      6.14D0,      6.19D0,      6.29D0,      6.45D0,
+     2       6.69D0,      7.03D0,      7.49D0,      8.11D0,      8.93D0,
+     3      10.04D0,     11.51D0,     13.47D0,     16.08D0,     19.58D0,
+     4      24.24D0,     30.42D0,     38.53D0,     49.03D0,     62.35D0,
+     5      78.83D0,     98.66D0,    121.76D0,    147.73D0,    175.91D0,
+     6     205.40D0,    235.18D0,    264.24D0,    291.70D0,    316.84D0,
+     7     339.20D0,    358.53D0,    374.78D0,    388.05D0,    398.56D0,
+     8     406.61D0,    412.66D0,    417.53D0,    423.43D0,    436.87D0,
+     9     472.90D0,    539.16D0,    598.43D0,    623.89D0,    595.0D0 ,
+     *     524.0D0 ,    365.0D0 ,    323.0D0 ,    321.0D0 ,    323.0D0 ,
+     1     325.0D0 ,    328.0D0 ,    333.0D0 ,    338.0D0 ,    344.0D0 ,
+     2     353.0D0 ,    371.0D0 ,    482.0D0 ,    581.0D0 ,    677.0D0 ,
+     3     777.0D0 ,    882.0D0 ,   1005.0D0 ,   1125.0D0 ,   1265.0D0 ,
+     4    1410.0D0 ,   1570.0D0 ,   1740.0D0 ,   1930.0D0 ,   2130.0D0 ,
+     5    2360.0D0 ,   2600.0D0 ,   2880.0D0 ,   3180.0D0 ,   3500.0D0 ,
+     6    3860.0D0 ,   4250.0D0 ,   4700.0D0 ,   5180.0D0 ,   5610.0D0 ,
+     7    6290.0D0 ,   6900.0D0 ,   7570.0D0 ,   8280.0D0 ,   9000.0D0 ,
+     8    9830.0D0 ,  10700.0D0 ,  11600.0D0 ,  12650.0D0 ,  13600.0D0 ,
+     9   14750.0D0 ,  15900.0D0 ,  17100.0D0 ,  18450.0D0 ,  19700.0D0 ,
+     *   21100.0D0 ,  22500.0D0 ,  23900.0D0 ,  25500.0D0 ,  27000.0D0 /
+*
+* Ambient dose equivalent for protons ("GRS"-conversion factors)
+* Energy in GeV, dose in pSv.cm^2
+*
+      DATA H10PR/
+     1        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     2        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     3        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     4        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     5        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     6        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     7        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     8        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     9        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     *        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     1        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     2        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     3        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     4        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     5        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     6        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     7        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     8        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     9        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     *     3130.0D0,   2530.0D0,   2130.0D0,   1825.0D0,   1585.0D0,
+     1     1390.0D0,   1230.0D0,   1105.0D0,   1000.0D0,    923.0D0,
+     2      864.0D0,    828.0D0,    898.0D0,    965.0D0,   1040.0D0,
+     3     1125.0D0,   1220.0D0,   1335.0D0,   1455.0D0,   1595.0D0,
+     4     1740.0D0,   1905.0D0,   2080.0D0,   2270.0D0,   2480.0D0,
+     5     2710.0D0,   2960.0D0,   3240.0D0,   3550.0D0,   3870.0D0,
+     6     4240.0D0,   4630.0D0,   5090.0D0,   5570.0D0,   6000.0D0,
+     7     6690.0D0,   7300.0D0,   7980.0D0,   8690.0D0,   9410.0D0,
+     8    10250.0D0,  11100.0D0,  12050.0D0,  13100.0D0,  14050.0D0,
+     9    15200.0D0,  16350.0D0,  17550.0D0,  18900.0D0,  20100.0D0,
+     *    21600.0D0,  22300.0D0,  24400.0D0,  26000.0D0,  27500.0D0/
+*
+* Ambient dose equivalent for charged pions ("GRS"-conversion factors)
+* Energy in GeV, dose in pSv.cm^2
+*
+      DATA H10PI/                                              
+     1        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     2        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     3        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     4        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     5        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     6        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     7        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     8        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     9        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     *        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     1        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     2        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     3        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     4        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     5        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     6        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     7        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     8        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     9        0.0D0,      0.0D0,      0.0D0,      0.0D0,      0.0D0,
+     *     1640.0D0,   1560.0D0,   1495.0D0,   1445.0D0,   1405.0D0,
+     1     1375.0D0,   1355.0D0,   1345.0D0,   1335.0D0,   1330.0D0,
+     2     1330.0D0,   1330.0D0,   1330.0D0,   1335.0D0,   1340.0D0,
+     3     1345.0D0,   1350.0D0,   1360.0D0,   1485.0D0,   1630.0D0,
+     4     1780.0D0,   1945.0D0,   2120.0D0,   2310.0D0,   2520.0D0,
+     5     2750.0D0,   3000.0D0,   3280.0D0,   3580.0D0,   3910.0D0,
+     6     4270.0D0,   4670.0D0,   5120.0D0,   5600.0D0,   6040.0D0,
+     7     6720.0D0,   7330.0D0,   8010.0D0,   8720.0D0,   9440.0D0,
+     8    10300.0D0,  11150.0D0,  12050.0D0,  13100.0D0,  14050.0D0,
+     9    15200.0D0,  16350.0D0,  17550.0D0,  18900.0D0,  20200.0D0,
+     *    21600.0D0,  23000.0D0,  24400.0D0,  26000.0D0,  27500.0D0/
+*
+* Ambient dose equivalent for muons ("GRS"-conversion factors)
+* Energy in GeV, dose in pSv.cm^2
+*
+      DIMENSION EAMBM(NBIN2M),AEAMBM(NBIN2M)
+      DATA EAMBM/
+     1      1.0D-02,    2.0D-02,     5.0D-02,     1.0D-01,     2.0D-01,
+     2      5.0D-01,    1.0D+00,     2.0D+00,     5.0D+00,     1.0D+01,
+     3      2.0D+01,    5.0D+01,     1.0D+02,     2.0D+02,     5.0D+02,
+     4      1.0D+03/
+      DATA H10MU /
+     1    2600.0D0,    2600.0D0,    2600.0D0,    2600.0D0,     350.0D0,
+     2     330.0D0,     350.0D0,     360.0D0,     380.0D0,     390.0D0,
+     3     410.0D0,     430.0D0,     450.0D0,     480.0D0,     560.0D0,
+     4     680.0D0/
+*
+*-----------------------------------------------------------------------
+*
+      DATA LFIRST /.TRUE.,.TRUE.,.TRUE.,.TRUE.,.TRUE.,
+     &             .TRUE.,.TRUE.,.TRUE.,.TRUE./
+      DATA CSET /'          '/
+* default is zero weighting
+      FLUSCW = 0.0D0
+      ITEST  = 0 
+      IJ     = IIJ
+
+* calculate logarithms of energy-bins at the very first call
+      IF (LFIRST(0)) THEN
+         DO 1 I=1,NBIN1N
+            AEBINN(I) = LOG10(EBINN(I))
+            AAP74N(I) = LOG10(AP74N(I))
+            ART74N(I) = LOG10(RT74N(I))
+            AWT74N(I) = LOG10(WT74N(I))
+            AAPPLN(I) = LOG10(APPLN(I))
+            ARTPLN(I) = LOG10(RTPLN(I))
+            AWTPLN(I) = LOG10(WTPLN(I))
+            AAMBN(I)  = LOG10(AMBN(I))
+    1    CONTINUE
+         DO 2 I=1,NBIN1P
+            AE74P(I)  = LOG10(E74P(I))
+            AEPLP(I)  = LOG10(EPLP(I))
+            AAP74P(I) = LOG10(AP74P(I))
+            ART74P(I) = LOG10(RT74P(I))
+            AWT74P(I) = LOG10(WT74P(I))
+            AAPPLP(I) = LOG10(APPLP(I))
+            ARTPLP(I) = LOG10(RTPLP(I))
+            AWTPLP(I) = LOG10(WTPLP(I))
+    2    CONTINUE
+         DO 3 I=1,NBIN1I
+            AEBINI(I) = LOG10(EBINI(I))
+            AAP74I(I) = LOG10(AP74I(I))
+            ART74I(I) = LOG10(RT74I(I))
+            AWT74I(I) = LOG10(WT74I(I))
+            AAP74J(I) = LOG10(AP74J(I))
+            ART74J(I) = LOG10(RT74J(I))
+            AWT74J(I) = LOG10(WT74J(I))
+            AAPPLI(I) = LOG10(APPLI(I))
+            ARTPLI(I) = LOG10(RTPLI(I))
+            AWTPLI(I) = LOG10(WTPLI(I))
+            AAPPLJ(I) = LOG10(APPLJ(I))
+            ARTPLJ(I) = LOG10(RTPLJ(I))
+            AWTPLJ(I) = LOG10(WTPLJ(I))
+            AAMBI(I)  = LOG10(AMBI(I))
+            AAMBJ(I)  = LOG10(AMBJ(I))
+    3    CONTINUE
+         DO 4 I=1,NBIN1M
+            AEBINM(I) = LOG10(EBINM(I))
+            AAPPLM(I) = LOG10(APPLM(I))
+            ARTPLM(I) = LOG10(RTPLM(I))
+            AWTPLM(I) = LOG10(WTPLM(I))
+            AAMBM(I)  = LOG10(AMBM(I))
+    4    CONTINUE
+         DO 5 I=1,NBIN2P
+            AEAMBP(I) = LOG10(EAMBP(I))
+            IF (AMBP(I).GT.0.0D0) THEN
+               AAMBP(I) = LOG10(AMBP(I))
+            ELSE
+               AAMBP(I) = LOG10(ANGLGB)
+            ENDIF
+    5    CONTINUE
+         DO 6 I=1,NBIN2M
+            AEAMBM(I) = LOG10(EAMBM(I))
+            AH10MU(I) = LOG10(H10MU(I))
+    6    CONTINUE
+         DO 7 I=1,NBIN1G
+            AE74G(I)  = LOG10(E74G(I))
+            AAP74G(I) = LOG10(AP74G(I))
+            ART74G(I) = LOG10(RT74G(I))
+            AWT74G(I) = LOG10(WT74G(I))
+            AAMBG(I)  = LOG10(AMBG(I))
+    7    CONTINUE
+         DO 8 I=1,NBIN1E
+            AE74E(I)  = LOG10(E74E(I))
+            AAP74E(I) = LOG10(AP74E(I))
+            ART74E(I) = LOG10(RT74E(I))
+            AWT74E(I) = LOG10(WT74E(I))
+    8    CONTINUE
+         DO 9 I=1,NBIN2E
+            AEAMBE(I) = LOG10(EAMBE(I))
+            AAMBE(I)  = LOG10(AMBE(I))
+    9    CONTINUE
+         LFIRST(0) = .FALSE.
+      ENDIF
+* test print
+      IF (IJ.LT.-10000) THEN
+*  test print for set number itest (i.e. -20001 gives the proton 
+*  conversion factors for set 2)
+*  return particle-id of conversion factor set used for particle IJ
+*  via LLO
+         ITEST = -IJ/10000
+         IJ = -IJ-10000*ITEST
+         IF (ITT(IJ).EQ.1) THEN
+            LLO = 8
+         ELSEIF (ITT(IJ).EQ.2) THEN
+            LLO = 1
+         ELSEIF (ITT(IJ).EQ.3) THEN
+            LLO = 13
+         ELSEIF (ITT(IJ).EQ.4) THEN
+            LLO = 14
+         ELSEIF (ITT(IJ).EQ.5) THEN
+            LLO = 10
+         ELSEIF (ITT(IJ).EQ.6) THEN
+            LLO = 11
+         ELSEIF (ITT(IJ).EQ.7) THEN
+            LLO = 7
+         ELSEIF (ITT(IJ).EQ.8) THEN
+            LLO = 3
+         ELSEIF (ITT(IJ).EQ.99) THEN
+            LLO = 0
+         ELSE
+            LLO = -1
+         ENDIF
+      ELSE
+* ISCRNG = 1 for usrbdx
+*        = 2 for usrbin
+*        = 3 for usrtrack
+* return unit weight for all other detectors
+         IF ((ISCRNG.NE.1).AND.(ISCRNG.NE.2).AND.(ISCRNG.NE.3)) THEN
+            FLUSCW = 1.0D0
+            RETURN
+         ENDIF
+      ENDIF
+*
+* At this point the detector is either usrbdx or usrbin or usrtrack.
+*
+* Now check if any of the available conversion factor sets is requested
+* in which case the default conversion factor is zero. Otherwise the
+* default factor is one.
+      IF (ITEST.EQ.0) THEN
+*  usrbdx
+         IF (ISCRNG.EQ.1) THEN
+            CSET = TITUSX(JSCRNG)
+*  usrtrack
+         ELSEIF (ISCRNG.EQ.3) THEN
+            CSET = TITUTC(JSCRNG)
+*  usrbin
+         ELSE
+            CSET = TITUSB(JSCRNG)
+         ENDIF
+         IF ((CSET(1:3).EQ.'EAP').OR.(CSET(1:3).EQ.'eap').OR.
+     &       (CSET(1:3).EQ.'ERT').OR.(CSET(1:3).EQ.'ert').OR.
+     &       (CSET(1:3).EQ.'EWT').OR.(CSET(1:3).EQ.'ewt').OR.
+     &       (CSET(1:3).EQ.'AMB').OR.(CSET(1:3).EQ.'amb')) THEN
+            FLUSCW = 0.0D0
+         ELSE 
+*  skip the rest for all other sdum's
+            FLUSCW = 1.0D0
+            RETURN
+         ENDIF
+      ENDIF
+*
+* At this point one of the available conversion factor sets is 
+* requested by sdum.
+*
+* check for particle type
+* return zero weight for all particles with ij < 1 or > 40 and for
+* all particles with flag=99 (see array ITT)
+      IF ((IJ.LT.1).OR.(IJ.GT.40)) RETURN
+      IPART = ITT(IJ)
+      IF (IPART.EQ.99) RETURN
+
+* kinetic energy
+      IF (PLA.LT.0.0D0) THEN 
+         EKIN = ABS(PLA)
+      ELSEIF (PLA.GT.0.0D0) THEN
+         EKIN = SQRT(PLA**2+AM(IJ)**2)-AM(IJ)
+      ELSE
+         RETURN
+      ENDIF
+*
+*
+* conversion factor set
+      IF (ITEST.EQ.0) THEN
+*  for muons there is only a Pelliccioni weighting factor set
+         IF (IPART.EQ.5) THEN
+            IF ((CSET(1:1).EQ.'E').AND.(CSET(4:5).EQ.'74'))
+     &         CSET(4:5) = 'MP'
+            IF ((CSET(1:1).EQ.'e').AND.(CSET(4:5).EQ.'74'))
+     &         CSET(4:5) = 'mp'
+         ENDIF
+*  for photons and electrons there is only a ICRP weighting factor set
+         IF ((IPART.EQ.7).OR.(IPART.EQ.8)) THEN
+            IF (((CSET(1:1).EQ.'E' ).OR.(CSET(1:1).EQ.'e' )).AND.
+     &          ((CSET(4:5).EQ.'MP').OR.(CSET(4:5).EQ.'mp'))) THEN
+               CSET(4:5) = '74'
+*  for photons and electrons there is no GRS amb. dose equivalent data set
+            ELSEIF ((CSET(1:3).EQ.'AMB').OR.(CSET(1:3).EQ.'amb')) THEN
+               IF ((CSET(4:5).EQ.'GS').OR.(CSET(4:5).EQ.'gs')) RETURN
+            ENDIF
+*  skip if only hadronic part is requested
+            IF (CSET(6:6).EQ.'1') RETURN
+         ELSE
+*  skip if only electromagnetic part is requested
+            IF (CSET(6:6).EQ.'2') RETURN
+         ENDIF
+      ELSE
+         IF (IPART.EQ.5) THEN
+            IF (ITEST.EQ.1) ITEST = 4
+            IF (ITEST.EQ.2) ITEST = 5
+            IF (ITEST.EQ.3) ITEST = 6
+         ENDIF
+         IF ((IPART.EQ.7).OR.(IPART.EQ.8)) THEN
+            IF (ITEST.EQ.4) ITEST = 1
+            IF (ITEST.EQ.5) ITEST = 2
+            IF (ITEST.EQ.6) ITEST = 3
+            IF (ITEST.GE.9) RETURN
+         ENDIF
+      ENDIF
+*
+*
+*  Effective dose (ICRP radiation weighting factors Wr)
+*   Anterior-Posterior irradiation
+      IF ((CSET(1:5).EQ.'EAP74').OR.(CSET(1:5).EQ.'eap74')
+     &                                    .OR.(ITEST.EQ.1)) THEN
+         IF (LFIRST(1).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1000)
+            WRITE(LUNOUT,1002)
+            WRITE(LUNOUT,1004)
+            LFIRST(1) = .FALSE.
+         ENDIF
+         IF (IPART.EQ.1) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINN(1)) THEN
+               FLUSCW = AP74N(1)
+            ELSEIF (AEKIN.GT.AEBINN(NBIN1N)) THEN
+               FLUSCW = AP74N(NBIN1N)
+            ELSEIF ((AEKIN.GE.AEBINN(47)).AND.(AEKIN.LE.AEBINN(NBIN1N)))
+     &                                                              THEN
+               XBIN = (AEKIN-AEBINN(47))/(AEBINN(NBIN1N)-AEBINN(47))
+     &                *DBLE(NBIN1N-47)+47.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINN(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINN(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1N) THEN
+                  FLUSCW = AP74N(NBIN1N)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINN(IBINLO))/
+     &                    (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                    (AAP74N(IBINHI)-AAP74N(IBINLO))+AAP74N(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ELSE
+               IBINLO = 1
+               IBINHI = 47
+   10          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 11
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEBINN(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 10
+   11          CONTINUE
+               FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                  (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                  (AAP74N(IBINHI)-AAP74N(IBINLO))+AAP74N(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ELSEIF (IPART.EQ.2) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74P(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AE74P(NBIN1P)) THEN
+               FLUSCW = AP74P(NBIN1P)
+            ELSE
+               XBIN = (AEKIN-AE74P(1))/(AE74P(NBIN1P)-AE74P(1))
+     &                *DBLE(NBIN1P-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74P(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74P(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1P) THEN
+                  FLUSCW = AP74P(NBIN1P)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74P(IBINLO))/
+     &                    (AE74P(IBINHI)-AE74P(IBINLO))*
+     &                    (AAP74P(IBINHI)-AAP74P(IBINLO))+AAP74P(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.3) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = AP74I(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = AP74I(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AAP74I(IBINHI)-AAP74I(IBINLO))+AAP74I(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.4) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = AP74J(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = AP74J(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AAP74J(IBINHI)-AAP74J(IBINLO))+AAP74J(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.7) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74G(1)) THEN
+               FLUSCW = AP74G(1)
+            ELSEIF (AEKIN.GT.AE74G(NBIN1G)) THEN
+               FLUSCW = AP74G(NBIN1G)
+            ELSE
+               XBIN = (AEKIN-AE74G(1))/(AE74G(NBIN1G)-AE74G(1))
+     &                *DBLE(NBIN1G-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74G(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74G(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1G) THEN
+                  FLUSCW = AP74G(NBIN1G)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74G(IBINLO))/
+     &                    (AE74G(IBINHI)-AE74G(IBINLO))*
+     &                    (AAP74G(IBINHI)-AAP74G(IBINLO))+AAP74G(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.8) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74E(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AE74E(NBIN1E)) THEN
+               FLUSCW = AP74E(NBIN1E)
+            ELSE
+               XBIN = (AEKIN-AE74E(1))/(AE74E(NBIN1E)-AE74E(1))
+     &                *DBLE(NBIN1E-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74E(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74E(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1E) THEN
+                  FLUSCW = AP74E(NBIN1E)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74E(IBINLO))/
+     &                    (AE74E(IBINHI)-AE74E(IBINLO))*
+     &                    (AAP74E(IBINHI)-AAP74E(IBINLO))+AAP74E(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ENDIF
+*
+*
+*  Effective dose (ICRP radiation weighting factors Wr)
+*   Rotational irradiation geometry
+      ELSEIF ((CSET(1:5).EQ.'ERT74').OR.(CSET(1:5).EQ.'ert74')
+     &                                        .OR.(ITEST.EQ.2)) THEN
+         IF (LFIRST(2).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1000)
+            WRITE(LUNOUT,1002)
+            WRITE(LUNOUT,1005)
+            LFIRST(2) = .FALSE.
+         ENDIF
+         IF (IPART.EQ.1) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINN(1)) THEN
+               FLUSCW = RT74N(1)
+            ELSEIF (AEKIN.GT.AEBINN(NBIN1N)) THEN
+               FLUSCW = RT74N(NBIN1N)
+            ELSEIF ((AEKIN.GE.AEBINN(47)).AND.(AEKIN.LE.AEBINN(NBIN1N)))
+     &                                                              THEN
+               XBIN = (AEKIN-AEBINN(47))/(AEBINN(NBIN1N)-AEBINN(47))
+     &                *DBLE(NBIN1N-47)+47.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINN(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINN(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1N) THEN
+                  FLUSCW = RT74N(NBIN1N)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINN(IBINLO))/
+     &                    (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                    (ART74N(IBINHI)-ART74N(IBINLO))+ART74N(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ELSE
+               IBINLO = 1
+               IBINHI = 47
+   20          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 21
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEBINN(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 20
+   21          CONTINUE
+               FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                  (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                  (ART74N(IBINHI)-ART74N(IBINLO))+ART74N(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ELSEIF (IPART.EQ.2) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74P(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AE74P(NBIN1P)) THEN
+               FLUSCW = RT74P(NBIN1P)
+            ELSE
+               XBIN = (AEKIN-AE74P(1))/(AE74P(NBIN1P)-AE74P(1))
+     &                *DBLE(NBIN1P-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74P(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74P(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1P) THEN
+                  FLUSCW = RT74P(NBIN1P)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74P(IBINLO))/
+     &                    (AE74P(IBINHI)-AE74P(IBINLO))*
+     &                    (ART74P(IBINHI)-ART74P(IBINLO))+ART74P(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.3) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = RT74I(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = RT74I(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (ART74I(IBINHI)-ART74I(IBINLO))+ART74I(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.4) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = RT74J(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = RT74J(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (ART74J(IBINHI)-ART74J(IBINLO))+ART74J(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.7) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74G(1)) THEN
+               FLUSCW = RT74G(1)
+            ELSEIF (AEKIN.GT.AE74G(NBIN1G)) THEN
+               FLUSCW = RT74G(NBIN1G)
+            ELSE
+               XBIN = (AEKIN-AE74G(1))/(AE74G(NBIN1G)-AE74G(1))
+     &                *DBLE(NBIN1G-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74G(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74G(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1G) THEN
+                  FLUSCW = RT74G(NBIN1G)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74G(IBINLO))/
+     &                    (AE74G(IBINHI)-AE74G(IBINLO))*
+     &                    (ART74G(IBINHI)-ART74G(IBINLO))+ART74G(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.8) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74E(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AE74E(NBIN1E)) THEN
+               FLUSCW = RT74E(NBIN1E)
+            ELSE
+               XBIN = (AEKIN-AE74E(1))/(AE74E(NBIN1E)-AE74E(1))
+     &                *DBLE(NBIN1E-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74E(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74E(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1E) THEN
+                  FLUSCW = RT74E(NBIN1E)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74E(IBINLO))/
+     &                    (AE74E(IBINHI)-AE74E(IBINLO))*
+     &                    (ART74E(IBINHI)-ART74E(IBINLO))+ART74E(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ENDIF
+*
+*
+*  Effective dose (ICRP radiation weighting factors Wr)
+*   Worst possible geometry for the irradiation
+      ELSEIF ((CSET(1:5).EQ.'EWT74').OR.(CSET(1:5).EQ.'ewt74')
+     &                                        .OR.(ITEST.EQ.3)) THEN
+         IF (LFIRST(3).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1000)
+            WRITE(LUNOUT,1002)
+            WRITE(LUNOUT,1006)
+            LFIRST(3) = .FALSE.
+         ENDIF
+         IF (IPART.EQ.1) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINN(1)) THEN
+               FLUSCW = WT74N(1)
+            ELSEIF (AEKIN.GT.AEBINN(NBIN1N)) THEN
+               FLUSCW = WT74N(NBIN1N)
+            ELSEIF ((AEKIN.GE.AEBINN(47)).AND.(AEKIN.LE.AEBINN(NBIN1N)))
+     &                                                              THEN
+               XBIN = (AEKIN-AEBINN(47))/(AEBINN(NBIN1N)-AEBINN(47))
+     &                *DBLE(NBIN1N-47)+47.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINN(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINN(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1N) THEN
+                  FLUSCW = WT74N(NBIN1N)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINN(IBINLO))/
+     &                    (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                    (AWT74N(IBINHI)-AWT74N(IBINLO))+AWT74N(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ELSE
+               IBINLO = 1
+               IBINHI = 47
+   30          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 31
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEBINN(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 30
+   31          CONTINUE
+               FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                  (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                  (AWT74N(IBINHI)-AWT74N(IBINLO))+AWT74N(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ELSEIF (IPART.EQ.2) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74P(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AE74P(NBIN1P)) THEN
+               FLUSCW = WT74P(NBIN1P)
+            ELSE
+               XBIN = (AEKIN-AE74P(1))/(AE74P(NBIN1P)-AE74P(1))
+     &                *DBLE(NBIN1P-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74P(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74P(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1P) THEN
+                  FLUSCW = WT74P(NBIN1P)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74P(IBINLO))/
+     &                    (AE74P(IBINHI)-AE74P(IBINLO))*
+     &                    (AWT74P(IBINHI)-AWT74P(IBINLO))+AWT74P(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.3) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = WT74I(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = WT74I(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AWT74I(IBINHI)-AWT74I(IBINLO))+AWT74I(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.4) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = WT74J(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = WT74J(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AWT74J(IBINHI)-AWT74J(IBINLO))+AWT74J(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.7) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74G(1)) THEN
+               FLUSCW = WT74G(1)
+            ELSEIF (AEKIN.GT.AE74G(NBIN1G)) THEN
+               FLUSCW = WT74G(NBIN1G)
+            ELSE
+               XBIN = (AEKIN-AE74G(1))/(AE74G(NBIN1G)-AE74G(1))
+     &                *DBLE(NBIN1G-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74G(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74G(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1G) THEN
+                  FLUSCW = WT74G(NBIN1G)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74G(IBINLO))/
+     &                    (AE74G(IBINHI)-AE74G(IBINLO))*
+     &                    (AWT74G(IBINHI)-AWT74G(IBINLO))+AWT74G(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.8) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74E(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AE74E(NBIN1E)) THEN
+               FLUSCW = WT74E(NBIN1E)
+            ELSE
+               XBIN = (AEKIN-AE74E(1))/(AE74E(NBIN1E)-AE74E(1))
+     &                *DBLE(NBIN1E-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74E(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74E(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1E) THEN
+                  FLUSCW = WT74E(NBIN1E)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74E(IBINLO))/
+     &                    (AE74E(IBINHI)-AE74E(IBINLO))*
+     &                    (AWT74E(IBINHI)-AWT74E(IBINLO))+AWT74E(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ENDIF
+*
+*  Effective dose (Pelliccioni radiation weighting factors Wr)
+*   Anterior-Posterior irradiation
+      ELSEIF ((CSET(1:5).EQ.'EAPMP').OR.(CSET(1:5).EQ.'eapmp')
+     &                                        .OR.(ITEST.EQ.4)) THEN
+         IF (LFIRST(4).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1000)
+            WRITE(LUNOUT,1003)
+            WRITE(LUNOUT,1004)
+            LFIRST(4) = .FALSE.
+         ENDIF
+         IF (IPART.EQ.1) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINN(1)) THEN
+               FLUSCW = APPLN(1)
+            ELSEIF (AEKIN.GT.AEBINN(NBIN1N)) THEN
+               FLUSCW = APPLN(NBIN1N)
+            ELSEIF ((AEKIN.GE.AEBINN(47)).AND.(AEKIN.LE.AEBINN(NBIN1N)))
+     &                                                              THEN
+               XBIN = (AEKIN-AEBINN(47))/(AEBINN(NBIN1N)-AEBINN(47))
+     &                *DBLE(NBIN1N-47)+47.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINN(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINN(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1N) THEN
+                  FLUSCW = APPLN(NBIN1N)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINN(IBINLO))/
+     &                    (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                    (AAPPLN(IBINHI)-AAPPLN(IBINLO))+AAPPLN(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ELSE
+               IBINLO = 1
+               IBINHI = 47
+   40          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 41
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEBINN(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 40
+   41          CONTINUE
+               FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                  (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                  (AAPPLN(IBINHI)-AAPPLN(IBINLO))+AAPPLN(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ELSEIF (IPART.EQ.2) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEPLP(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEPLP(NBIN1P)) THEN
+               FLUSCW = APPLP(NBIN1P)
+            ELSE
+               XBIN = (AEKIN-AEPLP(1))/(AEPLP(NBIN1P)-AEPLP(1))
+     &                *DBLE(NBIN1P-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEPLP(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEPLP(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1P) THEN
+                  FLUSCW = APPLP(NBIN1P)
+               ELSE
+                  FLUSCW =(        AEKIN-AEPLP(IBINLO))/
+     &                    (AEPLP(IBINHI)-AEPLP(IBINLO))*
+     &                    (AAPPLP(IBINHI)-AAPPLP(IBINLO))+AAPPLP(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.3) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = APPLI(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = APPLI(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AAPPLI(IBINHI)-AAPPLI(IBINLO))+AAPPLI(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.4) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = APPLJ(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = APPLJ(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AAPPLJ(IBINHI)-AAPPLJ(IBINLO))+AAPPLJ(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.5) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINM(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINM(NBIN1M)) THEN
+               FLUSCW = APPLM(NBIN1M)
+            ELSE
+               XBIN = (AEKIN-AEBINM(1))/(AEBINM(NBIN1M)-AEBINM(1))
+     &                *DBLE(NBIN1M-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINM(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINM(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1M) THEN
+                  FLUSCW = APPLM(NBIN1M)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINM(IBINLO))/
+     &                    (AEBINM(IBINHI)-AEBINM(IBINLO))*
+     &                    (AAPPLM(IBINHI)-AAPPLM(IBINLO))+AAPPLM(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ENDIF
+*
+*
+*  Effective dose (Pelliccioni radiation weighting factors Wr)
+*   Rotational irradiation geometry
+      ELSEIF ((CSET(1:5).EQ.'ERTMP').OR.(CSET(1:5).EQ.'ertmp')
+     &                                        .OR.(ITEST.EQ.5)) THEN
+         IF (LFIRST(5).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1000)
+            WRITE(LUNOUT,1003)
+            WRITE(LUNOUT,1005)
+            LFIRST(5) = .FALSE.
+         ENDIF
+         IF (IPART.EQ.1) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINN(1)) THEN
+               FLUSCW = RTPLN(1)
+            ELSEIF (AEKIN.GT.AEBINN(NBIN1N)) THEN
+               FLUSCW = RTPLN(NBIN1N)
+            ELSEIF ((AEKIN.GE.AEBINN(47)).AND.(AEKIN.LE.AEBINN(NBIN1N)))
+     &                                                              THEN
+               XBIN = (AEKIN-AEBINN(47))/(AEBINN(NBIN1N)-AEBINN(47))
+     &                *DBLE(NBIN1N-47)+47.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINN(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINN(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1N) THEN
+                  FLUSCW = RTPLN(NBIN1N)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINN(IBINLO))/
+     &                    (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                    (ARTPLN(IBINHI)-ARTPLN(IBINLO))+ARTPLN(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ELSE
+               IBINLO = 1
+               IBINHI = 47
+   50          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 51
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEBINN(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 50
+   51          CONTINUE
+               FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                  (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                  (ARTPLN(IBINHI)-ARTPLN(IBINLO))+ARTPLN(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ELSEIF (IPART.EQ.2) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEPLP(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEPLP(NBIN1P)) THEN
+               FLUSCW = RTPLP(NBIN1P)
+            ELSE
+               XBIN = (AEKIN-AEPLP(1))/(AEPLP(NBIN1P)-AEPLP(1))
+     &                *DBLE(NBIN1P-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEPLP(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEPLP(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1P) THEN
+                  FLUSCW = RTPLP(NBIN1P)
+               ELSE
+                  FLUSCW =(        AEKIN-AEPLP(IBINLO))/
+     &                    (AEPLP(IBINHI)-AEPLP(IBINLO))*
+     &                    (ARTPLP(IBINHI)-ARTPLP(IBINLO))+ARTPLP(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.3) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = RTPLI(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = RTPLI(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (ARTPLI(IBINHI)-ARTPLI(IBINLO))+ARTPLI(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.4) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = RTPLJ(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = RTPLJ(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (ARTPLJ(IBINHI)-ARTPLJ(IBINLO))+ARTPLJ(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.5) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINM(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINM(NBIN1M)) THEN
+               FLUSCW = RTPLM(NBIN1M)
+            ELSE
+               XBIN = (AEKIN-AEBINM(1))/(AEBINM(NBIN1M)-AEBINM(1))
+     &                *DBLE(NBIN1M-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINM(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINM(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1M) THEN
+                  FLUSCW = RTPLM(NBIN1M)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINM(IBINLO))/
+     &                    (AEBINM(IBINHI)-AEBINM(IBINLO))*
+     &                    (ARTPLM(IBINHI)-ARTPLM(IBINLO))+ARTPLM(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ENDIF
+*
+*
+*  Effective dose (Pelliccioni radiation weighting factors Wr)
+*   Worst possible geometry for the irradiation
+      ELSEIF ((CSET(1:5).EQ.'EWTMP').OR.(CSET(1:5).EQ.'ewtmp')
+     &                                        .OR.(ITEST.EQ.6)) THEN
+         IF (LFIRST(6).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1000)
+            WRITE(LUNOUT,1003)
+            WRITE(LUNOUT,1006)
+            LFIRST(6) = .FALSE.
+         ENDIF
+         IF (IPART.EQ.1) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINN(1)) THEN
+               FLUSCW = WTPLN(1)
+            ELSEIF (AEKIN.GT.AEBINN(NBIN1N)) THEN
+               FLUSCW = WTPLN(NBIN1N)
+            ELSEIF ((AEKIN.GE.AEBINN(47)).AND.(AEKIN.LE.AEBINN(NBIN1N)))
+     &                                                              THEN
+               XBIN = (AEKIN-AEBINN(47))/(AEBINN(NBIN1N)-AEBINN(47))
+     &                *DBLE(NBIN1N-47)+47.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINN(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINN(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1N) THEN
+                  FLUSCW = WTPLN(NBIN1N)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINN(IBINLO))/
+     &                    (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                    (AWTPLN(IBINHI)-AWTPLN(IBINLO))+AWTPLN(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ELSE
+               IBINLO = 1
+               IBINHI = 47
+   60          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 61
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEBINN(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 60
+   61          CONTINUE
+               FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                  (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                  (AWTPLN(IBINHI)-AWTPLN(IBINLO))+AWTPLN(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ELSEIF (IPART.EQ.2) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEPLP(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEPLP(NBIN1P)) THEN
+               FLUSCW = WTPLP(NBIN1P)
+            ELSE
+               XBIN = (AEKIN-AEPLP(1))/(AEPLP(NBIN1P)-AEPLP(1))
+     &                *DBLE(NBIN1P-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEPLP(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEPLP(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1P) THEN
+                  FLUSCW = WTPLP(NBIN1P)
+               ELSE
+                  FLUSCW =(        AEKIN-AEPLP(IBINLO))/
+     &                    (AEPLP(IBINHI)-AEPLP(IBINLO))*
+     &                    (AWTPLP(IBINHI)-AWTPLP(IBINLO))+AWTPLP(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.3) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = WTPLI(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = WTPLI(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AWTPLI(IBINHI)-AWTPLI(IBINLO))+AWTPLI(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.4) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = WTPLJ(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = WTPLJ(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AWTPLJ(IBINHI)-AWTPLJ(IBINLO))+AWTPLJ(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.5) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINM(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINM(NBIN1M)) THEN
+               FLUSCW = WTPLM(NBIN1M)
+            ELSE
+               XBIN = (AEKIN-AEBINM(1))/(AEBINM(NBIN1M)-AEBINM(1))
+     &                *DBLE(NBIN1M-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINM(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINM(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1M) THEN
+                  FLUSCW = WTPLM(NBIN1M)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINM(IBINLO))/
+     &                    (AEBINM(IBINHI)-AEBINM(IBINLO))*
+     &                    (AWTPLM(IBINHI)-AWTPLM(IBINLO))+AWTPLM(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ENDIF
+*
+*
+*  Ambient dose equivalent (from ICRP74 and Pelliccioni data)
+      ELSEIF ((CSET(1:5).EQ.'AMB74').OR.(CSET(1:5).EQ.'amb74')
+     &                                        .OR.(ITEST.EQ.7)) THEN
+         IF (LFIRST(7).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1001)
+            WRITE(LUNOUT,1008)
+            LFIRST(7) = .FALSE.
+         ENDIF
+         IF (IPART.EQ.1) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINN(1)) THEN
+               FLUSCW = AMBN(1)
+            ELSEIF (AEKIN.GT.AEBINN(NBIN1N)) THEN
+               FLUSCW = AMBN(NBIN1N)
+            ELSEIF ((AEKIN.GE.AEBINN(47)).AND.(AEKIN.LE.AEBINN(NBIN1N)))
+     &                                                              THEN
+               XBIN = (AEKIN-AEBINN(47))/(AEBINN(NBIN1N)-AEBINN(47))
+     &                *DBLE(NBIN1N-47)+47.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINN(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINN(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1N) THEN
+                  FLUSCW = AMBN(NBIN1N)
+               ELSE
+                  FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                     (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                     (AAMBN(IBINHI)-AAMBN(IBINLO))+AAMBN(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ELSE
+               IBINLO = 1
+               IBINHI = 47
+   70          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 71
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEBINN(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 70
+   71          CONTINUE
+               FLUSCW = (         AEKIN-AEBINN(IBINLO))/
+     &                  (AEBINN(IBINHI)-AEBINN(IBINLO))*
+     &                  (AAMBN(IBINHI)-AAMBN(IBINLO))+AAMBN(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ELSEIF (IPART.EQ.2) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEAMBP(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEAMBP(NBIN2P)) THEN
+               FLUSCW = AMBP(NBIN2P)
+            ELSE
+               XBIN = (AEKIN-AEAMBP(1))/(AEAMBP(NBIN2P)-AEAMBP(1))
+     &                *DBLE(NBIN2P-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEAMBP(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEAMBP(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN2P) THEN
+                  FLUSCW = AMBP(NBIN2P)
+               ELSE
+                  FLUSCW = (         AEKIN-AEAMBP(IBINLO))/
+     &                     (AEAMBP(IBINHI)-AEAMBP(IBINLO))*
+     &                     (AAMBP(IBINHI)-AAMBP(IBINLO))+AAMBP(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.3) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = AMBI(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = AMBI(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AAMBI(IBINHI)-AAMBI(IBINLO))+AAMBI(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.4) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINI(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINI(NBIN1I)) THEN
+               FLUSCW = AMBJ(NBIN1I)
+            ELSE
+               XBIN = (AEKIN-AEBINI(1))/(AEBINI(NBIN1I)-AEBINI(1))
+     &                *DBLE(NBIN1I-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINI(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINI(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1I) THEN
+                  FLUSCW = AMBJ(NBIN1I)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINI(IBINLO))/
+     &                    (AEBINI(IBINHI)-AEBINI(IBINLO))*
+     &                    (AAMBJ(IBINHI)-AAMBJ(IBINLO))+AAMBJ(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.5) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEBINM(1)) THEN
+               RETURN
+            ELSEIF (AEKIN.GT.AEBINM(NBIN1M)) THEN
+               FLUSCW = AMBM(NBIN1M)
+            ELSE
+               XBIN = (AEKIN-AEBINM(1))/(AEBINM(NBIN1M)-AEBINM(1))
+     &                *DBLE(NBIN1M-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEBINM(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEBINM(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1M) THEN
+                  FLUSCW = AMBM(NBIN1M)
+               ELSE
+                  FLUSCW =(         AEKIN-AEBINM(IBINLO))/
+     &                    (AEBINM(IBINHI)-AEBINM(IBINLO))*
+     &                    (AAMBM(IBINHI)-AAMBM(IBINLO))+AAMBM(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.7) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AE74G(1)) THEN
+               FLUSCW = AMBG(1)
+            ELSEIF (AEKIN.GT.AE74G(NBIN1G)) THEN
+               FLUSCW = AMBG(NBIN1G)
+            ELSE
+               XBIN = (AEKIN-AE74G(1))/(AE74G(NBIN1G)-AE74G(1))
+     &                *DBLE(NBIN1G-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AE74G(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AE74G(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN1G) THEN
+                  FLUSCW = AMBG(NBIN1G)
+               ELSE
+                  FLUSCW =(        AEKIN-AE74G(IBINLO))/
+     &                    (AE74G(IBINHI)-AE74G(IBINLO))*
+     &                    (AAMBG(IBINHI)-AAMBG(IBINLO))+AAMBG(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ELSEIF (IPART.EQ.8) THEN
+            AEKIN = LOG10(EKIN)
+            IF (AEKIN.LT.AEAMBE(1)) THEN
+               FLUSCW = AMBE(1)
+            ELSEIF (AEKIN.GT.AEAMBE(NBIN2E)) THEN
+               FLUSCW = AMBE(NBIN2E)
+            ELSE
+               XBIN = (AEKIN-AEAMBE(1))/(AEAMBE(NBIN2E)-AEAMBE(1))
+     &                *DBLE(NBIN2E-1)+1.0D0
+               IBINLO = INT(XBIN)
+               IBINHI = IBINLO+1
+               IF (AEKIN.LT.AEAMBE(IBINLO)) THEN
+                  IBINLO = IBINLO-1
+                  IBINHI = IBINLO+1
+               ELSEIF (AEKIN.GT.AEAMBE(IBINHI)) THEN
+                  IBINLO = IBINLO+1
+                  IBINHI = IBINLO+1
+               ENDIF
+               IF (IBINHI.GT.NBIN2E) THEN
+                  FLUSCW = AMBE(NBIN2E)
+               ELSE
+                  FLUSCW =(        AEKIN-AEAMBE(IBINLO))/
+     &                    (AEAMBE(IBINHI)-AEAMBE(IBINLO))*
+     &                    (AAMBE(IBINHI)-AAMBE(IBINLO))+AAMBE(IBINLO)
+                  FLUSCW = 10.0D0**FLUSCW
+               ENDIF
+            ENDIF
+         ENDIF
+*
+*
+*  Ambient dose equivalent (old GRS conversion factors)
+      ELSEIF ((CSET(1:5).EQ.'AMBGS').OR.(CSET(1:5).EQ.'ambgs')
+     &                                        .OR.(ITEST.EQ.8)) THEN
+         IF (LFIRST(8).AND.(ITEST.EQ.0)) THEN
+            WRITE(LUNOUT,1001)
+            WRITE(LUNOUT,1007)
+            LFIRST(8) = .FALSE.
+         ENDIF
+         AEKIN  = LOG10(EKIN)
+         IF (IPART.EQ.1) THEN
+            XDUM   = (11.0D0+AEKIN)*10.0D0
+            KENERG = INT(XDUM)+1
+            IF ((KENERG.LT.1).OR.(KENERG.GT.NBIN2N)) RETURN
+            FLUSCW = H10N(KENERG)
+         ELSEIF (IPART.EQ.2) THEN
+            XDUM   = (11.0D0+AEKIN)*10.0D0
+            KENERG = INT(XDUM)+1
+            IF ((KENERG.LT.1).OR.(KENERG.GT.NBIN2N)) RETURN
+            FLUSCW = H10PR(KENERG)
+         ELSEIF ((IPART.EQ.3).OR.(IPART.EQ.4)) THEN
+            XDUM   = (11.0D0+AEKIN)*10.0D0
+            KENERG = INT(XDUM)+1
+            IF ((KENERG.LT.1).OR.(KENERG.GT.NBIN2N)) RETURN
+            FLUSCW = H10PI(KENERG)
+         ELSEIF (IPART.EQ.5) THEN
+            IF (AEKIN.LT.AEAMBM(1)) THEN
+               FLUSCW = H10MU(1)
+            ELSEIF (AEKIN.GT.AEAMBM(NBIN2M)) THEN
+               FLUSCW = H10MU(NBIN2M)
+            ELSE
+               IBINLO = 1
+               IBINHI = NBIN2M
+   80          CONTINUE
+               IF ((IBINHI-IBINLO).EQ.1) GOTO 81
+               KK = (IBINHI+IBINLO)/2
+               IF (AEKIN.LE.AEAMBM(KK)) THEN
+                  IBINHI = KK
+               ELSE
+                  IBINLO = KK
+               ENDIF
+               GOTO 80
+   81          CONTINUE
+               FLUSCW = (         AEKIN-AEAMBM(IBINLO))/
+     &                  (AEAMBM(IBINHI)-AEAMBM(IBINLO))*
+     &                  (AH10MU(IBINHI)-AH10MU(IBINLO))+AH10MU(IBINLO)
+               FLUSCW = 10.0D0**FLUSCW
+            ENDIF
+         ENDIF
+      ELSE
+* this point should never be reached since the check for a valid
+* sdum has already been done above
+         FLUSCW = 0.0D0
+      ENDIF
+
+      LSCZER = .FALSE.
+      RETURN
+
+ 1000 FORMAT(1X,'FLUSCW:  direct conversion of fluence to effective ',
+     &       'dose requested with')
+ 1001 FORMAT(1X,'FLUSCW:  direct conversion of fluence to ambient ',
+     &       'dose eq. requested with')
+ 1002 FORMAT(12X,'- ICRP radiation weighting factors Wr')
+ 1003 FORMAT(12X,'- Pelliccioni radiation weighting factors Wr')
+ 1004 FORMAT(12X,'- anterior-posterior irradiation')
+ 1005 FORMAT(12X,'- rotational irradiation geometry')
+ 1006 FORMAT(12X,'- worst possible geometry for the irradiation')
+ 1007 FORMAT(12X,'- GRS conversion factors')
+ 1008 FORMAT(12X,'- ICRP74 and Pelliccioni conversion factors')
+
+      END
index 04fe165..8e44e0f 100644 (file)
@@ -3,7 +3,7 @@ SRCS:=  TFluka.cxx TFlukaMCGeometry.cxx TFlukaCerenkov.cxx \
        TFlukaConfigOption.cxx TFlukaScoringOption.cxx\
         magfld.cxx source.cxx mgdraw.cxx bxdraw.cxx eedraw.cxx \
        endraw.cxx sodraw.cxx usdraw.cxx stupre.cxx stuprf.cxx \
-       abscff.cxx dffcff.cxx queffc.cxx rflctv.cxx rfrndx.cxx
+       abscff.cxx dffcff.cxx queffc.cxx rflctv.cxx rfrndx.cxx 
 
 # Headers
 HDRS:= TFluka.h TFlukaMCGeometry.h TFlukaCerenkov.h TFlukaConfigOption.h \
@@ -11,6 +11,23 @@ HDRS:= TFluka.h TFlukaMCGeometry.h TFlukaCerenkov.h TFlukaConfigOption.h \
 
 FSRCS:= FLUKA_input.f crnkvp.f
 
+ifeq ($(FLUSCW),1MEVN)
+       FSRCS+=fluscw_1mevn.f
+endif
+
+ifeq ($(FLUSCW),DEQ99C)
+       FSRCS+=fluscw_deq99c.f
+endif
+
+ifeq ($(COMSCW),DEFAULT)
+       SRCS+=comscw.cxx
+endif
+
+ifeq ($(COMSCW),ACTIVITY)
+       FSRCS+=comscw_activity.f
+endif
+
+
 # ROOT Dictionary
 DHDR:= TFlukaLinkDef.h