|Message: Re: Generating a Beam with a given Energy Probability Distribution||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
>> My question is how can the type of radiation (the fact that it's beta-) >> be specified in the macro file (using radioactive dacay), where the >> source type has been defined as an ion (using gps)? I tried to use >> grdm/fbeta 1 but it didn't work. (I noticed that in >> examples/extended/radioactivedecay/exrdm/isotops.mac the types of decays >> are not specified either!..?)
in fact, in Geant4 the particle type is specified in the primary generator, and there if you use the GPS you just have to say that you want a Sr90 ion, and where you want it.
Then you have to make sure that Geant4 knows what to do with this ion: if in the physics list, you add the Radioactive Decay to the processes associated with the ion, Geant4 will know that that ion will decay, etc.
This is not related to the source definition (GPS) but to the physics associated with the particles to be tracked.
In particular, the radioactive decay process uses some tables to know which isotope undergoes which type of decay, and with which lifetime. It can also generate quite complex decay chains. You need to have these tables, they come in a tar package that you get from the Geant4 Download area (RadiativeDecay.3.0.tar.gz), and you normally need to tell Geant4 where they are during the Geant4 installation. The location is set by the environment variable G4RADIOACTIVEDATA. So I assume you have them.
>> Then I was wondering how I can input an external c++ code generating the >> energy distribution into geant4 (in case it ends up to be simpler to >> do). What should be changed in PrimaryGeneratorAction?
As you say, in principle, you can also specify the specific source (e-) energy distribution for the Sr90. You can do this with C++ code, but GPS also lets you input an energy spectrum, so you can simply write a text macro to input the Sr90 e- energy spectrum with a histogram.
But I would say that letting the Sr90 ion decay with the radioactive decay process is a more generic and elegant solution, and in the future you can change source isotope by just changing one line in a macro file.
I hope this helps
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Giovanni Santin Space Environments and Effects Analysis ESA - ESTEC - TEC-EES Keplerlaan 1, 2200 AG Noordwijk, Netherlands e-mail: email@example.com Tel: +31 71 565 6267 Fax: +31 71 565 4999 http://geant4.esa.int
|Inline Depth:||Outline Depth:||Add message:|