Re: usdraw & mgdraw.f

From: Ketil Rĝed (ketil.roed@student.uib.no)
Date: Wed Jul 11 2007 - 00:36:31 CEST

  • Next message: Francesco Cerutti: "Re: usdraw & mgdraw.f"

    Dear Vasilis. Thanks for pointing out the obvious! Using natural silicon
    explains why I see both Si-30 and Si-29. I have further tried to
    replace the natural Silicon with the Si-28 isotope by adding the
    following material card:

    * ...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
    MATERIAL 14.0 27.976927 2.33 14.0
    28.0SILICON

    It seems to work fine but can anyone confirm that this is the correct
    method?

    As a next step I would also like to collect possible fission fragments.
    By replacing the silicon in my target with Lead and increasing the
    length from 0.01 cm to 1 cm I ran a simulation to see if any fission
    fragments were produced. Using the RESNUCLE scoring card I got a
    positive result with fragments of Z in the area of ~30-50.
    However the same fragments are not detected by the usdraw entry in the
    mgdraw.f routing. In the FLUKA online manual chapter 5 "PArticle and
    material codes" it is said that fission fragments, when produced, are
    available from the COMMON FHEAVY with the internal code id 7-12.
    When having Silicon as a target I detect particles from FHEAVY with id
    in the range 7-12, but with Lead as a target I actually do not detect
    any particles from the COMMON FHEAVY at all. This is a bit confusing
    since I do see fission fragments with the RESNUCLE card.

    If possible, from which COMMON and/or user routine can I get access to
    the fission fragments?

    Best regards,
    Ketil

    Vasilis Vlachoudis wrote:
    > Dear Ketil,
    >
    > for the moment the information you want is not existing in the RESNUC
    > check the mail in the fluka-list http://www.fluka.org/web_archive/earchive/new-fluka-discuss/1000.html
    >
    > I didn't go through your mgdraw routine to check if it is ok, but I saw in your input you are using natural Silicon with a content of 3% of Si-30 and 4.7% of Si-29.
    >
    > Vasilis
    >
    > -----Original Message-----
    > From: owner-fluka-discuss@mi.infn.it [mailto:owner-fluka-discuss@mi.infn.it] On Behalf Of Ketil Rĝed
    > Sent: Friday, July 06, 2007 02:06
    > To: fluka-discuss@fluka.org
    > Subject: usdraw & mgdraw.f
    >
    > Dear all FLUKA users!
    >
    > I am running a simple example to get familiar with the mgdraw.f routine
    > of FLUKA. I am interested in scoring the inelastic
    > cross section for protons on a silicon target. In addition I would like
    > to score information on the
    > secondary particle production.
    > My geometry is very simple as can be seen in the attahced .inp file; to
    > reduce the probability of multiple
    > scattering I am using a thin (0.01 cm) silicon target.
    >
    > I am using the entry USDRAW in mgdraw.f to score particles produced
    > through inelasting and elastic
    > interaction. Through information available in (TRACKR), (GENSTK),
    > (RESNUC) and (FHEAVY) I can score different types
    > of particle parameters.
    > (TRACKR): TRACKs Recording (properties of the currently transported
    > particle and its path)
    > (GENSTK): properties of each secondary created in a hadronic event
    > (RESNUC): properties of the current residual nucleus
    > (FHEAVY): stack of heavy secondaries created in nuclear evaporation
    >
    > When an interaction takes place I dump information of interest about the
    > primary particle,secondaries,
    > heavy secondaries and the residual nucleus. See my attached mgdraw.f for
    > detailed information.
    > Output is formatted and structured for easy post processing, and an
    > example is given here:
    >
    >
    >
    > Column 1 indicates source of information:
    >
    > 1: primary particle (TRACKR) (+NP & NPHEAV)
    > '1
    > ',NCASE,JTRACK,NPFLKA,ICODE,NP,NPHEAV,ETRACK-AM(JTRACK),XSCO,YSCO,ZSCO,WTRACK
    >
    > 2: secondaries (GENSTK)
    > '2
    > ',NCASE,JTRACK,ip,ICODE,KPART(ip),ZPART,APART,TKI(ip),CXR(ip),CYR(ip),CZR(ip),WEI(ip)
    >
    > 3: residual nucleus (RESNUC)
    > '3 ',NCASE,JTRACK,'1',ICODE,'0',ICRES,IBRES,EKRES,PXRES,PYRES,PZRES,'1.0'
    >
    > 4: heavy secondaries (FHEAVY)
    > '4',NCASE,JTRACK,ip,ICODE,KHEAVY(ip),ICHEAV(KHEAVY(ip)),IBHEAV(KHEAVY(ip)),TKHEAV(ip),CXHEAV(ip),CYHEAV(ip),CZHEAV(ip),WHEAVY(ip)
    >
    >
    > 1 37735 1 0 100 1 0 0.099993 0.000000 0.000000 0.000882 1.0
    > 2 37735 1 1 100 1 0 0 0.09992 0.08741 -0.10571 0.99055 1.0
    > 3 37735 1 1 100 0 14 28 0.00007 -0.03891 0.04684 0.00437 1.0
    > 0
    > 1 39744 1 0 100 1 0 0.099975 -0.000003 -0.000001 0.002867 1.0
    > 2 39744 1 1 100 1 0 0 0.09997 0.04786 -0.00442 0.99884 1.0
    > 3 39744 1 1 100 0 14 28 0.00001 -0.02183 0.00147 0.00053 1.0
    > 0
    > 1 42027 1 0 101 4 2 0.099872 0.000000 0.000001 0.006844 1.0
    > 2 42027 1 1 101 1 0 0 0.03241 0.81883 0.06937 0.56982 1.0
    > 2 42027 1 2 101 1 0 0 0.01079 -0.49355 -0.86955 0.01712 1.0
    > 2 42027 1 3 101 7 0 0 0.00906 -0.95249 0.29478 0.07666 1.0
    > 2 42027 1 4 101 7 0 0 0.00439 0.51260 0.49615 -0.70077 1.0
    > 3 42027 1 1 101 0 0 0 0.00000 0.00000 0.00000 0.00000 1.0
    > 4 42027 1 1 101 7 6 12 0.01188 -0.12700 0.67350 0.72819 1.0
    > 4 42027 1 2 101 8 7 15 0.00247 -0.23353 -0.93209 -0.27690 1.0
    >
    > Different information is given for the primaries compared to the
    > secondaries
    > The main information I want is the particle type,
    > energy, direction, and type of interaction. For the secondaries and
    > heavy secondaries
    > GENSTK and FHEAVY contains information on direction, however I can not
    > find the same information
    > in RESNUC. Thus, for the moment I give the momentum components instead.
    > Can anyone tell me where to find the direction of the residual nucleus?
    > I would also like if someone can check if my usdraw/mgdraw.f routine and
    > my settings in the inp file
    > is correct with regards to my task; scoring the inelastic cross section
    > and all particles produced
    > in the interactions (at the interaction point).
    > The reason for the last question is that in a few cases I see something
    > I don't understand for the elastic
    > interactions. The two blocks of output data below are taken from the 2nd
    > of 5 runs with
    > a 100 MeV proton beam (100000 primaries per run). See attached file
    > "proton100mev002_secondary.log" for source (produced by mgdraw.f).
    >
    > For ncase 57831 and 60628 I have problems balancing numbers of particles
    > before and after interaction.
    > How can I get a Silicon with nuclear mass numbers of 29 & 30 from a
    > proton on Si-28 elastic interaction?
    >
    > 1 57831 1 0 100 1 0 0.099980 -0.000001 0.000000 0.001614 1.0
    > 2 57831 1 1 100 1 0 0 0.09998 -0.01587 0.02210 0.99963 1.0
    > 3 57831 1 1 100 0 14 30 0.00000 0.00676 -0.00985 0.00017 1.0
    >
    > 1 60628 1 0 100 1 0 0.099947 0.000000 0.000001 0.002527 1.0
    > 2 60628 1 1 100 1 0 0 0.09820 -0.27552 0.58946 0.75936 1.0
    > 3 60628 1 1 100 0 14 29 0.00174 0.12146 -0.25924 0.11006 1.0
    >
    > Am I using the mgdraw.f routine in an incorrect way? Are any of my
    > three settings related to physics
    > incorrect? Or is my interpretation of the RESNUC ICRES and IBRES values
    > wrong?
    >
    > I appreciate any corrections or comments.
    > Best regards,
    > Ketil Rĝed
    > PhD student
    > University of Bergen
    >
    >
    >
    >


    *$ CREATE MGDRAW.FOR
    *COPY MGDRAW
    * *
    *=== mgdraw ===========================================================*
    * *
          SUBROUTINE MGDRAW ( ICODE, MREG )

          INCLUDE '(DBLPRC)'
          INCLUDE '(DIMPAR)'
          INCLUDE '(IOUNIT)'
    *
    *----------------------------------------------------------------------*
    * *
    * Copyright (C) 1990-2006 by Alfredo Ferrari *
    * All Rights Reserved. *
    * *
    * *
    * MaGnetic field trajectory DRAWing: actually this entry manages *
    * all trajectory dumping for *
    * drawing *
    * *
    * Created on 01 march 1990 by Alfredo Ferrari *
    * INFN - Milan *
    * Last change 05-may-06 by Alfredo Ferrari *
    * INFN - Milan *
    * *
    *----------------------------------------------------------------------*
    *
          INCLUDE '(CASLIM)'
          INCLUDE '(COMPUT)'
          INCLUDE '(SOURCM)'
          INCLUDE '(FHEAVY)'
          INCLUDE '(FLKSTK)'
          INCLUDE '(GENSTK)'
          INCLUDE '(MGDDCM)'
          INCLUDE '(PAPROP)'
          INCLUDE '(QUEMGD)'
          INCLUDE '(SUMCOU)'
          INCLUDE '(TRACKR)'
          INCLUDE '(RESNUC)'
    *
          DIMENSION DTQUEN ( MXTRCK, MAXQMG )
    *
          CHARACTER*20 FILNAM
          LOGICAL LFCOPE
          SAVE LFCOPE
          DATA LFCOPE / .FALSE. /

          INTEGER ZPART !default Z
          INTEGER APART !default A
          INTEGER WPART !default weight

    *------------------------------------------
    *Convert region name to number
          INTEGER NTARG1
          INTEGER NTARG2
          CHARACTER*8 NAMET1
          CHARACTER*8 NAMET2
          SAVE NTARG1
          SAVE NTARG2

          PARAMETER (NAMET1 = 'TARG1')
          PARAMETER (NAMET2 = 'TARG2')

    * Open files for usdraw
          LOGICAL UDFIRST
          DATA UDFIRST / .TRUE. /
          SAVE UDFIRST
    * Open files for enddraw
          LOGICAL ENDFIRST
          DATA ENDFIRST / .TRUE. /
          SAVE ENDFIRST

          LOGICAL LFIRST
          DATA LFIRST / .TRUE. /
          SAVE LFIRST

          IF ( LFIRST ) THEN

               ZPART = 0
               APART = 0
               WPART = 0
    * +------------------------------------------------------------*
    * |Convert region name to number

               CALL GEON2R(NAMET1, NTARG1,IERR)
               WRITE(LUNOUT,*) 'NTARG1= ', NTARG1
               CALL GEON2R(NAMET2,NTARG2,IERR)
               LFIRST = .FALSE.

          END IF

    *
    *----------------------------------------------------------------------*
    * *
    * Icode = 1: call from Kaskad *
    * Icode = 2: call from Emfsco *
    * Icode = 3: call from Kasneu *
    * Icode = 4: call from Kashea *
    * Icode = 5: call from Kasoph *
    * *
    *----------------------------------------------------------------------*
    * *
    *

    * IF ( .NOT. LFCOPE ) THEN
    * LFCOPE = .TRUE.
    * IF ( KOMPUT .EQ. 2 ) THEN
    * FILNAM = '/'//CFDRAW(1:8)//' DUMP A'
    * ELSE
    * FILNAM = CFDRAW
    * END IF
    * OPEN ( UNIT = IODRAW, FILE = FILNAM, STATUS = 'NEW', FORM =
    * & 'UNFORMATTED' )
    * END IF
    * WRITE (IODRAW) NTRACK, MTRACK, JTRACK, SNGL (ETRACK),
    * & SNGL (WTRACK)
    * WRITE (IODRAW) ( SNGL (XTRACK (I)), SNGL (YTRACK (I)),
    * & SNGL (ZTRACK (I)), I = 0, NTRACK ),
    * & ( SNGL (DTRACK (I)), I = 1, MTRACK ),
    * & SNGL (CTRACK)
    * +-------------------------------------------------------------------*
    * | Quenching is activated
          IF ( LQEMGD ) THEN
             IF ( MTRACK .GT. 0 ) THEN
                RULLL = ZERZER
                CALL QUENMG ( ICODE, MREG, RULLL, DTQUEN )
    * WRITE (IODRAW) ( ( SNGL (DTQUEN (I,JBK)), I = 1, MTRACK ),
    * & JBK = 1, NQEMGD )
             END IF
          END IF
    * | End of quenching
    * +-------------------------------------------------------------------*
          RETURN
    *
    *======================================================================*
    * *
    * Boundary-(X)crossing DRAWing: *
    * *
    * Icode = 1x: call from Kaskad *
    * 19: boundary crossing *
    * Icode = 2x: call from Emfsco *
    * 29: boundary crossing *
    * Icode = 3x: call from Kasneu *
    * 39: boundary crossing *
    * Icode = 4x: call from Kashea *
    * 49: boundary crossing *
    * Icode = 5x: call from Kasoph *
    * 59: boundary crossing *
    * *
    *======================================================================*
    * *
          ENTRY BXDRAW ( ICODE, MREG, NEWREG, XSCO, YSCO, ZSCO )
          IF (DEBUG.EQ.1) THEN
    * WRITE(LUNOUT,*) '************DEBUG***************'
                  WRITE(LUNOUT,*) 'NTARG1= ', NTARG1, ' MREG= ', MREG
                  WRITE(LUNOUT,*) 'NTARG2= ', NTARG2, ' NEWREG= ', NEWREG
    * WRITE(LUNOUT,*) '************DEBUG END***************'
          END IF

           IF(MREG.EQ.NTARG1.AND.NEWREG.EQ.NTARG2) THEN ! select boundary of interest
             IF(JTRACK.EQ.1) THEN ! select proton
                  IF(ETRACK.GT.AM(JTRACK)) THEN ! proton has survived
                      WRITE(41.0,*) ETRACK-AM(JTRACK),CXTRCK,CYRCK,CZTRCK,WTRACK,NCASE !,XSCO,YSCO,ZSCO,
                  ENDIF
              ENDIF
           ENDIF

          IF(MREG.EQ.NTARG1.AND.NEWREG.EQ.NTARG2) THEN
             IF(JTRACK.EQ.8) THEN ! select neutron
                  IF(ETRACK.GT.AM(JTRACK)) THEN
                      WRITE(42.0,*) ETRACK-AM(JTRACK),XSCO,YSCO,ZSCO,NCASE !CXTRCK,CYRCK,CZTRCK,WTRACK,KTRACK,NCASE
                  ENDIF
              ENDIF
          ENDIF

          RETURN
    *
    *======================================================================*
    * *
    * Event End DRAWing: *
    * *
    *======================================================================*
    * *
          ENTRY EEDRAW ( ICODE )
          RETURN
    *
    *======================================================================*
    * *
    * ENergy deposition DRAWing: *
    * *
    * Icode = 1x: call from Kaskad *
    * 10: elastic interaction recoil *
    * 11: inelastic interaction recoil *
    * 12: stopping particle *
    * 13: pseudo-neutron deposition *
    * 14: escape *
    * 15: time kill *
    * Icode = 2x: call from Emfsco *
    * 20: local energy deposition (i.e. photoelectric) *
    * 21: below threshold, iarg=1 *
    * 22: below threshold, iarg=2 *
    * 23: escape *
    * 24: time kill *
    * Icode = 3x: call from Kasneu *
    * 30: target recoil *
    * 31: below threshold *
    * 32: escape *
    * 33: time kill *
    * Icode = 4x: call from Kashea *
    * 40: escape *
    * 41: time kill *
    * 42: delta ray stack overflow *
    * Icode = 5x: call from Kasoph *
    * 50: optical photon absorption *
    * 51: escape *
    * 52: time kill *
    * *
    *======================================================================*
    * *
          ENTRY ENDRAW ( ICODE, MREG, RULL, XSCO, YSCO, ZSCO )
    * IF ( .NOT. LFCOPE ) THEN
    * LFCOPE = .TRUE.
    * IF ( KOMPUT .EQ. 2 ) THEN
    * FILNAM = '/'//CFDRAW(1:8)//' DUMP A'
    * ELSE
    * FILNAM = CFDRAW
    * END IF
    * OPEN ( UNIT = IODRAW, FILE = FILNAM, STATUS = 'NEW', FORM =
    * & 'UNFORMATTED' )
    * END IF
    * WRITE (IODRAW) 0, ICODE, JTRACK, SNGL (ETRACK), SNGL (WTRACK)
    * WRITE (IODRAW) SNGL (XSCO), SNGL (YSCO), SNGL (ZSCO), SNGL (RULL)
    * +-------------------------------------------------------------------*
    * | Quenching is activated : calculate quenching factor
    * | and store quenched energy in DTQUEN(1, jbk)
    * IF ( LQEMGD ) THEN
    * RULLL = RULL
    * CALL QUENMG ( ICODE, MREG, RULLL, DTQUEN )
    * WRITE (IODRAW) ( SNGL (DTQUEN(1, JBK)), JBK = 1, NQEMGD )
    * END IF
    * | end quenching
    * +-------------------------------------------------------------------*

          RETURN
    *
    *======================================================================*
    * *
    * SOurce particle DRAWing: *
    * *
    *======================================================================*
    *
          ENTRY SODRAW
    * IF ( .NOT. LFCOPE ) THEN
    * LFCOPE = .TRUE.
    * IF ( KOMPUT .EQ. 2 ) THEN
    * FILNAM = '/'//CFDRAW(1:8)//' DUMP A'
    * ELSE
    * FILNAM = CFDRAW
    * END IF
    * OPEN ( UNIT = IODRAW, FILE = FILNAM, STATUS = 'NEW', FORM =
    * & 'UNFORMATTED' )
    * END IF
    * WRITE (IODRAW) -NCASE, NPFLKA, NSTMAX, SNGL (TKESUM),
    * & SNGL (WEIPRI)
    * +-------------------------------------------------------------------*
    * | (Radioactive) isotope: it works only for 1 source particle on
    * | the stack for the time being
    * IF ( ILOFLK (NPFLKA) .GE. 100000 .AND. LRADDC (NPFLKA) ) THEN
    * IARES = MOD ( ILOFLK (NPFLKA), 100000 ) / 100
    * IZRES = MOD ( ILOFLK (NPFLKA), 10000000 ) / 100000
    * IISRES = ILOFLK (NPFLKA) / 10000000
    * IONID = ILOFLK (NPFLKA)
    * WRITE (IODRAW) ( IONID,SNGL(-TKEFLK(I)),
    * & SNGL (WTFLK(I)), SNGL (XFLK (I)),
    * & SNGL (YFLK (I)), SNGL (ZFLK (I)),
    * & SNGL (TXFLK(I)), SNGL (TYFLK(I)),
    * & SNGL (TZFLK(I)), I = 1, NPFLKA )
    * |
    * +-------------------------------------------------------------------*
    * | Patch for heavy ions: it works only for 1 source particle on
    * | the stack for the time being
    * ELSE IF ( ABS (ILOFLK (NPFLKA)) .GE. 10000 ) THEN
    * IONID = ILOFLK (NPFLKA)
    * CALL DCDION ( IONID )
    * WRITE (IODRAW) ( IONID,SNGL(TKEFLK(I)+AMNHEA(-IONID)),
    * & SNGL (WTFLK(I)), SNGL (XFLK (I)),
    * & SNGL (YFLK (I)), SNGL (ZFLK (I)),
    * & SNGL (TXFLK(I)), SNGL (TYFLK(I)),
    * & SNGL (TZFLK(I)), I = 1, NPFLKA )
    * |
    * +-------------------------------------------------------------------*
    * | Patch for heavy ions: ???
    * ELSE IF ( ILOFLK (NPFLKA) .LT. -6 ) THEN
    * WRITE (IODRAW) ( IONID,SNGL(TKEFLK(I)+AMNHEA(-ILOFLK(NPFLKA))),
    * & SNGL (WTFLK(I)), SNGL (XFLK (I)),
    * & SNGL (YFLK (I)), SNGL (ZFLK (I)),
    * & SNGL (TXFLK(I)), SNGL (TYFLK(I)),
    * & SNGL (TZFLK(I)), I = 1, NPFLKA )
    * |
    * +-------------------------------------------------------------------*
    * |
    * ELSE
    * WRITE (IODRAW) ( ILOFLK(I), SNGL (TKEFLK(I)+AM(ILOFLK(I))),
    * & SNGL (WTFLK(I)), SNGL (XFLK (I)),
    * & SNGL (YFLK (I)), SNGL (ZFLK (I)),
    * & SNGL (TXFLK(I)), SNGL (TYFLK(I)),
    * & SNGL (TZFLK(I)), I = 1, NPFLKA )
    * END IF
    * |
    * +-------------------------------------------------------------------*
          RETURN
    *
    *======================================================================*
    * *
    * USer dependent DRAWing: *
    * *
    * Icode = 10x: call from Kaskad *
    * 100: elastic interaction secondaries *
    * 101: inelastic interaction secondaries *
    * 102: particle decay secondaries *
    * 103: delta ray generation secondaries *
    * 104: pair production secondaries *
    * 105: bremsstrahlung secondaries *
    * 110: decay products *
    * Icode = 20x: call from Emfsco *
    * 208: bremsstrahlung secondaries *
    * 210: Moller secondaries *
    * 212: Bhabha secondaries *
    * 214: in-flight annihilation secondaries *
    * 215: annihilation at rest secondaries *
    * 217: pair production secondaries *
    * 219: Compton scattering secondaries *
    * 221: photoelectric secondaries *
    * 225: Rayleigh scattering secondaries *
    * Icode = 30x: call from Kasneu *
    * 300: interaction secondaries *
    * Icode = 40x: call from Kashea *
    * 400: delta ray generation secondaries *
    * For all interactions secondaries are put on GENSTK common (kp=1,np) *
    * but for KASHEA delta ray generation where only the secondary elec- *
    * tron is present and stacked on FLKSTK common for kp=npflka *
    * *
    *======================================================================*
    *
          ENTRY USDRAW ( ICODE, MREG, XSCO, YSCO, ZSCO )
    * IF ( .NOT. LFCOPE ) THEN
    * LFCOPE = .TRUE.
    * IF ( KOMPUT .EQ. 2 ) THEN
    * FILNAM = '/'//CFDRAW(1:8)//' DUMP A'
    * ELSE
    * FILNAM = CFDRAW
    * END IF
    * OPEN ( UNIT = IODRAW, FILE = FILNAM, STATUS = 'NEW', FORM =
    * & 'UNFORMATTED' )
    * END IF

           IF (UDFIRST) THEN
    * OPEN(43,FILE='primary.log',STATUS='UNKNOWN')
             OPEN(44,FILE='secondary.log',STATUS='UNKNOWN')
             UDFIRST = .FALSE.
          ENDIF

    * No output by default:

    * |
    * +-------------------------------------------------------------------*
    * |DUMP#1 PRIMARY PARTICLE INFO FROM (TRACK)
    * |
    * |Dump : |DUMPID|NCASE|JTRACK|NPFLKA|ICODE|ETRACK-AM(JTRACK)|XSCO|-
    * | |YSCO|ZSCO|NP|NPHEAVY|WTRACK|

              WRITE( 44.0, '(A2,I5.5,1X,I2,1X,I2,1X,I3,1X,I2,1X,I1,1X,
         &F8.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F3.1,I2,I2)') '1 ',NCASE,JTRACK,
         &NPFLKA,ICODE,NP,NPHEAV,ETRACK-AM(JTRACK),XSCO,YSCO,ZSCO,WTRACK,
         &LTRACK,LFSSSC

    * WRITE( 43.0, * ) '0 ',NCASE,JTRACK,NPFLKA,
    * &ICODE,ETRACK-AM(JTRACK),XSCO,YSCO,ZSCO,NP,NPHEAV,WTRACK

    * WRITE( 43.0, * ) '1 ', NCASE,NPFLKA ,ICODE, JTRACK,WTRACK, NP
    * & ETRACK-AM(JTRACK),
    * |
    * +-------------------------------------------------------------------*
    * |DUMP#2 LOOP OVER SECONDARIES (GENSTK)
    * |For the moment the Z and A are 0. Taken care of in post processing
    * |
    * |* |Dump : |DUMPID|NCASE|JTRACK|ip|ICODE|KPART(ip)|ZPART|APART|-
    * | |TKI(ip)|CXR(ip)|CYR(ip)|CZR(ip)|WEI(ip)|

          do 10 ip = 1, NP
              WRITE( 44.0, '(A2,I5.5,1X,I2,1X,I2,1X,I3,1X,I2,1X,I2,1X,I3,
         &1X,F7.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F3.1)')'2 ',NCASE,JTRACK,
         &ip,ICODE,KPART(ip),ZPART,APART,TKI(ip),CXR(ip),CYR(ip),
         &CZR(ip),WEI(ip)

     10 continue
    * |
    * +-------------------------------------------------------------------*
    * |DUMP#3 RESIDUAL NUCLEUS (RESNUC)
    * |
    * |Position 4: '1' is replacing the ip counter since only 1 residual
    * |nucleus will be produce from RESNUC
    * |Position 6: '0' is replacing KPART and KHEAVY
    * |Could not find a weighting factor in (RESNUC) so last position is
    * |default '1.0'
    * |
    * IF (ICRES.NE.0.and.IBRES.NE.0) THEN
           WRITE( 44.0, '(A2,I5.5,1X,I2,1X,A2,1X,I3,1X,A2,1X,I2,1X,I3,
         &1X,F7.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,A3)')'3 ',NCASE,JTRACK,
         &' 1',ICODE,'0',ICRES,IBRES,EKRES,PXRES,PYRES,PZRES,'1.0'

    * END IF
    * |
    * +-------------------------------------------------------------------*
    * |DUMP#4 LOOP OVER HEAVY SECONDARIES (FHEAVY)
    * |
          do 20 ip = 1, NPHEAV
                WRITE( 44.0, '(A2,I5.5,1X,I2,1X,I2,1X,I3,1X,I2,1X,I2,1X,I3,
         &1X,F7.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F3.1)')'4 ',NCASE,JTRACK,
         &ip,ICODE,KHEAVY(ip),ICHEAV(KHEAVY(ip)),IBHEAV(KHEAVY(ip)),
         &TKHEAV(ip),CXHEAV(ip),CYHEAV(ip),CZHEAV(ip),WHEAVY(ip)

     20 continue

           WRITE(44.0, * ) '0' !output 0 for easy reading

          RETURN
    *=== End of subrutine Mgdraw ==========================================*
          END

    TITLE
    Proton beam
    * FLAIR: Use names
    GLOBAL 1.0 1.0
    * ...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
    DEFAULTS NEW-DEFA
    BEAM -0.1 -0.0 0.0 0.0 0.0 -1.0PROTON
    BEAMPOS 0.0 0.0 -0.5 0.0 0.0
    EVENTYPE 2.0 EVAP
    PHYSICS 3.0 EVAPORAT
    PHYSICS 1.0 COALESCE
    GEOBEGIN COMBNAME
        0 0 Cylindrical Target
    * *AAA*IIII_________+_________+_________+_________+_________+_________+
    SPH BLK 0.0 0.0 0.0 10000.0
    * vacuum box
    RPP VOI -1000.0 1000.0 -1000.0 1000.0 -1000.0 1000.0
    * target
    ZCC TARG 0.0 0.0 10.0
    * planes limiting the target
    XYP START 0.0
    XYP END 1.0
    YZP TOP 5.0
    YZP BOTTOM -5.0
    XZP LEFT -5.0
    XZP RIGHT 5.0
    * Dummy region before target (for boundary scoring)
    XYP P1 -0.1
    * Dummy region after target (for boundary scoring)
    XYP P2 1.1
    END
    * Regions
    * _AAA.....AA.....AA.....AA.....AA.....AA.....AA.....AA.....AA.....AA.....
    * Black Hole
    BLKHOLE 5 +BLK -VOI
    * Dummy
    DUMMY1 5 +TARG -P1 +START -LEFT +RIGHT -BOTTOM +TOP
    * Target1
    TARG1 5 +TARG -START +END -LEFT +RIGHT -BOTTOM +TOP
    * Target2
    TARG2 5 +TARG +P2 -END -LEFT +RIGHT -BOTTOM +TOP
    * Vac
    VAC 5 +VOI -( +TARG -P1 +P2 -LEFT +RIGHT -BOTTOM +TOP )
    END
    * AAAAAAAxx_________+_________+_________+_________+_________+_________+
    GEOEND
    * ...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
    ASSIGNMA BLCKHOLE BLKHOLE
    MATERIAL 14.0 27.976927 2.33 14.0 28.0SILICON
    ASSIGNMA VACUUM DUMMY1
    ASSIGNMA LEAD TARG1
    ASSIGNMA VACUUM TARG2
    ASSIGNMA VACUUM VAC
    PART-THR -0.0001 PROTON PROTON 0.0
    USERDUMP 100.0 37.0 0.0 1.0
    #if 0
    USRYIELD 114.0 PROTON -39.0 -1.0 -2.0 1.0angle
    USRYIELD 3.141592 0.0 600.0 0.1 0.0 1403.0&
    #endif
    RESNUCLE 3.0 -26.0 TARG1 100.0Resnuclei
    START 100000.0 0.0
    OPEN 41.0 NEW
    bdx_proton4
    OPEN 42.0 NEW
    bdx_neutron4
    #if 0
    OPEN 43.0 NEW
    primary
    #endif
    #if 0
    OPEN -44.0 NEW
    secondary_bin
    #endif
    #if 0
    OPEN 45.0 NEW
    nucleus
    #endif
    #if 0
    OPEN 46.0 NEW
    heavy
    #endif
    #if 0
    OPEN 47.0 NEW
    summary
    #endif
    #if 0
    OPEN 48.0 NEW
    mgdraw_call
    #endif
    RANDOMIZ 1.0
    STOP


  • Next message: Francesco Cerutti: "Re: usdraw & mgdraw.f"

    This archive was generated by hypermail 2.1.6 : Wed Jul 11 2007 - 09:16:51 CEST