|Message: Radioactive Decay module and Update Geometry issues.||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)|
Dear forum people,|
It looks like I pinned down a problem in a simulation and now I come to ask for your advice.
I have a hard-coded geometry developed i.e. not GDML or anything else, just CSG solids and boolean solids. The full geometry is this:
and I am having some problems while comparing the simulated results with the experimental data.
Here is a figure to show my problem.
The white curve is the experiment and the red is the simulation using the 152Eu source from the database. The two curves are normalised in the full window i.e. 500-1500 keV. In turquoise I marked a few energies (keV) next to problematic peaks. You see the 563, 778 (!), 1212, 1298 peaks all overestimated while the transitions in between are well reproduced by the simulation. In addition you see the 1460 normal backround peak measured in the experiment as expected.
The situation is the following: Since 152Eu is a calibration source. I programmed the rod that holds the calibration source inside the chamber as something you can include or exclude by means of a DetectorMessenger i.e. you can place it or not via a macro file and it was not included by default.
Please follow the links and you will find the spectra, for the different scenarios, between 500keV and 1500keV (for direct comparison with the experimental data), and please pay special attention to the intensities of the peaks located at ~778keV, ~960keV.
If you let the source "hanging in the air" without placing the holder/rod the result are this:
Never placing the "removing line" in the macro and the rod is not present by default
Removing the rod via Detector Messenger
You can notice that they are exactly the same between them since the rod was never there BUT the geometry gets recomputed anyway. Details below.
If you place the holder via the macro file now your results looks like this:
You may notice that this is nothing but the original problem.
BUT(!), on the other hand, if you hard-code the rode from the beginning (holder_flag set to true in the details below), this is what you get:
(and this is the desired result !!!! The agreement with the experiment is excellent, to say the least)
So, wrapping up: the problem comes to the fact that there is something wrong in the way I include the rod and here comes the part where I want to learn how to avoid/fix the situation properly.
The relevant parts of the code are the following:
if(holder_flag) ConstructSampleHolder(); //holder_flag=false by default
... PhysicalVolume definition and placement of the rod inside the chamber
The relevant part from the DetectorMessenger is this:
if ( command == sampleHolderCmd )
G4bool flag = sampleHolderCmd->GetNewBoolValue(newValue);
detector->UpdateGeometry(); //Should I implement a RemoveDaughterVolume function?
And this is what the UpdateGeometry() method does:
// Cleanup old geometry
What am I doing wrong here? The volume looks ok in the visualization(!). Is it something related to the PhysicsList being initialized after the initial geometry and hence the new geometry messes up the Physics? Should I restart the PhysicsList as well when updating the geometry?
Many thanks in advance.