Message: What are differences between methods to get momentum information Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question What are differences between methods to get momentum information 

Forum: Event and Track Management
Date: 21 Jan, 2015
From: Phan Viet Cuong <Phan Viet Cuong>

Dear Geant4 experts,

I was wondering if you could explain for me about the differences between the methods GetMomentum(), GetVertexMomentumDirection() and GetMomentumDirection(). I looked through some examples and have feeling that these methods do the same task, is it true?

In addition, in order to get information about secondaries at creation, in SteppingAction.cc what's kind of syntax do we have to use:

We use, for example to get momentum and position:

G4ThreeVector momentum=(secondary)[lp]->GetVertexMomentumDirection();

G4double x =(secondary)[lp]->GetPosition().x();

or we can use:

G4Track* theTrack = theStep->GetTrack();

G4ThreeVector momentum = theTrack->GetVertexMomentumDirection();

G4doulbe x = theTrack->GetPosition().x();

I would like to thank for your answer in advance!

Phan Viet Cuong

 Add Message Add Message
to: "What are differences between methods to get momentum information"

 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 ]