Re: [fluka-discuss]: Writting SOURCE user routine generating from file with mixture of particles?
On 13-11-13 02:09 AM, Alberto Fasso' wrote:
> 2) read COSX, COSY and COSZ, calculate COSNEW as
> SQRT(ONEONE - COSX**2 - COSY**2), give it the sign of COSZ
> using the Fortran function SIGN(COSNEW,COSZ), and set COSZ = COSNEW
>
> Alberto
Dear Alberto,
...
...
READ(47,*,END=501) Ipart(i), X(i), Y(i), Z(i),
& CosX(i), CosY(i), CosZ(i), Energy(i), Weight(i)
&
END DO
501 CONTINUE
...
...
TXFLK(NPFLKA) = CosX(line)
TYFLK(NPFLKA) = CosY(line)
COSNEW = SQRT(ONEONE - CosX(line)**2 - CosY(line)**2)
COSNEW = SIGN(COSNEW,CosZ(line))
TZFLK(NPFLKA) = COSNEW
Now, I just have to re-generate the data from step one and re-do step
two. I do have a question on normalization for step two but I will ask
that later.
Best wishes,
Mina
Received on Wed Nov 13 2013 - 21:07:48 CET
This archive was generated by hypermail 2.3.0
: Wed Nov 13 2013 - 21:07:49 CET