Message: Change particle momentum and position Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Change particle momentum and position 

Keywords: track step change direction momentum position
Forum: Event and Track Management
Date: 22 May, 2006
From: Frederik Wauters <Frederik Wauters>

Hello,

I want to change the direction of an e- comming from a Beta-decay. The plan is to redefine the particles momentum after the first step an to put it back where ik came from. This all in steppingaction.

I tried: theStep->GetPost(or Pre)StepPoint()->SetMomentumDirection(G4ThreeVector(1,0,0)); theStep->GetPost(or Pre)StepPoint()->SetPosition(initialPosition); This is just ignored.

I also tried theStep->GetTrack()->SetMomentumDirection(G4ThreeVector(1,0,0)); theStep->GetTrack()->SetPosition(initialPosition); Then the position and momentum of the particle changes, but i get warnings that the information is not reliable anymore.

Am i doing this in the wrong way or do is just have to add something else?

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

1 None: Re: Change particle momentum and position   (Makoto Asai - 22 May, 2006)
 Add Message Add Message
to: "Change particle momentum and position"

 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 ]