Message: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: Changing geometry between runs with GDML (Ex-G02 not allowing update) 

Forum: Persistency
Re: None Re: Changing geometry between runs with GDML (Ex-G02 not allowing update) (Jonathan Wrobel)
Re: None Re: Changing geometry between runs with GDML (Ex-G02 not allowing update) (Makoto Asai)
Re: Agree Re: Changing geometry between runs with GDML (Ex-G02 not allowing update) (Michael H. Kelsey)
Date: 04 Nov, 2014
From: Jonathan Wrobel <Jonathan Wrobel>

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:
   a) /persistency/gdml/clear
   b) /run/reinitializeGeometry 1 1
   c) /mydet/readFile test3.gdml
   d) /run/initialize
   e) /run/beamOn...

<<<<<<<<<<<<<<<<<<<<<<<<<<

It's great to see that the functionality is in Geant4, and thanks again!

Regards,
Jonathan

 Add Message Add Message
to: "Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]