record secondary part. properties

From: Jean-Eric Campagne (campagne@lal.in2p3.fr)
Date: Thu Jun 30 2005 - 11:07:43 CEST

  • Next message: Alberto Fasso': "torus"

    Hi everybody

    I am a FLUKA novice and I would like to do the following things:
    1) define a Beryllium target Dx:160mm, Dy=2mm,Dz=800mm
    2) shoot proton of 400GeV/c in it
    3) catch only particles going out this target and store the following
    caracteristics:
            a) event number
            b) PDG Code of the particle
            c) x,y,z at the exit of the target
            d) px,py,pz,Energy at the exit of the target
            e) x_p,y_p,z_p of the production vertex
            f) px_p,py_p,pz_p,E_p at the production vertex
            g) weigth of the particle
    4) store the informations in some ways (ASCII file may be sufficient).

    Along this program I have partially succeeded, and for instance I do not
    manage to get the variables defined at production vertex for only the
    particle exiting the target.

    Below I give you my modified fluscw.f and the cible.inp data cards. May be
    someone can spend some times to help me...

    Jean-Eric

    --------------------------------------- FLUSCW.F ---------------------------
          double precision FUNCTION FLUSCW(IJ,PLA,TXX,TYY,TZZ,WEE,XX,YY,ZZ,
         + NREG,IOLREG,LLO,ICALL)

    ************************************************************
    c
    c Write in unit 25 the particles exiting the target.
    c Unit 25 will be the input file of the collector (horn)
    c simulation
    c
    c************************************************************

          include '(IOUNIT)'
          include '(DBLPRC)'
          include '(DIMPAR)'
          include '(TRACKR)'

          double precision uPx, uPy, uPz

          integer EvtCount
          save EvtCount
          data EvtCount /0/

          LOGICAL LFIRST
          SAVE LFIRST
          DATA LFIRST /.true./
    * return message from first call
          if(LFIRST)then
             OPEN(UNIT=25, FILE='input.dat',STATUS='NEW')
             write(LUNOUT,*)'FLUSCW called'
             LFIRST = .false.
          endif

          if(ij.eq.1.and.IOLREG.eq.2.0.and.NREG.eq.3.0.and.
         + ZZ.lt.1e-6) then
    c A proton enters in the target: new event.
             EvtCount = EvtCount +1
          endif

          if(IOLREG.eq.3.0.and.NREG.eq.2.0) then

    c compute momentum in the 3 dirs
             uPx = Ptrack*TXX
             uPy = Ptrack*TYY
             uPz = Ptrack*TZZ

             write(25,200)EvtCount,IJ, XX, YY, ZZ, uPx, uPy,
         + uPz,Etrack,WEE
          endif

     200 format(I8,I3,F10.5,F10.5,F10.5,E14.6,E14.6,E14.6,F8.1,
         + F8.1,E12.4)

          FLUSCW = 1.0

          END
    ---------------------------------------- CIBLE.INP ----------------------
    TITLE
      Proton beam interaction in a beryllium target
    DEFAULTS NEW-DEFA
    *23456789 123456789 123456789 123456789 123456789 123456789 123456789
    123456789
    *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
    BEAM -400.0 PROTON
    BEAMPOS 0.0 0.0 -10.0
    GEOBEGIN COMBINAT
                                    target
    *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
      SPH 1 0.0 0.0 0.0 150.0
      SPH 2 0.0 0.0 0.0 140.0
      RPP 3 -8.0 8.0 -0.1 0.1 0.0 80.0
      END
    * black hole
        1 5 1 -2
    * vacuum
        2 5 2 -3
    * target
        3 5 3
      END
    GEOEND
    *23456789 123456789 123456789 123456789 123456789 123456789 123456789
    123456789
    *MATERIAL 80.0 200.59 13.5460 16.0 MERCURY
    *
    * External Black Hole
    ASSIGNMAT 1.0 1.0
    * Vacuum
    ASSIGNMAT 2.0 2.0
    * target (Standard Beryllium)
    ASSIGNMAT 5.0 3.0
    *
    *23456789 123456789 123456789 123456789 123456789 123456789 123456789
    123456789
    *
    EMF
    EMFCUT -0.0002 -0.0002 1.0 3.0
    STEPSIZE 0.0005 0.01 1.0 3.0
    ****SCORE 208.0 211.0
    OUTLEVEL 1.0 7.0
    * **** Scoring ****
    EXTRAWEI 1.0
    *RESNUCLEI 3.0 33.0 3.0 1.0 Dummy
    *23456789 123456789 123456789 123456789 123456789 123456789 123456789
    123456789
    USRBDX 1.0 201.0 48.0 2.0 3.0 1.0 target
    USRBDX 10000. 0.01 1.0 1. &
    *
    *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
    RANDOMIZE 1. 0. 0. 0. 0. 0. 0.
    START 200000.0 99999999. 0.0 0.0
    STOP

    ...........................................................................
    .LAL - IN2P3 - CNRS
    .LAL - B.P 34 - 91898 Orsay Cedex - France
    .Piece 108
    .Tel +33 (0)1 64 46 84 29
    .Fax +33 (0)1 64 46 83 97
    ...........................................................................

    ...........................................................................
    .LAL - IN2P3 - CNRS
    .LAL - B.P 34 - 91898 Orsay Cedex - France
    .Piece 108
    .Tel +33 (0)1 64 46 84 29
    .Fax +33 (0)1 64 46 83 97
    ...........................................................................


  • Next message: Alberto Fasso': "torus"

    This archive was generated by hypermail 2.1.6 : Thu Jun 30 2005 - 11:53:07 CEST