Message: Problem with angular distribution of primary particles  Not Logged In (login) 
Hi everyone,
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 welldefined 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) particleGun>SetParticleMomentumDirection(G4ThreeVector(u,v,w)); 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: 
to: 