|Message: Re: 152Eu||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 the problem in the simulation and now I come again to ask for your advice.
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 and it was not included by default.
Since the only 'controversial' part of the code was precisely the placement or not of the rod, I decided to change that and hard coded the "rod" (remember: not present by default) and it turns out that it makes a lot of difference.
Please follow the links and you will find the spectra, for the different scenarios, between 500keV and 1500keV (same range shown by Lisa for the simulation AND the experiment), and please pay special attention to the intensities of the peaks located at ~780keV, ~960keV and 1400keV.
If you let the source "hanging in the air" without placing the holder(rod) you find this:
-> Never placing the "removing line" in the macro. (rod not present by default)
-> Removed via Detector Messenger
(they are exactly the same between them since the rod was never there BUT the geometry gets recomputed anyway, details below).
If on the other hand you place the holder via the macro you get 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 beggining (holder_flag set to true in the details below), this is what you get:
(and this is the desired result !!!!)
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 heprep visualization(!).
Many thanks for the time you spent helping me/us and I apologize if this is not the right forum to ask this follow-up question.
|Inline Depth:||Outline Depth:||Add message:|