Message: Run management during geometry change Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Run management during geometry change 

Keywords: geometry change
Forum: Run Management
Date: 05 Feb, 2003
From: Harald Paganetti <hpaganetti@partners.org>

A small piece in my geometry is changing in between runs (one of the volumes has to rotate). The rotation angle is defined as input using a DetectorMessenger function. It is my understanding that you can perform the rotation in two ways:

1. Replace the old geometry via

void P_DetectorConstruction::UpdateGeometry()
{
  G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
  G4RunManager::GetRunManager()->GeometryHasBeenModified();
  G4RunManager::GetRunManager()->ResetNavigator();
  Construct();
}
However, when I do this Geant keeps the old geometry in the memory,
which eventually results in a crash since I change the geometry quite
often during my simulation.
As far as I know there is no way to free the memory (right?).

2. Modify the geometry

void P_DetectorConstruction::ModifyGeometry()
{
  G4RunManager::GetRunManager()->GeometryHasBeenModified();
  G4RunManager::GetRunManager()->ResetNavigator();
  Construct();
}
However, although it goes through ‘Construct’ and knows about the new
geometry parameters the geometry remains unchanged for the next run
(Why?).

I asked the question on the User Forum 'Geometry' but I figured out that this is probably a RunManager rather than a geometry problem.

Does anybody know how to solve the problem?

Harald

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

1 None: Re: Run management during geometry change   (Makoto Asai - 14 Feb, 2003)
 Add Message Add Message
to: "Run management during geometry change"

 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 ]