Showing posts with label Geant4. Show all posts
Showing posts with label Geant4. Show all posts

Thursday, July 25, 2013

Detector Modeling (Geometry)

Okay, the last one was a little depressing and not very useful - so here are some images of the geometry I am modeling!
The GS20 model
 A nice little study I did was using a teflon reflector versus black tape (which shouldn't reflect much light). The spectra are shown below, and this agrees with my model.

The RPM8 simulation is what I am going for, and below is an image of what my model is.
RPM8 SIAC detector.  The detector is 2.1 m tall, 30 cm wide, 12.7 cm thick.
The reason for all of these nice pictures? ARI slides are due!

Tuesday, July 23, 2013

Optical Photon Simulation

It finally seems to be working without too much of a problem!  This is great news, as the ARI conference is in a week. I haven't really had time to go through the results yet, but they seem to be mostly aligned with the measurements. For the GS20 we are only losing about 8% of the photons, which seems low to me - but the mounting conditions usually account for around a 5-10% change in the peak channel number, so if we are only losing 8% then it kinda works, if you squint hard enough.
GS20 Simulation with Teflon Reflector, BK7 photocathode and silicone optical grease
The simulation is very slow, so I need to work on regaining the parallel capability that I discarded to avoid the code clutter.

In another news we have a big summer league game coming up tomorrow against my future roommate. And, for a limited time, I'm back on Facebook!

Friday, June 7, 2013

Super Awesome Range Simulations!

Yay!  I can simulate ranges accurately with GEANT4!  What I did was compare my GEANT4 simulated ranges to those published by the NIST in ASTAR and ESTAR.  A ratio of 1.0 indicates perfect agreement. For the most part (asides from being lazy and only running a low number of Monte Carlo trials) I have very good agreement to the NIST values.
Alpha

Electrons

Thursday, April 25, 2013

Super Cool Energy Deposition

A while ago I did a short post about the positional energy deposition in polymeric films.  I recently ran the simulation for 25 cm thick films, and it is cool that it is possible to see a lot of fundamental physics in the simulation.
Neutron Energy Deposition. (I wish I was good enough such that you could rotate the figure)
First, you can see for very thick films pratically of the energy is deposited in the film (the neutron reaction has a q-value of 4.78 MeV). There is some backscattering lost of the front edge of the film, shown by the number of events in the first thickness bin.  This effect is decreased as one goes into the film. Secondly, you can see the exponential attenuation of neutrons through the film by th linear decrease in the frequency of counts as you go through the film at 4.78 MeV -  just taking the slice at 4.78 MeV.  This decrease is linear on a log scale, and therfore follows an exponential attenutation.  From this it would then be possible to esimate the macroscopic absoribition cross section, which determines the rate of attenuation in the medium. Pretty cool, huh?

Tuesday, April 23, 2013

Compton Scattering & Secondary Electron Kinetic Energy Distrbution

Every once and a while it is good to do basic physics again. This problem was for the validation (again) of my GEANT4 code that simulates the energy deposition and distribution of secondary electrons in a thin film in order to make sure that I am grabbing the right particles / using the correct tracking.

The physics involved are the energy of the Compton scattering of the photon
 \[E_e= E - \frac{E m_e c^2}{m_e c^2 + E (1-\cos\theta)}\]
and the Klein-Nishma scattering cross section
\[ d\sigma = r_0^2 f(\theta)\sin\theta d\theta d\phi \]
where
\[f(\theta) = \frac{1}{2}\left(\frac{E'}{E}\right)^2 \left(\frac{E'}{E} + \frac{E}{E'}-\sin^2\theta\right)\].
After integrating out the phi component it is possible to arrive at
\[\frac{d\sigma}{d \theta} = 2\pi r_e^2 f(\theta) \sin \theta \]

Then taking the derivative of the electron kinetic energy allows for the relationship between the scattering probability and the electron kinetic energy.
 \[\frac{d\sigma}{dE_e} = 2\pi r_e^2 \sin \theta f(\theta)\left [ \frac{1+\frac{E}{m_e c^2}\left(1-\cos\theta \right)^2}{E^2 \sin \theta} \right ]\]

The difficult part was in correctly sampling the distribution, for this I just used a simple rejection method in which the probability of an energy is proportional the the scattering angle of that energy as the PDF (shown above) would be difficult to invert. For this a python script was written. The first part was to make sure that I could reproduce the Compton Scattering cross section; i.e. make sure that my math was correct (Hey, I had to do some fancy chain rule stuff and it has been awhile).
 
Scattering Cross Section as a function of Photon Energy (Co-60)
Finally, I sample from the above distribution and binned it according to a logarithmic energy binning, as shown below. The comparison to the GEANT4 data is also shown as the final figure.
Klein-Nishma Electron Kinetic Energy Spectra

Pretty Good, but I don't have the peak slightly below 1 MeV. 

After all of this it is kinda depressing - I spent so much time just making sure I was right that the simulation code wasn't really worth the effort if in two days you can do a quick analytical check - but hey, it is pretty sweet that I can reproduce things.

Monday, April 15, 2013

Positional Dependance of Energy Deposition

Often times I find myself making vague arguments about the influence of an neutron interaction position and it's energy deposition.  For example, if an interaction takes place "close" (say 10 microns) very little of the energy from the neutron interaction will be deposited in the film as the range of the alpha and triton are both in the 30-50 micron range and will thus leave the film. However, these are very hand-wavy arguments, so I quantified them with a GEANT4 simulation, bining the postion of first interaction and the energy deposition resulting from that interaction.  The detector is a cylinder with the impingent neutrons along the axis of the cylinder; thus it is axial symmetric and the only dimension of intrest is the z.

The following plots (however badly made; I'm still trying to figure out how to nicely plot things in ROOT) are the results of these simulations.

25 micron neutron - most of the energy depostion comes from the alpha, which has a shorter range than the triton
250 micron film neutron.  Can observe that interactions near the edges deposit less energy, are are far less likely.
2,500 micron (2.5mm) neutron. Essentially all of the energy is deposited in the film.
The gamma probablities of energy depsotion are pretty flat even for very thick films, with most of the interactions depositing very little energy, as expected.
10,000 micron (10 mm) film Co60
Incidently, if anyone knows how to space the axis label from the axis in ROOT, please let me know.

Monday, February 20, 2012

Gamma Interaction Simulations

One of the drawbacks of using MCNPX is a lack of control for the physics options, and its refusal to implement certain features.  So I have taken to playing around with Geant4 again, which means I get to make awesome pictures.
50 Events in a Plastic Scintillator
The results even seem correct, so I guess I'm on the correct track! (Get it, track . . .).   Next step is to add a photo cathode behind it and implement hits collections and sensitive detectors. I've also started to write my thesis; I think I am starting to look forward to getting away from Rocky Top.

In other news our IM Ultimate suffered our first defeat of the season after a very sluggish, hammer throwing, who needs defense first half.  We should still have the head to head and point diff, so I am still on track to win a T-Shirt.