|Message: Problem with angular distribution of primary particles||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)|
I am experiencing a subtle problem in generating the proper direction of my primary particles. I am at a point in my problem solving where I thought it would be best to ask for some advice.
A very quick overview of my set up is as follows: I have a 6 layered detector that is meant to detect cosmic ray muons. These particles have a fairly well-defined angular and energy distribution. The muons are generated at random positions on the top plane of the world in my simulation and the angle should follow a cos squared theta distribution for the angle from the vertical (phi is generated randomly between 0 and 2pi). For theta, if you consider 0 to be in the "up" direction, then you expect to see particles generated between theta = 90 degrees and theta = 180 degrees.
theta is sampled from a cos squared distribution. phi is sampled uniformly between 0 and 2pi.
From these angles I then calculate the unit direction vector to give to the particleGun.
u = sin(theta)*cos(phi) v = cos(theta) w = sin(theta)*sin(phi)
I am certain that theta and phi are being generated properly. But when I look at the angle from vertical of the particles within the simulation (ie as soon as they have entered the world) there is a problem. Looking at a histogram of theta within the simulation, there are a significant number of bins that are empty very close to the 180 degree point (these bins should have thousands of entries). And the "180 degree" bin is far too full. Is it possible that the particle gun is only able to take a certain number of decimal places for its momentum direction vector? The only solution I feel is left is that the particle gun is rounding my u, v and w values. Though, I could be very very wrong with this.
If anyone has any insight I would be extremely thankful. And if I haven't explained the problem with enough clarity, please don't hesitate to ask for more information.
|Inline Depth:||Outline Depth:||Add message:|