# Re: usrbin result

From: Alberto Fasso' <fasso_at_SLAC.Stanford.EDU>
Date: Thu, 20 Nov 2008 15:33:13 -0800 (PST)

The answer is very simple. That matrix is the content of a Fortran array=20
A(ix,iy,iz), with ix running from 1 to 20, iy from 1 to 20, and iz from 1 t=
o 1.
In Fortran, the first index runs faster than the second, and the second fas=
ter=20
than the third.
So, this the meaning of the numbers in the first lines:
> 0.0000E+00 0.0000E+00 0.0000E+00 3.2462E-07 0.0000E+00 0.0000E=
+00 2.4530E-08 0.0000E+00 3.2727E-08 0.0000E+00
A(1,1,1) A(2,1,1) A(3,1,1) A(4,1,1) A(5,1,1) A(6,=
1,1) A(7,1,1) A(8,1,1) A(9,1,1) A(10,1,1)
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E=
+00 1.5913E-07 0.0000E+00 1.8299E-09 0.0000E+00
A(11,1,1) A(12,1,1) A(13,1,1) A(14,1,1) A(15,1,1) A(16=
,1,1) A(17,1,1) A(18,1,1) A(19,1,1) A(20,1,1)
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E=
+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
A(1,2,1) A(2,2,1) A(3,2,1) A(4,2,1) A(5,2,1) A(6,=
2,1) A(7,2,1) A(8,2,1) A(9,2,1) A(10,1,1)
etc.
The easiest way to read that matrix is to write a Fortran program with the =
declaration
DIMENSION A(20,20,1) (using as dimensions the number of bins printe=
d in the file)=20
and the statement
READ(2,100) A (if the dimensions are exact, as shown above, =
you don't need to specify indexes)
100 FORMAT(1(5x,1p,10(1x,e11.4))) (using the format as printed in the f=
ile)
(where 2, or whatever number, has been declared the input logical unit with=
an OPEN statement).
Then you can write DO loops to write the same number sequentially, for inst=
ance:
DO 1 IX =3D 1, 20
DO 2 IY =3D 1, 20
DO 3 IZ =3D 1, 1
IF(A(IX,IY,IZ).GT.0.0) WRITE(3,*) IX, IY, IZ, A(IX,IY,IZ)
3 CONTINUE
2 CONTINUE
1 CONTINUE
In this example, I have decided to have IZ running faster than IY, and IY f=
aster=20
than IX, and to skip the zeros. But it is up to you in which order you want=
them.

Alberto

On Thu, 20 Nov 2008, dufei wrote:

> Dear All
> I have got a result from usrbin card, but I can not analyze it. Cou=
ld anyone can tell me what does "Data follow in a matrix A(ix,iy,iz), forma=
t (1(5x,1p,10(1x,e11.4)))" mean and which position corresponding to one of=
the data?
> Thanks
>
> =
dufei
>
> Cartesian binning n. 1 "DT " , generalized particle n. 1
> X coordinate: from -1.0000E+01 to 1.0000E+01 cm, 20 bins ( 1.000=
0E+00 cm wide)
> Y coordinate: from -1.0000E+01 to 1.0000E+01 cm, 20 bins ( 1.000=
0E+00 cm wide)
> Z coordinate: from 2.0000E+00 to 2.5000E+00 cm, 1 bins ( 5.000=
0E-01 cm wide)
> Data follow in a matrix A(ix,iy,iz), format (1(5x,1p,10(1x,e11.4)))
> accurate deposition along the tracks requested
> this is a track-length binning
> 0.0000E+00 0.0000E+00 0.0000E+00 3.2462E-07 0.0000E+00 0.0000E=
+00 2.4530E-08 0.0000E+00 3.2727E-08 0.0000E+00
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E=
+00 1.5913E-07 0.0000E+00 1.8299E-09 0.0000E+00
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E=
+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E=
+00 2.1512E-08 1.3103E-08 3.8817E-08 0.0000E+00
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E=
+00 0.0000E+00 3.3701E-09 0.0000E+00 5.9629E-08
> 0.0000E+00 2.0285E-08 0.0000E+00 0.0000E+00 0.0000E+00 1.5785E=
-07 0.0000E+00 3.1676E-07 1.4365E-07 0.0000E+00
> 0.0000E+00 3.9836E-10 1.4225E-08 0.0000E+00 0.0000E+00 5.9848E=
-08 0.0000E+00 8.3657E-07 9.1626E-07 3.8951E-07
> 7.9334E-08 1.1709E-07 3.8163E-07 3.1779E-07 0.0000E+00 0.0000E=
+00 9.5640E-08 0.0000E+00 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 9.3458E=
-08 4.7364E-07 1.1271E-06 5.2257E-06 1.3945E-05
> 1.7292E-05 1.8028E-06 1.5141E-06 4.6383E-07 0.0000E+00 0.0000E=
+00 0.0000E+00 4.8246E-08 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 2.7412E-08 0.0000E+00 0.0000E+00 5.7304E=
-07 4.3251E-06 4.0503E-03 9.6885E-03 1.2346E-02
> 1.2320E-02 9.6453E-03 4.0286E-03 3.4659E-06 9.1863E-07 0.0000E=
+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 2.0920E-08 0.0000E+00 9.8161E-08 3.1620E=
-06 6.9882E-03 1.2706E-02 1.2642E-02 1.2736E-02
> 1.2679E-02 1.2763E-02 1.2703E-02 6.9841E-03 2.4315E-06 0.0000E=
+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
> 0.0000E+00 1.1352E-09 3.6553E-08 0.0000E+00 9.3082E-07 4.0190E=
-03 1.2769E-02 1.2756E-02 1.2723E-02 1.2819E-02
> 1.2751E-02 1.2684E-02 1.2726E-02 1.2706E-02 4.0400E-03 7.9905E=
-07 3.1000E-08 2.7721E-09 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 3.3002E-10 8.0177E-07 3.4692E-06 9.6645E=
-03 1.2804E-02 1.2741E-02 1.2734E-02 1.2670E-02
> 1.2770E-02 1.2755E-02 1.2746E-02 1.2760E-02 9.7278E-03 2.9724E=
-06 1.4301E-07 0.0000E+00 7.9819E-09 1.5372E-07
> 0.0000E+00 0.0000E+00 0.0000E+00 7.6721E-07 1.3069E-05 1.2334E=
-02 1.2831E-02 1.2731E-02 1.2781E-02 1.2776E-02
> 1.2722E-02 1.2717E-02 1.2733E-02 1.2718E-02 1.2276E-02 1.4671E=
-05 1.7602E-07 0.0000E+00 3.0192E-10 0.0000E+00
> 0.0000E+00 3.3005E-07 5.4079E-09 9.8563E-07 1.7834E-05 1.2216E=
-02 1.2756E-02 1.2649E-02 1.2620E-02 1.2810E-02
> 1.2650E-02 1.2656E-02 1.2661E-02 1.2727E-02 1.2283E-02 1.8485E=
-05 4.2161E-07 0.0000E+00 0.0000E+00 0.0000E+00
> 2.0453E-07 6.3793E-07 2.8352E-08 1.9015E-08 2.2030E-06 9.6880E=
-03 1.2765E-02 1.2659E-02 1.2652E-02 1.2701E-02
> 1.2723E-02 1.2680E-02 1.2741E-02 1.2600E-02 9.6675E-03 2.1519E=
-06 9.4157E-07 1.0074E-07 4.2266E-07 6.5326E-08
> 3.2213E-07 0.0000E+00 3.0935E-08 1.4805E-07 9.7513E-07 4.0054E=
-03 1.2745E-02 1.2776E-02 1.2746E-02 1.2657E-02
> 1.2744E-02 1.2709E-02 1.2728E-02 1.2691E-02 3.9810E-03 1.4750E=
-06 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
> 5.7695E-09 3.7996E-07 8.0033E-10 2.0182E-07 8.6029E-07 5.5027E=
-06 6.9455E-03 1.2671E-02 1.2747E-02 1.2685E-02
> 1.2808E-02 1.2763E-02 1.2677E-02 6.9956E-03 4.0409E-06 3.9334E=
-07 3.6084E-08 0.0000E+00 0.0000E+00 0.0000E+00
> 1.9618E-09 0.0000E+00 0.0000E+00 0.0000E+00 4.9666E-07 1.1742E=
-06 4.0730E-06 4.0093E-03 9.5808E-03 1.2265E-02
> 1.2296E-02 9.7542E-03 4.0439E-03 4.7984E-06 6.4325E-07 5.1116E=
-07 0.0000E+00 2.5490E-08 0.0000E+00 3.0587E-08
> 0.0000E+00 0.0000E+00 0.0000E+00 2.5488E-08 3.5573E-07 3.6675E=
-07 3.0778E-07 1.2068E-06 2.5542E-06 1.5045E-05
> 1.9124E-05 4.3217E-06 6.6921E-07 8.3108E-07 1.8236E-07 0.0000E=
+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 5.3664E-08 2.1545E-08 0.0000E+00 3.4995E=
-07 6.0104E-08 1.6248E-07 1.9690E-07 9.7607E-07
> 7.0315E-07 2.9187E-07 6.1982E-07 6.2230E-07 9.8106E-09 4.3471E=
-08 3.1980E-07 2.1069E-08 0.0000E+00 1.8649E-08
> 0.0000E+00 6.8128E-08 0.0000E+00 0.0000E+00 1.6555E-08 0.0000E=
+00 0.0000E+00 0.0000E+00 1.1268E-07 1.4235E-09
> 7.8357E-08 3.5657E-08 1.5465E-08 4.1801E-07 0.0000E+00 2.7546E=
-09 0.0000E+00 4.4452E-08 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 1.3708E-08 0.0000E=
+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00
> 0.0000E+00 0.0000E+00 5.3585E-08 5.4815E-08 1.9738E-07 0.0000E=
+00 0.0000E+00 7.1296E-08 0.0000E+00 1.0991E-09
> 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 5.3560E-09 0.0000E=
+00 0.0000E+00 6.4474E-08 5.1016E-08 0.0000E+00
> 0.0000E+00 3.6542E-08 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E=
+00 0.0000E+00 0.0000E+00 1.0288E-07 0.0000E+00
>
> 2008-11-20
>
>
>
> dufei
>

--=20
Alberto Fass=F2
SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
Phone: (1 650) 926 4762 Fax: (1 650) 926 3569
fasso_at_slac.stanford.edu
--1334205520-583965688-1227223494=3D:25842--
Received on Fri Nov 21 2008 - 09:41:34 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 21 2008 - 09:41:34 CET