|Message: Re: Try to get X ray production direction but angle seem to be wrong||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
On Thu, 03 May 2018 22:02:58 GMT, HuangHong wrote:
> 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.
> 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.
> 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.
-- Michael Kelsey
|Inline Depth:||Outline Depth:||Add message:|