Message: Re: Try to get X ray production direction but angle seem to be wrong Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Try to get X ray production direction but angle seem to be wrong 

Forum: Biasing and Scoring
Re: Question Try to get X ray production direction but angle seem to be wrong (HuangHong)
Re: Feedback Re: Try to get X ray production direction but angle seem to be wrong (Michael H. Kelsey)
Date: May 04, 17:25
From: HuangHong <HuangHong>

 Dear all, I want simulate the electron bombard the target(tungsten)to
 produce X ray, I want to get the direction of X ray production.Details
 are described in the attachment.

I use the momentum to get the angle, codes likes blow:

 G4ThreeVector direction = track->GetMomentumDirection(); 
 G4double theta = direction.theta(); G4double phi = direction.phi();

>You need to be a little careful about this. The track kinematics (position, direction, energy) are updated with every step the track takes. If you want to get the _production_ kinematics, you should use the "GetVertexXyz" functions (see G4Track.hh). You will also want to have some sort of filter in your stepping action or sensitive detector so that you only do this once per track.

>> 1. Thanks for your advice to use vertex (where this track was created) information. I think your advice is right for my simulation. Now I use " G4ThreeVector direction = track->GetVertexMomentumDirection(); 
 G4double theta = direction.theta(); G4double phi = direction.phi();" to get the momentumDirection where this track was created.
>> 2. I set my target(tungsten material) as a sensitive detector, and I use a flag to mark the trackID so that I just record once per track.

 Question 1: The result of theta is as follows(see attachment), we can
 see there is no X ray production in the 0 degree and 180 degree. Do I
 wrong to use the Momentum to get the X ray production direction?
>You're not wrong, it just wasn't answering the question you were asking :-) The instantaneous (at a step) direction may be different from the original production, if the X-ray scattered during its flight.

>> Thanks for your kind reply. I adopt your advice(using GetVertexMomentumDirection().) to simulate again, but the result is also like before, there is no X ray production in the 0 degree and 180 degree(theta, it respects to the Z axis). Could you please give me some advice if you know?

Question 2: Where is the reference point for the MomentumDirection? Is
 it in relation to the interacting electron vector at the point of photon
 generation or something else entirely?
>The direction, like the position, is expressed in the global coordinate system. If you need the direction or position in the local coordinates of the volume, then you need to apply the coordinate transform from the G4VTouchable associated with the track.

>>Thanks for telling me the reference point. I just want to get the global coordinate, and I know how to transform the global coordinate to local.

 Add Message Add Message
to: "Re: Try to get X ray production direction but angle seem to be wrong"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews