|Message: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)||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)|
Thanks Makoto and Michael,|
That was the missing piece of information! The old geometry is now clearing and I am no longer getting conflicts when using the same constant/variable names in subsequent GDML files. I appreciate the advice from everyone in this thread. Turns out it is an appropriate name for the function group - persistency pays off :)
Before responding I took a moment to make a script and run through a large number of GDML reloads to see if there would be problems with the materials being redefined/duplicated and thus creating segmentation faults. Everything seemed ok. Correct me if I am wrong, but it appears that the GDML parser does not duplicate materials even if the <materials></materials> section in subsequent GDML files is not empty. I have not tried with differing materials lists in subsequent GDML files, only the same materials list copied.
For anyone else who is trying to load multiple consecutive geometries into Geant4 using GDML, here's a recap:
1) use Geant4v10.00.p03 (or later version when they roll out) as there is improved support for this activity
2) with GDML-G02 as an example, modify the Detector Messenger class so that you can issue the /mydet/readFile command during the Idle state and not just the PreInit state
3) Don't define any new materials in subsequent GDML files (but it looks like having the same <materials></materials> section is ok.
4) after the initial GDML geometry load, load subsequent GDML files with the following runtime commands:
b) /run/reinitializeGeometry 1 1
c) /mydet/readFile test3.gdml
It's great to see that the functionality is in Geant4, and thanks again!