From: Alberto Fasso' (Alberto.Fasso@cern.ch)
Date: Thu Apr 17 2003 - 13:57:48 CEST
On Wed, 16 Apr 2003, Christopher Knievel wrote:
> I am running a simulation in which I would like to score residual nuclei
> production. I have used the RESNUCLEi card with the output being printed on
> the formatted unit 23. I am just having trouble understanding what the
> numbers mean which it is giving me. I am simulating an electron beam
> interacting with an aluminum cylindrical beam dump and I have asked it to
> score the residual nuclei production within that aluminum beam dump. I will
> attach the output which I recieve. The output is in matrix format. I do not
> understand what the columns or the rows correspond to. This is what I can
> tell, the rows correspond to the atomic number Z and the columns to the number
> N-Z-K, where N=# of neutrons? and K=constant(-5). Is this correct?
No. The array is printed as a continuous stream, not in separate rows.
In your case Z goes from 1 to 17 and N-Z-K from 1 to 12 (see below).
As usual in Fortran, the column index runs faster:
1,1 2,1 3,1 4,1 5,1 6,1 7,1 8,1 9,1 10,1
11,1 12,1 13,1 14,1 15,1 16,1 17,1 1,2 2,2 3,2
4,2 5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 13,2
14,2 15,2 16,2 17,2 1,3 2,3 3,3 4,3 5,3 6,3
In the header of your output you have got the following lines:
Res. nuclei n. 1 "DUMMY " , all products, region n. 3
detector volume: 4.3118E+04 cm**3
Max. Z: 17, Max. N-Z: 7 Min. N-Z: -4
Data follow in a matrix A(z,n-z-k), k: -5 format (1(5x,1p,10(1x,e11.4)))
These lines are followed by a 2-dimensional array.
According to what is printed in the header we can set:
MAXZ = 17
MAXNMZ = 7
MINNMZ = -4
K = -5
MINNMZ-K = -4 +5 = 1
MAXNMZ-K = 7 +5 = 12
To read the rest of the output, you can write a small Fortran program
where you have:
* the first dimension goes from 1 to MAXZ
* the second dimension goes from MINNMZ-K to MAXNMZ-K
* the format is as printed in the header
MAXZ = 17
MAXNMZ = 7
MINNMZ = -4
K = -5
WRITE(2,'(A)') ' Z A Residual nuclei'
DO 1 IZ = 1, MAXZ
DO 2 NMZMK = MINNMZ-K, MAXNMZ-K
WRITE(2,'(2I4,1P,G15.6)') IZ, NMZMK+K+2*IZ, ARRAY(IZ,NMZMK)
Note that in the outer DO loop the index IZ gives the Z of the residual nucleus
(and goes from 1 to MAXZ).
In the inner DO loop, NMZMK+K gives N-Z: therefore NMZMK+K+2*IZ gives N-Z+2Z=A
In the case of the output you have attached, you would get:
Z A Residual nuclei
2 4 9.900100E-09 4He
9 20 3.434400E-09 20F
11 23 5.982500E-09 23Na
11 24 6.465600E-09 24Na
12 25 1.193100E-09 25Mg
12 26 1.595100E-08 26Mg
12 27 2.832600E-09 27Mg
13 26 1.187900E-08 26Al
13 27 3.376600E-07 27Al
13 28 2.158800E-08 28Al
> I also do not understand what the number which I get in a specific location in
> the matrix corresponds to.
It means "number of residual nuclei per cm3 per primary particle"
> Another question which I have is why does the last row in the matrix end after
> only four elements.
The dimensions of the array are 17*12 = 204. Since the values are printed in
rows of 10 each, the last one contains 4.
> One final question which I have is if I were to specify that I wanted
> unformatted output, is there a specific subroutine which I could use which
> would calculate the statistics and numerous runs, such as is available for the
> other estimator options. Or would i have to create my own subroutine.
There is a program to read the binary output, but I have never used it.
I will send it to you separately.
It must be compiled with the Fluka compiling script:
You will obtain a an object file usrsuw.o which must be linked with the Fluka
library as follows:
lfluka -m usrsuw -o usrsuw usrsuw.o
and answer the questions.
-- Alberto FassÚ CERN-EP/AIP, CH-1211 Geneve 23 (Switzerland) Phone: (41 22) 767 2398 Fax: (41 22) 767 9480 Alberto.Fasso@cern.ch
This archive was generated by hypermail 2.1.6 : Tue Jun 10 2003 - 14:47:42 CEST