|Message: Re: Multiple Physics Lists||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)|
On Mon, 22 Jun 2015 20:48:00 GMT, ZachB wrote:
> I am trying to register multiple physics list for my application
You can't do that. The "physics list" is a factory class, which encapsulates a table of the complete set of processes desired for the set of all "relevant" particles (as defined by the physics list code itself) for your application.
> and it looks like when I do, the latest one overwrites the previous one. Is > this an accurate statement
Yes, that is correct. The RunManager (see G4RunManager.hh, for example) contains a single data member pointer corresponding to a physics list. If you register a physics list a second time, the value of that data member is simply replaced.
> and if so, what can I do to have these multiple physics lists running at the same time? Thank you.
If you wish to have different processes for different purposes in the same application, then you can extend your own locally written physics list by adding those processes. Geant4 provides the so-called "physics builders" or "physics constructors", which do the registration of a set of related processes to a specific set of particles. Some examples include G4DecayPhysics, G4OpticalPhysics, G4EmPhysics.
If you want to be able to choose (one time, only at the "PreInit" state) between different possible physics lists, then you may want to look at the G4PhysicsListFactory class. That class permits you to pass in a string, corresponding to the names of our reference physics lists ("FTFP_BERT", "Shielding", and so on) and have a pointer to the physics list returned. You can set the string from an environment variable or via a macro command.
If you want to be able to add or modify the processes included in a physics list via macro commands (again, only at the "PreInit" state), you may want to look at some of our examples.
-- Michael Kelsey
|Inline Depth:||Outline Depth:||Add message:|