This project has moved and is read-only. For the latest updates, please go here.

RadianceOfXAndYAndZAndThetaAndPhi detector confusion - non-zero values for non-zero Phi only when X >=0

May 12, 2012 at 4:30 AM

I used this XML file to simulate a RadianceOfXAndYAndZAndThetaAndPhi detector. There's only one (-40 to 40mm) Y-bin and one (0 to Pi) Theta bin.

My goal was to tally radiance for each phi in the X-Z plane (phi rotating about Y-axis in/out of the plane), to capture what the radiance of a line source would look like.

Here's what I see. For all but the first phi-bin, I'm only seeing values for X=>0...what might I be doing wrong?

May 12, 2012 at 8:00 PM

Hi David,  I found that the default Phi range given in the SimulationInputProvider was wrong.  The range on Phi should be [-pi,pi] not [0,2pi]. I updated the Provider and modified the matlab files so that the title of the plots for this detector was correct.

I made up this infile that specifies 4 x bins, 1 y bin, 4 x bins, 1 theta bin, 4 phi bins.  Since there are 4 phi bins, each bin is a quadrant.  So looking down along the z-axis with the positive x-axis to the right and the positive y-axis down, the phi bin [-pi,-pi/2] is where x values are negative, the phi bin [-pi/2,0] is where x values are positive and so on.   Here's what gets plotted.  So depending on the phi bin you specify, an exclusion of x<0 or x>0 may apply.

Let me know if you have any further questions.


May 12, 2012 at 8:07 PM

I just took a shower and realized what I just posted is total hogwash.  I know what the problem is.  I'll fix it in a few minutes.

May 12, 2012 at 8:27 PM

Okay, so I corrected the detector to use Direction Cosines in the determination of Phi rather than Position!  I'm not sure why that didn't hit me sooner...I should have taken a shower earlier ;)  I have pushed the fix and now using the infile from my post above, I get these results.

Sorry about that, Carole

May 12, 2012 at 8:27 PM

Hi Carole, thanks for thinking through this for me. I may have been confused regarding which variable was the azimuthal angle. Looking at our source descriptions, Page 2 has phi as the azimuthal angle, not theta. This seems to be supported by the source code, too. My bad.

I'm pretty sure you've created documentation for this, but I can't find it from our Documentation page...we need to fix this.

May 12, 2012 at 8:30 PM

Just saw your last post - looks like the symmetry issue is fixed, and since this is a radially-symmetric problem, it's good that all the quadrants look the same. I'll go ahead and re-run with my initial intent, rotating about theta, not phi.

May 12, 2012 at 9:35 PM

Hi Carole,

I re-ran varying theta instead of phi with the new code and all looks well, thanks! Here's a plot of my results. You can see the forward directed photons in the first theta bin (top-left).

I have a separate question now, but will post in a new thread.


May 12, 2012 at 11:15 PM

I have updated the documentation on this page.  The link to this page is currently on the codeplex downloads page and can be found from the VP website->Documentation->Conventional Monte Carlo (on left side panel of page).

May 12, 2012 at 11:42 PM

Thanks Carole. It should be navigable from within the documentation page itself, too.