Re: FLUKA: Source routine
Uuuh, then you want to sample your vector on the surface of the
cone, not inside, right?
Then, indeed, you must do it inside SOURCE. Something like:
TINZ = COS(30.D0 * DEGRAD)
TXTY = SQRT(ONEONE - TINZ**2)
* cosi: Fluka subroutine which returns random sine/cosine in a plane
CALL COSI (SFE,CFE)
TINX = TXTY * SFE
TINY = TXTY * CFE
Alberto
On Mon, 25 Jun 2001, Piero Neuhold wrote:
> Sorry Alberto ,
> I actually meant "with a constant angle" , so that I was
> wrong !
> Have I to correct the following in some way in SOURCE ?:
>
> The direction cosines are loaded next:
>
> TX (LSTACK) = TINX Assumed here to be the same as
> TY (LSTACK) = TINY defined by option BEAMPOS. TINX,
> TZ (LSTACK) = TINZ TINY, TINZ are some among the
>beam
> properties in COMMON BEAM.
> (If BEAMPOS is not given, by default TINX = TINY = 0.0, TINZ =
>1.0)
>
> Remember to make sure that the cosines are normalized! One could
> replace the last statement by:
> TZ (LSTACK) = SQRT ( ONEONE - TX(LSTACK)**2 - TY(LSTACK)**2 )
>
> Thanks for your answers !
> bye ,
>
> _____________________piero_______________________
>
> Piero Neuhold
> Ansaldo Nucleare
> Corso Perrone,25 16161 Genova - ITALY
> Phone : ++39 010 6558093
> Fax : ++39 010 64018093
> E-mail : neuhold@ansaldo.it
>
>
>
--
Alberto Fassò
CERN-EP/AIP, CH-1211 Geneve 23 (Switzerland)
Phone: (41 22) 767 2398 Fax: (41 22) 767 9480 Alberto.Fasso@cern.ch
Partial thread listing: