Difference between revisions of "Simulations of Particle Interactions with Matter"

From New IAC Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
== Overview ==
+
==Class Admin==
  
=== Particle Detection ===
 
A device detects a particle only after the particle transfers energy to the device.
 
  
Energy intrinsic to a device depends on the material used in a device
+
[[TF_SPIM_ClassAdmin]]
  
Some device of material with an average atomic number (<math>Z</math>) is at some temperature (<math>T</math>).  The materials atoms are in constant thermal motion (unless T = zero degrees Klevin).
+
== Homework Problems==
 +
[[HomeWork_Simulations_of_Particle_Interactions_with_Matter]]
  
Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that
+
=Introduction=
  
<math>P(E) = \frac{1}{kT} e^{-\frac{E}{kT}}</math>
+
[[TF_SPIM_Intro]]
  
<math>P(E)</math> represents the probability of any atom in the system having an energy <math>E</math> where
+
= Energy Loss =
  
<math>k= 1.38 \times 10^{-23} \frac{J}{mole \cdot K}</math>
+
[[TF_SPIM_StoppingPower]]
  
Note:  You may be more familiar with the Maxwell-Boltzmann distribution in the form
+
Ann. Phys. vol. 5, 325, (1930)
  
<math>N(\nu) = 4 \pi N \left ( \frac{m}{2\pi k T} \right ) ^{3/2} v^2  e^{-mv^2/2kT}</math>
+
=Interactions of Electrons and Photons with Matter=
  
where <math>N(v) \Delta v</math> would represent the molesules in the gas sample with speeds between <math>v</math> and <math>v + \Delta v</math>
+
[[TF_SPIM_e-gamma]]
  
==== Example 1: P(E=5 eV) ====
+
= Hadronic Interactions =
  
What is the probability that an atom in a 12.011 gram block of carbon would have and energy of 5 eV?
+
[[TF_SPIM_HadronicInteractions]]
  
First lets check that the probability distribution is Normailized; ie: does <math>\int_0^{\infty} P(E) dE =1</math>?
+
= Final Project=
  
 +
A final project will be submitted that will be graded with the following metrics:
  
<math>\int_0^{\infty} P(E) dE = \int_0^{\infty} \frac{1}{kT} e^{-\frac{E}{kT}} dE = \frac{1}{kT} \frac{1}{\frac{1}{-kT}} e^{-\frac{E}{kT}} \mid_0^{\infty} = - [e^{-\infty} - e^0]= 1</math>
+
1.) The document must be less than 15 pages.
  
<math>P(E=5eV)</math> is calculated by integrating P(E) over some energy interval ( ie:<math> N(v) dv</math>).  I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.
+
2.) The document must contain references in a bibliography (5 points) .
  
 +
3.) A comparison must be made between GEANT4's prediction and either the prediction of someone else or an experimental result(30 points).
  
<math>\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1 eV/kT} - e^{4.9 eV/kT}]</math>
+
4.) The graphs must be of publication quality with font sizes similar or larger than the 12 point font (10 points).
  
<math>k= (1.38 \times 10^{-23} \frac{J}{mole \cdot K} ) (1.38 \times 10^{-23} \frac{J}{mole \cdot K} )(6.42 \times 10^{18} \frac{eV}{J})= 8.614 \times 10^{-5} \frac {eV}{mole \cdot K}</math>
+
5.) The document must be grammatically correct (5 points).
  
assuming a room empterature of <math>T=300 K</math>
+
6.) The document format must contain the following sections: An abstract of 5 sentences (5 points) , an Introduction(10 points), a Theory section (20 points) , if applicable a section describing the experiment that was simulated, a section delineating the comparisons that were made, and a conclusion( 15 points).
  
then<math>kT = 0.0258 \frac{eV}{mole}</math>
+
=Resources=
  
and
+
[http://geant4.web.cern.ch/geant4/  GEANT4 Home Page]
  
<math>\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1/0.0258} - e^{4.9/0.0258}] = 4.48 \times 10^{-83} - 1.9 \times 10^{-86} \approx 4.48 \times 10^{-83}</math>
+
[http://root.cern.ch ROOT Home page]
  
or in other words the precise mathematical calculation of the probability may be approximated by just using the distribution function alone
+
[http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/  Fermi Lab Example]
  
<math>P(E=5eV) = e^{-5/0.0258} \approx 10^{-85}</math>
 
  
This approximation breaks down as <math>E \rightarrow 0.0258 eV</math>
+
[http://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html NIST Range Tables]
  
Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = <math>6 \times 10^{23} </math>carbon atoms
+
[http://ie.lbl.gov/xray/ X-ray specturm]
  
We do not expect to see a 5 eV carbon atom in a sample size of <math>6 \times 10^{23} </math> carbon atoms when the probability of observing such an atom is <math>\approx 10^{-85}</math>
+
[[Installing_GEANT4.9.3_Fsim]]
  
The energy we expect to see would be calculated by
+
== Saving/restoring Random number seed==
  
<math><E> = \int_{0}^{\infty} E \cdot P(E) dE</math>
+
You save the current state of the random number generator with the command
  
If you used this block of carbon as a detector you would easily notice an event in which a carbon atom absorbed 5 eV of energy as compared to the energy of a typical atom in the carbon block.
+
/random/setSavingFlag 1
  
----
+
/run/beamOn 100
  
Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.
+
/random/saveThisRun
  
approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon
+
A file is created called
  
<math>P(E=1 eV) = e^{-1/0.0258} \approx 10^{-17}</math>
+
currentEvent.rndm
  
approximately 10 eV of energy is needed to ionize an atom in a gas chamber
+
/control/shell mv currentEvent.rndm currentEvent10.rndm
  
<math>P(E=10 eV) = e^{-10/0.0258} \approx 10^{-169}</math>
 
  
 +
You can restore the random number generator and begin generating random number from the last save time
  
 +
/random/resetEngineFrom currentEvent.rndm
  
The low probability of having an atom with 10 eV of energy means that an ionization chamber would have a better Signal to Noise ratio (SNR) for detecting 10 eV radiation than a silicon detector
+
==Building GEANT4.11==
  
But if you cool the silicon detector to 200 degrees Kelvin (200 K) then
+
===4.11.2===
 +
[[TF_GEANT4.11]]
  
<math>P(E=1 eV) = e^{-1/0.0172} \approx 10^{-26}  10^{-17}<< </math>
+
==Building GEANT4.10==
  
So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.
 
  
also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.
+
===4.10.02===
  
Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it quantum efficiency for absorbing energy.
+
[[TF_GEANT4.10.2]]
 +
===4.10.01===
  
=== The Monte Carlo method ===
+
[[TF_GEANT4.10.1]]
; Stochastic
 
: from the greek word "stachos"
 
: a means of, relating to, or characterized by conjecture and randomness.
 
  
=== A Unix Primer ===
+
==Building GEANT4.9.6==
=== A Root Primer ===
 
==== Example 1: Create Ntuple  and Draw Histogram====
 
  
=== Cross Sections ===
+
[[TF_GEANT4.9.6]]
==== Deginitions ====
 
==== Example : Elastic Scattering ====
 
==== Lab Frame Cross Sections ====
 
  
== Stopping Power ==
+
==Building GEANT4.9.5==
=== Bethe Equation ===
 
====Classical Energy Loss ====
 
====Bethe-Bloch Equation ====
 
=== Energy Straggling ===
 
==== Thick Absorber ====
 
====Thin Absorbers====
 
=== Range Straggling===
 
=== Electron Capture and Loss ===
 
=== Multiple Scattering ===
 
  
== Interactions of Electrons and Photons with Matter==
+
[[TF_GEANT4.9.5]]
=== Bremsstrahlung===
 
=== Photo-electric effect===
 
=== Compton Scattering ===
 
=== Pair Production ===
 
  
== Hadronic Interactions ==
+
An old version of Installation notes for versions prior to 9.5
=== Neutron Interactions ===
 
==== Elastic scattering====
 
  
==== Inelasstic Scattering====
+
[http://brems.iac.isu.edu/~tforest/NucSim/Day3/ Old Install Notes]
 +
 
 +
 
 +
Visualization Libraries:
 +
 
 +
[http://www.opengl.org/ OpenGL]
 +
 
 +
[http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html  DAWN]
 +
 
 +
 
 +
[http://doc.coin3d.org/Coin/  Coin3D]
 +
 
 +
==Compiling G4 with ROOT==
 +
 
 +
These instruction describe how you can create a tree within ExN02SteppingVerbose to store tracking info in an array (max number of steps in a track is set to 100 for the desired particle)
 +
 
 +
[[G4CompileWRootforTracks]]
 +
 
 +
==Using SLURM==
 +
 
 +
http://slurm.schedmd.com/quickstart.html
 +
 
 +
 
 +
https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/
 +
 
 +
===simple batch script for one process job===
 +
 
 +
create the file submit.sbatch below
 +
 
 +
<pre>
 +
#!/bin/sh
 +
#SBATCH --time=1
 +
cd src/PI
 +
./PI_MC 100000000000000
 +
</pre>
 +
 
 +
the execute
 +
 
 +
:sbatch submit.sbatch
 +
 
 +
check if its running with
 +
 
 +
:squeue
 +
 
 +
to kill a batch job
 +
 
 +
:scancel JOBID
 +
 
 +
===On minerve===
 +
 
 +
Sample script to submit 10 batch jobs.
 +
 
 +
the filename is minervesubmit and you run like
 +
source minervesubmit
 +
 
 +
<pre>
 +
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch
 +
qsub submit10mil
 +
qsub submit20mil
 +
qsub submit30mil
 +
qsub submit40mil
 +
qsub submit50mil
 +
qsub submit60mil
 +
qsub submit70mil
 +
qsub submit80mil
 +
qsub submit90mil
 +
qsub submit100mil
 +
</pre>
 +
 
 +
The file submit10mil looks like this
 +
<pre>
 +
#!/bin/sh
 +
#PBS -l nodes=1
 +
#PBS -A FIAC
 +
#PBS -M foretony@isu.edu
 +
#PBS -m abe
 +
#
 +
source /home/foretony/src/GEANT4/geant4.9.5/geant4.9.6-install/bin/geant4.sh
 +
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch/10mil
 +
../../exampleN02 run1.mac > /dev/null
 +
</pre>
 +
 
 +
 
 +
use
 +
 
 +
qstat
 +
 
 +
to check that the process is still running
 +
 
 +
use
 +
 
 +
qdel jobID#
 +
 
 +
if you want to kill the batch job, the jobID number shows up when you do stat.
 +
 
 +
for example
 +
<pre>
 +
[foretony@minerve HW10]$ qstat
 +
Job id                    Name            User            Time Use S Queue
 +
------------------------- ---------------- --------------- -------- - -----
 +
27033.minerve            submit          foretony        00:41:55 R default       
 +
[foretony@minerve HW10]$ qdel 27033
 +
[foretony@minerve HW10]$ qstat
 +
</pre>
 +
 
 +
==Definitions of Materials==
 +
 
 +
[[File:MCNP_Compendium_of_Material_Composition.pdf]]
 +
 
 +
==Minerve2 GEANT 4.10.1 Xterm error==
 +
 
 +
 
 +
On OS X El Capitan V 10.11.4 using XQuartz
 +
 
 +
~/src/GEANT4/geant4.10.1/Simulations/B2/B2a/exsmpleB2a
 +
 
 +
<pre>
 +
 
 +
# Use this open statement to create an OpenGL view:
 +
/vis/open OGL 600x600-0+0
 +
/vis/sceneHandler/create OGL
 +
/vis/viewer/create ! ! 600x600-0+0
 +
libGL error: failed to load driver: swrast
 +
X Error of failed request:  BadValue (integer parameter out of range for operation)
 +
  Major opcode of failed request:  150 (GLX)
 +
  Minor opcode of failed request:  3 (X_GLXCreateContext)
 +
  Value in failed request:  0x0
 +
  Serial number of failed request:  25
 +
  Current serial number in output stream:  26
 +
</pre>
 +
 
 +
 
 +
 
 +
 
 +
 
 +
[[TF_SPIM_OLD]]

Latest revision as of 22:31, 15 January 2024

Class Admin

TF_SPIM_ClassAdmin

Homework Problems

HomeWork_Simulations_of_Particle_Interactions_with_Matter

Introduction

TF_SPIM_Intro

Energy Loss

TF_SPIM_StoppingPower

Ann. Phys. vol. 5, 325, (1930)

Interactions of Electrons and Photons with Matter

TF_SPIM_e-gamma

Hadronic Interactions

TF_SPIM_HadronicInteractions

Final Project

A final project will be submitted that will be graded with the following metrics:

1.) The document must be less than 15 pages.

2.) The document must contain references in a bibliography (5 points) .

3.) A comparison must be made between GEANT4's prediction and either the prediction of someone else or an experimental result(30 points).

4.) The graphs must be of publication quality with font sizes similar or larger than the 12 point font (10 points).

5.) The document must be grammatically correct (5 points).

6.) The document format must contain the following sections: An abstract of 5 sentences (5 points) , an Introduction(10 points), a Theory section (20 points) , if applicable a section describing the experiment that was simulated, a section delineating the comparisons that were made, and a conclusion( 15 points).

Resources

GEANT4 Home Page

ROOT Home page

Fermi Lab Example


NIST Range Tables

X-ray specturm

Installing_GEANT4.9.3_Fsim

Saving/restoring Random number seed

You save the current state of the random number generator with the command

/random/setSavingFlag 1

/run/beamOn 100

/random/saveThisRun

A file is created called

currentEvent.rndm

/control/shell mv currentEvent.rndm currentEvent10.rndm


You can restore the random number generator and begin generating random number from the last save time

/random/resetEngineFrom currentEvent.rndm

Building GEANT4.11

4.11.2

TF_GEANT4.11

Building GEANT4.10

4.10.02

TF_GEANT4.10.2

4.10.01

TF_GEANT4.10.1

Building GEANT4.9.6

TF_GEANT4.9.6

Building GEANT4.9.5

TF_GEANT4.9.5

An old version of Installation notes for versions prior to 9.5

Old Install Notes


Visualization Libraries:

OpenGL

DAWN


Coin3D

Compiling G4 with ROOT

These instruction describe how you can create a tree within ExN02SteppingVerbose to store tracking info in an array (max number of steps in a track is set to 100 for the desired particle)

G4CompileWRootforTracks

Using SLURM

http://slurm.schedmd.com/quickstart.html


https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/

simple batch script for one process job

create the file submit.sbatch below

#!/bin/sh
#SBATCH --time=1
cd src/PI
./PI_MC 100000000000000

the execute

sbatch submit.sbatch

check if its running with

squeue

to kill a batch job

scancel JOBID

On minerve

Sample script to submit 10 batch jobs.

the filename is minervesubmit and you run like

source minervesubmit
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch
qsub submit10mil
qsub submit20mil
qsub submit30mil
qsub submit40mil
qsub submit50mil
qsub submit60mil
qsub submit70mil
qsub submit80mil
qsub submit90mil
qsub submit100mil

The file submit10mil looks like this

#!/bin/sh
#PBS -l nodes=1
#PBS -A FIAC
#PBS -M foretony@isu.edu
#PBS -m abe
#
source /home/foretony/src/GEANT4/geant4.9.5/geant4.9.6-install/bin/geant4.sh
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch/10mil
../../exampleN02 run1.mac > /dev/null 


use

qstat

to check that the process is still running

use

qdel jobID#

if you want to kill the batch job, the jobID number shows up when you do stat.

for example

[foretony@minerve HW10]$ qstat
Job id                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
27033.minerve             submit           foretony        00:41:55 R default        
[foretony@minerve HW10]$ qdel 27033
[foretony@minerve HW10]$ qstat

Definitions of Materials

File:MCNP Compendium of Material Composition.pdf

Minerve2 GEANT 4.10.1 Xterm error

On OS X El Capitan V 10.11.4 using XQuartz

~/src/GEANT4/geant4.10.1/Simulations/B2/B2a/exsmpleB2a


# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
/vis/viewer/create ! ! 600x600-0+0
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  25
  Current serial number in output stream:  26



TF_SPIM_OLD