From: Lee, Kerry T. \(JSC-SF\)[LMIT] (kerry.t.lee@nasa.gov)
Date: Fri Dec 15 2006 - 05:30:03 CET
This is a multi-part message in MIME format.
------_=_NextPart_001_01C72001.B0F9F80B
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Fanoos,
There are several ways that I have done this. All them can either =
result in creating a single primary at each call to SOURCE or you may =
create all the source particles first in a file and read them one at a =
time within the SOURCE routine.
1) You can write your own routine to sample your spectrum and set the =
energy in source.f (see the example source.f supplied with the FLUKA =
code in $FLUPRO/usrmvax, or if you'd like I'd be happy to share the one =
I have with you).
2) If you can write/fit your energy distribution with an algebraic =
function you may use ROOT (root.cern.ch) and create a TF1 object with =
this function. Then simply call TF1::GetRandom() to sample the =
distribution.
3) Uniformly sample the energy range you wish to run, and give it a =
weight according to your spectrum. Use this weight to set the variable =
WEIPRI in source.f. This uses the powerful biasing capability of FLUKA, =
which is especially useful if your energy distribution function varies =
over orders of magnitude.
Hope this helps,
Kerry
-----Original Message-----
From: owner-fluka-discuss@fisica.unimi.it on behalf of fanoos
Sent: Thu 12/14/2006 1:16 PM
To: fluka-discuss@fluka.org
Subject: a complex source
=20
Dear Fluka users
I want to define a source which has a distribution of energy.Each bin of =
energy has a certain probability.
I've studied fluka manual for this but I couldn't find anything.
How can I define this kind of source by a source routine?
Any help will be appreciated in advance.
=20
Fanoos
________________________________
Need a quick answer? Get one in minutes from people who know. Ask your =
question on Yahoo! Answers =
<http://answers.yahoo.com/;_ylc=3DX3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwM=
zOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx> .
------_=_NextPart_001_01C72001.B0F9F80B
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7651.34">
<TITLE>RE: a complex source</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=3D2>Hi Fanoos,<BR>
<BR>
There are several ways that I have done this. All them can either =
result in creating a single primary at each call to SOURCE or you may =
create all the source particles first in a file and read them one at a =
time within the SOURCE routine.<BR>
<BR>
1) You can write your own routine to sample your spectrum and set the =
energy in source.f (see the example source.f supplied with the FLUKA =
code in $FLUPRO/usrmvax, or if you'd like I'd be happy to share the one =
I have with you).<BR>
<BR>
2) If you can write/fit your energy distribution with an algebraic =
function you may use ROOT (root.cern.ch) and create a TF1 object with =
this function. Then simply call TF1::GetRandom() to sample the =
distribution.<BR>
<BR>
3) Uniformly sample the energy range you wish to run, and give it a =
weight according to your spectrum. Use this weight to set the =
variable WEIPRI in source.f. This uses the powerful biasing =
capability of FLUKA, which is especially useful if your energy =
distribution function varies over orders of magnitude.<BR>
<BR>
Hope this helps,<BR>
Kerry<BR>
<BR>
-----Original Message-----<BR>
From: owner-fluka-discuss@fisica.unimi.it on behalf of fanoos<BR>
Sent: Thu 12/14/2006 1:16 PM<BR>
To: fluka-discuss@fluka.org<BR>
Subject: a complex source<BR>
<BR>
Dear Fluka users<BR>
I want to define a source which has a distribution of energy.Each bin of =
energy has a certain probability.<BR>
I've studied fluka manual for this but I couldn't find anything.<BR>
How can I define this kind of source by a source routine?<BR>
Any help will be appreciated in advance.<BR>
<BR>
Fanoos<BR>
<BR>
________________________________<BR>
<BR>
Need a quick answer? Get one in minutes from people who know. Ask your =
question on Yahoo! Answers <<A =
HREF=3D"http://answers.yahoo.com/;_ylc=3DX3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEw=
OARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx">http://answ=
ers.yahoo.com/;_ylc=3DX3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDM=
Ec2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx</A>> .<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C72001.B0F9F80B--
This archive was generated by hypermail 2.1.6 : Fri Dec 15 2006 - 18:01:53 CET