[fluka-discuss]: pi0 particles in USERDUMP output

From: Andrew Taylor <taylora_at_cp.dias.ie>
Date: Mon, 27 Jan 2014 09:25:31 +0000

Dear Andrea,

Many thanks for getting back to me about my problem.
Please find below a copy of the fluka input routine I am
using. I also enclose a copy of the routine I have written
to read in the binary file output by USERDUMP.

My main query is whether there is any way to see the
information on the neutral pions themselves, following
the inelastic collisions in the target. Since pi0 -> 2gamma
is the dominant decay channel, it seems likely that a lot of
the high energy photons produced came through this
channel. However, I'd prefer to know for sure which
channel the photons produced came through if
possible.

Kind regards,
Andrew

------------------------------------------------
Input Routine:

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
TITLE
  Neutral pion fluence around proton-irradiated p target
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
BEAM 5.0E+1 0.0 0.0 0.0 0.0 1.0 PROTON
BEAMPOS 0.0 0.0 -50.0
*
GEOBEGIN COMBNAME
   0 0 A simple H target inside vacuum
RPP body1 -5000000.0 +5000000.0 -5000000.0 +5000000.0 -5000000.0 +5000000.0
RPP body2 -1000000.0 +1000000.0 -1000000.0 +1000000.0 -100.0 +1000000.0
RPP body3 -10.0 +10.0 -10.0 +10.0 0.0 +1000.0
* plane to separate the upstream and downstream part of the target
XYP body4 0.005
END
* black hole
regBH1 5 +body1 -body2
* vacuum around
regVA2 5 +body2 -body3
* H target 1st half
regTA3 5 +body3 +body4
* H target 2nd half
regTA4 5 +body3 -body4
END
GEOEND
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
MATERIAL 1. 1.0E-2 3. 0.0 1. HYDROGEN
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
* H target, 1st and 2nd half
ASSIGNMAT HYDROGEN regTA3 regTA4
* External Black Hole
ASSIGNMAT BLCKHOLE regBH1
* Vacuum
ASSIGNMAT VACUUM regVA2
*
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
USRYIELD 1387.0 PIZERO 50.0 -1 -2 1.0TotPi0(E)
USRYIELD 1.0E+5 1.0E-4 100.03.14159265 0.0 1.0 &
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
USERDUMP 200. 37.0 5.0 ENERGYFILE
START 1.0E+6
STOP

------------------------------------------------

Fortran routine for reading binary file:

       Program Read_Binary

       implicit none
       Integer nmax
       parameter (nmax=10000)
       Integer n,j,ntrack,mtrack,jtrack,iloflk(1:nmax),j_old
       Real*4 etrack,wtrack,dtrack(1:nmax),ctrack
       Real*4 xsco,ysco,zsco,rull
       Real*4 etot(1:nmax)
       Real*4 wtflk(1:nmax),xflk(1:nmax),yflk(1:nmax),zflk(1:nmax)
       Real*4 txflk(1:nmax),tyflk(1:nmax),tzflk(1:nmax)
       Integer n_int,n_pi0,tracking
       Character*80 word

       jtrack=0

       n_int=0
       n_pi0=0

       tracking=0

c open(unit=1,file='example001_ENERGYFILE',status='old',
c -form='binary')

       open(unit=1,file='events_output_5.0E+1.out',status='old',
      -form='unformatted')

c read(1)ntrack,mtrack,jtrack,etrack,wtrack
c print*,'n:',ntrack,' m:',mtrack,' j:',jtrack,
c -' e:',etrack,' w:',wtrack

c do n=1,5000
  11 read(1,end=10)ntrack,mtrack,jtrack,etrack,wtrack
c print*,'n:',ntrack,' m:',mtrack,' j:',jtrack,
c -' e:',etrack,' w:',wtrack

       if (ntrack.gt.1) then
       read(1)(dtrack(j),j=1,mtrack),ctrack
       elseif (ntrack.eq.0) then
       read(1)xsco,ysco,zsco,rull
       elseif (ntrack.lt.0) then
       read(1)(iloflk(j),etot(j),wtflk(j),xflk(j),yflk(j),zflk(j),
      -txflk(j),tyflk(j),tzflk(j),j=1,mtrack)
       endif
c read(1)

c check to see if energy deposit event
       if (ntrack.eq.0) then

       if (mtrack.eq.10) then

          if (tracking.eq.1) then
          print*,'elastic scattering'
          endif

       elseif (mtrack.eq.11) then

          if (tracking.eq.1) then
          print*,'inelastic scattering',' rull:',rull
          endif

          n_int=n_int+1

       endif

       if (jtrack.eq.1) then

          if (tracking.eq.1) then
          print*,'PROTON',' Energy:',etrack
          endif

       elseif (jtrack.eq.7) then

          if (tracking.eq.1) then
          print*,'PHOTON',' Energy:',etrack
          endif

c print*,'j_old:',j_old
          if (j_old.eq.jtrack) then

             if (tracking.eq.1) then
             print*,'probably PI0'
             endif

             n_pi0=n_pi0+1

          endif

       elseif (jtrack.eq.13.and.tracking.eq.1) then
          print*,'PI+',' Energy:',etrack
       elseif (jtrack.eq.14.and.tracking.eq.1) then
          print*,'PI-',' Energy:',etrack
       elseif (jtrack.eq.23.and.tracking.eq.1) then
          print*,'PI0',' Energy:',etrack
       endif

c endif to ntrack=0
       endif

c enddo

c read(1)ntrack,mtrack,jtrack,etrack,wtrack
c print*,'n:',ntrack,' m:',mtrack,' j:',jtrack,
c -' e:',etrack,' w:',wtrack
c read(1)
c read(1)ntrack,mtrack,jtrack,etrack,wtrack
c print*,'n:',ntrack,' m:',mtrack,' j:',jtrack,
c -' e:',etrack,' w:',wtrack

       if (j_old.ne.jtrack) then
          j_old=jtrack
       else
          j_old=0
       endif
       goto 11
  10 close(1)

       print*,'n_int:',n_int,' n_pi0:',n_pi0
       print*,'frac:',real(n_pi0)/real(n_int)

       end


------------------------------------------------

Dear Andrew,

Can you provide us your input and the FLUKA user routines that you are
using?

Cheers, Andrea

-------------------------------------------------

Dear Fluka people,

Firstly, I should clarify that I'm a newbie to FLUKA! I'm trying to tag
the production of pi0 particles produced inside my detector simulation
using FLUKA. Having output the inelastic events using USERDUMP, I can
follow the photons which I think are produced through pi0 decay.
However, I would like to know if there is some way I can be sure of the
primary producing the photons or perhaps some way of switching of the
pi0 decay.

Kind regards, Andrew


-- 
------------------------------------------------------------
Dr. Andrew Taylor-Castillo
School of Cosmic Physics
Dublin Institute for Advanced Study
Ireland
office: +353 16621333x337
mob.: +353 877116296
Received on Mon Jan 27 2014 - 11:58:06 CET

This archive was generated by hypermail 2.3.0 : Mon Jan 27 2014 - 11:58:09 CET