Message: Modifying Geometry using Messenger Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Modifying Geometry using Messenger 

Forum: Geometry
Date: 15 Nov, 2014
From: Alan James Bell <Alan James Bell>

Hi all.

I have a very strange problem when modifying my geometry using a macro and messenger the class. The problem is that I get a reduced number of optical photon counts in one of my Sensitive Detectors. The problem only appears when I run my code on the Amazon Cloud and doesn't show up locally.

My geometry has a scintillating crystal, a light guide and 4 'SiPMs'. All are defined as MultiFunctionalDetectors with primitives that count the number of optical photons in each volume. The SiPMs are defined once and copied & positioned four times. (That's the only difference between the way the SiPMs are defined compared to the other sensitive detectors).

When I run the code, I get an output for an event like so: Photons In Crystal: 5123. Photons in Light Guide: 4992. Photons Hitting SiPMs: 4601.

I make a modification using a messenger. For test purposes, I re-write the number of photons/MeV in my crystal, so that I know there are no geometrical changes which could cause the issue. After I make the change using the messenger, I do the following:

    G4GeometryManager::GetInstance()->OpenGeometry();
    G4PhysicalVolumeStore::GetInstance()->Clean();
    G4LogicalVolumeStore::GetInstance()->Clean();
    G4SolidStore::GetInstance()->Clean();

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

With these commands, I can see the effect of the change when I use the visualisation window. So I know that the messenger is working.

The results come out like: Photons In Crystal: 5232. Photons in Light Guide: 4893. Photons Hitting SiPMs: 185 <----- Greatly reduced photons in the SiPMs.

I have also tried only the 'ReinitializeGeometry() command without cleaning, but that results in no changes to the geometry.

I only see the problem when running the code on the Amazon Cloud where we have installed the same version of Geant4 that I use locally on my MacBook. (V 4.10.00p2)

I would appreciate any suggestions of how I can debug this. Should I re-instantiate my sensitive detectors after reinitialising the geometry? Or does the ReinitilizeGeometry() take care of that in Geant4.10.00.p02?

Please let me know what additional information is required to help me tackle this problem.

Best regards, Alan.

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

1 None: Re: Modifying Geometry using Messenger   (Roger Hälg - 02 Dec, 2014)
(_ None: Re: Modifying Geometry using Messenger   (Alan James Bell - 03 Dec, 2014)
(_ None: Re: Modifying Geometry using Messenger   (Roger Hälg - 03 Dec, 2014)
(_ None: Re: Modifying Geometry using Messenger   (Alan James Bell - 04 Dec, 2014)
(_ None: Re: Modifying Geometry using Messenger   (Roger Hälg - 04 Dec, 2014)
1 None: Re: Modifying Geometry using Messenger   (Makoto Asai - 04 Dec, 2014)
2 None: Re: Modifying Geometry using Messenger   (Alan James Bell - 05 Dec, 2014)
 Add Message Add Message
to: "Modifying Geometry using Messenger"

 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 ]