Message: Changing geometry between runs with GDML & runtime primitive scorers (the latter is not working) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Changing geometry between runs with GDML & runtime primitive scorers (the latter is not working) 

Forum: Biasing and Scoring
Date: 10 Nov, 2014
From: Jonathan Wrobel <Jonathan Wrobel>

Hello,

I'm using primitive scoring and GDML-based geometry definition for my Geant4 application in G4v10.00.p03 on Linux. I am attempting to load new geometry between runs, as well as re-set the primitive scorer. However, I am getting segmentation faults and it appears that the primitive scoring is not happy being reset. Can anyone point me in the right direction?

Long version:
My approach for the primitive scoring is taken directly from Example RE03, where I'm implementing the G4ScoringManager.hh and using run-time definition of the scorers through UI command scripts. This is paired with a GDML load approach adapted from the persistency example G02.

I just finished hammering out the GDML portion so that I could successfully load different geometries between runs without restarting Geant4. I know that this portion of the code works because I've been using it and testing it with the reloading. This thread summarizes that accomplishment:
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/persistency/45/1/1/1.html

For the primitive scorer, I can use the UI-based primitive scorer on my initial geometries, but when I go to initialize the second geometry it will crash. This is my basic UI call order:

# First Run #######################
/mydet/readFile test.gdml
/run/initialize
/vis/open OGL
/control/execute scoring_definition_v1.mac
/control/execute G4GPS_2Dsource.mac
/control/execute vis_settings.mac
/control/execute scoring_vis_v1.mac

# Second Run ######################
/vis/viewer/clearTransients
/persistency/gdml/clear
#/run/reinitializeGeometry
/run/reinitializeGeometry 1 1
/mydet/readFile test2.gdml
/run/initialize <--Seg Fault occurs here
/control/execute scoring_definition_v2.mac
/control/execute G4GPS_2Dsource.mac
/control/execute scoring_vis_v2.mac

My understanding of the /run/reinitializeGeometry command is that the two boolean flags at the end when set to true should be purging the parallel world where the primitive scorers are defined. Is that correct? Are there any other "clean" or "reinitialize" commands that I should be using?

Thanks for any help.

Regards,
Jonathan

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Changing geometry between runs with GDML & runtime primitive scorers (the latter is not working)   (Jonathan Wrobel - 11 Nov, 2014)
 Add Message Add Message
to: "Changing geometry between runs with GDML & runtime primitive scorers (the latter is not working)"

 Subscribe Subscribe

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