|Message: Re: Update Geometry Before Run/BeamOn leads to Segfault||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 Fri, 19 Jul 2013 14:49:16 GMT, Yugeng He wrote:
> I'm working on the liquid xenon particle detector project and I'm trying > to experiment with various parameters in my detector geometry to find > the optimal setup.[...]
When you modify your geometry, are you changing the structure, or changing materials? I notice that your traceback shows the crash happening in NeutronHP:
> #5 0x00007f2146751c8b in G4NeutronHPData::DoPhysicsVector(G4NeutronHPVector*) () from /home/daranday/geant4/geant4.9.4.p04/lib/Linux-g++/libG4processes.so > #6 0x00007f2146758aff in G4NeutronHPElasticData::BuildPhysicsTable(G4ParticleDefinition const&) () from /home/daranday/geant4/geant4.9.4.p04/lib/Linux-g++/libG4processes.so
NeutronHP has an unfortunate "feature", that it preloads all of its material-dependent cross-section tables at the beginning of the job. You've surely seen those hundreds of lines of useless warning messages about different HP files not being found, blah, blah, blah...
Anyway, the problem is that if you create a new material _after_ NeutronHP has done its preloading, then the first time a neutron encounters that material, you'll get a segfault, because there won't be any table entries found. This is embedded deep in the guts of HP, and cannot be fixed in any straightforward way.
What you need to do is to pre-define all of your materials before you instantiate your physics list. If you are using the so-called "NIST" materials in G4, you also have to call GetMaterial() for all of them, so that they get instantiated and added to the table of pointers. In my own application, I do this by having a singleton "material table" class which gets instantiated at the beginning of the job, and creates all the materials.
-- Michael Kelsey