Message: Re: multiple sensitive detectors conflicting with each other Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: multiple sensitive detectors conflicting with each other 

Forum: Hits, Digitization and Pileup
Re: None multiple sensitive detectors conflicting with each other (David Oxley)
Date: 24 Jul, 2012
From: Makoto Asai <Makoto Asai>

Hi,

The line in your ExN01TrackerSD::Initialize()

   static G4int HCID = -1;

caused your problem. Since you are instantiating two objects of this ExN01TrackerSD class, you should define G4int HCID as a data member and initialize it to -1 in its constructor.

In your current code, since HCID is static, it is shared by two objects and thus the value of the firstly invoked object is overwritten by the second.

Makoto

 Add Message Add Message
to: "Re: multiple sensitive detectors conflicting with each other"

 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 ]