Message: Detecting the particle leaving a volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Detecting the particle leaving a volume 

Keywords: volume leaving
Forum: Event and Track Management
Date: 30 Nov, 2006
From: Guez <Guez>

Hi, as written in the FAQ exemple, one may detect that a particle is entering or leaving a volume, in a UserSteppingAction derived class, with something like :

G4StepPoint* point2 = step->GetPreStepPoint(); if (point1->GetStepStatus() == fGeomBoundary)


G4StepPoint* point2 = step->GetPostStepPoint(); if (point2->GetStepStatus() == fGeomBoundary)


But, although the first case sems to work for every case, it appears for me that the volume leaving is rarely detected with this method (about 9 time for 1000 events).

So my question is, how to detect ALL the volume leaving of particle ? Note that in my geometry, I have array of boxes with adjacent edges, but I also tried it with small distance between boxes and it doesn't seem to solve my problem.

I'm using GEANT4.8.1 patch 02

Thanks in advance

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

1 None: Re: Detecting the particle leaving a volume   (Makoto Asai - 30 Nov, 2006)
 Add Message Add Message
to: "Detecting the particle leaving a volume"

 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 ]