|Message: Non-symetrical distribution of randomly generated 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 a new user of Geant4, I hope I am in the good part of the forum... I have several issues with the generation of random particles. I would like to study the interaction of several millions of gamma with my system in order to calculate a shielding thickness.
The system is mainly composed by: - an isotropic source surrounded by a lead housing in order to collimate the photons in a beam - several elements in the system that interact with the photons - a shield of lead - a measurement cylinder composed of water used to get the dose around the system. it is a tube where I save step position and deposited energy. I then discretize this volume in small elements to get a kind of map of the dose. I am sure there is a better solution but I thought to that first...
After several tries I realised that I have some issues with the random number generator.
I used in the main G4Random::setTheEngine(new CLHEP::HepJamesRandom);
and in PrimaryGeneratorAction:
G4double randTheta = G4UniformRand();
G4double randPhi = G4UniformRand();
G4double cosTheta = 2 * randTheta - 1., phi = twopi*randPhi ;
I looked the given randTheta and randPhi values and observed repeated values: about 6 repeated values for 10 000 event, 330 for 100 000, 40 000 for 1e6...) I read a lot the forum and I saw that many of us had this issue when a big event number is required. But it is mainly linked to a seed and I am not sure that is the problem here( I run only one /run/beamOn XX command)
So I tried something else: Instead of using G4UniformRand(), I used CLHEP:RandFlat::shoot(0.0, 1.0). The repeated values disappear completely (why ?). But I had a weird side effect. When I look the distribution of the dose in my volume I saw a strange non symmetrical distribution. I did the test with a simplified system (only the source, the source housing and the measurement cylinder) and I looked the dose in front of the source. We should expect a spot centred on the beam with a diameter about 75 mm. It is not that I obtain.
The following plot shows the distribution of the dose in front of the source for the two random number generation process. You can see that the G4UniformRand create a centred distribution but not CLHEP:RandFlat::shoot(0.0, 1.0). however the spot diameter is about 100 mm for CLHEP:RandFlat::shoot(0.0, 1.0), and roughly 200 mm for the G4UniformRand(). Nothing changes between the two tests except the way I generate random number.
I don't understand what is happening here. Do you have an idea ?
Thank you very much for your help.
Attachment: http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2015/09/22/04.44-64327-symetry_issue.png http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2015/09/22/04.44-37726-topview.png
|Inline Depth:||Outline Depth:||Add message:|