Message: Re: Coordinates of secondary particles Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Coordinates of secondary particles 

Forum: Event and Track Management
Re: None Coordinates of secondary particles
Date: 14 Apr, 2014
From: Gumplinger Peter <Gumplinger Peter>

Hi Sara,

In your SteppingAction, when you know that a secondary:

G4Track aTrack = step->GetTrack();

G4int pid = aTrack->GetParentID();

if (pid > 0)

has stopped:

aTrack->GetTrackStatus() == fStopAndKill

You get the final coordinates from:

 G4ThreeVector final = aTrack->GetPosition();

and the original from:

 G4ThreeVector vertex = aTrack->GetVertexPosition();

You can learn much by looking at basic and extended examples.

Peter

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

1 None: Re: Coordinates of secondary particles   (Sarah - 15 Apr, 2014)
 Add Message Add Message
to: "Re: Coordinates of secondary particles"

 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 ]