Message: Position of a particle when it enters/exits a certain volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Position of a particle when it enters/exits a certain volume 

Forum: Event and Track Management
Date: 26 Oct, 2016
From: <Nicolas78>

Hi everyone,

I'm shooting particles throughout a certain volume. It's an ellipsoid inside a World (Box). I'd like to know the position (for example in z axis) of the particle only when it enters (or exits) the ellipsoid volume. I've started to do something like (for when the particle enters inside the ellipsoid):

z=step->GetPreStepPoint()->GetPosition().z()/nanometer;

if (step->GetPreStepPoint->GetPhysicalVolume()->GetName() == "World" && step->GetPreStepPoint->GetStepStatus() == fGeomBoundary)
  {
      G4cout<<z<<G4endl;
  }

But I'm not really sure about the results coming from this.

Can anyone tell me if I'm missing something ?

Thanks a lot ! Nicolas

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

1 Ok: Re: Position of a particle when it enters/exits a certain volume   (Nicolas78 - 26 Oct, 2016)
 Add Message Add Message
to: "Position of a particle when it enters/exits a certain 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 ]