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

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

Forum: Persistency
Re: Question 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) (Michael H. Kelsey)
Re: None Re: Changing geometry between runs with GDML (Ex-G02 not allowing update) (Jonathan Wrobel)
Date: 03 Nov, 2014
From: Michael H. Kelsey <Michael H. Kelsey>

Jonathan Wrobel writes:
> I appreciate the suggestions and I put the in changes that you
> recommended:
> 
> -G02DetectorConstruction.cc (see lines 41-46 & 130-133)
> -G02DetectorMessenger.cc (see line 62)
> 
> When I run the modified G02 example ($ ./geotest read_gdml.mac) it now
> allows the /mydet/readFile command during Idle but it doesn't seem to do
> anything.

There is one additional piece, which I didn't notice was missing from your
original posting.  You need to notify the Run Manager that the geometry has
been changed, so that it will call DetectorConstruction::Construct().

 G4RunManager::GetRunManager()->GeometryHasBeenChanged();

> The command above ($ ./geotest read_gdml.mac) will launch the Qt viewer,
> show the test.gdml geometry in the Qt viewer, and run the scripted
> beamOn command. However, when I subsequently enter /mydet/readFile
> test2.gdml (test2 is a different gdml file I created and validated
> separately) nothing happens. I have tried to issue the following
> commands after the /mydet/readFile command, but they did not help
> either:

>   /run/geometryModified

This should do the same thing as the function call above.  You should be
able to do this either before or after the /mydet/readFile command.

>   /run/reinitializeGeometry
>   /geometry/navigator/reset
>   /vis/viewer/refresh
> 
> Strangely, nothing is showing up in the Output - should there be? Any
> suggestions?

Well, I don't think you'll get a different geometry drawn unless you do
/vis/drawVolume.  But if you set the geometry-modified flag before beamOn,
you should still see the effect of the new geometry in your data.

     -- Michael Kelsey

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

1 None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Jonathan Wrobel - 03 Nov, 2014)
(_ None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Mike Kelsey - 03 Nov, 2014)
(_ Question: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Jonathan Wrobel - 03 Nov, 2014)
(_ None: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Makoto Asai - 03 Nov, 2014)
(_ Question: Re: Changing geometry between runs with GDML (Ex-G02 not allowing update)   (Jonathan Wrobel - 03 Nov, 2014)
 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 ]