<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.iac.isu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Foretony</id>
	<title>New IAC Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.iac.isu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Foretony"/>
	<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=Special:Contributions/Foretony"/>
	<updated>2026-05-08T09:24:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130064</id>
		<title>TF GEANT4.11</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130064"/>
		<updated>2025-04-02T05:12:21Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* TSG */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
== System requirements==&lt;br /&gt;
&lt;br /&gt;
===Installing on Ubuntu 24===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
install OpenGL&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglu1-mesa-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglut-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxpm-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxmu-dev&lt;br /&gt;
&lt;br /&gt;
sudo apt search libexpat1-dev&lt;br /&gt;
&lt;br /&gt;
maybe  &lt;br /&gt;
&lt;br /&gt;
sudo apt install libcurl4-openssl-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install libmotif-dev&lt;br /&gt;
&lt;br /&gt;
==resources==&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/InstallationGuide/html/installguide.html#buildandinstall&lt;br /&gt;
&lt;br /&gt;
==Step -by- Step commands==&lt;br /&gt;
&lt;br /&gt;
 mkdir geant4.11&lt;br /&gt;
&lt;br /&gt;
 cd geant4.11&lt;br /&gt;
&lt;br /&gt;
using git to get version 4.11.2&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Geant4/geant4.git&lt;br /&gt;
&lt;br /&gt;
 cd geant4&lt;br /&gt;
&lt;br /&gt;
 git checkout v11.2.2&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
 mkdir build&lt;br /&gt;
&lt;br /&gt;
 cd build&lt;br /&gt;
&lt;br /&gt;
 cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11:BOOL=ON -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.11/install ~/src/GEANT4/geant4.11/geant4&lt;br /&gt;
&lt;br /&gt;
 make -j8&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
 cd ../geant4-install/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 source bin/geant4.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===examples===&lt;br /&gt;
&lt;br /&gt;
You can test your installation by compiling and running the example programs&lt;br /&gt;
&lt;br /&gt;
first try to compile example/basic/B2  located in the directory where you build everything&lt;br /&gt;
&lt;br /&gt;
source geant4-install/bin/geant4.csh &lt;br /&gt;
&lt;br /&gt;
cd geant4/examples/basic/B2/B2a&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===creating a copy of an example===&lt;br /&gt;
&lt;br /&gt;
cd&lt;br /&gt;
&lt;br /&gt;
mkdir HW&lt;br /&gt;
&lt;br /&gt;
cd HW&lt;br /&gt;
&lt;br /&gt;
cp -r geant4.10.02.p02/examples/basic/B2/B2a/* ./&lt;br /&gt;
&lt;br /&gt;
rm CMakeCache.txt&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
==Commands used for version 4.9.5==&lt;br /&gt;
&lt;br /&gt;
Download the source code to a subdirectory.&lt;br /&gt;
&lt;br /&gt;
 I stored it in /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
Then I created a build subdirectory&lt;br /&gt;
&lt;br /&gt;
 mkdir /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-build&lt;br /&gt;
&lt;br /&gt;
From inside the build directory I execute the cmake command using a switch to download the data files and install visulatization &lt;br /&gt;
&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_OPENGL_X11=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_XM=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEASNT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I install if teh make was succcessfull&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Build example N02===&lt;br /&gt;
&lt;br /&gt;
To build an example you need to create a build subdirectory under the subdirectory of teh example source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  cmake -DGeant4_DIR=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install ../&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TSG==&lt;br /&gt;
&lt;br /&gt;
 TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE, TSG)&lt;br /&gt;
 Default graphics system is: TSG_OFFSCREEN (based on build flags).&lt;br /&gt;
 Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).&lt;br /&gt;
 Note: Parameters specified on the command line will override these defaults.&lt;br /&gt;
      Use &amp;quot;vis/open&amp;quot; without parameters to get these defaults.&lt;br /&gt;
&lt;br /&gt;
==ROOT install==&lt;br /&gt;
&lt;br /&gt;
cmake command to build standalone ROOT without python xrootd and ssl&lt;br /&gt;
&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=../root_install -Dbuiltin_openssl=OFF -Dpython=OFF -Dbuiltin_xrootd=OFF -Dxrootd=OFF ../root_src^C&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130063</id>
		<title>SPIM PhotElectricEffect Lab</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130063"/>
		<updated>2025-03-31T18:32:44Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to evaluate the implementation of the&lt;br /&gt;
Photoelectric (photo) effect in GEANT4.&lt;br /&gt;
&lt;br /&gt;
The photoelectric effect is a discrete process by which a photon&lt;br /&gt;
ejects electrons from the surface of a metal.  &lt;br /&gt;
&lt;br /&gt;
Here the process is generalized to mean the ejection of an&lt;br /&gt;
electron due to a collision with an incident photon (&lt;br /&gt;
a direct ionization process).  The incident photon is absorbed in&lt;br /&gt;
the process and the ejected electron carries away the excess&lt;br /&gt;
energy.  This differs from Compton scattering where the photon is&lt;br /&gt;
not absorbed but rather scatters from the electron.&lt;br /&gt;
&lt;br /&gt;
To accomplish the above objective you will choose an element from&lt;br /&gt;
the table below which has at least 4 energy levels.&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php?title=TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
Then you will use GEANT to create histograms of the photon energy&lt;br /&gt;
lost as predicted by GEANT4's &lt;br /&gt;
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.&lt;br /&gt;
&lt;br /&gt;
you should comment out all other physics processes for a gamma particle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.) Step 1 is to create a target made from one of the elements&lt;br /&gt;
above which is long enough to almost guarantee a photoelectric&lt;br /&gt;
event for each incident photon.&lt;br /&gt;
&lt;br /&gt;
I chose Argon.  You will choose something else.&lt;br /&gt;
&lt;br /&gt;
I edited the Detector Construction code to have the following&lt;br /&gt;
&lt;br /&gt;
   //Argon gas&lt;br /&gt;
  //G4Material* ArgonGas = &lt;br /&gt;
  //  new G4Material(&amp;quot;ArgonGas&amp;quot;, z=18., a=39.948*g/mole, density= 1.784*mg/cm3);&lt;br /&gt;
 TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
and I made my target length long&lt;br /&gt;
&lt;br /&gt;
 fTargetLength  = 15. * cm;&lt;br /&gt;
&lt;br /&gt;
2.) Then make sure that only one process is in the physics.cc for the gamma particle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     RegisterPhysics (new G4EmStandardPhysics());&lt;br /&gt;
      //    RegisterPhysics(new G4EmLivermorePhysics());                                   &lt;br /&gt;
      //    RegisterPhysics(new G4EmPenelopePhysics());                                    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.)  Now you need to alter the stepping.cc code so it writes&lt;br /&gt;
out the photon KE lost.  Mine looked like this&lt;br /&gt;
&lt;br /&gt;
    if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;gamma&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetTrack()-&amp;gt;GetParentID()==0 &amp;amp;&amp;amp;  step-&amp;gt;GetTrack()-&amp;gt;GetCurrentStepNumber()==1)&lt;br /&gt;
      InitialPhotonEnergy=step-&amp;gt;GetTrack()-&amp;gt;GetKineticEnergy();&lt;br /&gt;
&lt;br /&gt;
  if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;gamma&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;phot&amp;quot;)&lt;br /&gt;
     {&lt;br /&gt;
        /*&lt;br /&gt;
          G4cout&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;stepping:cc &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n\t Particle=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n \t Process Name=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t ParentID=  &amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetParentID()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n\t volume=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetVolume()-&amp;gt;GetName()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t x,y,z=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt;step-&amp;gt;GetTrack()-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t Px,Py,Pz=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t dz=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetStepLength()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n \t Delta E=&amp;quot; &amp;lt;&amp;lt;  step-&amp;gt;GetTotalEnergyDeposit()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n\t edep=&amp;quot; &amp;lt;&amp;lt; edep&lt;br /&gt;
          &amp;lt;&amp;lt; G4endl;&lt;br /&gt;
        */&lt;br /&gt;
          outfile &amp;lt;&amp;lt;        InitialPhotonEnergy &amp;lt;&amp;lt; &amp;quot;\t&amp;quot;  &amp;lt;&amp;lt; step-&amp;gt;GetTotalEnergyDeposit()  &amp;lt;&amp;lt; G4endl;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
I used G4out and set /tracking/versose 2 to check that I was&lt;br /&gt;
printing out the right thing for each simulation event (above it&lt;br /&gt;
is commented out).  If you comment out the line with &amp;quot;oufile&amp;quot; and&lt;br /&gt;
un-comment out the two lines with G4cout then what was printing&lt;br /&gt;
to a file will print to the terminal window.&lt;br /&gt;
&lt;br /&gt;
4.) You now have the infrastructure to start your investigation.&lt;br /&gt;
&lt;br /&gt;
ie: use /gun/energy to change the energy of the incident photon and &lt;br /&gt;
cover the range of electron binding energies in the atom you&lt;br /&gt;
selected.&lt;br /&gt;
&lt;br /&gt;
you can create root trees containing the photon kinetic energy&lt;br /&gt;
lost in the target and compare those with the electron binding&lt;br /&gt;
energies of your chosen atom.&lt;br /&gt;
&lt;br /&gt;
Is there a distribution of photon energies lost or is just one&lt;br /&gt;
specific photon energy lost?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) As in the previous lab you will write your results up in TeX,&lt;br /&gt;
include all neccessary figures, and reach a conclusion describing&lt;br /&gt;
which entry to use in your physicslist and what are the&lt;br /&gt;
limitations for its use.&lt;br /&gt;
&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
0 points /10 if you use a target atom with less than 3 energy&lt;br /&gt;
levels (ie H, He, Li ...).  This means all atoms should have &amp;quot;A&amp;quot;&lt;br /&gt;
of Sodium(Na) or above.&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you insert a reference and tabulated values for&lt;br /&gt;
the binding energy of your atom (along with uncertainty in that&lt;br /&gt;
binding energy) and compare that value with the GEANT4 prediction.&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you are able to implement the  G4EmLivermorePhysics() and  G4EmPenelopePhysics() models.  Compare the energy levels among the three models and the Measured/Mosley values.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130062</id>
		<title>SPIM PhotElectricEffect Lab</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130062"/>
		<updated>2025-03-31T17:23:37Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to evaluate the implementation of the&lt;br /&gt;
Photoelectric (photo) effect in GEANT4.&lt;br /&gt;
&lt;br /&gt;
The photoelectric effect is a discrete process by which a photon&lt;br /&gt;
ejects electrons from the surface of a metal.  &lt;br /&gt;
&lt;br /&gt;
Here the process is generalized to mean the ejection of an&lt;br /&gt;
electron due to a collision with an incident photon (&lt;br /&gt;
a direct ionization process).  The incident photon is absorbed in&lt;br /&gt;
the process and the ejected electron carries away the excess&lt;br /&gt;
energy.  This differs from Compton scattering where the photon is&lt;br /&gt;
not absorbed but rather scatters from the electron.&lt;br /&gt;
&lt;br /&gt;
To accomplish the above objective you will choose an element from&lt;br /&gt;
the table below which has at least 4 energy levels.&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php?title=TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
Then you will use GEANT to create histograms of the photon energy&lt;br /&gt;
lost as predicted by GEANT4's &lt;br /&gt;
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.&lt;br /&gt;
&lt;br /&gt;
you should comment out all other physics processes for a gamma particle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.) Step 1 is to create a target made from one of the elements&lt;br /&gt;
above which is long enough to almost guarantee a photoelectric&lt;br /&gt;
event for each incident photon.&lt;br /&gt;
&lt;br /&gt;
I chose Argon.  You will choose something else.&lt;br /&gt;
&lt;br /&gt;
I edited the Detector Construction code to have the following&lt;br /&gt;
&lt;br /&gt;
   //Argon gas&lt;br /&gt;
  //G4Material* ArgonGas = &lt;br /&gt;
  //  new G4Material(&amp;quot;ArgonGas&amp;quot;, z=18., a=39.948*g/mole, density= 1.784*mg/cm3);&lt;br /&gt;
 TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
and I made my target length long&lt;br /&gt;
&lt;br /&gt;
 fTargetLength  = 15. * cm;&lt;br /&gt;
&lt;br /&gt;
2.) Then make sure that only one process is in the physics.cc for the gamma particle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     RegisterPhysics (new G4EmStandardPhysics());&lt;br /&gt;
      //    RegisterPhysics(new G4EmLivermorePhysics());                                   &lt;br /&gt;
      //    RegisterPhysics(new G4EmPenelopePhysics());                                    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.)  Now you need to alter the stepping.cc code so it writes&lt;br /&gt;
out the photon KE lost.  Mine looked like this&lt;br /&gt;
&lt;br /&gt;
    if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;gamma&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetTrack()-&amp;gt;GetParentID()==0 &amp;amp;&amp;amp;  step-&amp;gt;GetTrack()-&amp;gt;GetCurrentStepNumber()==1)&lt;br /&gt;
      InitialPhotonEnergy=step-&amp;gt;GetTrack()-&amp;gt;GetKineticEnergy();&lt;br /&gt;
&lt;br /&gt;
  if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;gamma&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;phot&amp;quot;)&lt;br /&gt;
     {&lt;br /&gt;
        /*&lt;br /&gt;
          G4cout&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;stepping:cc &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n\t Particle=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n \t Process Name=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t ParentID=  &amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetParentID()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n\t volume=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetVolume()-&amp;gt;GetName()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t x,y,z=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt;step-&amp;gt;GetTrack()-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t Px,Py,Pz=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; step-&amp;gt;GetTrack()-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot;\n \t dz=&amp;quot; &amp;lt;&amp;lt; step-&amp;gt;GetStepLength()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n \t Delta E=&amp;quot; &amp;lt;&amp;lt;  step-&amp;gt;GetTotalEnergyDeposit()&lt;br /&gt;
          &amp;lt;&amp;lt; &amp;quot; \n\t edep=&amp;quot; &amp;lt;&amp;lt; edep&lt;br /&gt;
          &amp;lt;&amp;lt; G4endl;&lt;br /&gt;
        */&lt;br /&gt;
          outfile &amp;lt;&amp;lt;        InitialPhotonEnergy &amp;lt;&amp;lt; &amp;quot;\t&amp;quot;  &amp;lt;&amp;lt; step-&amp;gt;GetTotalEnergyDeposit()  &amp;lt;&amp;lt; G4endl;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
I used G4out and set /tracking/versose 2 to check that I was&lt;br /&gt;
printing out the right thing for each simulation event (above it&lt;br /&gt;
is commented out).  If you comment out the line with &amp;quot;oufile&amp;quot; and&lt;br /&gt;
un-comment out the two lines with G4cout then what was printing&lt;br /&gt;
to a file will print to the terminal window.&lt;br /&gt;
&lt;br /&gt;
4.) You now have the infrastructure to start your investigation.&lt;br /&gt;
&lt;br /&gt;
ie: use /gun/energy to change the energy of the incident photon and &lt;br /&gt;
cover the range of electron binding energies in the atom you&lt;br /&gt;
selected.&lt;br /&gt;
&lt;br /&gt;
you can create root trees containing the photon kinetic energy&lt;br /&gt;
lost in the target and compare those with the electron binding&lt;br /&gt;
energies of your chosen atom.&lt;br /&gt;
&lt;br /&gt;
Is there a distribution of photon energies lost or is just one&lt;br /&gt;
specific photon energy lost?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) As in the previous lab you will write your results up in TeX,&lt;br /&gt;
include all neccessary figures, and reach a conclusion describing&lt;br /&gt;
which entry to use in your physicslist and what are the&lt;br /&gt;
limitations for its use.&lt;br /&gt;
&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
0 points /10 if you use a target atom with less than 3 energy&lt;br /&gt;
levels (ie H, He, Li ...).  This means all atoms should have &amp;quot;A&amp;quot;&lt;br /&gt;
of Sodium(Na) or above.&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you insert a reference and tabulated values for&lt;br /&gt;
the binding energy of your atom (along with uncertainty in that&lt;br /&gt;
binding energy) and compare that value with the GEANT4 prediction.&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you are able to implement the  G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130061</id>
		<title>SPIM PhotElectricEffect Lab</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130061"/>
		<updated>2025-03-31T17:18:07Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to evaluate the implementation of the&lt;br /&gt;
Photoelectric (photo) effect in GEANT4.&lt;br /&gt;
&lt;br /&gt;
The photoelectric effect is a discrete process by which a photon&lt;br /&gt;
ejects electrons from the surface of a metal.  &lt;br /&gt;
&lt;br /&gt;
Here the process is generalized to mean the ejection of an&lt;br /&gt;
electron due to a collision with an incident photon (&lt;br /&gt;
a direct ionization process).  The incident photon is absorbed in&lt;br /&gt;
the process and the ejected electron carries away the excess&lt;br /&gt;
energy.  This differs from Compton scattering where the photon is&lt;br /&gt;
not absorbed but rather scatters from the electron.&lt;br /&gt;
&lt;br /&gt;
To accomplish the above objective you will choose an element from&lt;br /&gt;
the table below which has at least 4 energy levels.&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php?title=TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
Then you will use GEANT to create histograms of the photon energy&lt;br /&gt;
lost as predicted by GEANT4's &lt;br /&gt;
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.&lt;br /&gt;
&lt;br /&gt;
you should comment out all other physics processes for a gamma particle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.) Step 1 is to create a target made from one of the elements&lt;br /&gt;
above which is long enough to almost guarantee a photoelectric&lt;br /&gt;
event for each incident photon.&lt;br /&gt;
&lt;br /&gt;
I chose Argon.  You will choose something else.&lt;br /&gt;
&lt;br /&gt;
I edited the Detector Construction code to have the following&lt;br /&gt;
&lt;br /&gt;
   //Argon gas&lt;br /&gt;
  //G4Material* ArgonGas = &lt;br /&gt;
  //  new G4Material(&amp;quot;ArgonGas&amp;quot;, z=18., a=39.948*g/mole, density= 1.784*mg/cm3);&lt;br /&gt;
 TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
and I made my target length long&lt;br /&gt;
&lt;br /&gt;
 fTargetLength  = 15. * cm;&lt;br /&gt;
&lt;br /&gt;
2.) Then make sure that only one process is in the physics.cc for the gamma particle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     RegisterPhysics (new G4EmStandardPhysics());&lt;br /&gt;
      //    RegisterPhysics(new G4EmLivermorePhysics());                                   &lt;br /&gt;
      //    RegisterPhysics(new G4EmPenelopePhysics());                                    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.)  Now you need to alter the stepping.cc code so it writes&lt;br /&gt;
out the photon KE lost.  Mine looked like this&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     if( fTrack-&amp;gt;GetDefinition()-&amp;gt;GetPDGEncoding()==22 &amp;amp;&amp;amp; &lt;br /&gt;
                fStep-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName() ==  &amp;quot;phot&amp;quot; &lt;br /&gt;
              &amp;amp;&amp;amp; fTrack-&amp;gt;GetVolume()-&amp;gt;GetName() ==&amp;quot;Target&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
      //      G4cout  &amp;lt;&amp;lt; &amp;quot;  Photon &amp;quot;  ; &lt;br /&gt;
      //G4cout  &amp;lt;&amp;lt; &lt;br /&gt;
      outfile &amp;lt;&amp;lt;   &lt;br /&gt;
           //   fTrack-&amp;gt;GetKineticEnergy() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            fStep-&amp;gt;GetTotalEnergyDeposit()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().y()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().z()&amp;lt;&amp;lt; &amp;quot;    &amp;quot; &lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            &amp;lt;&amp;lt; G4endl;&amp;lt;br&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used G4out and set /tracking/versose 2 to check that I was&lt;br /&gt;
printing out the right thing for each simulation event (above it&lt;br /&gt;
is commented out).  If you comment out the line with &amp;quot;oufile&amp;quot; and&lt;br /&gt;
un-comment out the two lines with G4cout then what was printing&lt;br /&gt;
to a file will print to the terminal window.&lt;br /&gt;
&lt;br /&gt;
4.) You now have the infrastructure to start your investigation.&lt;br /&gt;
&lt;br /&gt;
ie: use /gun/energy to change the energy of the incident photon and &lt;br /&gt;
cover the range of electron binding energies in the atom you&lt;br /&gt;
selected.&lt;br /&gt;
&lt;br /&gt;
you can create root trees containing the photon kinetic energy&lt;br /&gt;
lost in the target and compare those with the electron binding&lt;br /&gt;
energies of your chosen atom.&lt;br /&gt;
&lt;br /&gt;
Is there a distribution of photon energies lost or is just one&lt;br /&gt;
specific photon energy lost?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) As in the previous lab you will write your results up in TeX,&lt;br /&gt;
include all neccessary figures, and reach a conclusion describing&lt;br /&gt;
which entry to use in your physicslist and what are the&lt;br /&gt;
limitations for its use.&lt;br /&gt;
&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
0 points /10 if you use a target atom with less than 3 energy&lt;br /&gt;
levels (ie H, He, Li ...).  This means all atoms should have &amp;quot;A&amp;quot;&lt;br /&gt;
of Sodium(Na) or above.&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you insert a reference and tabulated values for&lt;br /&gt;
the binding energy of your atom (along with uncertainty in that&lt;br /&gt;
binding energy) and compare that value with the GEANT4 prediction.&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you are able to implement the  G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130060</id>
		<title>SPIM PhotElectricEffect Lab</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130060"/>
		<updated>2025-03-31T17:17:47Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to evaluate the implementation of the&lt;br /&gt;
Photoelectric (photo) effect in GEANT4.&lt;br /&gt;
&lt;br /&gt;
The photoelectric effect is a discrete process by which a photon&lt;br /&gt;
ejects electrons from the surface of a metal.  &lt;br /&gt;
&lt;br /&gt;
Here the process is generalized to mean the ejection of an&lt;br /&gt;
electron due to a collision with an incident photon (&lt;br /&gt;
a direct ionization process).  The incident photon is absorbed in&lt;br /&gt;
the process and the ejected electron carries away the excess&lt;br /&gt;
energy.  This differs from Compton scattering where the photon is&lt;br /&gt;
not absorbed but rather scatters from the electron.&lt;br /&gt;
&lt;br /&gt;
To accomplish the above objective you will choose an element from&lt;br /&gt;
the table below which has at least 4 energy levels.&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php/TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php?title=TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
Then you will use GEANT to create histograms of the photon energy&lt;br /&gt;
lost as predicted by GEANT4's &lt;br /&gt;
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.&lt;br /&gt;
&lt;br /&gt;
you should comment out all other physics processes for a gamma particle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.) Step 1 is to create a target made from one of the elements&lt;br /&gt;
above which is long enough to almost guarantee a photoelectric&lt;br /&gt;
event for each incident photon.&lt;br /&gt;
&lt;br /&gt;
I chose Argon.  You will choose something else.&lt;br /&gt;
&lt;br /&gt;
I edited the Detector Construction code to have the following&lt;br /&gt;
&lt;br /&gt;
   //Argon gas&lt;br /&gt;
  //G4Material* ArgonGas = &lt;br /&gt;
  //  new G4Material(&amp;quot;ArgonGas&amp;quot;, z=18., a=39.948*g/mole, density= 1.784*mg/cm3);&lt;br /&gt;
 TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
and I made my target length long&lt;br /&gt;
&lt;br /&gt;
 fTargetLength  = 15. * cm;&lt;br /&gt;
&lt;br /&gt;
2.) Then make sure that only one process is in the physics.cc for the gamma particle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     RegisterPhysics (new G4EmStandardPhysics());&lt;br /&gt;
      //    RegisterPhysics(new G4EmLivermorePhysics());                                   &lt;br /&gt;
      //    RegisterPhysics(new G4EmPenelopePhysics());                                    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.)  Now you need to alter the stepping.cc code so it writes&lt;br /&gt;
out the photon KE lost.  Mine looked like this&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     if( fTrack-&amp;gt;GetDefinition()-&amp;gt;GetPDGEncoding()==22 &amp;amp;&amp;amp; &lt;br /&gt;
                fStep-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName() ==  &amp;quot;phot&amp;quot; &lt;br /&gt;
              &amp;amp;&amp;amp; fTrack-&amp;gt;GetVolume()-&amp;gt;GetName() ==&amp;quot;Target&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
      //      G4cout  &amp;lt;&amp;lt; &amp;quot;  Photon &amp;quot;  ; &lt;br /&gt;
      //G4cout  &amp;lt;&amp;lt; &lt;br /&gt;
      outfile &amp;lt;&amp;lt;   &lt;br /&gt;
           //   fTrack-&amp;gt;GetKineticEnergy() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            fStep-&amp;gt;GetTotalEnergyDeposit()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().y()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().z()&amp;lt;&amp;lt; &amp;quot;    &amp;quot; &lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            &amp;lt;&amp;lt; G4endl;&amp;lt;br&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used G4out and set /tracking/versose 2 to check that I was&lt;br /&gt;
printing out the right thing for each simulation event (above it&lt;br /&gt;
is commented out).  If you comment out the line with &amp;quot;oufile&amp;quot; and&lt;br /&gt;
un-comment out the two lines with G4cout then what was printing&lt;br /&gt;
to a file will print to the terminal window.&lt;br /&gt;
&lt;br /&gt;
4.) You now have the infrastructure to start your investigation.&lt;br /&gt;
&lt;br /&gt;
ie: use /gun/energy to change the energy of the incident photon and &lt;br /&gt;
cover the range of electron binding energies in the atom you&lt;br /&gt;
selected.&lt;br /&gt;
&lt;br /&gt;
you can create root trees containing the photon kinetic energy&lt;br /&gt;
lost in the target and compare those with the electron binding&lt;br /&gt;
energies of your chosen atom.&lt;br /&gt;
&lt;br /&gt;
Is there a distribution of photon energies lost or is just one&lt;br /&gt;
specific photon energy lost?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) As in the previous lab you will write your results up in TeX,&lt;br /&gt;
include all neccessary figures, and reach a conclusion describing&lt;br /&gt;
which entry to use in your physicslist and what are the&lt;br /&gt;
limitations for its use.&lt;br /&gt;
&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
0 points /10 if you use a target atom with less than 3 energy&lt;br /&gt;
levels (ie H, He, Li ...).  This means all atoms should have &amp;quot;A&amp;quot;&lt;br /&gt;
of Sodium(Na) or above.&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you insert a reference and tabulated values for&lt;br /&gt;
the binding energy of your atom (along with uncertainty in that&lt;br /&gt;
binding energy) and compare that value with the GEANT4 prediction.&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you are able to implement the  G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130059</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130059"/>
		<updated>2025-03-19T16:47:56Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Homework 6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it using the PI simulation program&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;asci2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x asci2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x*4&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x:evt.y&amp;quot;,&amp;quot;evt.x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x)&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x-evt.y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
Use the above equation to calculate the max energy loss (transfer) for a 10 GeV proton.&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.  &lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example B2a to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install texlive-latex-base&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130058</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130058"/>
		<updated>2025-03-17T17:49:30Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
The objective of this lab is to alter the physics.cc program to&lt;br /&gt;
ONLY include the G4EmStandardPhysics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;  &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit construction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Ta)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check physics.cc to be sure it has the Bremsstrahlung (eBrem) process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.1123 -0.847857 -0.681592 0.172033 -0.0256877 0.00355802 0.109265&lt;br /&gt;
1.11604 -0.890015 -0.650824 0.302384 -0.430069 0.261998 0.995961&lt;br /&gt;
0.102826 -1.06591 -0.860491 0.812798 -0.0716314 -0.0549312 0.0492417&lt;br /&gt;
0.168739 -1.06702 -0.798629 1.63029 -0.0109706 -0.148751 0.0789028&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;sim.dat&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    if(evt.event&amp;lt;3)&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    &lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130057</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130057"/>
		<updated>2025-03-17T17:16:12Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
The objective of this lab is to alter the physics.cc program to&lt;br /&gt;
ONLY include the G4EmStandardPhysics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit construction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check physics.cc to be sure it has the Bremsstrahlung (eBrem) process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.00725373, -0.0493313,-0.201349,0.903937,-0.000406446, -0.00119566, 0.00714295&lt;br /&gt;
0.00825911, 0.256055,0.0515852,1.37989,0.00113305, 0.000415401, 0.00817047&lt;br /&gt;
0.00689593, 0.267732,-0.614023,1.04238,-0.00423662, -0.00522941, 0.00150271&lt;br /&gt;
0.0954614, -0.0828961,0.00149944,-0.403959,-0.0184925, -0.000495819, 0.0936518&lt;br /&gt;
0.180546, -0.00629437,-0.173088,0.580054,0.0138079, -0.0599412, 0.169745&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;sim.dat&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130056</id>
		<title>SPIM PhotElectricEffect Lab</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130056"/>
		<updated>2025-03-17T02:37:46Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to evaluate the implementation of the&lt;br /&gt;
Photoelectric (photo) effect in GEANT4.&lt;br /&gt;
&lt;br /&gt;
The photoelectric effect is a discrete process by which a photon&lt;br /&gt;
ejects electrons from the surface of a metal.  &lt;br /&gt;
&lt;br /&gt;
Here the process is generalized to mean the ejection of an&lt;br /&gt;
electron due to a collision with an incident photon (&lt;br /&gt;
a direct ionization process).  The incident photon is absorbed in&lt;br /&gt;
the process and the ejected electron carries away the excess&lt;br /&gt;
energy.  This differs from Compton scattering where the photon is&lt;br /&gt;
not absorbed but rather scatters from the electron.&lt;br /&gt;
&lt;br /&gt;
To accomplish the above objective you will choose an element from&lt;br /&gt;
the table below which has at least 4 energy levels.&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php/TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then you will use GEANT to create histograms of the photon energy&lt;br /&gt;
lost as predicted by GEANT4's &lt;br /&gt;
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.&lt;br /&gt;
&lt;br /&gt;
you should comment out all other physics processes for a gamma particle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.) Step 1 is to create a target made from one of the elements&lt;br /&gt;
above which is long enough to almost guarantee a photoelectric&lt;br /&gt;
event for each incident photon.&lt;br /&gt;
&lt;br /&gt;
I chose Argon.  You will choose something else.&lt;br /&gt;
&lt;br /&gt;
I edited the Detector Construction code to have the following&lt;br /&gt;
&lt;br /&gt;
   //Argon gas&lt;br /&gt;
  //G4Material* ArgonGas = &lt;br /&gt;
  //  new G4Material(&amp;quot;ArgonGas&amp;quot;, z=18., a=39.948*g/mole, density= 1.784*mg/cm3);&lt;br /&gt;
 TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
and I made my target length long&lt;br /&gt;
&lt;br /&gt;
 fTargetLength  = 15. * cm;&lt;br /&gt;
&lt;br /&gt;
2.) Then make sure that only one process is in the physics.cc for the gamma particle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     RegisterPhysics (new G4EmStandardPhysics());&lt;br /&gt;
      //    RegisterPhysics(new G4EmLivermorePhysics());                                   &lt;br /&gt;
      //    RegisterPhysics(new G4EmPenelopePhysics());                                    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.)  Now you need to alter the stepping.cc code so it writes&lt;br /&gt;
out the photon KE lost.  Mine looked like this&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     if( fTrack-&amp;gt;GetDefinition()-&amp;gt;GetPDGEncoding()==22 &amp;amp;&amp;amp; &lt;br /&gt;
                fStep-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName() ==  &amp;quot;phot&amp;quot; &lt;br /&gt;
              &amp;amp;&amp;amp; fTrack-&amp;gt;GetVolume()-&amp;gt;GetName() ==&amp;quot;Target&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
      //      G4cout  &amp;lt;&amp;lt; &amp;quot;  Photon &amp;quot;  ; &lt;br /&gt;
      //G4cout  &amp;lt;&amp;lt; &lt;br /&gt;
      outfile &amp;lt;&amp;lt;   &lt;br /&gt;
           //   fTrack-&amp;gt;GetKineticEnergy() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            fStep-&amp;gt;GetTotalEnergyDeposit()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().y()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().z()&amp;lt;&amp;lt; &amp;quot;    &amp;quot; &lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            &amp;lt;&amp;lt; G4endl;&amp;lt;br&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used G4out and set /tracking/versose 2 to check that I was&lt;br /&gt;
printing out the right thing for each simulation event (above it&lt;br /&gt;
is commented out).  If you comment out the line with &amp;quot;oufile&amp;quot; and&lt;br /&gt;
un-comment out the two lines with G4cout then what was printing&lt;br /&gt;
to a file will print to the terminal window.&lt;br /&gt;
&lt;br /&gt;
4.) You now have the infrastructure to start your investigation.&lt;br /&gt;
&lt;br /&gt;
ie: use /gun/energy to change the energy of the incident photon and &lt;br /&gt;
cover the range of electron binding energies in the atom you&lt;br /&gt;
selected.&lt;br /&gt;
&lt;br /&gt;
you can create root trees containing the photon kinetic energy&lt;br /&gt;
lost in the target and compare those with the electron binding&lt;br /&gt;
energies of your chosen atom.&lt;br /&gt;
&lt;br /&gt;
Is there a distribution of photon energies lost or is just one&lt;br /&gt;
specific photon energy lost?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) As in the previous lab you will write your results up in TeX,&lt;br /&gt;
include all neccessary figures, and reach a conclusion describing&lt;br /&gt;
which entry to use in your physicslist and what are the&lt;br /&gt;
limitations for its use.&lt;br /&gt;
&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
0 points /10 if you use a target atom with less than 3 energy&lt;br /&gt;
levels (ie H, He, Li ...).  This means all atoms should have &amp;quot;A&amp;quot;&lt;br /&gt;
of Sodium(Na) or above.&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you insert a reference and tabulated values for&lt;br /&gt;
the binding energy of your atom (along with uncertainty in that&lt;br /&gt;
binding energy) and compare that value with the GEANT4 prediction.&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you are able to implement the  G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130055</id>
		<title>SPIM PhotElectricEffect Lab</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130055"/>
		<updated>2025-03-17T02:35:34Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to evaluate the implementation of the&lt;br /&gt;
Photoelectric effect in GEANT4.&lt;br /&gt;
&lt;br /&gt;
The photoelectric effect is a discrete process by which a photon&lt;br /&gt;
ejects electrons from the surface of a metal.  &lt;br /&gt;
&lt;br /&gt;
Here the process is generalized to mean the ejection of an&lt;br /&gt;
electron due to a collision with an incident photon (&lt;br /&gt;
a direct ionization process).  The incident photon is absorbed in&lt;br /&gt;
the process and the ejected electron carries away the excess&lt;br /&gt;
energy.  This differs from Compton scattering where the photon is&lt;br /&gt;
not absorbed but rather scatters from the electron.&lt;br /&gt;
&lt;br /&gt;
To accomplish the above objective you will choose an element from&lt;br /&gt;
the table below which has at least 4 energy levels.&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php/TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then you will use GEANT to create histograms of the photon energy&lt;br /&gt;
lost as predicted by GEANT4's &lt;br /&gt;
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.&lt;br /&gt;
&lt;br /&gt;
you should comment out all other physics processes for a gamma particle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.) Step 1 is to create a target made from one of the elements&lt;br /&gt;
above which is long enough to almost guarantee a photoelectric&lt;br /&gt;
event for each incident photon.&lt;br /&gt;
&lt;br /&gt;
I chose Argon.  You will choose something else.&lt;br /&gt;
&lt;br /&gt;
I edited the Detector Construction code to have the following&lt;br /&gt;
&lt;br /&gt;
   //Argon gas&lt;br /&gt;
  //G4Material* ArgonGas = &lt;br /&gt;
  //  new G4Material(&amp;quot;ArgonGas&amp;quot;, z=18., a=39.948*g/mole, density= 1.784*mg/cm3);&lt;br /&gt;
 TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
and I made my target length long&lt;br /&gt;
&lt;br /&gt;
 fTargetLength  = 15. * cm;&lt;br /&gt;
&lt;br /&gt;
2.) Then make sure that only one process is in the physics.cc for the gamma particle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     RegisterPhysics (new G4EmStandardPhysics());&lt;br /&gt;
      //    RegisterPhysics(new G4EmLivermorePhysics());                                   &lt;br /&gt;
      //    RegisterPhysics(new G4EmPenelopePhysics());                                    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.)  Now you need to alter the stepping.cc code so it writes&lt;br /&gt;
out the photon KE lost.  Mine looked like this&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     if( fTrack-&amp;gt;GetDefinition()-&amp;gt;GetPDGEncoding()==22 &amp;amp;&amp;amp; &lt;br /&gt;
                fStep-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName() ==  &amp;quot;phot&amp;quot; &lt;br /&gt;
              &amp;amp;&amp;amp; fTrack-&amp;gt;GetVolume()-&amp;gt;GetName() ==&amp;quot;Target&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
      //      G4cout  &amp;lt;&amp;lt; &amp;quot;  Photon &amp;quot;  ; &lt;br /&gt;
      //G4cout  &amp;lt;&amp;lt; &lt;br /&gt;
      outfile &amp;lt;&amp;lt;   &lt;br /&gt;
           //   fTrack-&amp;gt;GetKineticEnergy() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            fStep-&amp;gt;GetTotalEnergyDeposit()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().y()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().z()&amp;lt;&amp;lt; &amp;quot;    &amp;quot; &lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            &amp;lt;&amp;lt; G4endl;&amp;lt;br&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used G4out and set /tracking/versose 2 to check that I was&lt;br /&gt;
printing out the right thing for each simulation event (above it&lt;br /&gt;
is commented out).  If you comment out the line with &amp;quot;oufile&amp;quot; and&lt;br /&gt;
un-comment out the two lines with G4cout then what was printing&lt;br /&gt;
to a file will print to the terminal window.&lt;br /&gt;
&lt;br /&gt;
4.) You now have the infrastructure to start your investigation.&lt;br /&gt;
&lt;br /&gt;
ie: use /gun/energy to change the energy of the incident photon and &lt;br /&gt;
cover the range of electron binding energies in the atom you&lt;br /&gt;
selected.&lt;br /&gt;
&lt;br /&gt;
you can create root trees containing the photon kinetic energy&lt;br /&gt;
lost in the target and compare those with the electron binding&lt;br /&gt;
energies of your chosen atom.&lt;br /&gt;
&lt;br /&gt;
Is there a distribution of photon energies lost or is just one&lt;br /&gt;
specific photon energy lost?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) As in the previous lab you will write your results up in TeX,&lt;br /&gt;
include all neccessary figures, and reach a conclusion describing&lt;br /&gt;
which entry to use in your physicslist and what are the&lt;br /&gt;
limitations for its use.&lt;br /&gt;
&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
0 points /10 if you use a target atom with less than 3 energy&lt;br /&gt;
levels (ie H, He, Li ...).  This means all atoms should have &amp;quot;A&amp;quot;&lt;br /&gt;
of Sodium(Na) or above.&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you insert a reference and tabulated values for&lt;br /&gt;
the binding energy of your atom (along with uncertainty in that&lt;br /&gt;
binding energy) and compare that value with the GEANT4 prediction.&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you are able to implement the  G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130054</id>
		<title>SPIM PhotElectricEffect Lab</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_PhotElectricEffect_Lab&amp;diff=130054"/>
		<updated>2025-03-17T02:35:01Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to evaluate the implementation of the&lt;br /&gt;
Photoelectric effect in GEANT4.&lt;br /&gt;
&lt;br /&gt;
The photoelectric effect is a discrete process by which a photon&lt;br /&gt;
ejects electrons from the surface of a metal.  &lt;br /&gt;
&lt;br /&gt;
Here the process is generalized to mean the ejection of an&lt;br /&gt;
electron due to a collision with an incident photon (&lt;br /&gt;
a direct ionization process).  The incident photon is absorbed in&lt;br /&gt;
the process and the ejected electron carries away the excess&lt;br /&gt;
energy.  This differs from Compton scattering where the photon is&lt;br /&gt;
not absorbed but rather scatters from the electron.&lt;br /&gt;
&lt;br /&gt;
To accomplish the above objective you will choose an element from&lt;br /&gt;
the table below which has at least 4 energy levels.&lt;br /&gt;
&lt;br /&gt;
https://wiki.iac.isu.edu/index.php/TF_SPIM_e-gamma#Moseley.27s_Law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then you will use GEANT to create histograms of the photon energy&lt;br /&gt;
lost as predicted by GEANT4's &lt;br /&gt;
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.&lt;br /&gt;
&lt;br /&gt;
you should comment out all other physics processes for a gamma particle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.) Step 1 is to create a target made from one of the elements&lt;br /&gt;
above which is long enough to almost guarantee a photoelectric&lt;br /&gt;
event for each incident photon.&lt;br /&gt;
&lt;br /&gt;
I chose Argon.  You will choose something else.&lt;br /&gt;
&lt;br /&gt;
I edited the Detector Construction code to have the following&lt;br /&gt;
&lt;br /&gt;
   //Argon gas&lt;br /&gt;
  //G4Material* ArgonGas = &lt;br /&gt;
  //  new G4Material(&amp;quot;ArgonGas&amp;quot;, z=18., a=39.948*g/mole, density= 1.784*mg/cm3);&lt;br /&gt;
 TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ar&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
and I made my target length long&lt;br /&gt;
&lt;br /&gt;
 fTargetLength  = 15. * cm;&lt;br /&gt;
&lt;br /&gt;
2.) Then make sure that only one process is in the physics.cc for the gamma particle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     RegisterPhysics (new G4EmStandardPhysics());&lt;br /&gt;
      //    RegisterPhysics(new G4EmLivermorePhysics());                                   &lt;br /&gt;
      //    RegisterPhysics(new G4EmPenelopePhysics());                                    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.)  Now you need to alter the stepping.cc code so it writes&lt;br /&gt;
out the photon KE lost.  Mine looked like this&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     if( fTrack-&amp;gt;GetDefinition()-&amp;gt;GetPDGEncoding()==22 &amp;amp;&amp;amp; &lt;br /&gt;
                fStep-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName() ==  &amp;quot;phot&amp;quot; &lt;br /&gt;
              &amp;amp;&amp;amp; fTrack-&amp;gt;GetVolume()-&amp;gt;GetName() ==&amp;quot;Target&amp;quot;)&lt;br /&gt;
    {&lt;br /&gt;
      //      G4cout  &amp;lt;&amp;lt; &amp;quot;  Photon &amp;quot;  ; &lt;br /&gt;
      //G4cout  &amp;lt;&amp;lt; &lt;br /&gt;
      outfile &amp;lt;&amp;lt;   &lt;br /&gt;
           //   fTrack-&amp;gt;GetKineticEnergy() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            fStep-&amp;gt;GetTotalEnergyDeposit()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
              &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().y()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().z()&amp;lt;&amp;lt; &amp;quot;    &amp;quot; &lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
            &amp;lt;&amp;lt; G4endl;&amp;lt;br&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used G4out and set /tracking/versose 2 to check that I was&lt;br /&gt;
printing out the right thing for each simulation event (above it&lt;br /&gt;
is commented out).  If you comment out the line with &amp;quot;oufile&amp;quot; and&lt;br /&gt;
un-comment out the two lines with G4cout then what was printing&lt;br /&gt;
to a file will print to the terminal window.&lt;br /&gt;
&lt;br /&gt;
4.) You now have the infrastructure to start your investigation.&lt;br /&gt;
&lt;br /&gt;
ie: use /gun/energy to change the energy of the incident photon and &lt;br /&gt;
cover the range of electron binding energies in the atom you&lt;br /&gt;
selected.&lt;br /&gt;
&lt;br /&gt;
you can create root trees containing the photon kinetic energy&lt;br /&gt;
lost in the target and compare those with the electron binding&lt;br /&gt;
energies of your chosen atom.&lt;br /&gt;
&lt;br /&gt;
Is there a distribution of photon energies lost or is just one&lt;br /&gt;
specific photon energy lost?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) As in the previous lab you will write your results up in TeX,&lt;br /&gt;
include all neccessary figures, and reach a conclusion describing&lt;br /&gt;
which entry to use in your physicslist and what are the&lt;br /&gt;
limitations for its use.&lt;br /&gt;
&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
0 points /10 if you use a target atom with less than 3 energy&lt;br /&gt;
levels (ie H, He, Li ...).  This means all atoms should have &amp;quot;A&amp;quot;&lt;br /&gt;
of Sodium(Na) or above.&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you insert a reference and tabulated values for&lt;br /&gt;
the binding energy of your atom (along with uncertainty in that&lt;br /&gt;
binding energy) and compare that value with the GEANT4 prediction.&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you are able to implement the  G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Adding the Penelope model&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      G4PenelopePhotoElectricModel* thePEPenelopeModel = new G4PenelopePhotoElectricModel();&lt;br /&gt;
      thePEPenelopeModel-&amp;gt;SetHighEnergyLimit(PenelopeHighEnergyLimit);&lt;br /&gt;
      thePhotoElectricEffect-&amp;gt;AddEmModel(0,thePEPenelopeModel);&lt;br /&gt;
      ph-&amp;gt;RegisterProcess(thePhotoElectricEffect, particle);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130053</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130053"/>
		<updated>2025-03-17T02:27:59Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
The objective of this lab is to alter the physics.cc program to&lt;br /&gt;
ONLY include the G4EmStandardPhysics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit construction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check physics.cc to be it has the Bremsstrahlung (eBrem) process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.00725373, -0.0493313,-0.201349,0.903937,-0.000406446, -0.00119566, 0.00714295&lt;br /&gt;
0.00825911, 0.256055,0.0515852,1.37989,0.00113305, 0.000415401, 0.00817047&lt;br /&gt;
0.00689593, 0.267732,-0.614023,1.04238,-0.00423662, -0.00522941, 0.00150271&lt;br /&gt;
0.0954614, -0.0828961,0.00149944,-0.403959,-0.0184925, -0.000495819, 0.0936518&lt;br /&gt;
0.180546, -0.00629437,-0.173088,0.580054,0.0138079, -0.0599412, 0.169745&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;sim.dat&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130052</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130052"/>
		<updated>2025-03-17T02:24:43Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
The objective of this lab is to alter the physicslist.cc program to&lt;br /&gt;
ONLY include the Bremsstrahlung Physics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit construction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check physicslist.cc to be sure that only the Bremsstrahlung process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.00725373, -0.0493313,-0.201349,0.903937,-0.000406446, -0.00119566, 0.00714295&lt;br /&gt;
0.00825911, 0.256055,0.0515852,1.37989,0.00113305, 0.000415401, 0.00817047&lt;br /&gt;
0.00689593, 0.267732,-0.614023,1.04238,-0.00423662, -0.00522941, 0.00150271&lt;br /&gt;
0.0954614, -0.0828961,0.00149944,-0.403959,-0.0184925, -0.000495819, 0.0936518&lt;br /&gt;
0.180546, -0.00629437,-0.173088,0.580054,0.0138079, -0.0599412, 0.169745&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;sim.dat&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130051</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130051"/>
		<updated>2025-03-17T02:23:57Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
The objective of this lab is to alter the physicslist.cc program to&lt;br /&gt;
ONLY include the Bremsstrahlung Physics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit src/ExN02DetectorConstruction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check ExN02PhysicsList.cc to be sure that only the Bremsstrahlung process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.00725373, -0.0493313,-0.201349,0.903937,-0.000406446, -0.00119566, 0.00714295&lt;br /&gt;
0.00825911, 0.256055,0.0515852,1.37989,0.00113305, 0.000415401, 0.00817047&lt;br /&gt;
0.00689593, 0.267732,-0.614023,1.04238,-0.00423662, -0.00522941, 0.00150271&lt;br /&gt;
0.0954614, -0.0828961,0.00149944,-0.403959,-0.0184925, -0.000495819, 0.0936518&lt;br /&gt;
0.180546, -0.00629437,-0.173088,0.580054,0.0138079, -0.0599412, 0.169745&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;sim.dat&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130050</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130050"/>
		<updated>2025-03-10T04:09:45Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
The objective of this lab is to alter the ExN02PhysicsList.cc program to&lt;br /&gt;
ONLY include the Bremsstrahlung Physics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit src/ExN02DetectorConstruction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check ExN02PhysicsList.cc to be sure that only the Bremsstrahlung process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.00725373, -0.0493313,-0.201349,0.903937,-0.000406446, -0.00119566, 0.00714295&lt;br /&gt;
0.00825911, 0.256055,0.0515852,1.37989,0.00113305, 0.000415401, 0.00817047&lt;br /&gt;
0.00689593, 0.267732,-0.614023,1.04238,-0.00423662, -0.00522941, 0.00150271&lt;br /&gt;
0.0954614, -0.0828961,0.00149944,-0.403959,-0.0184925, -0.000495819, 0.0936518&lt;br /&gt;
0.180546, -0.00629437,-0.173088,0.580054,0.0138079, -0.0599412, 0.169745&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;sim.dat&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130049</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130049"/>
		<updated>2025-03-05T05:09:47Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to alter the ExN02PhysicsList.cc program to&lt;br /&gt;
ONLY include the Bremsstrahlung Physics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit src/ExN02DetectorConstruction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check ExN02PhysicsList.cc to be sure that only the Bremsstrahlung process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.00725373, -0.0493313,-0.201349,0.903937,-0.000406446, -0.00119566, 0.00714295&lt;br /&gt;
0.00825911, 0.256055,0.0515852,1.37989,0.00113305, 0.000415401, 0.00817047&lt;br /&gt;
0.00689593, 0.267732,-0.614023,1.04238,-0.00423662, -0.00522941, 0.00150271&lt;br /&gt;
0.0954614, -0.0828961,0.00149944,-0.403959,-0.0184925, -0.000495819, 0.0936518&lt;br /&gt;
0.180546, -0.00629437,-0.173088,0.580054,0.0138079, -0.0599412, 0.169745&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;sim.dat&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
[http://wiki.iac.isu.edu/index.php/HomeWork_Simulations_of_Particle_Interactions_with_Matter Back to Homework Assigments]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130048</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130048"/>
		<updated>2025-03-05T05:06:44Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to alter the ExN02PhysicsList.cc program to&lt;br /&gt;
ONLY include the Bremsstrahlung Physics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   if(step-&amp;gt;GetTrack()-&amp;gt;GetParticleDefinition()-&amp;gt;GetParticleName()==&amp;quot;e-&amp;quot; &amp;amp;&amp;amp; step-&amp;gt;GetPostStepPoint()-&amp;gt;GetProcessDefinedStep()-&amp;gt;GetProcessName()==&amp;quot;eBrem&amp;quot;)&lt;br /&gt;
      {&lt;br /&gt;
      if(step-&amp;gt;GetNumberOfSecondariesInCurrentStep()&amp;gt;0)&lt;br /&gt;
          {&lt;br /&gt;
            auto secondary = step-&amp;gt;GetSecondaryInCurrentStep();&lt;br /&gt;
            size_t size_secondary = (*secondary).size();&lt;br /&gt;
            if (size_secondary){&lt;br /&gt;
              for (size_t i=0; i&amp;lt;(size_secondary);i++){&lt;br /&gt;
                auto secstep = (*secondary)[i];&lt;br /&gt;
                outfile&lt;br /&gt;
                 &amp;lt;&amp;lt; secstep-&amp;gt;GetKineticEnergy()  &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().y() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetPosition().z() &amp;lt;&amp;lt; &amp;quot;,&amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;, &amp;quot;&lt;br /&gt;
                  &amp;lt;&amp;lt; secstep-&amp;gt;GetMomentum().z()&lt;br /&gt;
                  &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit src/ExN02DetectorConstruction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
G4double targetSize  = 0.2*cm;    // Half length of the Target   &lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check ExN02PhysicsList.cc to be sure that only the Bremsstrahlung process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./sim run.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called sim.dat which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.00725373, -0.0493313,-0.201349,0.903937,-0.000406446, -0.00119566, 0.00714295&lt;br /&gt;
0.00825911, 0.256055,0.0515852,1.37989,0.00113305, 0.000415401, 0.00817047&lt;br /&gt;
0.00689593, 0.267732,-0.614023,1.04238,-0.00423662, -0.00522941, 0.00150271&lt;br /&gt;
0.0954614, -0.0828961,0.00149944,-0.403959,-0.0184925, -0.000495819, 0.0936518&lt;br /&gt;
0.180546, -0.00629437,-0.173088,0.580054,0.0138079, -0.0599412, 0.169745&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
sim.dat to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;Brem.txt&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
[http://wiki.iac.isu.edu/index.php/HomeWork_Simulations_of_Particle_Interactions_with_Matter Back to Homework Assigments]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130047</id>
		<title>SPIM Brem Lab Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=SPIM_Brem_Lab_Instructions&amp;diff=130047"/>
		<updated>2025-03-05T03:59:37Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The objective of this lab is to alter the ExN02PhysicsList.cc program to&lt;br /&gt;
ONLY include the Bremsstrahlung Physics process in order to determine&lt;br /&gt;
the photon energy distribution due to bremsstrahlung and compare&lt;br /&gt;
that distribution with experiment.&lt;br /&gt;
&lt;br /&gt;
Figure #2 in &lt;br /&gt;
&lt;br /&gt;
 http://physics.isu.edu/~tforest/Classes/NucSim/Day8/Mondelaers_XXInt.Linac_Conf._Brem_E-spectrum.pdf&lt;br /&gt;
&lt;br /&gt;
[[File:Mondelaers_XXIntLinacConf.pdf]]&lt;br /&gt;
&lt;br /&gt;
shows the photon energy distribution when 15 MeV electrons&lt;br /&gt;
impinge on a 4mm thick target of Graphite (C12) and Tantalum.  &lt;br /&gt;
&lt;br /&gt;
Let's alter the GEANT4 program to output the photon kinetic&lt;br /&gt;
energy, position, and momentum.&lt;br /&gt;
&lt;br /&gt;
1.) In the file stepping.cc add the code below to the&lt;br /&gt;
function&lt;br /&gt;
&lt;br /&gt;
	void ExN02SteppingVerbose::StepInfo()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if( fTrack-&amp;gt;GetDefinition()-&amp;gt;GetPDGEncoding()==22 &amp;amp;&amp;amp;  fTrack-&amp;gt;GetCurrentStepNumber()==1 &amp;amp;&amp;amp; fTrack-&amp;gt;GetKineticEnergy()&amp;gt;0)&lt;br /&gt;
    {&lt;br /&gt;
      //      G4cout  &amp;lt;&amp;lt; &amp;quot;  Photon Energy &amp;quot;  &lt;br /&gt;
      outfile &amp;lt;&amp;lt;   fTrack-&amp;gt;GetKineticEnergy() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
       &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().x()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
       &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().y()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
       &amp;lt;&amp;lt; fTrack-&amp;gt;GetPosition().z()&amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
       &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().x() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
       &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().y() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
       &amp;lt;&amp;lt; fTrack-&amp;gt;GetMomentum().z() &amp;lt;&amp;lt; &amp;quot;    &amp;quot;&lt;br /&gt;
       &amp;lt;&amp;lt; G4endl;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
make sure the above code isn't embedded in another if statement&lt;br /&gt;
&lt;br /&gt;
2.) Now edit src/ExN02DetectorConstruction.cc&lt;br /&gt;
and add the material Tantalum to the list&lt;br /&gt;
&lt;br /&gt;
   //    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_Ta&amp;quot;);                                                  &lt;br /&gt;
    TargetMater=nist-&amp;gt;FindOrBuildMaterial(&amp;quot;G4_C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
set target length to 4 mm&lt;br /&gt;
&lt;br /&gt;
 G4double targetSize  = 0.4*cm;    // Half length of the Target  &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change the target matter variable to tantalum (Tnt)&lt;br /&gt;
&lt;br /&gt;
3.) After you check that things are working right  (check ExN02PhysicsList.cc to be sure that only the Bremsstrahlung process is turned on for the electrons).&lt;br /&gt;
&lt;br /&gt;
Run 10000 events at 15 MeV&lt;br /&gt;
&lt;br /&gt;
create the file run1.mac with the following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/particle e-&lt;br /&gt;
/gun/energy 15 MeV&lt;br /&gt;
/event/verbose 0&lt;br /&gt;
/tracking/verbose 1&lt;br /&gt;
/run/beamOn 10000&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now you can run the simulation in &amp;quot;batch mode&amp;quot; ie without visualization and re-direct the output to a file&lt;br /&gt;
&lt;br /&gt;
ie: &amp;gt; ./exampleN02 run1.mac &amp;gt; /dev/null &amp;amp;&lt;br /&gt;
&lt;br /&gt;
4.) You may have a file called Range.date which has entries&lt;br /&gt;
that look like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.082831    -0.102156    -0.155741    -800    -0.00347244    -0.00405495    0.0826588    &lt;br /&gt;
0.346969    0.499903    -0.474851    -800    0.0683589    -0.0569303    0.335371    &lt;br /&gt;
0.332485    -172.26    -254.795    800    -0.0621649    -0.0604049    0.320987    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
create a file for C12 and Tantalum (make may need to rename&lt;br /&gt;
SigmaR.txt to something else or it will be written over when you&lt;br /&gt;
run the program again)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.) I wrote the following ROOT macro to read in the data into a&lt;br /&gt;
root tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 void Brem() {&lt;br /&gt;
    struct evt_t {&lt;br /&gt;
    Int_t event;&lt;br /&gt;
    Float_t KE, pos[3],mom[3];&lt;br /&gt;
  };&lt;br /&gt;
  ifstream in;&lt;br /&gt;
  in.open(&amp;quot;Brem.txt&amp;quot;);&lt;br /&gt;
  evt_t evt;&lt;br /&gt;
  Int_t nlines=0;&lt;br /&gt;
  TFile *f = new TFile(&amp;quot;Brem.root&amp;quot;,&amp;quot;RECREATE&amp;quot;);&lt;br /&gt;
  TTree *tree = new TTree(&amp;quot;Brem&amp;quot;,&amp;quot;Brem data from ascii file&amp;quot;);&lt;br /&gt;
  tree-&amp;gt;Branch(&amp;quot;evt&amp;quot;,&amp;amp;evt.event,&amp;quot;event/I:ke/F:posx:posy:posz:px:py:pz&amp;quot;);&lt;br /&gt;
  while(in.good()){&lt;br /&gt;
    evt.event=nlines;&lt;br /&gt;
    in &amp;gt;&amp;gt; evt.KE &amp;gt;&amp;gt; evt.pos[0] &amp;gt;&amp;gt; evt.pos[1] &amp;gt;&amp;gt; evt.pos[2]   &amp;gt;&amp;gt; evt.mom[0] &lt;br /&gt;
 &amp;gt;&amp;gt; evt.mom[1] &amp;gt;&amp;gt; evt.mom[2];&lt;br /&gt;
    /*&lt;br /&gt;
      printf( &amp;quot; %d  %f %f %f %f %f %f %f\n&amp;quot;, evt.event, evt.KE, evt.pos[0], &lt;br /&gt;
 evt.pos[1], evt.pos[2],  evt.mom[0], evt.mom[1], evt.mom[2] );&lt;br /&gt;
    */&lt;br /&gt;
    nlines++;&lt;br /&gt;
    tree-&amp;gt;Fill();&lt;br /&gt;
  }&lt;br /&gt;
  tree-&amp;gt;Print();&lt;br /&gt;
  tree-&amp;gt;Write();  &lt;br /&gt;
  in.close();&lt;br /&gt;
  delete tree;&lt;br /&gt;
  delete f;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the above program into a file called Brem.C and save it into the same subdirectory as the output file you created with the simulation.&lt;br /&gt;
&lt;br /&gt;
Notice it expects the data file to be called &amp;quot;Brem.txt&amp;quot; and it&lt;br /&gt;
creates the root file &amp;quot;Brem.root&amp;quot; (you will need to rename files&lt;br /&gt;
if you don't want things overwritten).&lt;br /&gt;
&lt;br /&gt;
to run this program run root from the same subdirectory as Brem.C and just type &amp;quot;.x Brem.C&amp;quot; at the root prompt&lt;br /&gt;
&lt;br /&gt;
(to run root set the environmental variable ROOTSYS to point to the root subdirectory and then type $ROOTSYS/bin/root)&lt;br /&gt;
&lt;br /&gt;
A root file is created called &amp;quot;Brem.root&amp;quot;.  &amp;quot;.q&amp;quot; root and rename&lt;br /&gt;
the file so you won't write over it the next time you run the&lt;br /&gt;
root program.&lt;br /&gt;
&lt;br /&gt;
6.)  Now analyze the root file:&lt;br /&gt;
&lt;br /&gt;
Run root and give it the filename of the root file (Brem.root) on the command line (or you could type new TBrowser(): and load it from the GUI).&lt;br /&gt;
&lt;br /&gt;
ie: root Brem.root&lt;br /&gt;
&lt;br /&gt;
a.) first, from within root, clock on the Brem.root file name under the &amp;quot;ROOT files&amp;quot; subdirectory&lt;br /&gt;
&lt;br /&gt;
Now try to plot the scattering angle of the outgoing photon with&lt;br /&gt;
respect to the Z-axis&lt;br /&gt;
&lt;br /&gt;
root[0]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice &amp;quot;pz&amp;gt;0&amp;quot; above is a cut that only looks at forward going&lt;br /&gt;
photons (no backward scattered photons are plotted).&lt;br /&gt;
&lt;br /&gt;
The experiment reports that the lower Z target creates photons&lt;br /&gt;
which have a range of angles that are smaller than the high Z&lt;br /&gt;
target.&lt;br /&gt;
&lt;br /&gt;
You can check this by comparing the above plot for the C12 root&lt;br /&gt;
tree and the Tantalum root Tree.&lt;br /&gt;
&lt;br /&gt;
It is a little tricky to have two root files open at the same time&lt;br /&gt;
for plotting but it can be done.&lt;br /&gt;
&lt;br /&gt;
Use the Browser to open both files (&amp;quot;new TBrowser&amp;quot; opens the&lt;br /&gt;
browser window and clicking on file names opens the file)&lt;br /&gt;
&lt;br /&gt;
When you click on the file name listed under &amp;quot;ROOT files&amp;quot; ROOT&lt;br /&gt;
will direct all commands to that file.  So if you click on&lt;br /&gt;
file1.root and then do &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
You will now analyze the entries in file1.root and histograms&lt;br /&gt;
will be save there.&lt;br /&gt;
&lt;br /&gt;
If you click on &amp;quot;file2.root&amp;quot; and again execute &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
you will redefine the tree to be associated with file2.root.&lt;br /&gt;
&lt;br /&gt;
You can move between the two files by clicking on the name and&lt;br /&gt;
redefining th tree.&lt;br /&gt;
&lt;br /&gt;
Suppose you want to create a histogram now of the photon&lt;br /&gt;
scattering angles for C12 and Tantalum.&lt;br /&gt;
&lt;br /&gt;
click on the C12.root file and execute the command&lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *C12hist=new TH1F(&amp;quot;BremAngle_C12&amp;quot;,&amp;quot;BremAngle_C12&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_C12&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;C12.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do the same thing for Tantalum&lt;br /&gt;
&lt;br /&gt;
first click on the &amp;quot;Tantalum.root&amp;quot; file name then &lt;br /&gt;
&lt;br /&gt;
root[0] TTree *tree=Brem; &lt;br /&gt;
&lt;br /&gt;
then define a 1-D histogram which spans the angular range.&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *Tanthist=new TH1F(&amp;quot;BremAngle_Tant&amp;quot;,&amp;quot;BremAngle_Tant&amp;quot;,90,0,90);&lt;br /&gt;
&lt;br /&gt;
now fill the histgram with the data&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;asin((px*px+py*py)/(px*px+py*py+pz*pz))*180/3.14 &amp;gt;&amp;gt; BremAngle_Tant&amp;quot;,&amp;quot;pz&amp;gt;0&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
you will see a histogram save under the file &amp;quot;Tantalum.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can overlay the two histograms using the &amp;quot;same&amp;quot; switch when&lt;br /&gt;
drawing the histograms&lt;br /&gt;
&lt;br /&gt;
click on &amp;quot;C12.root&amp;quot; file and then do &lt;br /&gt;
&lt;br /&gt;
 BremAngle_C12-&amp;gt;Draw();&lt;br /&gt;
&lt;br /&gt;
now click on &amp;quot;Tantalum.root&amp;quot; and do &lt;br /&gt;
&lt;br /&gt;
BremAngle_Tant-&amp;gt;Draw(&amp;quot;same&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The two distributions are now on the same plot for comparison.&lt;br /&gt;
Notice that the angular distribution for the tantalum target is&lt;br /&gt;
wider (goes to higher angles) than the C12 distribution, as&lt;br /&gt;
suggested by the article.&lt;br /&gt;
&lt;br /&gt;
b.)  Now we want to create the Histograms for Figure 2 in the&lt;br /&gt;
article.  I was unable to determine what photon angular range&lt;br /&gt;
was subtended by the detector in the experiment.  You can clearly&lt;br /&gt;
see that if you cut on the photon angle, the energy distribution&lt;br /&gt;
of the Tantalum changes.  &lt;br /&gt;
&lt;br /&gt;
click on the &amp;quot;Tantalum.root&amp;quot; file and redefine th tree pointer&lt;br /&gt;
&lt;br /&gt;
root[0]TTree *tree=Brem &lt;br /&gt;
&lt;br /&gt;
now create a histogram to store the energy distribution:&lt;br /&gt;
&lt;br /&gt;
root[1]TH1F *TantKEhist=new TH1F(&amp;quot;BremKE_Tant&amp;quot;,&amp;quot;BremKE_Tant&amp;quot;,500,0,1);&lt;br /&gt;
&lt;br /&gt;
now fill the histogram with the KE using different angle cuts&lt;br /&gt;
and watch how the distribution changes.&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.5&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
root[2]Brem-&amp;gt;Draw(&amp;quot;ke &amp;gt;&amp;gt; BremKE_Tant&amp;quot;,&amp;quot;pz&amp;gt;0 &amp;amp;&amp;amp; (px*px+py*py)/(px*px+py*py+pz*pz) &amp;lt; 0.1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your goal for this lab is to change the angle cut until you get&lt;br /&gt;
something close to Figure 2 in the paper (this won't be a precise&lt;br /&gt;
method for determining the angle only a qualitative one).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use the TeX template I gave you to write up your result&lt;br /&gt;
with a graph included.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
commands to generate a pdf file from the template are&lt;br /&gt;
&lt;br /&gt;
 pdflatex filename.tex&lt;br /&gt;
&lt;br /&gt;
 evince filename.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
  Note: My grading scheme is as follows&lt;br /&gt;
&lt;br /&gt;
8 points/10 if you supply a pdf file with an energy specta from&lt;br /&gt;
GEANT4 for C12 and Tantalum&lt;br /&gt;
&lt;br /&gt;
9 points /10 if you include a spectrum of photon scattering angles&lt;br /&gt;
&lt;br /&gt;
10 points /10 if you write a complete description summarizing the&lt;br /&gt;
referenced experiment, a description of the simulation, and&lt;br /&gt;
analysis of GEANT4 output.  The grade is not based on document&lt;br /&gt;
length but document completeness.  You can provide enough details&lt;br /&gt;
about the experiment in 2 paragraphs to be complete.  The GEANT&lt;br /&gt;
simulation may need a few more paragraphs in which you focus on&lt;br /&gt;
detector geometry, physicslists, and the writing of tracking&lt;br /&gt;
variables to a file.  I imagine 4 paragraphs could adequately&lt;br /&gt;
describe the analysis of the GEANT4 output.&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
[http://wiki.iac.isu.edu/index.php/HomeWork_Simulations_of_Particle_Interactions_with_Matter Back to Homework Assigments]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130046</id>
		<title>TF SPIM StoppingPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130046"/>
		<updated>2025-02-26T17:51:37Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* (Vavilou's Theory) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Stopping Power=&lt;br /&gt;
== Bethe Equation ==&lt;br /&gt;
===Classical Energy Loss ===&lt;br /&gt;
&lt;br /&gt;
Consider the energy lost when a particle of charge (&amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt;) traveling at speed &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is scattered by a target of charge (&amp;lt;math&amp;gt;Ze&amp;lt;/math&amp;gt;).  Assume only the coulomb force causes the particle to scatter from the target as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Bethe_ClassCoulScat.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Notice:&lt;br /&gt;
: as &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is scattered the horizontal component of the coulomb force (&amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt;) flips direction; ie net horizontal force for the scattering&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F_{vertical} = k \frac{zZe^2}{r^2} \sin(\theta) = k \frac{zZe^2}{r^2}  \frac{b}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: k =&amp;lt;math&amp;gt;\frac{1}{4 \pi \epsilon_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
: r = distance between incident projectile and target atom&lt;br /&gt;
: b= impact parameter of collision &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the definition of Impulse one can determine the momentum change of &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta p = \int F dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's assume that the energy lost by the incident particle &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is absorbed by an electron in the target atom.  This energy may be cast in terms of the incident particles momentum change as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{(\Delta p)^2}{2m_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By calculating the change in momentum (&amp;lt;math&amp;gt;\Delta p&amp;lt;/math&amp;gt;) of the incident particle we can infer that the energy lost by the incident particle is absorbed by one of the target material's atomic electrons.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta P = \int F dt = \int k \frac{zZe^2b}{r^3}  dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using  &amp;lt;math&amp;gt;dt = \frac{dx}{v} = \frac{d x}{\beta c}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;= k \frac{zZe^2b}{\beta c} \int_{-\infty}^{+\infty} \frac{ dx}{(x^2+b^2)^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{kzZe^2b}{\beta c b^2} \int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x^2}{b^2})^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x}{b^2})^{3/2}}=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2kzZe^2b}{\beta c b^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
casting this in terms of the classical atomic electron radius &amp;lt;math&amp;gt;r_e&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;r_e = \frac{k e^2}{m_e v^2} \sim \frac{k e^2}{m_e c^2}&amp;lt;/math&amp;gt;  just equate &amp;lt;math&amp;gt;F = \frac{ke^2}{r_e^2} = m \frac{v^2}{r_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2zZr_e m_e c}{\beta  b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \frac{(\Delta p)^2}{2m_e} = 2 \left ( \frac{r_e m_e}{\beta b}\right )^2 \frac {z^2 Z^2 c^2}{m_e}&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = 1 here because I shall assume the energy is lost to just the electron and the Atom is a spectator&lt;br /&gt;
&lt;br /&gt;
Now let's calculate an expression representing the AVERAGE energy lost for an incident particle traversing a material of some thickness.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(\Delta E)&amp;lt;/math&amp;gt; = Probability of an interaction taking place which results in an energy loss &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we let&lt;br /&gt;
&lt;br /&gt;
Z  = Atomic Number = # electrons in target Atom = number of protons in an Atom&lt;br /&gt;
&lt;br /&gt;
N = Avagadros number  = &amp;lt;math&amp;gt;6.022 \times 10^{23}  \frac{Atoms}{mol}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A = Atomic mass =  &amp;lt;math&amp;gt;\frac{g}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt;  = probability of hitting an atomic electron in the area of an annulus of radius (&amp;lt;math&amp;gt;b + db&amp;lt;/math&amp;gt;) with an energy transfer between &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta E + d(\Delta E)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;\frac{-dE }{dx}= \int_0^{\infty} dP(\Delta E) \Delta E&amp;lt;/math&amp;gt; = energy lost by the incident particle per distance traversed through the material&lt;br /&gt;
&lt;br /&gt;
I am just adding up all the energy losses weighted by the probability of the energy loss to find the average (total) energy loss.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; :&lt;br /&gt;
: &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; = probability of an energy transfer taking place = probability of an interaction = &amp;lt;math&amp;gt;\frac{N}{A} d \sigma&amp;lt;/math&amp;gt;  [ Atoms &amp;lt;math&amp;gt;cm^2&amp;lt;/math&amp;gt;/g]&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;dP(\Delta E) = \frac{N}{A} d \sigma =\frac{N}{A} (2 \pi b db) Z&amp;lt;/math&amp;gt; &lt;br /&gt;
:In practice &amp;lt;math&amp;gt; \sigma&amp;lt;/math&amp;gt; is a measured cross-section which is a function of energy.&lt;br /&gt;
:classically &amp;lt;math&amp;gt;\sigma = \pi b^2 ; d \sigma = 2\pi b db&amp;lt;/math&amp;gt; so let's use this as a first approximation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{-dE}{dx} =  \int_0^{\infty} \frac{N}{A} (2 \pi b db) Z \Delta E = \frac{2 \pi N Z}{A} \int_0^{\infty} \Delta E b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{2 \pi N Z}{A} \int_0^{\infty} \left [ \frac{2 r_e^2 m_e c^2 z^2}{\beta^2 b^2}\right ] b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;4 \pi N r_e^2 m_e c^2 \frac{z^2 Z}{A \beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
:=&amp;lt;math&amp;gt;\frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\mathcal{K}}{A} = \frac{4 \pi N r_e^2 m_e c^2}{A} = 0.307 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;''' if A=1'''&lt;br /&gt;
&lt;br /&gt;
The limits of the above integral should be more physical in order to reflect the limits of the physics interaction.  Let &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; represent the minimum and maximum possible impact parameter where the physics is described,  as shown above,  by the coulomb force.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;b \rightarrow 0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\frac{d E}{dx}&amp;lt;/math&amp;gt; diverges and the energy transfer &amp;lt;math&amp;gt;\rightarrow \infty : \Delta E \sim \frac{1}{b}&amp;lt;/math&amp;gt;.  Physically there is a maximum energy that may be transferred before the physics of the problem changes (ie: nuclear excitation, jet production, ...).  The de Borglie wavelength of the atom is used to estimate a value for &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt; such that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;b_{min} \sim  \frac{1}{2} \lambda_{de Broglie} = \frac{h}{2p} = \frac{h}{2 \gamma m_e \beta c}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
As &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger the interaction is &amp;quot;softer&amp;quot; and longer.  If the interaction time (&amp;lt;math&amp;gt;\tau_i&amp;lt;/math&amp;gt;) is so long that it is equivalent to an electron orbit (&amp;lt;math&amp;gt;\tau_R&amp;lt;/math&amp;gt;) then the atom looks more like it is neutrally charged.  You move from an interaction in which the electron orbit is perturbed adiabatically such that there is no orbit change and the minimum amount of energy is transferred to no interaction taking place because the atom is neutral.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_i = \frac{b_{max}}{v} (\sqrt{1-\beta^2})&amp;lt;/math&amp;gt;  : fields at high velocities get Lorentz contracted&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_R \equiv \frac{h}{I}&amp;lt;/math&amp;gt; : I &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt; mean excitation energy of target material ( &amp;lt;math&amp;gt;E = h \nu = h/ \tau&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Condition for &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;\tau_i = \tau_R&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow b_{max} = \frac{h \gamma \beta c}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\frac{dE}{dx} = \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{b_{max}}{b_{min}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{2 \gamma^2 m_e \beta^2 c^2}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Find &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; for a 10 MeV proton hitting a liquid hydrogen (&amp;lt;math&amp;gt;LH_2&amp;lt;/math&amp;gt;) target===&lt;br /&gt;
A = Z=z=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;m_e c^2&amp;lt;/math&amp;gt; = 0.511 MeV &amp;lt;br&amp;gt;&lt;br /&gt;
I = 21.8 eV : see gray data point for Liquid &amp;lt;math&amp;gt;H_2&amp;lt;/math&amp;gt; From  Figure 27.5 on pg 6 of [http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG] below.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PDG_IonizationPotential.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
Just need to know &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;a 10 MeV proton&amp;quot; &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; Kinetic Energy (K.E.) = 10 MeV = &amp;lt;math&amp;gt;(\gamma - 1) mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \gamma = \frac{K.E.}{mc^2} + 1 = \frac{10 MeV}{938 MeV} + 1 \sim 1 = \frac{1}{\sqrt{1-\beta^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proton is not relativistic&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;v^2 = \frac{2 K.E.}{m} = \frac{2 \cdot 10 MeV}{938 MeV/c^2} = 2 \times 10^{-2} c^2 \Rightarrow \beta^2 = \frac{v^2}{c^2} = 2\times 10^{-2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plugging in the numbers:&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} = \left ( 0.307 \frac{MeV \cdot cm^2}{g}\right ) (1)^2 (1) \frac{1}{2 \times10^{-2}} \ln \left( \frac{2 (1) (0.511 MeV) (2 \times10^{-2})}{21.8 eV} \frac{10^6 eV}{MeV}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= 105 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;How much energy is lost after 0.3 cm?&lt;br /&gt;
&lt;br /&gt;
'''Notice that the units for energy loss are normalized by the density of the material'''&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_{LH_2}&amp;lt;/math&amp;gt; = 0.07 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the actual energy lost I need to multiply by the density.   So for any given atom the energy loss will depend on the state (solid, gas, liqid) of the atom as this effects the density of the material.  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta E = (105 \frac{MeV cm^2}{g}) (0.07 \frac{g}{cm^3}) (0.3 cm)&amp;lt;/math&amp;gt; = 2.2 MeV&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_HydrogenStoppingPower.pdf]] Compare with Triumf Kinematics Handbook, 2nd edition, September 1987, L.G. Greeniaus&lt;br /&gt;
&lt;br /&gt;
==Bethe-Bloch Equation ==&lt;br /&gt;
&lt;br /&gt;
While the classical equation above works in a limited kinematic regime, the Bethe-Bloch equation includes the corrections needed to cover most kinematic regimes for heavy particle energy loss.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} = \mathcal{K} z^2 \frac{Z}{A} \frac{1}{\beta^2} \left [ \frac{1}{2} \ln \left (\frac{2 m_e c^2 \beta^2 \gamma^2 }{I} \frac{ T_{max}}{I} \right) - \beta^2 - \frac{\delta}{2}\right ]&amp;lt;/math&amp;gt;[http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG reference Eq 27.1 pg 1]&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;T_{max} = \frac{2 m_e c^2 \beta^2 \gamma^2}{1+ \frac{2 \gamma m_e}{M} + \frac{m_e}{M}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= Max K.E. transferable to the Target of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in a single collision.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;-\beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: =  correction for electron spin and very distant collisions which deforms the electron atomic orbits each process reducing dE/dx by &amp;lt;math&amp;gt;\frac{\beta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:= density correction term: in the classical derivation the material is treated as just a system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms uniformly distributed in space.  These Atoms, however, give the material polarizability which can reduce the electric field (dielectric).&lt;br /&gt;
&lt;br /&gt;
== GEANT 4 implementation ==&lt;br /&gt;
&lt;br /&gt;
The GEANT4 file  (version 4.8.p01)&lt;br /&gt;
&lt;br /&gt;
source/processes/electromagnetic/standard/src/G4BetheBlockModel.cc&lt;br /&gt;
&lt;br /&gt;
is used to calculate hadron energy loss.&lt;br /&gt;
&lt;br /&gt;
line 132 (line 257 in version 4.9.5)  &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} =  \log \left ( \frac{2 m_e c^2 \tau (\tau +2) E_{min}}{I^2}\right) - \left (1 - \frac{E_{min}}{E_{max}} \right ) \beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \tau = \frac{K.E.}{M}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 143 (line 267 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \log  ( \tau (\tau + 2) ) -cden&amp;lt;/math&amp;gt; = density corection = &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 148 (line 270 in vers. 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \frac{2c}{Z_{target}}&amp;lt;/math&amp;gt; = shell correction, corrects for the classical asumption that the atomic electron's velocity is initially zero; or the the incident particles velocity is far greater than the atomic electron's velocity.&lt;br /&gt;
&lt;br /&gt;
line 154 (line 273 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} *= \frac{2 \pi m_e c^2 r_e^2 z^2}{\beta^2} \rho_e \;\;\;\; \rho_e \propto \frac{NZ}{A}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Energy Dependence ==&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_EnergyLoss_EnergyDependence.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
The above curve shows the energy loss per distance traveled (&amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt;) as a function of the incident particles energy.  There are three basic regions.  At low incident energies ( &amp;lt; 10^5 eV) the incident particle tends to excite or even ionize the atoms in the material it is penetrating.  The maximum amount of energy loss per distance traveled is defined as the Bragg peak.  The region after the Bragg peak, in which the energy loss per distance traveled reaches its smallest value, is refered to as the point of minimum ionizing.  Minimimum ionizing particles will have incident energies corresponding to this value or larger.  The characteristic of the minimum ionizing particles is that their energy loss per distance traveled is essentially constant making simulations easier until the particle's energy drops below the minimum ionizing energy level as it passes through the material.&lt;br /&gt;
&lt;br /&gt;
In general the Bethe-Bloch equation breaks down at low energies (below the Bragg peak)  and is a good description (to within 10%) for &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10 \frac{MeV}{a.m.u.} &amp;lt; E &amp;lt; 2 \frac{GeV}{a.m.u.}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; &amp;lt; 26 (Iron)  : a.m.u = Atomic Mass Unit&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\frac{1}{\beta^2}&amp;lt;/math&amp;gt; term in the Bethe-Bloch equation dominates between the Bragg peak and the minimum ionization region.&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\ln&amp;lt;/math&amp;gt; term and its corrections influence the dependence of  &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; as you move up in energy beyond the minimum ionization point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Energy Straggling ===&lt;br /&gt;
&lt;br /&gt;
While the Bethe-Bloch formula gives you a way to quantify the amount of energy a heavy charged particle  loses as a function of the distance traveled, you should realize that when you calculate the total energy lost via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta E = \int_{E_i}^{E_f} \left ( \frac{dE}{dx} \right ) dx&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you are only determining the AVERAGE energy loss.  In other words, Bethe-Bloch is the Astochastic process describing energy loss.&lt;br /&gt;
&lt;br /&gt;
In reality the energy loss process is a stochastic process because of the statistical fluctuations which occur in the actual number of collisions which take place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Thick Absorber ====&lt;br /&gt;
&lt;br /&gt;
A thick absorber is one in which a large number of collisions takes place.   In this situation the central limit theorem from statistics tells you that the larger the number of random variable samples , &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, involved the more the observable will follow a Gaussian distribution. The Gaussian distribution is a good approximation to the binomial distribution when the number of trials is large.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Binomial_with_Large_N_becomes_Gaussian]]&lt;br /&gt;
&lt;br /&gt;
, and to a Poisson distribution when the mean is a lot larger than 1.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Gaussian_approximation_to_Poisson_when]]&lt;br /&gt;
&lt;br /&gt;
The gaussian probability function is defined as &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto e^{\frac{(\Delta - \bar{\Delta})^2}{ \sigma^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Full Width at Half Max (FWHM) of the distribution = &amp;lt;math&amp;gt;\left ( 2 \sqrt{2 \ln 2} \right ) \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of energy loss, the variance using the Bethe-Bloch equation should be &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_0^2 = 4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the realitivistic variance is &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 = [\frac{1-\beta^2/2}{1-\beta^2} ]\sigma_0^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for very thick absorbers see&lt;br /&gt;
&lt;br /&gt;
C. Tschaler, NIM '''64''', (1968) 237 ; ''ibid'', '''61''', (1968) 141&lt;br /&gt;
&lt;br /&gt;
When simulating energy loss of heavy charged particles the Bethe-Bloch equation may be used to calculate a &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; which can determine the average energy loss at the given kinetic energy of the particle.  This average is then smeared according to a gaussian distribution of variance &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 =4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x [\frac{1-\beta^2/2}{1-\beta^2} ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Thin Absorbers====&lt;br /&gt;
&lt;br /&gt;
In thin absorbers the number of collisions is small preventing the use of the central limit theorem to describe the stochastic process of energy loss in terms of a Gaussian distribution.  The large energy transfers that are possible cause the energy loss distribution to look like a Gaussian  with a high energy tail (or foot).&lt;br /&gt;
&lt;br /&gt;
The skewness of the resulting energy loss distribution is quantified as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\kappa = \frac{\bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta  \equiv 2 \pi N_a r_e^2 m_e c^2 \rho \frac{Z}{A} \left ( \frac{z}{\beta}\right)^2 x &amp;lt;/math&amp;gt; = lead term in Bethe Bloch equation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt; = density of absorbing material.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right ) \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; = max energy transfered in 1 collision (headon / knock out collision)&lt;br /&gt;
&lt;br /&gt;
This comes from the relativistic kinematics of an Elastic Collision.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:SPIM_ThinAbsorbers_Scatering.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\gamma = \frac{E_{tot}}{Mc^2} = \frac{ \sqrt{(pc)^2 + (Mc^2)^2}}{Mc^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\beta= \frac{pc}{\gamma Mc^2} = \frac{pc}{E_{tot}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = E_{tot} - Mc^2 = \gamma Mc^2 - Mc^2 = (\gamma - 1 ) Mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = \sqrt{(pc)^2 + (Mc^2)^2} - Mc^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;   (p^{\prime}c)^2 = E_k^2 + 2E_km_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conservation of Momentum &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{p} = \vec{p}^{\; \prime \prime} + \vec{p}^{\; \prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conservation of Energy &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_{tot} + m_ec^2 = E_{tot}^{\prime \prime} + E_{tot}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sqrt{(pc)^2 + (Mc^2)^2} + m_ec^2 = \sqrt{(p^{\; \prime \prime} c)^2 + (Mc^2)^2}  + E_k +  m_e c^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using conservation of E &amp;amp; P as well as substituting for &amp;lt;math&amp;gt;p^{\prime}&amp;lt;/math&amp;gt; you can show&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(p^{\; \prime \prime}c)^2 = (pc)^2 - 2E_k\sqrt{(pc)^2 +(Mc^2)^2} + E_k^2&amp;lt;/math&amp;gt; : cons of E&lt;br /&gt;
:&amp;lt;math&amp;gt;= (pc)^2 + E_k^2 + 2E_km_ec^2 -2pc\sqrt{E_k^2+2E_km_ec^2} \cos(\theta)&amp;lt;/math&amp;gt; : cons of P&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;pc \cos(\theta) \sqrt{1+\frac{2m_ec^2}{E_k}} = \sqrt{(pc)^2+(Mc^2)^2} + m_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;E_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_k = \frac{2m_ec^2(pc)^2\cos^2 (\theta)}{[\sqrt{(pc)^2 + (Mc^2)^2} +m_ec^2]^2 - (pc)^2 \cos^2 (\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== (Landau Theory) =====&lt;br /&gt;
&amp;lt;math&amp;gt;\kappa \leq 0.01&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Landau assumed&lt;br /&gt;
:# &amp;lt;math&amp;gt;W_{max} = \infty&amp;lt;/math&amp;gt; is max energy transfer&lt;br /&gt;
:# electrons are free (energy transfer is so large you can neglect binding)&lt;br /&gt;
:# incident particle maintains velocity (large momentum transfer from big mass to small mass) (bowling ball hits ping pong ball)&lt;br /&gt;
&lt;br /&gt;
L. Landau, &amp;quot;On the Energy Loss of Fast Particles by Ionization&amp;quot;, J. Phys., vol 8 (1944), pg 201&lt;br /&gt;
&lt;br /&gt;
instead of a gaussian distribution Landau used&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto \frac{1}{\bar{\Delta}\pi} \int_0^{\infty} e^{-u \ln u - u \lambda} \sin(\pi u) du&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda = \frac{1}{\bar{\Delta}} \left [ \Delta - \bar{\Delta} \ln \bar{\Delta} - \ln \epsilon + 1 -C \right ]&amp;lt;/math&amp;gt; Landau's parameter&lt;br /&gt;
: &amp;lt;math&amp;gt;\bar{\Delta} = 2\pi N_a r_e^2 m_e c^2 \rho \frac{Zz^2}{A \beta^2}x&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln \epsilon = \ln \left [ \frac{(1-\beta^2)I^2}{2m_ec^2 \beta^2} \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Landau_ThinAbsorberDist.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== (Vavilou's Theory) =====&lt;br /&gt;
&lt;br /&gt;
Vavilous paper&lt;br /&gt;
&lt;br /&gt;
P.V. Vavilou, &amp;quot;Ionization losses of High Energy Heavy Particles&amp;quot;, Soviet Physics JETP, vol 5 (1950? )pg 749&lt;br /&gt;
&lt;br /&gt;
describe the physics for the case &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;0.01 &amp;lt; \kappa &amp;lt; \infty &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution function derived is shown below as well as a conceptual overlay of Vavilou's and Landau's distributions.  (The &amp;lt;math&amp;gt;\zeta f(x,\Delta)&amp;lt;/math&amp;gt; in the picture should be a &amp;lt;math&amp;gt;\bar{\Delta}P(x,\Delta)&amp;lt;/math&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) = \frac{1}{\bar{\Delta}\pi} x e^{x(1+\beta^2C)} \int_0^{\infty} e^{xf_1} \cos(y \lambda_1 + xf_2) dy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f_1 = \beta^2 \left [ \ln(y) - C_i(y)\right ] - \cos(y) - y S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f_2 = y\left [ \ln(y) - C_i(y)\right ] + \sin(y) + \beta^2  S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C_i(y) \equiv - \int_y^{\infty} \frac{\cos(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;S_i(y) \equiv \int_0^{y} \frac{\sin(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_1 = \int_{\Delta}^{\infty} P(x,\Delta) d \Delta &amp;lt;/math&amp;gt; are the sine and cosine integral functions given in Vavilous' paper&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Vavilou_Landau_ThinAbsorber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation ====&lt;br /&gt;
&lt;br /&gt;
GEANT 4 uses the skewness parameter &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; to determine if it will use a &amp;quot;fluctuations model&amp;quot; to calculate energy straggling or the gaussian model described in section 3.2.1.&lt;br /&gt;
&lt;br /&gt;
===== kappa &amp;gt; 10 =====&lt;br /&gt;
If &lt;br /&gt;
: &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt; &amp;gt; 10 &lt;br /&gt;
and we have a thick absorber ( large step size) then the Gausian function in 3.2.1 is used to calculate energy straggling.&lt;br /&gt;
&lt;br /&gt;
What happens is &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; is calculated via &amp;lt;math&amp;gt;\int_{E_i}^{E_f} \frac{dE}{dx} dx&amp;lt;/math&amp;gt; then the actual energy loss predicted by the simulation is chosen from a Gaussian distribution to account for energy straggling such that the &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; of this Gaussian distribution is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma^2 = 2 \pi r_e^2m_ec^2N_{el} \frac{Z_h}{\beta^2} T_C s (1 - \frac{\beta^2}{2})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N_{el}&amp;lt;/math&amp;gt; = electron density of the medium&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_h&amp;lt;/math&amp;gt; = charge of the incident particle&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = step size&lt;br /&gt;
:&amp;lt;math&amp;gt; T_C&amp;lt;/math&amp;gt; = cutoff kinetic energy for &amp;lt;math&amp;gt;\delta &amp;lt;/math&amp;gt;-electrons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_C&amp;lt;/math&amp;gt; tells GEANT where to put the cutoff for using the Gaussian distribution for energy straggling.  This tells the simulation the low energy cutoff where Bethe-Bloch starts to fail due to ionization.&lt;br /&gt;
&lt;br /&gt;
=====Delta-electrons =====&lt;br /&gt;
What is a &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electron?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons are also known as &amp;quot;knock -on&amp;quot; electrons or delta rays.&lt;br /&gt;
&lt;br /&gt;
As heavy particles traverse a medium they can ionize electrons from atoms.  The ejected electrons (&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons) can be given enough energy to ionize as well.&lt;br /&gt;
&lt;br /&gt;
In a cloud chamber (a supercooled volume of super saturated water vapor which ionizes as charged particles pass through)  such and event would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_DeltaRay_CloudChamber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
The blue spiral in the above gas chamber picture is a high energy electron ejected from a collision that spirals in the B-field ejecting low energy electrons at the end.  The B-field is directed out of the picture.&lt;br /&gt;
&lt;br /&gt;
The physics of ionization is different from the physics used to calculate Bethe-Bloch energy loss.  Remember Bethe-Bloch  starts to break down at low energies below the Bragg peak.  &lt;br /&gt;
&lt;br /&gt;
Because of this GEANT 4 sets the cutoff for this process to be&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;T_{cut}&amp;lt;/math&amp;gt; &amp;gt; 1 keV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:  The BE energies of an electron in Hydrogen is 13.6 ev and the electrons in Argon have binding energies between 15.7 eV and 3.2 keV.&lt;br /&gt;
&lt;br /&gt;
===== Fluctuations Model: kappa &amp;lt; 10=====&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}} &amp;lt; \frac{\Delta E}{T_C}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then GEANT 4 uses a &amp;quot;Fluctuations Model&amp;quot; to determine energy loss instead of Bethe-Bloch.&lt;br /&gt;
&lt;br /&gt;
; Fluctuations Model&lt;br /&gt;
:# the atom is assumed to have 2 energy levels &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:# you can excite the atom and lose either &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt; or you can ionize the atom and lose energy according to a &amp;lt;math&amp;gt;\frac{1}{E^2}&amp;lt;/math&amp;gt; function &amp;lt;math&amp;gt;u_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total energy loss in a step will be &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \Delta E_{exc} + \Delta E_{ion}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{exc} = \eta_1 E_1 + \eta_2 E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{ion} = \sum_{j=1}^{\eta_3} \frac{I}{1 - u_j \frac{T_{up}-I}{T_{up}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\eta_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\eta_2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\eta_3&amp;lt;/math&amp;gt; are the number of collisions which are sampled from a poison distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;u_j = \int_{I}^{E_j} \frac{I T_{up}}{T_{up} - I} \frac{dx}{x^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_j = \frac{I}{1- rand  \frac{T_{up}-1}{T_{up}}}&amp;lt;/math&amp;gt; : rand = random number between 0 and 1&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T_{up} = \left \{  {~ 1 keV \;  threshold \;energy \;for \; \delta- ray \; production \atop T_{max} \; \;\;\; if \; T_{max} &amp;lt; 1 keV} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; = mean ionization energy&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_2 \approx (10 eV) Z^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln E_1 = \frac{\ln (I) - f_2 \ln (E_2)}{f_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1 + f_2 =1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2 =\left \{  {0 \; z=1 \atop \frac{2}{z} \; z \ge 2} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fluctuation model was comparted with data in &lt;br /&gt;
&lt;br /&gt;
K. Lassila-Perini and L. Urban, NIM, A362 (1995) pg 416&lt;br /&gt;
&lt;br /&gt;
The cross sections used for excitation and ionization may be found in &lt;br /&gt;
&lt;br /&gt;
H. Bichel, Rev. Mod. Phys., vol 60 (1988) pg 663&lt;br /&gt;
&lt;br /&gt;
=== Range Straggling===&lt;br /&gt;
&lt;br /&gt;
;Def of Range (R):&lt;br /&gt;
: The distance traveled before all the particles energy is lost.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;R \equiv \int_0^T \frac{dE}{\frac{dE}{dx}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:  = theoretical calculation of the path length traveled by a particle of incident energy &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note units: &amp;lt;math&amp;gt;\left [ R \right ] =  \frac{g}{cm^2} ; \left [ \frac{dE}{dx} \right ] = \frac{MeV \cdot cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the Energy Straggling introduced in the previous section can explain why identical particles penetrate material to different depths.   The energy straggling results in Range straggling.&lt;br /&gt;
&lt;br /&gt;
If we do a shielding experiment where we have a source of incident particles of energy E and we count how many &amp;quot;punch&amp;quot; through a material of thickness (x) we would see a transmission coefficient &amp;lt;math&amp;gt;\left ( \frac{N_{out}}{N_{in}} \right) &amp;lt;/math&amp;gt; which would look like&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStraggling.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
====Fractional Range Straggling ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \equiv&amp;lt;/math&amp;gt; fractional range straggling&lt;br /&gt;
&lt;br /&gt;
Assuming the energy loss of a non-relativistic heavy ion through matter follows a Gaussian (thick absorber)&lt;br /&gt;
&lt;br /&gt;
Then it can be shown that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{M}{A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; = mass of the target electrons&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; = atomic mass of the Projectile&lt;br /&gt;
&lt;br /&gt;
since &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e = 9.11 \times 10^{-31}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
: 1 a.m.u. = &amp;lt;math&amp;gt;1.66 \times 10^{-27}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{9.11 \times 10^{-31}}{1.66 \times 10^{-27}A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: = 1.17 % if using a proton (A=1)&lt;br /&gt;
&lt;br /&gt;
The above is a &amp;quot;back of the envelope&amp;quot; estimate.  The experimentally measured values for Cu, Al, and Be target using a proton projectile are &lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStrag_SigmaR_overR.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
If the incident projectile is an electron then &amp;lt;math&amp;gt;\frac{\sigma_R}{R}  \approx \frac{1}{2}&amp;lt;/math&amp;gt; making electron range straggling a vague concept.&lt;br /&gt;
&lt;br /&gt;
There are several definitions of electron range&lt;br /&gt;
&lt;br /&gt;
;1.) Maximum Range (&amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:This range is defined using the continuous slowing down approximation (CSDA) where electrons are assumed to have many collisions over very small distances making it appear to be continuous energy loss instead of discrete.  The range is then calculated by integrating over these average energy losses &amp;lt;math&amp;gt;\frac{dE}{dx} \cdot s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;2.) Practical Range (&amp;lt;math&amp;gt;R_P&amp;lt;/math&amp;gt;):&lt;br /&gt;
: This stopping distance is defined by extrapolating the electron transmission curve to zero (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PracticalRangStraggline_4Electrons.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
=== Electron Capture and Loss ===&lt;br /&gt;
====Bohr Criterion====&lt;br /&gt;
:&amp;quot;A rapidly moving nucleus is fully ionized if its velocity exceeds that of its most tightly bound electron&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Bohr Model:&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow E = \frac{mz^2e^4}{8 \epsilon_0^2 h^2 n^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the inner most electron (&amp;lt;math&amp;gt;n=1&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
:Electron K.E. = &amp;lt;math&amp;gt;\frac{1}{2} mv^2 = \frac{mz^2e^4}{2(4\pi \epsilon_0)^2 \hbar^2} \Rightarrow v = \frac{z e^2}{4 \pi \epsilon_0 \hbar}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:the fine structure constant &amp;lt;math&amp;gt;\alpha \equiv \frac{e^2}{4 \pi \epsilon_0 \hbar c} = \frac{1}{137}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; v = zc \alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;v &amp;gt; zc \alpha&amp;lt;/math&amp;gt; the nucleus is fully ionized&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;\frac{z}{v/c} = \frac{z}{\beta} &amp;lt; \frac{1}{\alpha} = 137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively if the ion is moving through a material with a speed such that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{z}{\beta} &amp;gt; \frac{1}{\alpha} =137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then electrons may be captured by the projectile and lost by the target.&lt;br /&gt;
&lt;br /&gt;
==== Z-effective====&lt;br /&gt;
Describing the charge state of your heavy ion traveling through matter at a velocity below the Bohr criterion is very complicated.  There is a competition between electron capture and loss.  Accurate cross sections are needed to simulate the process reliably.&lt;br /&gt;
&lt;br /&gt;
Some insight into this process can be found using the Thomas-Fermi model &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;V \propto \frac{Ze^{-r/a}}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to describe an atom moving slow enough so it has captured many electrons but fast enough so its not neutral.  In the Thomas-Fermi model the distribution of electrons in an atom is described as being uniformly distributed such that there are 2 electrons in each discrete volume of phase space( the space in which all possible states of a system are represented)  defined using planks constant as &amp;lt;math&amp;gt;h^3&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
For the purpose of simulations you would like a relationship for &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
It is usually adequate to use fits for empirical data as long as we know that we are in the kinematic range in which those fits are valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when &amp;lt;math&amp;gt;E &amp;lt; 10&amp;lt;/math&amp;gt; MeV the data indicates that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Z_{eff} = Z(1 - e^{-\beta\frac{B}{Z^{2/3}}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;B = 130 \pm 5&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_{eff} \equiv&amp;lt;/math&amp;gt; effective charge f the projectile = &amp;lt;math&amp;gt;Z - \bar{q}_c&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = number of protons&lt;br /&gt;
:&amp;lt;math&amp;gt;\bar{q}_c&amp;lt;/math&amp;gt; = average number of captured electrons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''When calculating stopping power for E &amp;lt; 10 MeV you use &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in the Bethe-Bloch equation.'''&lt;br /&gt;
&lt;br /&gt;
Note:  As the ions charge state fluctuates while it slows down (or if accelerated through materials) you will need to recalculate the energy loss, and as a result you will get larger energy loss fluctuations in this energy range.&lt;br /&gt;
&lt;br /&gt;
For thin absorber you will look for stripping and loss cross sections.&lt;br /&gt;
&lt;br /&gt;
: Here a thin absorber is one whose thickness is less than the charge equilibrium distance defined as the distance traveled until the projectile's velocity is &amp;lt;math&amp;gt; v \ll zc\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rule of thumb is that a thin absorber for low energy ions has a thickness &amp;lt;math&amp;gt;\le \frac{5 \frac{\mu g}{cm^2}}{\rho}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For thick absorbers:  The experimentally determined expression for the change in &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta Z_{eff} = \frac{1}{2} \sqrt{ \left [  Z_{eff} \left (1 - \frac{Z_{eff}}{Z} \right )^{1.67}\right ] }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Scattering ===&lt;br /&gt;
&lt;br /&gt;
The Bethe-Bloch equation tells us how much energy is lost and GEANT4s calculation of this energy is described above.&lt;br /&gt;
&lt;br /&gt;
Now we need to know which direction the scattered particle goes after it has lost this energy.&lt;br /&gt;
&lt;br /&gt;
The work of Moliere describes the angular deflection of the particle which lost the energy thereby leading to a prediction of the Cross-section.  GEANT4 though uses the more complete Lewis theory to describe Multiple Coulomb Scattering (MCS) sometimes generically referred to as multiple scattering.&lt;br /&gt;
&lt;br /&gt;
There are 3 regions in which coulomb scattering is calculated&lt;br /&gt;
&lt;br /&gt;
; 1.) Single Scattering:&lt;br /&gt;
: For thin materials.&lt;br /&gt;
: If the probability of more than 1 coulomb scattering is small &lt;br /&gt;
:Then use the Rutherford formula for &amp;lt;math&amp;gt;\frac{d \sigma}{d \Omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;2.)Multiple Scattering:&lt;br /&gt;
: In this case the number of independent scatterings is large (N &amp;gt; 20) and the energy loss is small such that the problem can be treated statisticaly to obtain a probability distribution for the net deflection angle &amp;lt;math&amp;gt; [P(\theta)]&amp;lt;/math&amp;gt; as a function of the material thickness that is traversed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;3.) Plural Scattering:&lt;br /&gt;
: If 1&amp;lt; N &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; 20 then you can't use Rutherford to describe the scattering nor use a normal random statistical description.&lt;br /&gt;
&lt;br /&gt;
see E. Keil, Z. Naturforsch, vol 15 (1960), pg 1031&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews of rigorous multiple scattering calculations may be found in &lt;br /&gt;
: P.C. Hemmer, et. al., Phys. Rev, vol 168 (1968), pg 294&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation of MSC (N&amp;gt;20) ====&lt;br /&gt;
&lt;br /&gt;
GEANT4 models MSC when N&amp;gt;20 using model functions to determine the angular and spatial distributions chosen to give the same moments of these distributions as the Lewis theory.&lt;br /&gt;
&lt;br /&gt;
:H.W. Lewis, Phys. Rev., vol 78 (1950), pg 526&lt;br /&gt;
&lt;br /&gt;
modern versions of the above are at&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
: I. Kawrakow, et. al., NIM, B142 (1998) pg 253&lt;br /&gt;
&lt;br /&gt;
When N&amp;gt;20 multiple scattering can be described as a statistical process using a modified version of the Boltzman transport equation from statistical mechanics.  &lt;br /&gt;
&lt;br /&gt;
;Note: The simulation step size is chosen such that (N&amp;gt;20),  If you have materials so thin that N &amp;lt; 20 then GEANT4 will likely skip the material.  (one way around this is to increase the thickness and change the density).  If the material thickness can't be increased because its sandwhiched between two other materials then you will need to write a special step algorithm for the volume and have GEANT4 use it for the step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) \equiv&amp;lt;/math&amp;gt; the distribution function for a system of incident particles traveling through a material.&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s =&amp;lt;/math&amp;gt; arc length of the particle's path through the material&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{x} =&amp;lt;/math&amp;gt; position of a charged particle&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{v} =&amp;lt;/math&amp;gt; direction of motion of the particle &amp;lt;math&amp;gt;\frac{\vec{v}}{|\vec{v}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multiple scattering experienced by a single charged particle traveling through the material is then simulated by sampling from the distribution &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The governing transport/diffusion equation is based on the continuity equation but with a &amp;quot;sink&amp;quot; term representing the possibility of collisions ejecting particles out of the volume.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f(s,\vec{x},\hat{v} ) }{\partial s} + \hat{v} \bullet \vec{\nabla}f(s,\vec{x},\hat{v} ) = N \int \sigma(\hat{v} \bullet\hat{v}^{\prime} )\left [ f(s,\vec{x},\hat{v}^{\prime} )  - f(s,\vec{x},\hat{v} ) \right ] d \hat{v}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; = number of atoms per volume&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\hat{v} \bullet\hat{v}^{\prime} )&amp;lt;/math&amp;gt; = cross sections for elastic scattering per Solid angle &amp;lt;math&amp;gt;\left ( \frac{d \sigma}{d \Omega} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the above diffusion equation the distribution function, &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt; is expanded in Spherical Harmonics ( &amp;lt;math&amp;gt;Y_{\ell}^m(\theta,\phi)&amp;lt;/math&amp;gt; ) and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; expand  in Legendre Polynomials (&amp;lt;math&amp;gt;P_N(cos \theta)&amp;lt;/math&amp;gt;) since it has no &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; angle dependence.&lt;br /&gt;
&lt;br /&gt;
;Note: For Coulomb Scattering in polar coordinates you can write the potential in terms of Legendre Polynomials such that:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;U=k \frac{q}{r}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{\sqrt{r^2-a^2-2ar \cos \theta}}&amp;lt;/math&amp;gt;  in polar coordinates&lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{r} \sum_{n=0}^{\infty} P_n(\cos \theta) \left ( \frac{a}{r}\right )^n&amp;lt;/math&amp;gt; (the sqrt term above is expanded using binomial series&lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} ) = \sum_{\ell,m} f_{\ell,m}(\vec{x},s) Y_{\ell}^m(\hat{v})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting into the diffusion equation and doing the integral on the righ hand side you get&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f_{\ell,m}(\vec{x},s) }{\partial s} + \frac{f_{\ell,m}(s,\vec{x},\hat{v} }{\lambda_{\ell}} = - \sum_{\lambda, i, j} \vec{\nabla} f_{i,j}(\vec{x},s ) \bullet \int Y_{\ell,m}^{\star} \hat{v} Y_{i,j} d \hat{v} \; \; \; \; \; \; \; \;\hat{v} = f(\theta.\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{1}{\lambda_{\ell}} = 2 \pi N \int_0^{\pi} \left [ 1-P_{\ell}(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt;\ell^{th}&amp;lt;/math&amp;gt; transport mean free path for the &amp;lt;math&amp;gt;f_{\ell}&amp;lt;/math&amp;gt; distribution function ( &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; symmetry is assumed making it &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; independent)&lt;br /&gt;
&lt;br /&gt;
From the above one can find the average distances traveled and the average deflection angle of the distribution.  Again, see :&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moments&amp;quot; of &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) &amp;lt;/math&amp;gt;  are defined as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt; = 2 \pi \int z f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = \lambda_1 \left [ 1-e^{-s/\lambda_1}\right ]&amp;lt;/math&amp;gt; = mean geometrical path length&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;\cos(\theta)&amp;gt; = 2 \pi \int_{-1}^1 \sum_{\ell} P_{\ell}(\cos \theta) \int f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = e^{-s/\lambda_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\lambda_1} = 2 \pi N \int_0^{\pi} \left [ 1-P_1(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are 3 lengths&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq_PathLength.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = geometrical path length between endpoints of the step =&amp;lt;math&amp;gt; \left \{  {line \; if \; \vec{B} = 0 \atop arc \; if \; \vec{B} \ne 0 } \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; = true path length = actual length of the path taken by particle&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt;&amp;lt;/math&amp;gt; - mean geometrical path length along the z-axis&lt;br /&gt;
&lt;br /&gt;
In GEANT4 the &amp;lt;math&amp;gt;\lambda_{\ell}&amp;lt;/math&amp;gt;'s are taken from&lt;br /&gt;
&lt;br /&gt;
If 100 eV &amp;lt; K.E. of electron or positron &amp;lt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:D. Liljequist, J. Applied Phys, vol 62 (1987), 342&lt;br /&gt;
:J. Applied Phys, vol 68 (1990), 3061&lt;br /&gt;
&lt;br /&gt;
If K.E. &amp;gt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:R. Mogol, Atomic Data, Nucl, Data tables, vol 65 (1997) pg 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;z&amp;gt; now known GEANT will try to determine &amp;quot;&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&amp;quot; for the energy loss and scattering calculations.&lt;br /&gt;
&lt;br /&gt;
A model is used for this where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\frac{1}{\alpha} \left [ 1 - (1- \alpha \omega z)^{\frac{1}{\omega}})\right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\omega = 1 + \frac{1}{\alpha \lambda_{10}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\alpha =\left \{  {\frac{\lambda_{10} - \lambda_{11}}{s \lambda_{10}}\;\;\;\; K.E. \ge M_{particle} \atop \frac{1}{R}\;\;\;\; K.E. &amp;lt; M_{particle}} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = stepsize&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda_{10} - \frac{\lambda_1}{1-\alpha s}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_{11} = \lambda_1&amp;lt;/math&amp;gt; at end of strep&lt;br /&gt;
&lt;br /&gt;
while &amp;lt;math&amp;gt;&amp;lt;cos \theta &amp;gt;&amp;lt;/math&amp;gt; is calculable, GEANT4 evaluates &amp;lt;math&amp;gt;\cos (\theta)&amp;lt;/math&amp;gt; from a probability distribution whose general form is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g[\cos(\theta)] = p \left ( qg_1[\cos(\theta)] + (1-q)g_3[\cos(\theta)] \right ) + (1-p)g_2[\cos(\theta)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g_1(x) = C1e^{-a(1-x)}&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;g_2(x) = \frac{C_2}{(b-x)^d}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;g_3(x) = C_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;C_1, C_2, C_3&amp;lt;/math&amp;gt; are normalization constants&lt;br /&gt;
:&amp;lt;math&amp;gt;p,q,a,b,d&amp;lt;/math&amp;gt; are parameters which follow the work reported in &lt;br /&gt;
&lt;br /&gt;
:V.L. Highland, NIM, vol 219 (1975) pg497&lt;br /&gt;
&lt;br /&gt;
The GEANT4 files in version 4.8 were located in &lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MscModel.cc&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130045</id>
		<title>TF SPIM StoppingPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130045"/>
		<updated>2025-02-26T17:48:17Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* (Landau Theory) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Stopping Power=&lt;br /&gt;
== Bethe Equation ==&lt;br /&gt;
===Classical Energy Loss ===&lt;br /&gt;
&lt;br /&gt;
Consider the energy lost when a particle of charge (&amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt;) traveling at speed &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is scattered by a target of charge (&amp;lt;math&amp;gt;Ze&amp;lt;/math&amp;gt;).  Assume only the coulomb force causes the particle to scatter from the target as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Bethe_ClassCoulScat.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Notice:&lt;br /&gt;
: as &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is scattered the horizontal component of the coulomb force (&amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt;) flips direction; ie net horizontal force for the scattering&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F_{vertical} = k \frac{zZe^2}{r^2} \sin(\theta) = k \frac{zZe^2}{r^2}  \frac{b}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: k =&amp;lt;math&amp;gt;\frac{1}{4 \pi \epsilon_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
: r = distance between incident projectile and target atom&lt;br /&gt;
: b= impact parameter of collision &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the definition of Impulse one can determine the momentum change of &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta p = \int F dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's assume that the energy lost by the incident particle &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is absorbed by an electron in the target atom.  This energy may be cast in terms of the incident particles momentum change as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{(\Delta p)^2}{2m_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By calculating the change in momentum (&amp;lt;math&amp;gt;\Delta p&amp;lt;/math&amp;gt;) of the incident particle we can infer that the energy lost by the incident particle is absorbed by one of the target material's atomic electrons.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta P = \int F dt = \int k \frac{zZe^2b}{r^3}  dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using  &amp;lt;math&amp;gt;dt = \frac{dx}{v} = \frac{d x}{\beta c}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;= k \frac{zZe^2b}{\beta c} \int_{-\infty}^{+\infty} \frac{ dx}{(x^2+b^2)^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{kzZe^2b}{\beta c b^2} \int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x^2}{b^2})^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x}{b^2})^{3/2}}=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2kzZe^2b}{\beta c b^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
casting this in terms of the classical atomic electron radius &amp;lt;math&amp;gt;r_e&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;r_e = \frac{k e^2}{m_e v^2} \sim \frac{k e^2}{m_e c^2}&amp;lt;/math&amp;gt;  just equate &amp;lt;math&amp;gt;F = \frac{ke^2}{r_e^2} = m \frac{v^2}{r_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2zZr_e m_e c}{\beta  b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \frac{(\Delta p)^2}{2m_e} = 2 \left ( \frac{r_e m_e}{\beta b}\right )^2 \frac {z^2 Z^2 c^2}{m_e}&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = 1 here because I shall assume the energy is lost to just the electron and the Atom is a spectator&lt;br /&gt;
&lt;br /&gt;
Now let's calculate an expression representing the AVERAGE energy lost for an incident particle traversing a material of some thickness.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(\Delta E)&amp;lt;/math&amp;gt; = Probability of an interaction taking place which results in an energy loss &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we let&lt;br /&gt;
&lt;br /&gt;
Z  = Atomic Number = # electrons in target Atom = number of protons in an Atom&lt;br /&gt;
&lt;br /&gt;
N = Avagadros number  = &amp;lt;math&amp;gt;6.022 \times 10^{23}  \frac{Atoms}{mol}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A = Atomic mass =  &amp;lt;math&amp;gt;\frac{g}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt;  = probability of hitting an atomic electron in the area of an annulus of radius (&amp;lt;math&amp;gt;b + db&amp;lt;/math&amp;gt;) with an energy transfer between &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta E + d(\Delta E)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;\frac{-dE }{dx}= \int_0^{\infty} dP(\Delta E) \Delta E&amp;lt;/math&amp;gt; = energy lost by the incident particle per distance traversed through the material&lt;br /&gt;
&lt;br /&gt;
I am just adding up all the energy losses weighted by the probability of the energy loss to find the average (total) energy loss.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; :&lt;br /&gt;
: &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; = probability of an energy transfer taking place = probability of an interaction = &amp;lt;math&amp;gt;\frac{N}{A} d \sigma&amp;lt;/math&amp;gt;  [ Atoms &amp;lt;math&amp;gt;cm^2&amp;lt;/math&amp;gt;/g]&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;dP(\Delta E) = \frac{N}{A} d \sigma =\frac{N}{A} (2 \pi b db) Z&amp;lt;/math&amp;gt; &lt;br /&gt;
:In practice &amp;lt;math&amp;gt; \sigma&amp;lt;/math&amp;gt; is a measured cross-section which is a function of energy.&lt;br /&gt;
:classically &amp;lt;math&amp;gt;\sigma = \pi b^2 ; d \sigma = 2\pi b db&amp;lt;/math&amp;gt; so let's use this as a first approximation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{-dE}{dx} =  \int_0^{\infty} \frac{N}{A} (2 \pi b db) Z \Delta E = \frac{2 \pi N Z}{A} \int_0^{\infty} \Delta E b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{2 \pi N Z}{A} \int_0^{\infty} \left [ \frac{2 r_e^2 m_e c^2 z^2}{\beta^2 b^2}\right ] b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;4 \pi N r_e^2 m_e c^2 \frac{z^2 Z}{A \beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
:=&amp;lt;math&amp;gt;\frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\mathcal{K}}{A} = \frac{4 \pi N r_e^2 m_e c^2}{A} = 0.307 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;''' if A=1'''&lt;br /&gt;
&lt;br /&gt;
The limits of the above integral should be more physical in order to reflect the limits of the physics interaction.  Let &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; represent the minimum and maximum possible impact parameter where the physics is described,  as shown above,  by the coulomb force.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;b \rightarrow 0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\frac{d E}{dx}&amp;lt;/math&amp;gt; diverges and the energy transfer &amp;lt;math&amp;gt;\rightarrow \infty : \Delta E \sim \frac{1}{b}&amp;lt;/math&amp;gt;.  Physically there is a maximum energy that may be transferred before the physics of the problem changes (ie: nuclear excitation, jet production, ...).  The de Borglie wavelength of the atom is used to estimate a value for &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt; such that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;b_{min} \sim  \frac{1}{2} \lambda_{de Broglie} = \frac{h}{2p} = \frac{h}{2 \gamma m_e \beta c}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
As &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger the interaction is &amp;quot;softer&amp;quot; and longer.  If the interaction time (&amp;lt;math&amp;gt;\tau_i&amp;lt;/math&amp;gt;) is so long that it is equivalent to an electron orbit (&amp;lt;math&amp;gt;\tau_R&amp;lt;/math&amp;gt;) then the atom looks more like it is neutrally charged.  You move from an interaction in which the electron orbit is perturbed adiabatically such that there is no orbit change and the minimum amount of energy is transferred to no interaction taking place because the atom is neutral.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_i = \frac{b_{max}}{v} (\sqrt{1-\beta^2})&amp;lt;/math&amp;gt;  : fields at high velocities get Lorentz contracted&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_R \equiv \frac{h}{I}&amp;lt;/math&amp;gt; : I &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt; mean excitation energy of target material ( &amp;lt;math&amp;gt;E = h \nu = h/ \tau&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Condition for &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;\tau_i = \tau_R&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow b_{max} = \frac{h \gamma \beta c}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\frac{dE}{dx} = \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{b_{max}}{b_{min}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{2 \gamma^2 m_e \beta^2 c^2}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Find &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; for a 10 MeV proton hitting a liquid hydrogen (&amp;lt;math&amp;gt;LH_2&amp;lt;/math&amp;gt;) target===&lt;br /&gt;
A = Z=z=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;m_e c^2&amp;lt;/math&amp;gt; = 0.511 MeV &amp;lt;br&amp;gt;&lt;br /&gt;
I = 21.8 eV : see gray data point for Liquid &amp;lt;math&amp;gt;H_2&amp;lt;/math&amp;gt; From  Figure 27.5 on pg 6 of [http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG] below.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PDG_IonizationPotential.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
Just need to know &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;a 10 MeV proton&amp;quot; &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; Kinetic Energy (K.E.) = 10 MeV = &amp;lt;math&amp;gt;(\gamma - 1) mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \gamma = \frac{K.E.}{mc^2} + 1 = \frac{10 MeV}{938 MeV} + 1 \sim 1 = \frac{1}{\sqrt{1-\beta^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proton is not relativistic&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;v^2 = \frac{2 K.E.}{m} = \frac{2 \cdot 10 MeV}{938 MeV/c^2} = 2 \times 10^{-2} c^2 \Rightarrow \beta^2 = \frac{v^2}{c^2} = 2\times 10^{-2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plugging in the numbers:&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} = \left ( 0.307 \frac{MeV \cdot cm^2}{g}\right ) (1)^2 (1) \frac{1}{2 \times10^{-2}} \ln \left( \frac{2 (1) (0.511 MeV) (2 \times10^{-2})}{21.8 eV} \frac{10^6 eV}{MeV}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= 105 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;How much energy is lost after 0.3 cm?&lt;br /&gt;
&lt;br /&gt;
'''Notice that the units for energy loss are normalized by the density of the material'''&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_{LH_2}&amp;lt;/math&amp;gt; = 0.07 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the actual energy lost I need to multiply by the density.   So for any given atom the energy loss will depend on the state (solid, gas, liqid) of the atom as this effects the density of the material.  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta E = (105 \frac{MeV cm^2}{g}) (0.07 \frac{g}{cm^3}) (0.3 cm)&amp;lt;/math&amp;gt; = 2.2 MeV&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_HydrogenStoppingPower.pdf]] Compare with Triumf Kinematics Handbook, 2nd edition, September 1987, L.G. Greeniaus&lt;br /&gt;
&lt;br /&gt;
==Bethe-Bloch Equation ==&lt;br /&gt;
&lt;br /&gt;
While the classical equation above works in a limited kinematic regime, the Bethe-Bloch equation includes the corrections needed to cover most kinematic regimes for heavy particle energy loss.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} = \mathcal{K} z^2 \frac{Z}{A} \frac{1}{\beta^2} \left [ \frac{1}{2} \ln \left (\frac{2 m_e c^2 \beta^2 \gamma^2 }{I} \frac{ T_{max}}{I} \right) - \beta^2 - \frac{\delta}{2}\right ]&amp;lt;/math&amp;gt;[http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG reference Eq 27.1 pg 1]&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;T_{max} = \frac{2 m_e c^2 \beta^2 \gamma^2}{1+ \frac{2 \gamma m_e}{M} + \frac{m_e}{M}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= Max K.E. transferable to the Target of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in a single collision.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;-\beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: =  correction for electron spin and very distant collisions which deforms the electron atomic orbits each process reducing dE/dx by &amp;lt;math&amp;gt;\frac{\beta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:= density correction term: in the classical derivation the material is treated as just a system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms uniformly distributed in space.  These Atoms, however, give the material polarizability which can reduce the electric field (dielectric).&lt;br /&gt;
&lt;br /&gt;
== GEANT 4 implementation ==&lt;br /&gt;
&lt;br /&gt;
The GEANT4 file  (version 4.8.p01)&lt;br /&gt;
&lt;br /&gt;
source/processes/electromagnetic/standard/src/G4BetheBlockModel.cc&lt;br /&gt;
&lt;br /&gt;
is used to calculate hadron energy loss.&lt;br /&gt;
&lt;br /&gt;
line 132 (line 257 in version 4.9.5)  &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} =  \log \left ( \frac{2 m_e c^2 \tau (\tau +2) E_{min}}{I^2}\right) - \left (1 - \frac{E_{min}}{E_{max}} \right ) \beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \tau = \frac{K.E.}{M}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 143 (line 267 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \log  ( \tau (\tau + 2) ) -cden&amp;lt;/math&amp;gt; = density corection = &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 148 (line 270 in vers. 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \frac{2c}{Z_{target}}&amp;lt;/math&amp;gt; = shell correction, corrects for the classical asumption that the atomic electron's velocity is initially zero; or the the incident particles velocity is far greater than the atomic electron's velocity.&lt;br /&gt;
&lt;br /&gt;
line 154 (line 273 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} *= \frac{2 \pi m_e c^2 r_e^2 z^2}{\beta^2} \rho_e \;\;\;\; \rho_e \propto \frac{NZ}{A}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Energy Dependence ==&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_EnergyLoss_EnergyDependence.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
The above curve shows the energy loss per distance traveled (&amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt;) as a function of the incident particles energy.  There are three basic regions.  At low incident energies ( &amp;lt; 10^5 eV) the incident particle tends to excite or even ionize the atoms in the material it is penetrating.  The maximum amount of energy loss per distance traveled is defined as the Bragg peak.  The region after the Bragg peak, in which the energy loss per distance traveled reaches its smallest value, is refered to as the point of minimum ionizing.  Minimimum ionizing particles will have incident energies corresponding to this value or larger.  The characteristic of the minimum ionizing particles is that their energy loss per distance traveled is essentially constant making simulations easier until the particle's energy drops below the minimum ionizing energy level as it passes through the material.&lt;br /&gt;
&lt;br /&gt;
In general the Bethe-Bloch equation breaks down at low energies (below the Bragg peak)  and is a good description (to within 10%) for &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10 \frac{MeV}{a.m.u.} &amp;lt; E &amp;lt; 2 \frac{GeV}{a.m.u.}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; &amp;lt; 26 (Iron)  : a.m.u = Atomic Mass Unit&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\frac{1}{\beta^2}&amp;lt;/math&amp;gt; term in the Bethe-Bloch equation dominates between the Bragg peak and the minimum ionization region.&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\ln&amp;lt;/math&amp;gt; term and its corrections influence the dependence of  &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; as you move up in energy beyond the minimum ionization point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Energy Straggling ===&lt;br /&gt;
&lt;br /&gt;
While the Bethe-Bloch formula gives you a way to quantify the amount of energy a heavy charged particle  loses as a function of the distance traveled, you should realize that when you calculate the total energy lost via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta E = \int_{E_i}^{E_f} \left ( \frac{dE}{dx} \right ) dx&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you are only determining the AVERAGE energy loss.  In other words, Bethe-Bloch is the Astochastic process describing energy loss.&lt;br /&gt;
&lt;br /&gt;
In reality the energy loss process is a stochastic process because of the statistical fluctuations which occur in the actual number of collisions which take place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Thick Absorber ====&lt;br /&gt;
&lt;br /&gt;
A thick absorber is one in which a large number of collisions takes place.   In this situation the central limit theorem from statistics tells you that the larger the number of random variable samples , &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, involved the more the observable will follow a Gaussian distribution. The Gaussian distribution is a good approximation to the binomial distribution when the number of trials is large.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Binomial_with_Large_N_becomes_Gaussian]]&lt;br /&gt;
&lt;br /&gt;
, and to a Poisson distribution when the mean is a lot larger than 1.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Gaussian_approximation_to_Poisson_when]]&lt;br /&gt;
&lt;br /&gt;
The gaussian probability function is defined as &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto e^{\frac{(\Delta - \bar{\Delta})^2}{ \sigma^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Full Width at Half Max (FWHM) of the distribution = &amp;lt;math&amp;gt;\left ( 2 \sqrt{2 \ln 2} \right ) \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of energy loss, the variance using the Bethe-Bloch equation should be &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_0^2 = 4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the realitivistic variance is &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 = [\frac{1-\beta^2/2}{1-\beta^2} ]\sigma_0^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for very thick absorbers see&lt;br /&gt;
&lt;br /&gt;
C. Tschaler, NIM '''64''', (1968) 237 ; ''ibid'', '''61''', (1968) 141&lt;br /&gt;
&lt;br /&gt;
When simulating energy loss of heavy charged particles the Bethe-Bloch equation may be used to calculate a &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; which can determine the average energy loss at the given kinetic energy of the particle.  This average is then smeared according to a gaussian distribution of variance &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 =4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x [\frac{1-\beta^2/2}{1-\beta^2} ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Thin Absorbers====&lt;br /&gt;
&lt;br /&gt;
In thin absorbers the number of collisions is small preventing the use of the central limit theorem to describe the stochastic process of energy loss in terms of a Gaussian distribution.  The large energy transfers that are possible cause the energy loss distribution to look like a Gaussian  with a high energy tail (or foot).&lt;br /&gt;
&lt;br /&gt;
The skewness of the resulting energy loss distribution is quantified as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\kappa = \frac{\bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta  \equiv 2 \pi N_a r_e^2 m_e c^2 \rho \frac{Z}{A} \left ( \frac{z}{\beta}\right)^2 x &amp;lt;/math&amp;gt; = lead term in Bethe Bloch equation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt; = density of absorbing material.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right ) \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; = max energy transfered in 1 collision (headon / knock out collision)&lt;br /&gt;
&lt;br /&gt;
This comes from the relativistic kinematics of an Elastic Collision.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:SPIM_ThinAbsorbers_Scatering.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\gamma = \frac{E_{tot}}{Mc^2} = \frac{ \sqrt{(pc)^2 + (Mc^2)^2}}{Mc^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\beta= \frac{pc}{\gamma Mc^2} = \frac{pc}{E_{tot}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = E_{tot} - Mc^2 = \gamma Mc^2 - Mc^2 = (\gamma - 1 ) Mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = \sqrt{(pc)^2 + (Mc^2)^2} - Mc^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;   (p^{\prime}c)^2 = E_k^2 + 2E_km_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conservation of Momentum &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{p} = \vec{p}^{\; \prime \prime} + \vec{p}^{\; \prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conservation of Energy &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_{tot} + m_ec^2 = E_{tot}^{\prime \prime} + E_{tot}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sqrt{(pc)^2 + (Mc^2)^2} + m_ec^2 = \sqrt{(p^{\; \prime \prime} c)^2 + (Mc^2)^2}  + E_k +  m_e c^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using conservation of E &amp;amp; P as well as substituting for &amp;lt;math&amp;gt;p^{\prime}&amp;lt;/math&amp;gt; you can show&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(p^{\; \prime \prime}c)^2 = (pc)^2 - 2E_k\sqrt{(pc)^2 +(Mc^2)^2} + E_k^2&amp;lt;/math&amp;gt; : cons of E&lt;br /&gt;
:&amp;lt;math&amp;gt;= (pc)^2 + E_k^2 + 2E_km_ec^2 -2pc\sqrt{E_k^2+2E_km_ec^2} \cos(\theta)&amp;lt;/math&amp;gt; : cons of P&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;pc \cos(\theta) \sqrt{1+\frac{2m_ec^2}{E_k}} = \sqrt{(pc)^2+(Mc^2)^2} + m_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;E_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_k = \frac{2m_ec^2(pc)^2\cos^2 (\theta)}{[\sqrt{(pc)^2 + (Mc^2)^2} +m_ec^2]^2 - (pc)^2 \cos^2 (\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== (Landau Theory) =====&lt;br /&gt;
&amp;lt;math&amp;gt;\kappa \leq 0.01&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Landau assumed&lt;br /&gt;
:# &amp;lt;math&amp;gt;W_{max} = \infty&amp;lt;/math&amp;gt; is max energy transfer&lt;br /&gt;
:# electrons are free (energy transfer is so large you can neglect binding)&lt;br /&gt;
:# incident particle maintains velocity (large momentum transfer from big mass to small mass) (bowling ball hits ping pong ball)&lt;br /&gt;
&lt;br /&gt;
L. Landau, &amp;quot;On the Energy Loss of Fast Particles by Ionization&amp;quot;, J. Phys., vol 8 (1944), pg 201&lt;br /&gt;
&lt;br /&gt;
instead of a gaussian distribution Landau used&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto \frac{1}{\bar{\Delta}\pi} \int_0^{\infty} e^{-u \ln u - u \lambda} \sin(\pi u) du&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda = \frac{1}{\bar{\Delta}} \left [ \Delta - \bar{\Delta} \ln \bar{\Delta} - \ln \epsilon + 1 -C \right ]&amp;lt;/math&amp;gt; Landau's parameter&lt;br /&gt;
: &amp;lt;math&amp;gt;\bar{\Delta} = 2\pi N_a r_e^2 m_e c^2 \rho \frac{Zz^2}{A \beta^2}x&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln \epsilon = \ln \left [ \frac{(1-\beta^2)I^2}{2m_ec^2 \beta^2} \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Landau_ThinAbsorberDist.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== (Vavilou's Theory) =====&lt;br /&gt;
&lt;br /&gt;
Vavilous paper&lt;br /&gt;
&lt;br /&gt;
P.V. Vavilou, &amp;quot;Ionization losses of High Energy Heavy Particles&amp;quot;, Soviet Physics JETP, vol 5 (1950? )pg 749&lt;br /&gt;
&lt;br /&gt;
describe the physics for the case &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;0.01 &amp;lt; \kappa &amp;lt; \infty &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution function derived is shown below as well as a conceptual overlay of Vavilou's and Landau's distributions.  (The &amp;lt;math&amp;gt;\zeta f(x,\Delta)&amp;lt;/math&amp;gt; in the picture should be a &amp;lt;math&amp;gt;\bar{\Delta}P(x,\Delta)&amp;lt;/math&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) = \frac{1}{\bar{\Delta}\pi} x e^{x(1+\beta^2C)} \int_0^{\infty} e^{xf_1} \cos(y \lambda_1 + xf_2) dy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f_1 = \beta^2 \left [ \ln(y) - C_i(y)\right ] - \cos(y) - y S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f_2 = y\left [ \ln(y) - C_i(y)\right ] + \sin(y) + \beta^2  S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C_i(y) \equiv - \int_y^{\infty} \frac{\cos(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;S_i(y) \equiv \int_0^{y} \frac{\sin(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt; are the sine and cosine integral functions given in Vavilous' paper&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Vavilou_Landau_ThinAbsorber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation ====&lt;br /&gt;
&lt;br /&gt;
GEANT 4 uses the skewness parameter &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; to determine if it will use a &amp;quot;fluctuations model&amp;quot; to calculate energy straggling or the gaussian model described in section 3.2.1.&lt;br /&gt;
&lt;br /&gt;
===== kappa &amp;gt; 10 =====&lt;br /&gt;
If &lt;br /&gt;
: &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt; &amp;gt; 10 &lt;br /&gt;
and we have a thick absorber ( large step size) then the Gausian function in 3.2.1 is used to calculate energy straggling.&lt;br /&gt;
&lt;br /&gt;
What happens is &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; is calculated via &amp;lt;math&amp;gt;\int_{E_i}^{E_f} \frac{dE}{dx} dx&amp;lt;/math&amp;gt; then the actual energy loss predicted by the simulation is chosen from a Gaussian distribution to account for energy straggling such that the &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; of this Gaussian distribution is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma^2 = 2 \pi r_e^2m_ec^2N_{el} \frac{Z_h}{\beta^2} T_C s (1 - \frac{\beta^2}{2})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N_{el}&amp;lt;/math&amp;gt; = electron density of the medium&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_h&amp;lt;/math&amp;gt; = charge of the incident particle&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = step size&lt;br /&gt;
:&amp;lt;math&amp;gt; T_C&amp;lt;/math&amp;gt; = cutoff kinetic energy for &amp;lt;math&amp;gt;\delta &amp;lt;/math&amp;gt;-electrons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_C&amp;lt;/math&amp;gt; tells GEANT where to put the cutoff for using the Gaussian distribution for energy straggling.  This tells the simulation the low energy cutoff where Bethe-Bloch starts to fail due to ionization.&lt;br /&gt;
&lt;br /&gt;
=====Delta-electrons =====&lt;br /&gt;
What is a &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electron?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons are also known as &amp;quot;knock -on&amp;quot; electrons or delta rays.&lt;br /&gt;
&lt;br /&gt;
As heavy particles traverse a medium they can ionize electrons from atoms.  The ejected electrons (&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons) can be given enough energy to ionize as well.&lt;br /&gt;
&lt;br /&gt;
In a cloud chamber (a supercooled volume of super saturated water vapor which ionizes as charged particles pass through)  such and event would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_DeltaRay_CloudChamber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
The blue spiral in the above gas chamber picture is a high energy electron ejected from a collision that spirals in the B-field ejecting low energy electrons at the end.  The B-field is directed out of the picture.&lt;br /&gt;
&lt;br /&gt;
The physics of ionization is different from the physics used to calculate Bethe-Bloch energy loss.  Remember Bethe-Bloch  starts to break down at low energies below the Bragg peak.  &lt;br /&gt;
&lt;br /&gt;
Because of this GEANT 4 sets the cutoff for this process to be&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;T_{cut}&amp;lt;/math&amp;gt; &amp;gt; 1 keV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:  The BE energies of an electron in Hydrogen is 13.6 ev and the electrons in Argon have binding energies between 15.7 eV and 3.2 keV.&lt;br /&gt;
&lt;br /&gt;
===== Fluctuations Model: kappa &amp;lt; 10=====&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}} &amp;lt; \frac{\Delta E}{T_C}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then GEANT 4 uses a &amp;quot;Fluctuations Model&amp;quot; to determine energy loss instead of Bethe-Bloch.&lt;br /&gt;
&lt;br /&gt;
; Fluctuations Model&lt;br /&gt;
:# the atom is assumed to have 2 energy levels &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:# you can excite the atom and lose either &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt; or you can ionize the atom and lose energy according to a &amp;lt;math&amp;gt;\frac{1}{E^2}&amp;lt;/math&amp;gt; function &amp;lt;math&amp;gt;u_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total energy loss in a step will be &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \Delta E_{exc} + \Delta E_{ion}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{exc} = \eta_1 E_1 + \eta_2 E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{ion} = \sum_{j=1}^{\eta_3} \frac{I}{1 - u_j \frac{T_{up}-I}{T_{up}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\eta_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\eta_2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\eta_3&amp;lt;/math&amp;gt; are the number of collisions which are sampled from a poison distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;u_j = \int_{I}^{E_j} \frac{I T_{up}}{T_{up} - I} \frac{dx}{x^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_j = \frac{I}{1- rand  \frac{T_{up}-1}{T_{up}}}&amp;lt;/math&amp;gt; : rand = random number between 0 and 1&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T_{up} = \left \{  {~ 1 keV \;  threshold \;energy \;for \; \delta- ray \; production \atop T_{max} \; \;\;\; if \; T_{max} &amp;lt; 1 keV} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; = mean ionization energy&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_2 \approx (10 eV) Z^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln E_1 = \frac{\ln (I) - f_2 \ln (E_2)}{f_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1 + f_2 =1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2 =\left \{  {0 \; z=1 \atop \frac{2}{z} \; z \ge 2} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fluctuation model was comparted with data in &lt;br /&gt;
&lt;br /&gt;
K. Lassila-Perini and L. Urban, NIM, A362 (1995) pg 416&lt;br /&gt;
&lt;br /&gt;
The cross sections used for excitation and ionization may be found in &lt;br /&gt;
&lt;br /&gt;
H. Bichel, Rev. Mod. Phys., vol 60 (1988) pg 663&lt;br /&gt;
&lt;br /&gt;
=== Range Straggling===&lt;br /&gt;
&lt;br /&gt;
;Def of Range (R):&lt;br /&gt;
: The distance traveled before all the particles energy is lost.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;R \equiv \int_0^T \frac{dE}{\frac{dE}{dx}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:  = theoretical calculation of the path length traveled by a particle of incident energy &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note units: &amp;lt;math&amp;gt;\left [ R \right ] =  \frac{g}{cm^2} ; \left [ \frac{dE}{dx} \right ] = \frac{MeV \cdot cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the Energy Straggling introduced in the previous section can explain why identical particles penetrate material to different depths.   The energy straggling results in Range straggling.&lt;br /&gt;
&lt;br /&gt;
If we do a shielding experiment where we have a source of incident particles of energy E and we count how many &amp;quot;punch&amp;quot; through a material of thickness (x) we would see a transmission coefficient &amp;lt;math&amp;gt;\left ( \frac{N_{out}}{N_{in}} \right) &amp;lt;/math&amp;gt; which would look like&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStraggling.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
====Fractional Range Straggling ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \equiv&amp;lt;/math&amp;gt; fractional range straggling&lt;br /&gt;
&lt;br /&gt;
Assuming the energy loss of a non-relativistic heavy ion through matter follows a Gaussian (thick absorber)&lt;br /&gt;
&lt;br /&gt;
Then it can be shown that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{M}{A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; = mass of the target electrons&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; = atomic mass of the Projectile&lt;br /&gt;
&lt;br /&gt;
since &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e = 9.11 \times 10^{-31}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
: 1 a.m.u. = &amp;lt;math&amp;gt;1.66 \times 10^{-27}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{9.11 \times 10^{-31}}{1.66 \times 10^{-27}A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: = 1.17 % if using a proton (A=1)&lt;br /&gt;
&lt;br /&gt;
The above is a &amp;quot;back of the envelope&amp;quot; estimate.  The experimentally measured values for Cu, Al, and Be target using a proton projectile are &lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStrag_SigmaR_overR.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
If the incident projectile is an electron then &amp;lt;math&amp;gt;\frac{\sigma_R}{R}  \approx \frac{1}{2}&amp;lt;/math&amp;gt; making electron range straggling a vague concept.&lt;br /&gt;
&lt;br /&gt;
There are several definitions of electron range&lt;br /&gt;
&lt;br /&gt;
;1.) Maximum Range (&amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:This range is defined using the continuous slowing down approximation (CSDA) where electrons are assumed to have many collisions over very small distances making it appear to be continuous energy loss instead of discrete.  The range is then calculated by integrating over these average energy losses &amp;lt;math&amp;gt;\frac{dE}{dx} \cdot s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;2.) Practical Range (&amp;lt;math&amp;gt;R_P&amp;lt;/math&amp;gt;):&lt;br /&gt;
: This stopping distance is defined by extrapolating the electron transmission curve to zero (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PracticalRangStraggline_4Electrons.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
=== Electron Capture and Loss ===&lt;br /&gt;
====Bohr Criterion====&lt;br /&gt;
:&amp;quot;A rapidly moving nucleus is fully ionized if its velocity exceeds that of its most tightly bound electron&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Bohr Model:&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow E = \frac{mz^2e^4}{8 \epsilon_0^2 h^2 n^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the inner most electron (&amp;lt;math&amp;gt;n=1&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
:Electron K.E. = &amp;lt;math&amp;gt;\frac{1}{2} mv^2 = \frac{mz^2e^4}{2(4\pi \epsilon_0)^2 \hbar^2} \Rightarrow v = \frac{z e^2}{4 \pi \epsilon_0 \hbar}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:the fine structure constant &amp;lt;math&amp;gt;\alpha \equiv \frac{e^2}{4 \pi \epsilon_0 \hbar c} = \frac{1}{137}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; v = zc \alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;v &amp;gt; zc \alpha&amp;lt;/math&amp;gt; the nucleus is fully ionized&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;\frac{z}{v/c} = \frac{z}{\beta} &amp;lt; \frac{1}{\alpha} = 137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively if the ion is moving through a material with a speed such that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{z}{\beta} &amp;gt; \frac{1}{\alpha} =137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then electrons may be captured by the projectile and lost by the target.&lt;br /&gt;
&lt;br /&gt;
==== Z-effective====&lt;br /&gt;
Describing the charge state of your heavy ion traveling through matter at a velocity below the Bohr criterion is very complicated.  There is a competition between electron capture and loss.  Accurate cross sections are needed to simulate the process reliably.&lt;br /&gt;
&lt;br /&gt;
Some insight into this process can be found using the Thomas-Fermi model &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;V \propto \frac{Ze^{-r/a}}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to describe an atom moving slow enough so it has captured many electrons but fast enough so its not neutral.  In the Thomas-Fermi model the distribution of electrons in an atom is described as being uniformly distributed such that there are 2 electrons in each discrete volume of phase space( the space in which all possible states of a system are represented)  defined using planks constant as &amp;lt;math&amp;gt;h^3&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
For the purpose of simulations you would like a relationship for &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
It is usually adequate to use fits for empirical data as long as we know that we are in the kinematic range in which those fits are valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when &amp;lt;math&amp;gt;E &amp;lt; 10&amp;lt;/math&amp;gt; MeV the data indicates that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Z_{eff} = Z(1 - e^{-\beta\frac{B}{Z^{2/3}}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;B = 130 \pm 5&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_{eff} \equiv&amp;lt;/math&amp;gt; effective charge f the projectile = &amp;lt;math&amp;gt;Z - \bar{q}_c&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = number of protons&lt;br /&gt;
:&amp;lt;math&amp;gt;\bar{q}_c&amp;lt;/math&amp;gt; = average number of captured electrons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''When calculating stopping power for E &amp;lt; 10 MeV you use &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in the Bethe-Bloch equation.'''&lt;br /&gt;
&lt;br /&gt;
Note:  As the ions charge state fluctuates while it slows down (or if accelerated through materials) you will need to recalculate the energy loss, and as a result you will get larger energy loss fluctuations in this energy range.&lt;br /&gt;
&lt;br /&gt;
For thin absorber you will look for stripping and loss cross sections.&lt;br /&gt;
&lt;br /&gt;
: Here a thin absorber is one whose thickness is less than the charge equilibrium distance defined as the distance traveled until the projectile's velocity is &amp;lt;math&amp;gt; v \ll zc\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rule of thumb is that a thin absorber for low energy ions has a thickness &amp;lt;math&amp;gt;\le \frac{5 \frac{\mu g}{cm^2}}{\rho}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For thick absorbers:  The experimentally determined expression for the change in &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta Z_{eff} = \frac{1}{2} \sqrt{ \left [  Z_{eff} \left (1 - \frac{Z_{eff}}{Z} \right )^{1.67}\right ] }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Scattering ===&lt;br /&gt;
&lt;br /&gt;
The Bethe-Bloch equation tells us how much energy is lost and GEANT4s calculation of this energy is described above.&lt;br /&gt;
&lt;br /&gt;
Now we need to know which direction the scattered particle goes after it has lost this energy.&lt;br /&gt;
&lt;br /&gt;
The work of Moliere describes the angular deflection of the particle which lost the energy thereby leading to a prediction of the Cross-section.  GEANT4 though uses the more complete Lewis theory to describe Multiple Coulomb Scattering (MCS) sometimes generically referred to as multiple scattering.&lt;br /&gt;
&lt;br /&gt;
There are 3 regions in which coulomb scattering is calculated&lt;br /&gt;
&lt;br /&gt;
; 1.) Single Scattering:&lt;br /&gt;
: For thin materials.&lt;br /&gt;
: If the probability of more than 1 coulomb scattering is small &lt;br /&gt;
:Then use the Rutherford formula for &amp;lt;math&amp;gt;\frac{d \sigma}{d \Omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;2.)Multiple Scattering:&lt;br /&gt;
: In this case the number of independent scatterings is large (N &amp;gt; 20) and the energy loss is small such that the problem can be treated statisticaly to obtain a probability distribution for the net deflection angle &amp;lt;math&amp;gt; [P(\theta)]&amp;lt;/math&amp;gt; as a function of the material thickness that is traversed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;3.) Plural Scattering:&lt;br /&gt;
: If 1&amp;lt; N &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; 20 then you can't use Rutherford to describe the scattering nor use a normal random statistical description.&lt;br /&gt;
&lt;br /&gt;
see E. Keil, Z. Naturforsch, vol 15 (1960), pg 1031&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews of rigorous multiple scattering calculations may be found in &lt;br /&gt;
: P.C. Hemmer, et. al., Phys. Rev, vol 168 (1968), pg 294&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation of MSC (N&amp;gt;20) ====&lt;br /&gt;
&lt;br /&gt;
GEANT4 models MSC when N&amp;gt;20 using model functions to determine the angular and spatial distributions chosen to give the same moments of these distributions as the Lewis theory.&lt;br /&gt;
&lt;br /&gt;
:H.W. Lewis, Phys. Rev., vol 78 (1950), pg 526&lt;br /&gt;
&lt;br /&gt;
modern versions of the above are at&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
: I. Kawrakow, et. al., NIM, B142 (1998) pg 253&lt;br /&gt;
&lt;br /&gt;
When N&amp;gt;20 multiple scattering can be described as a statistical process using a modified version of the Boltzman transport equation from statistical mechanics.  &lt;br /&gt;
&lt;br /&gt;
;Note: The simulation step size is chosen such that (N&amp;gt;20),  If you have materials so thin that N &amp;lt; 20 then GEANT4 will likely skip the material.  (one way around this is to increase the thickness and change the density).  If the material thickness can't be increased because its sandwhiched between two other materials then you will need to write a special step algorithm for the volume and have GEANT4 use it for the step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) \equiv&amp;lt;/math&amp;gt; the distribution function for a system of incident particles traveling through a material.&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s =&amp;lt;/math&amp;gt; arc length of the particle's path through the material&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{x} =&amp;lt;/math&amp;gt; position of a charged particle&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{v} =&amp;lt;/math&amp;gt; direction of motion of the particle &amp;lt;math&amp;gt;\frac{\vec{v}}{|\vec{v}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multiple scattering experienced by a single charged particle traveling through the material is then simulated by sampling from the distribution &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The governing transport/diffusion equation is based on the continuity equation but with a &amp;quot;sink&amp;quot; term representing the possibility of collisions ejecting particles out of the volume.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f(s,\vec{x},\hat{v} ) }{\partial s} + \hat{v} \bullet \vec{\nabla}f(s,\vec{x},\hat{v} ) = N \int \sigma(\hat{v} \bullet\hat{v}^{\prime} )\left [ f(s,\vec{x},\hat{v}^{\prime} )  - f(s,\vec{x},\hat{v} ) \right ] d \hat{v}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; = number of atoms per volume&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\hat{v} \bullet\hat{v}^{\prime} )&amp;lt;/math&amp;gt; = cross sections for elastic scattering per Solid angle &amp;lt;math&amp;gt;\left ( \frac{d \sigma}{d \Omega} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the above diffusion equation the distribution function, &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt; is expanded in Spherical Harmonics ( &amp;lt;math&amp;gt;Y_{\ell}^m(\theta,\phi)&amp;lt;/math&amp;gt; ) and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; expand  in Legendre Polynomials (&amp;lt;math&amp;gt;P_N(cos \theta)&amp;lt;/math&amp;gt;) since it has no &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; angle dependence.&lt;br /&gt;
&lt;br /&gt;
;Note: For Coulomb Scattering in polar coordinates you can write the potential in terms of Legendre Polynomials such that:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;U=k \frac{q}{r}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{\sqrt{r^2-a^2-2ar \cos \theta}}&amp;lt;/math&amp;gt;  in polar coordinates&lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{r} \sum_{n=0}^{\infty} P_n(\cos \theta) \left ( \frac{a}{r}\right )^n&amp;lt;/math&amp;gt; (the sqrt term above is expanded using binomial series&lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} ) = \sum_{\ell,m} f_{\ell,m}(\vec{x},s) Y_{\ell}^m(\hat{v})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting into the diffusion equation and doing the integral on the righ hand side you get&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f_{\ell,m}(\vec{x},s) }{\partial s} + \frac{f_{\ell,m}(s,\vec{x},\hat{v} }{\lambda_{\ell}} = - \sum_{\lambda, i, j} \vec{\nabla} f_{i,j}(\vec{x},s ) \bullet \int Y_{\ell,m}^{\star} \hat{v} Y_{i,j} d \hat{v} \; \; \; \; \; \; \; \;\hat{v} = f(\theta.\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{1}{\lambda_{\ell}} = 2 \pi N \int_0^{\pi} \left [ 1-P_{\ell}(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt;\ell^{th}&amp;lt;/math&amp;gt; transport mean free path for the &amp;lt;math&amp;gt;f_{\ell}&amp;lt;/math&amp;gt; distribution function ( &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; symmetry is assumed making it &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; independent)&lt;br /&gt;
&lt;br /&gt;
From the above one can find the average distances traveled and the average deflection angle of the distribution.  Again, see :&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moments&amp;quot; of &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) &amp;lt;/math&amp;gt;  are defined as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt; = 2 \pi \int z f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = \lambda_1 \left [ 1-e^{-s/\lambda_1}\right ]&amp;lt;/math&amp;gt; = mean geometrical path length&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;\cos(\theta)&amp;gt; = 2 \pi \int_{-1}^1 \sum_{\ell} P_{\ell}(\cos \theta) \int f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = e^{-s/\lambda_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\lambda_1} = 2 \pi N \int_0^{\pi} \left [ 1-P_1(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are 3 lengths&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq_PathLength.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = geometrical path length between endpoints of the step =&amp;lt;math&amp;gt; \left \{  {line \; if \; \vec{B} = 0 \atop arc \; if \; \vec{B} \ne 0 } \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; = true path length = actual length of the path taken by particle&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt;&amp;lt;/math&amp;gt; - mean geometrical path length along the z-axis&lt;br /&gt;
&lt;br /&gt;
In GEANT4 the &amp;lt;math&amp;gt;\lambda_{\ell}&amp;lt;/math&amp;gt;'s are taken from&lt;br /&gt;
&lt;br /&gt;
If 100 eV &amp;lt; K.E. of electron or positron &amp;lt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:D. Liljequist, J. Applied Phys, vol 62 (1987), 342&lt;br /&gt;
:J. Applied Phys, vol 68 (1990), 3061&lt;br /&gt;
&lt;br /&gt;
If K.E. &amp;gt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:R. Mogol, Atomic Data, Nucl, Data tables, vol 65 (1997) pg 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;z&amp;gt; now known GEANT will try to determine &amp;quot;&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&amp;quot; for the energy loss and scattering calculations.&lt;br /&gt;
&lt;br /&gt;
A model is used for this where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\frac{1}{\alpha} \left [ 1 - (1- \alpha \omega z)^{\frac{1}{\omega}})\right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\omega = 1 + \frac{1}{\alpha \lambda_{10}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\alpha =\left \{  {\frac{\lambda_{10} - \lambda_{11}}{s \lambda_{10}}\;\;\;\; K.E. \ge M_{particle} \atop \frac{1}{R}\;\;\;\; K.E. &amp;lt; M_{particle}} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = stepsize&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda_{10} - \frac{\lambda_1}{1-\alpha s}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_{11} = \lambda_1&amp;lt;/math&amp;gt; at end of strep&lt;br /&gt;
&lt;br /&gt;
while &amp;lt;math&amp;gt;&amp;lt;cos \theta &amp;gt;&amp;lt;/math&amp;gt; is calculable, GEANT4 evaluates &amp;lt;math&amp;gt;\cos (\theta)&amp;lt;/math&amp;gt; from a probability distribution whose general form is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g[\cos(\theta)] = p \left ( qg_1[\cos(\theta)] + (1-q)g_3[\cos(\theta)] \right ) + (1-p)g_2[\cos(\theta)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g_1(x) = C1e^{-a(1-x)}&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;g_2(x) = \frac{C_2}{(b-x)^d}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;g_3(x) = C_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;C_1, C_2, C_3&amp;lt;/math&amp;gt; are normalization constants&lt;br /&gt;
:&amp;lt;math&amp;gt;p,q,a,b,d&amp;lt;/math&amp;gt; are parameters which follow the work reported in &lt;br /&gt;
&lt;br /&gt;
:V.L. Highland, NIM, vol 219 (1975) pg497&lt;br /&gt;
&lt;br /&gt;
The GEANT4 files in version 4.8 were located in &lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MscModel.cc&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130044</id>
		<title>TF SPIM StoppingPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130044"/>
		<updated>2025-02-26T17:45:37Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* (Vavilou's Theory) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Stopping Power=&lt;br /&gt;
== Bethe Equation ==&lt;br /&gt;
===Classical Energy Loss ===&lt;br /&gt;
&lt;br /&gt;
Consider the energy lost when a particle of charge (&amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt;) traveling at speed &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is scattered by a target of charge (&amp;lt;math&amp;gt;Ze&amp;lt;/math&amp;gt;).  Assume only the coulomb force causes the particle to scatter from the target as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Bethe_ClassCoulScat.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Notice:&lt;br /&gt;
: as &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is scattered the horizontal component of the coulomb force (&amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt;) flips direction; ie net horizontal force for the scattering&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F_{vertical} = k \frac{zZe^2}{r^2} \sin(\theta) = k \frac{zZe^2}{r^2}  \frac{b}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: k =&amp;lt;math&amp;gt;\frac{1}{4 \pi \epsilon_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
: r = distance between incident projectile and target atom&lt;br /&gt;
: b= impact parameter of collision &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the definition of Impulse one can determine the momentum change of &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta p = \int F dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's assume that the energy lost by the incident particle &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is absorbed by an electron in the target atom.  This energy may be cast in terms of the incident particles momentum change as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{(\Delta p)^2}{2m_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By calculating the change in momentum (&amp;lt;math&amp;gt;\Delta p&amp;lt;/math&amp;gt;) of the incident particle we can infer that the energy lost by the incident particle is absorbed by one of the target material's atomic electrons.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta P = \int F dt = \int k \frac{zZe^2b}{r^3}  dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using  &amp;lt;math&amp;gt;dt = \frac{dx}{v} = \frac{d x}{\beta c}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;= k \frac{zZe^2b}{\beta c} \int_{-\infty}^{+\infty} \frac{ dx}{(x^2+b^2)^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{kzZe^2b}{\beta c b^2} \int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x^2}{b^2})^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x}{b^2})^{3/2}}=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2kzZe^2b}{\beta c b^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
casting this in terms of the classical atomic electron radius &amp;lt;math&amp;gt;r_e&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;r_e = \frac{k e^2}{m_e v^2} \sim \frac{k e^2}{m_e c^2}&amp;lt;/math&amp;gt;  just equate &amp;lt;math&amp;gt;F = \frac{ke^2}{r_e^2} = m \frac{v^2}{r_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2zZr_e m_e c}{\beta  b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \frac{(\Delta p)^2}{2m_e} = 2 \left ( \frac{r_e m_e}{\beta b}\right )^2 \frac {z^2 Z^2 c^2}{m_e}&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = 1 here because I shall assume the energy is lost to just the electron and the Atom is a spectator&lt;br /&gt;
&lt;br /&gt;
Now let's calculate an expression representing the AVERAGE energy lost for an incident particle traversing a material of some thickness.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(\Delta E)&amp;lt;/math&amp;gt; = Probability of an interaction taking place which results in an energy loss &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we let&lt;br /&gt;
&lt;br /&gt;
Z  = Atomic Number = # electrons in target Atom = number of protons in an Atom&lt;br /&gt;
&lt;br /&gt;
N = Avagadros number  = &amp;lt;math&amp;gt;6.022 \times 10^{23}  \frac{Atoms}{mol}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A = Atomic mass =  &amp;lt;math&amp;gt;\frac{g}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt;  = probability of hitting an atomic electron in the area of an annulus of radius (&amp;lt;math&amp;gt;b + db&amp;lt;/math&amp;gt;) with an energy transfer between &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta E + d(\Delta E)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;\frac{-dE }{dx}= \int_0^{\infty} dP(\Delta E) \Delta E&amp;lt;/math&amp;gt; = energy lost by the incident particle per distance traversed through the material&lt;br /&gt;
&lt;br /&gt;
I am just adding up all the energy losses weighted by the probability of the energy loss to find the average (total) energy loss.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; :&lt;br /&gt;
: &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; = probability of an energy transfer taking place = probability of an interaction = &amp;lt;math&amp;gt;\frac{N}{A} d \sigma&amp;lt;/math&amp;gt;  [ Atoms &amp;lt;math&amp;gt;cm^2&amp;lt;/math&amp;gt;/g]&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;dP(\Delta E) = \frac{N}{A} d \sigma =\frac{N}{A} (2 \pi b db) Z&amp;lt;/math&amp;gt; &lt;br /&gt;
:In practice &amp;lt;math&amp;gt; \sigma&amp;lt;/math&amp;gt; is a measured cross-section which is a function of energy.&lt;br /&gt;
:classically &amp;lt;math&amp;gt;\sigma = \pi b^2 ; d \sigma = 2\pi b db&amp;lt;/math&amp;gt; so let's use this as a first approximation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{-dE}{dx} =  \int_0^{\infty} \frac{N}{A} (2 \pi b db) Z \Delta E = \frac{2 \pi N Z}{A} \int_0^{\infty} \Delta E b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{2 \pi N Z}{A} \int_0^{\infty} \left [ \frac{2 r_e^2 m_e c^2 z^2}{\beta^2 b^2}\right ] b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;4 \pi N r_e^2 m_e c^2 \frac{z^2 Z}{A \beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
:=&amp;lt;math&amp;gt;\frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\mathcal{K}}{A} = \frac{4 \pi N r_e^2 m_e c^2}{A} = 0.307 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;''' if A=1'''&lt;br /&gt;
&lt;br /&gt;
The limits of the above integral should be more physical in order to reflect the limits of the physics interaction.  Let &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; represent the minimum and maximum possible impact parameter where the physics is described,  as shown above,  by the coulomb force.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;b \rightarrow 0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\frac{d E}{dx}&amp;lt;/math&amp;gt; diverges and the energy transfer &amp;lt;math&amp;gt;\rightarrow \infty : \Delta E \sim \frac{1}{b}&amp;lt;/math&amp;gt;.  Physically there is a maximum energy that may be transferred before the physics of the problem changes (ie: nuclear excitation, jet production, ...).  The de Borglie wavelength of the atom is used to estimate a value for &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt; such that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;b_{min} \sim  \frac{1}{2} \lambda_{de Broglie} = \frac{h}{2p} = \frac{h}{2 \gamma m_e \beta c}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
As &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger the interaction is &amp;quot;softer&amp;quot; and longer.  If the interaction time (&amp;lt;math&amp;gt;\tau_i&amp;lt;/math&amp;gt;) is so long that it is equivalent to an electron orbit (&amp;lt;math&amp;gt;\tau_R&amp;lt;/math&amp;gt;) then the atom looks more like it is neutrally charged.  You move from an interaction in which the electron orbit is perturbed adiabatically such that there is no orbit change and the minimum amount of energy is transferred to no interaction taking place because the atom is neutral.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_i = \frac{b_{max}}{v} (\sqrt{1-\beta^2})&amp;lt;/math&amp;gt;  : fields at high velocities get Lorentz contracted&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_R \equiv \frac{h}{I}&amp;lt;/math&amp;gt; : I &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt; mean excitation energy of target material ( &amp;lt;math&amp;gt;E = h \nu = h/ \tau&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Condition for &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;\tau_i = \tau_R&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow b_{max} = \frac{h \gamma \beta c}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\frac{dE}{dx} = \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{b_{max}}{b_{min}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{2 \gamma^2 m_e \beta^2 c^2}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Find &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; for a 10 MeV proton hitting a liquid hydrogen (&amp;lt;math&amp;gt;LH_2&amp;lt;/math&amp;gt;) target===&lt;br /&gt;
A = Z=z=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;m_e c^2&amp;lt;/math&amp;gt; = 0.511 MeV &amp;lt;br&amp;gt;&lt;br /&gt;
I = 21.8 eV : see gray data point for Liquid &amp;lt;math&amp;gt;H_2&amp;lt;/math&amp;gt; From  Figure 27.5 on pg 6 of [http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG] below.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PDG_IonizationPotential.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
Just need to know &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;a 10 MeV proton&amp;quot; &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; Kinetic Energy (K.E.) = 10 MeV = &amp;lt;math&amp;gt;(\gamma - 1) mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \gamma = \frac{K.E.}{mc^2} + 1 = \frac{10 MeV}{938 MeV} + 1 \sim 1 = \frac{1}{\sqrt{1-\beta^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proton is not relativistic&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;v^2 = \frac{2 K.E.}{m} = \frac{2 \cdot 10 MeV}{938 MeV/c^2} = 2 \times 10^{-2} c^2 \Rightarrow \beta^2 = \frac{v^2}{c^2} = 2\times 10^{-2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plugging in the numbers:&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} = \left ( 0.307 \frac{MeV \cdot cm^2}{g}\right ) (1)^2 (1) \frac{1}{2 \times10^{-2}} \ln \left( \frac{2 (1) (0.511 MeV) (2 \times10^{-2})}{21.8 eV} \frac{10^6 eV}{MeV}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= 105 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;How much energy is lost after 0.3 cm?&lt;br /&gt;
&lt;br /&gt;
'''Notice that the units for energy loss are normalized by the density of the material'''&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_{LH_2}&amp;lt;/math&amp;gt; = 0.07 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the actual energy lost I need to multiply by the density.   So for any given atom the energy loss will depend on the state (solid, gas, liqid) of the atom as this effects the density of the material.  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta E = (105 \frac{MeV cm^2}{g}) (0.07 \frac{g}{cm^3}) (0.3 cm)&amp;lt;/math&amp;gt; = 2.2 MeV&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_HydrogenStoppingPower.pdf]] Compare with Triumf Kinematics Handbook, 2nd edition, September 1987, L.G. Greeniaus&lt;br /&gt;
&lt;br /&gt;
==Bethe-Bloch Equation ==&lt;br /&gt;
&lt;br /&gt;
While the classical equation above works in a limited kinematic regime, the Bethe-Bloch equation includes the corrections needed to cover most kinematic regimes for heavy particle energy loss.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} = \mathcal{K} z^2 \frac{Z}{A} \frac{1}{\beta^2} \left [ \frac{1}{2} \ln \left (\frac{2 m_e c^2 \beta^2 \gamma^2 }{I} \frac{ T_{max}}{I} \right) - \beta^2 - \frac{\delta}{2}\right ]&amp;lt;/math&amp;gt;[http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG reference Eq 27.1 pg 1]&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;T_{max} = \frac{2 m_e c^2 \beta^2 \gamma^2}{1+ \frac{2 \gamma m_e}{M} + \frac{m_e}{M}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= Max K.E. transferable to the Target of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in a single collision.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;-\beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: =  correction for electron spin and very distant collisions which deforms the electron atomic orbits each process reducing dE/dx by &amp;lt;math&amp;gt;\frac{\beta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:= density correction term: in the classical derivation the material is treated as just a system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms uniformly distributed in space.  These Atoms, however, give the material polarizability which can reduce the electric field (dielectric).&lt;br /&gt;
&lt;br /&gt;
== GEANT 4 implementation ==&lt;br /&gt;
&lt;br /&gt;
The GEANT4 file  (version 4.8.p01)&lt;br /&gt;
&lt;br /&gt;
source/processes/electromagnetic/standard/src/G4BetheBlockModel.cc&lt;br /&gt;
&lt;br /&gt;
is used to calculate hadron energy loss.&lt;br /&gt;
&lt;br /&gt;
line 132 (line 257 in version 4.9.5)  &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} =  \log \left ( \frac{2 m_e c^2 \tau (\tau +2) E_{min}}{I^2}\right) - \left (1 - \frac{E_{min}}{E_{max}} \right ) \beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \tau = \frac{K.E.}{M}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 143 (line 267 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \log  ( \tau (\tau + 2) ) -cden&amp;lt;/math&amp;gt; = density corection = &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 148 (line 270 in vers. 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \frac{2c}{Z_{target}}&amp;lt;/math&amp;gt; = shell correction, corrects for the classical asumption that the atomic electron's velocity is initially zero; or the the incident particles velocity is far greater than the atomic electron's velocity.&lt;br /&gt;
&lt;br /&gt;
line 154 (line 273 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} *= \frac{2 \pi m_e c^2 r_e^2 z^2}{\beta^2} \rho_e \;\;\;\; \rho_e \propto \frac{NZ}{A}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Energy Dependence ==&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_EnergyLoss_EnergyDependence.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
The above curve shows the energy loss per distance traveled (&amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt;) as a function of the incident particles energy.  There are three basic regions.  At low incident energies ( &amp;lt; 10^5 eV) the incident particle tends to excite or even ionize the atoms in the material it is penetrating.  The maximum amount of energy loss per distance traveled is defined as the Bragg peak.  The region after the Bragg peak, in which the energy loss per distance traveled reaches its smallest value, is refered to as the point of minimum ionizing.  Minimimum ionizing particles will have incident energies corresponding to this value or larger.  The characteristic of the minimum ionizing particles is that their energy loss per distance traveled is essentially constant making simulations easier until the particle's energy drops below the minimum ionizing energy level as it passes through the material.&lt;br /&gt;
&lt;br /&gt;
In general the Bethe-Bloch equation breaks down at low energies (below the Bragg peak)  and is a good description (to within 10%) for &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10 \frac{MeV}{a.m.u.} &amp;lt; E &amp;lt; 2 \frac{GeV}{a.m.u.}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; &amp;lt; 26 (Iron)  : a.m.u = Atomic Mass Unit&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\frac{1}{\beta^2}&amp;lt;/math&amp;gt; term in the Bethe-Bloch equation dominates between the Bragg peak and the minimum ionization region.&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\ln&amp;lt;/math&amp;gt; term and its corrections influence the dependence of  &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; as you move up in energy beyond the minimum ionization point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Energy Straggling ===&lt;br /&gt;
&lt;br /&gt;
While the Bethe-Bloch formula gives you a way to quantify the amount of energy a heavy charged particle  loses as a function of the distance traveled, you should realize that when you calculate the total energy lost via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta E = \int_{E_i}^{E_f} \left ( \frac{dE}{dx} \right ) dx&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you are only determining the AVERAGE energy loss.  In other words, Bethe-Bloch is the Astochastic process describing energy loss.&lt;br /&gt;
&lt;br /&gt;
In reality the energy loss process is a stochastic process because of the statistical fluctuations which occur in the actual number of collisions which take place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Thick Absorber ====&lt;br /&gt;
&lt;br /&gt;
A thick absorber is one in which a large number of collisions takes place.   In this situation the central limit theorem from statistics tells you that the larger the number of random variable samples , &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, involved the more the observable will follow a Gaussian distribution. The Gaussian distribution is a good approximation to the binomial distribution when the number of trials is large.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Binomial_with_Large_N_becomes_Gaussian]]&lt;br /&gt;
&lt;br /&gt;
, and to a Poisson distribution when the mean is a lot larger than 1.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Gaussian_approximation_to_Poisson_when]]&lt;br /&gt;
&lt;br /&gt;
The gaussian probability function is defined as &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto e^{\frac{(\Delta - \bar{\Delta})^2}{ \sigma^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Full Width at Half Max (FWHM) of the distribution = &amp;lt;math&amp;gt;\left ( 2 \sqrt{2 \ln 2} \right ) \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of energy loss, the variance using the Bethe-Bloch equation should be &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_0^2 = 4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the realitivistic variance is &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 = [\frac{1-\beta^2/2}{1-\beta^2} ]\sigma_0^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for very thick absorbers see&lt;br /&gt;
&lt;br /&gt;
C. Tschaler, NIM '''64''', (1968) 237 ; ''ibid'', '''61''', (1968) 141&lt;br /&gt;
&lt;br /&gt;
When simulating energy loss of heavy charged particles the Bethe-Bloch equation may be used to calculate a &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; which can determine the average energy loss at the given kinetic energy of the particle.  This average is then smeared according to a gaussian distribution of variance &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 =4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x [\frac{1-\beta^2/2}{1-\beta^2} ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Thin Absorbers====&lt;br /&gt;
&lt;br /&gt;
In thin absorbers the number of collisions is small preventing the use of the central limit theorem to describe the stochastic process of energy loss in terms of a Gaussian distribution.  The large energy transfers that are possible cause the energy loss distribution to look like a Gaussian  with a high energy tail (or foot).&lt;br /&gt;
&lt;br /&gt;
The skewness of the resulting energy loss distribution is quantified as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\kappa = \frac{\bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta  \equiv 2 \pi N_a r_e^2 m_e c^2 \rho \frac{Z}{A} \left ( \frac{z}{\beta}\right)^2 x &amp;lt;/math&amp;gt; = lead term in Bethe Bloch equation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt; = density of absorbing material.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right ) \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; = max energy transfered in 1 collision (headon / knock out collision)&lt;br /&gt;
&lt;br /&gt;
This comes from the relativistic kinematics of an Elastic Collision.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:SPIM_ThinAbsorbers_Scatering.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\gamma = \frac{E_{tot}}{Mc^2} = \frac{ \sqrt{(pc)^2 + (Mc^2)^2}}{Mc^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\beta= \frac{pc}{\gamma Mc^2} = \frac{pc}{E_{tot}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = E_{tot} - Mc^2 = \gamma Mc^2 - Mc^2 = (\gamma - 1 ) Mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = \sqrt{(pc)^2 + (Mc^2)^2} - Mc^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;   (p^{\prime}c)^2 = E_k^2 + 2E_km_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conservation of Momentum &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{p} = \vec{p}^{\; \prime \prime} + \vec{p}^{\; \prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conservation of Energy &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_{tot} + m_ec^2 = E_{tot}^{\prime \prime} + E_{tot}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sqrt{(pc)^2 + (Mc^2)^2} + m_ec^2 = \sqrt{(p^{\; \prime \prime} c)^2 + (Mc^2)^2}  + E_k +  m_e c^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using conservation of E &amp;amp; P as well as substituting for &amp;lt;math&amp;gt;p^{\prime}&amp;lt;/math&amp;gt; you can show&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(p^{\; \prime \prime}c)^2 = (pc)^2 - 2E_k\sqrt{(pc)^2 +(Mc^2)^2} + E_k^2&amp;lt;/math&amp;gt; : cons of E&lt;br /&gt;
:&amp;lt;math&amp;gt;= (pc)^2 + E_k^2 + 2E_km_ec^2 -2pc\sqrt{E_k^2+2E_km_ec^2} \cos(\theta)&amp;lt;/math&amp;gt; : cons of P&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;pc \cos(\theta) \sqrt{1+\frac{2m_ec^2}{E_k}} = \sqrt{(pc)^2+(Mc^2)^2} + m_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;E_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_k = \frac{2m_ec^2(pc)^2\cos^2 (\theta)}{[\sqrt{(pc)^2 + (Mc^2)^2} +m_ec^2]^2 - (pc)^2 \cos^2 (\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== (Landau Theory) =====&lt;br /&gt;
&amp;lt;math&amp;gt;\kappa \leq 0.01&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Landau assumed&lt;br /&gt;
:# &amp;lt;math&amp;gt;W_{max} = \infty&amp;lt;/math&amp;gt; is max energy transfer&lt;br /&gt;
:# electrons are free (energy transfer is so large you can neglect binding)&lt;br /&gt;
:# incident particle maintains velocity (large momentum transfer from big mass to small mass) (bowling ball hits ping pong ball)&lt;br /&gt;
&lt;br /&gt;
L. Landau, &amp;quot;On the Energy Loss of Fast Particles by Ionization&amp;quot;, J. Phys., vol 8 (1944), pg 201&lt;br /&gt;
&lt;br /&gt;
instead of a gaussian distribution Landau used&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto \frac{1}{\bar{\Delta}\pi} \int_0^{\infty} e^{-u \ln u - u \lambda} \sin(\pi u) du&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda = \frac{1}{\bar{\Delta}} \left [ \Delta - \bar{\Delta} \ln \bar{\Delta} - \ln \epsilon + 1 -C \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\bar{\Delta} = 2\pi N_a r_e^2 m_e c^2 \rho \frac{Zz^2}{A \beta^2}x&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln \epsilon = \ln \left [ \frac{(1-\beta^2)I^2}{2m_ec^2 \beta^2} \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Landau_ThinAbsorberDist.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== (Vavilou's Theory) =====&lt;br /&gt;
&lt;br /&gt;
Vavilous paper&lt;br /&gt;
&lt;br /&gt;
P.V. Vavilou, &amp;quot;Ionization losses of High Energy Heavy Particles&amp;quot;, Soviet Physics JETP, vol 5 (1950? )pg 749&lt;br /&gt;
&lt;br /&gt;
describe the physics for the case &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;0.01 &amp;lt; \kappa &amp;lt; \infty &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution function derived is shown below as well as a conceptual overlay of Vavilou's and Landau's distributions.  (The &amp;lt;math&amp;gt;\zeta f(x,\Delta)&amp;lt;/math&amp;gt; in the picture should be a &amp;lt;math&amp;gt;\bar{\Delta}P(x,\Delta)&amp;lt;/math&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) = \frac{1}{\bar{\Delta}\pi} x e^{x(1+\beta^2C)} \int_0^{\infty} e^{xf_1} \cos(y \lambda_1 + xf_2) dy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f_1 = \beta^2 \left [ \ln(y) - C_i(y)\right ] - \cos(y) - y S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f_2 = y\left [ \ln(y) - C_i(y)\right ] + \sin(y) + \beta^2  S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C_i(y) \equiv - \int_y^{\infty} \frac{\cos(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;S_i(y) \equiv \int_0^{y} \frac{\sin(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt; are the sine and cosine integral functions given in Vavilous' paper&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Vavilou_Landau_ThinAbsorber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation ====&lt;br /&gt;
&lt;br /&gt;
GEANT 4 uses the skewness parameter &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; to determine if it will use a &amp;quot;fluctuations model&amp;quot; to calculate energy straggling or the gaussian model described in section 3.2.1.&lt;br /&gt;
&lt;br /&gt;
===== kappa &amp;gt; 10 =====&lt;br /&gt;
If &lt;br /&gt;
: &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt; &amp;gt; 10 &lt;br /&gt;
and we have a thick absorber ( large step size) then the Gausian function in 3.2.1 is used to calculate energy straggling.&lt;br /&gt;
&lt;br /&gt;
What happens is &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; is calculated via &amp;lt;math&amp;gt;\int_{E_i}^{E_f} \frac{dE}{dx} dx&amp;lt;/math&amp;gt; then the actual energy loss predicted by the simulation is chosen from a Gaussian distribution to account for energy straggling such that the &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; of this Gaussian distribution is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma^2 = 2 \pi r_e^2m_ec^2N_{el} \frac{Z_h}{\beta^2} T_C s (1 - \frac{\beta^2}{2})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N_{el}&amp;lt;/math&amp;gt; = electron density of the medium&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_h&amp;lt;/math&amp;gt; = charge of the incident particle&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = step size&lt;br /&gt;
:&amp;lt;math&amp;gt; T_C&amp;lt;/math&amp;gt; = cutoff kinetic energy for &amp;lt;math&amp;gt;\delta &amp;lt;/math&amp;gt;-electrons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_C&amp;lt;/math&amp;gt; tells GEANT where to put the cutoff for using the Gaussian distribution for energy straggling.  This tells the simulation the low energy cutoff where Bethe-Bloch starts to fail due to ionization.&lt;br /&gt;
&lt;br /&gt;
=====Delta-electrons =====&lt;br /&gt;
What is a &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electron?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons are also known as &amp;quot;knock -on&amp;quot; electrons or delta rays.&lt;br /&gt;
&lt;br /&gt;
As heavy particles traverse a medium they can ionize electrons from atoms.  The ejected electrons (&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons) can be given enough energy to ionize as well.&lt;br /&gt;
&lt;br /&gt;
In a cloud chamber (a supercooled volume of super saturated water vapor which ionizes as charged particles pass through)  such and event would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_DeltaRay_CloudChamber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
The blue spiral in the above gas chamber picture is a high energy electron ejected from a collision that spirals in the B-field ejecting low energy electrons at the end.  The B-field is directed out of the picture.&lt;br /&gt;
&lt;br /&gt;
The physics of ionization is different from the physics used to calculate Bethe-Bloch energy loss.  Remember Bethe-Bloch  starts to break down at low energies below the Bragg peak.  &lt;br /&gt;
&lt;br /&gt;
Because of this GEANT 4 sets the cutoff for this process to be&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;T_{cut}&amp;lt;/math&amp;gt; &amp;gt; 1 keV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:  The BE energies of an electron in Hydrogen is 13.6 ev and the electrons in Argon have binding energies between 15.7 eV and 3.2 keV.&lt;br /&gt;
&lt;br /&gt;
===== Fluctuations Model: kappa &amp;lt; 10=====&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}} &amp;lt; \frac{\Delta E}{T_C}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then GEANT 4 uses a &amp;quot;Fluctuations Model&amp;quot; to determine energy loss instead of Bethe-Bloch.&lt;br /&gt;
&lt;br /&gt;
; Fluctuations Model&lt;br /&gt;
:# the atom is assumed to have 2 energy levels &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:# you can excite the atom and lose either &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt; or you can ionize the atom and lose energy according to a &amp;lt;math&amp;gt;\frac{1}{E^2}&amp;lt;/math&amp;gt; function &amp;lt;math&amp;gt;u_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total energy loss in a step will be &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \Delta E_{exc} + \Delta E_{ion}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{exc} = \eta_1 E_1 + \eta_2 E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{ion} = \sum_{j=1}^{\eta_3} \frac{I}{1 - u_j \frac{T_{up}-I}{T_{up}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\eta_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\eta_2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\eta_3&amp;lt;/math&amp;gt; are the number of collisions which are sampled from a poison distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;u_j = \int_{I}^{E_j} \frac{I T_{up}}{T_{up} - I} \frac{dx}{x^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_j = \frac{I}{1- rand  \frac{T_{up}-1}{T_{up}}}&amp;lt;/math&amp;gt; : rand = random number between 0 and 1&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T_{up} = \left \{  {~ 1 keV \;  threshold \;energy \;for \; \delta- ray \; production \atop T_{max} \; \;\;\; if \; T_{max} &amp;lt; 1 keV} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; = mean ionization energy&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_2 \approx (10 eV) Z^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln E_1 = \frac{\ln (I) - f_2 \ln (E_2)}{f_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1 + f_2 =1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2 =\left \{  {0 \; z=1 \atop \frac{2}{z} \; z \ge 2} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fluctuation model was comparted with data in &lt;br /&gt;
&lt;br /&gt;
K. Lassila-Perini and L. Urban, NIM, A362 (1995) pg 416&lt;br /&gt;
&lt;br /&gt;
The cross sections used for excitation and ionization may be found in &lt;br /&gt;
&lt;br /&gt;
H. Bichel, Rev. Mod. Phys., vol 60 (1988) pg 663&lt;br /&gt;
&lt;br /&gt;
=== Range Straggling===&lt;br /&gt;
&lt;br /&gt;
;Def of Range (R):&lt;br /&gt;
: The distance traveled before all the particles energy is lost.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;R \equiv \int_0^T \frac{dE}{\frac{dE}{dx}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:  = theoretical calculation of the path length traveled by a particle of incident energy &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note units: &amp;lt;math&amp;gt;\left [ R \right ] =  \frac{g}{cm^2} ; \left [ \frac{dE}{dx} \right ] = \frac{MeV \cdot cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the Energy Straggling introduced in the previous section can explain why identical particles penetrate material to different depths.   The energy straggling results in Range straggling.&lt;br /&gt;
&lt;br /&gt;
If we do a shielding experiment where we have a source of incident particles of energy E and we count how many &amp;quot;punch&amp;quot; through a material of thickness (x) we would see a transmission coefficient &amp;lt;math&amp;gt;\left ( \frac{N_{out}}{N_{in}} \right) &amp;lt;/math&amp;gt; which would look like&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStraggling.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
====Fractional Range Straggling ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \equiv&amp;lt;/math&amp;gt; fractional range straggling&lt;br /&gt;
&lt;br /&gt;
Assuming the energy loss of a non-relativistic heavy ion through matter follows a Gaussian (thick absorber)&lt;br /&gt;
&lt;br /&gt;
Then it can be shown that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{M}{A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; = mass of the target electrons&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; = atomic mass of the Projectile&lt;br /&gt;
&lt;br /&gt;
since &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e = 9.11 \times 10^{-31}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
: 1 a.m.u. = &amp;lt;math&amp;gt;1.66 \times 10^{-27}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{9.11 \times 10^{-31}}{1.66 \times 10^{-27}A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: = 1.17 % if using a proton (A=1)&lt;br /&gt;
&lt;br /&gt;
The above is a &amp;quot;back of the envelope&amp;quot; estimate.  The experimentally measured values for Cu, Al, and Be target using a proton projectile are &lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStrag_SigmaR_overR.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
If the incident projectile is an electron then &amp;lt;math&amp;gt;\frac{\sigma_R}{R}  \approx \frac{1}{2}&amp;lt;/math&amp;gt; making electron range straggling a vague concept.&lt;br /&gt;
&lt;br /&gt;
There are several definitions of electron range&lt;br /&gt;
&lt;br /&gt;
;1.) Maximum Range (&amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:This range is defined using the continuous slowing down approximation (CSDA) where electrons are assumed to have many collisions over very small distances making it appear to be continuous energy loss instead of discrete.  The range is then calculated by integrating over these average energy losses &amp;lt;math&amp;gt;\frac{dE}{dx} \cdot s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;2.) Practical Range (&amp;lt;math&amp;gt;R_P&amp;lt;/math&amp;gt;):&lt;br /&gt;
: This stopping distance is defined by extrapolating the electron transmission curve to zero (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PracticalRangStraggline_4Electrons.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
=== Electron Capture and Loss ===&lt;br /&gt;
====Bohr Criterion====&lt;br /&gt;
:&amp;quot;A rapidly moving nucleus is fully ionized if its velocity exceeds that of its most tightly bound electron&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Bohr Model:&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow E = \frac{mz^2e^4}{8 \epsilon_0^2 h^2 n^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the inner most electron (&amp;lt;math&amp;gt;n=1&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
:Electron K.E. = &amp;lt;math&amp;gt;\frac{1}{2} mv^2 = \frac{mz^2e^4}{2(4\pi \epsilon_0)^2 \hbar^2} \Rightarrow v = \frac{z e^2}{4 \pi \epsilon_0 \hbar}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:the fine structure constant &amp;lt;math&amp;gt;\alpha \equiv \frac{e^2}{4 \pi \epsilon_0 \hbar c} = \frac{1}{137}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; v = zc \alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;v &amp;gt; zc \alpha&amp;lt;/math&amp;gt; the nucleus is fully ionized&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;\frac{z}{v/c} = \frac{z}{\beta} &amp;lt; \frac{1}{\alpha} = 137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively if the ion is moving through a material with a speed such that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{z}{\beta} &amp;gt; \frac{1}{\alpha} =137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then electrons may be captured by the projectile and lost by the target.&lt;br /&gt;
&lt;br /&gt;
==== Z-effective====&lt;br /&gt;
Describing the charge state of your heavy ion traveling through matter at a velocity below the Bohr criterion is very complicated.  There is a competition between electron capture and loss.  Accurate cross sections are needed to simulate the process reliably.&lt;br /&gt;
&lt;br /&gt;
Some insight into this process can be found using the Thomas-Fermi model &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;V \propto \frac{Ze^{-r/a}}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to describe an atom moving slow enough so it has captured many electrons but fast enough so its not neutral.  In the Thomas-Fermi model the distribution of electrons in an atom is described as being uniformly distributed such that there are 2 electrons in each discrete volume of phase space( the space in which all possible states of a system are represented)  defined using planks constant as &amp;lt;math&amp;gt;h^3&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
For the purpose of simulations you would like a relationship for &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
It is usually adequate to use fits for empirical data as long as we know that we are in the kinematic range in which those fits are valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when &amp;lt;math&amp;gt;E &amp;lt; 10&amp;lt;/math&amp;gt; MeV the data indicates that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Z_{eff} = Z(1 - e^{-\beta\frac{B}{Z^{2/3}}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;B = 130 \pm 5&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_{eff} \equiv&amp;lt;/math&amp;gt; effective charge f the projectile = &amp;lt;math&amp;gt;Z - \bar{q}_c&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = number of protons&lt;br /&gt;
:&amp;lt;math&amp;gt;\bar{q}_c&amp;lt;/math&amp;gt; = average number of captured electrons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''When calculating stopping power for E &amp;lt; 10 MeV you use &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in the Bethe-Bloch equation.'''&lt;br /&gt;
&lt;br /&gt;
Note:  As the ions charge state fluctuates while it slows down (or if accelerated through materials) you will need to recalculate the energy loss, and as a result you will get larger energy loss fluctuations in this energy range.&lt;br /&gt;
&lt;br /&gt;
For thin absorber you will look for stripping and loss cross sections.&lt;br /&gt;
&lt;br /&gt;
: Here a thin absorber is one whose thickness is less than the charge equilibrium distance defined as the distance traveled until the projectile's velocity is &amp;lt;math&amp;gt; v \ll zc\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rule of thumb is that a thin absorber for low energy ions has a thickness &amp;lt;math&amp;gt;\le \frac{5 \frac{\mu g}{cm^2}}{\rho}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For thick absorbers:  The experimentally determined expression for the change in &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta Z_{eff} = \frac{1}{2} \sqrt{ \left [  Z_{eff} \left (1 - \frac{Z_{eff}}{Z} \right )^{1.67}\right ] }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Scattering ===&lt;br /&gt;
&lt;br /&gt;
The Bethe-Bloch equation tells us how much energy is lost and GEANT4s calculation of this energy is described above.&lt;br /&gt;
&lt;br /&gt;
Now we need to know which direction the scattered particle goes after it has lost this energy.&lt;br /&gt;
&lt;br /&gt;
The work of Moliere describes the angular deflection of the particle which lost the energy thereby leading to a prediction of the Cross-section.  GEANT4 though uses the more complete Lewis theory to describe Multiple Coulomb Scattering (MCS) sometimes generically referred to as multiple scattering.&lt;br /&gt;
&lt;br /&gt;
There are 3 regions in which coulomb scattering is calculated&lt;br /&gt;
&lt;br /&gt;
; 1.) Single Scattering:&lt;br /&gt;
: For thin materials.&lt;br /&gt;
: If the probability of more than 1 coulomb scattering is small &lt;br /&gt;
:Then use the Rutherford formula for &amp;lt;math&amp;gt;\frac{d \sigma}{d \Omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;2.)Multiple Scattering:&lt;br /&gt;
: In this case the number of independent scatterings is large (N &amp;gt; 20) and the energy loss is small such that the problem can be treated statisticaly to obtain a probability distribution for the net deflection angle &amp;lt;math&amp;gt; [P(\theta)]&amp;lt;/math&amp;gt; as a function of the material thickness that is traversed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;3.) Plural Scattering:&lt;br /&gt;
: If 1&amp;lt; N &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; 20 then you can't use Rutherford to describe the scattering nor use a normal random statistical description.&lt;br /&gt;
&lt;br /&gt;
see E. Keil, Z. Naturforsch, vol 15 (1960), pg 1031&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews of rigorous multiple scattering calculations may be found in &lt;br /&gt;
: P.C. Hemmer, et. al., Phys. Rev, vol 168 (1968), pg 294&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation of MSC (N&amp;gt;20) ====&lt;br /&gt;
&lt;br /&gt;
GEANT4 models MSC when N&amp;gt;20 using model functions to determine the angular and spatial distributions chosen to give the same moments of these distributions as the Lewis theory.&lt;br /&gt;
&lt;br /&gt;
:H.W. Lewis, Phys. Rev., vol 78 (1950), pg 526&lt;br /&gt;
&lt;br /&gt;
modern versions of the above are at&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
: I. Kawrakow, et. al., NIM, B142 (1998) pg 253&lt;br /&gt;
&lt;br /&gt;
When N&amp;gt;20 multiple scattering can be described as a statistical process using a modified version of the Boltzman transport equation from statistical mechanics.  &lt;br /&gt;
&lt;br /&gt;
;Note: The simulation step size is chosen such that (N&amp;gt;20),  If you have materials so thin that N &amp;lt; 20 then GEANT4 will likely skip the material.  (one way around this is to increase the thickness and change the density).  If the material thickness can't be increased because its sandwhiched between two other materials then you will need to write a special step algorithm for the volume and have GEANT4 use it for the step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) \equiv&amp;lt;/math&amp;gt; the distribution function for a system of incident particles traveling through a material.&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s =&amp;lt;/math&amp;gt; arc length of the particle's path through the material&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{x} =&amp;lt;/math&amp;gt; position of a charged particle&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{v} =&amp;lt;/math&amp;gt; direction of motion of the particle &amp;lt;math&amp;gt;\frac{\vec{v}}{|\vec{v}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multiple scattering experienced by a single charged particle traveling through the material is then simulated by sampling from the distribution &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The governing transport/diffusion equation is based on the continuity equation but with a &amp;quot;sink&amp;quot; term representing the possibility of collisions ejecting particles out of the volume.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f(s,\vec{x},\hat{v} ) }{\partial s} + \hat{v} \bullet \vec{\nabla}f(s,\vec{x},\hat{v} ) = N \int \sigma(\hat{v} \bullet\hat{v}^{\prime} )\left [ f(s,\vec{x},\hat{v}^{\prime} )  - f(s,\vec{x},\hat{v} ) \right ] d \hat{v}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; = number of atoms per volume&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\hat{v} \bullet\hat{v}^{\prime} )&amp;lt;/math&amp;gt; = cross sections for elastic scattering per Solid angle &amp;lt;math&amp;gt;\left ( \frac{d \sigma}{d \Omega} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the above diffusion equation the distribution function, &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt; is expanded in Spherical Harmonics ( &amp;lt;math&amp;gt;Y_{\ell}^m(\theta,\phi)&amp;lt;/math&amp;gt; ) and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; expand  in Legendre Polynomials (&amp;lt;math&amp;gt;P_N(cos \theta)&amp;lt;/math&amp;gt;) since it has no &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; angle dependence.&lt;br /&gt;
&lt;br /&gt;
;Note: For Coulomb Scattering in polar coordinates you can write the potential in terms of Legendre Polynomials such that:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;U=k \frac{q}{r}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{\sqrt{r^2-a^2-2ar \cos \theta}}&amp;lt;/math&amp;gt;  in polar coordinates&lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{r} \sum_{n=0}^{\infty} P_n(\cos \theta) \left ( \frac{a}{r}\right )^n&amp;lt;/math&amp;gt; (the sqrt term above is expanded using binomial series&lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} ) = \sum_{\ell,m} f_{\ell,m}(\vec{x},s) Y_{\ell}^m(\hat{v})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting into the diffusion equation and doing the integral on the righ hand side you get&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f_{\ell,m}(\vec{x},s) }{\partial s} + \frac{f_{\ell,m}(s,\vec{x},\hat{v} }{\lambda_{\ell}} = - \sum_{\lambda, i, j} \vec{\nabla} f_{i,j}(\vec{x},s ) \bullet \int Y_{\ell,m}^{\star} \hat{v} Y_{i,j} d \hat{v} \; \; \; \; \; \; \; \;\hat{v} = f(\theta.\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{1}{\lambda_{\ell}} = 2 \pi N \int_0^{\pi} \left [ 1-P_{\ell}(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt;\ell^{th}&amp;lt;/math&amp;gt; transport mean free path for the &amp;lt;math&amp;gt;f_{\ell}&amp;lt;/math&amp;gt; distribution function ( &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; symmetry is assumed making it &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; independent)&lt;br /&gt;
&lt;br /&gt;
From the above one can find the average distances traveled and the average deflection angle of the distribution.  Again, see :&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moments&amp;quot; of &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) &amp;lt;/math&amp;gt;  are defined as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt; = 2 \pi \int z f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = \lambda_1 \left [ 1-e^{-s/\lambda_1}\right ]&amp;lt;/math&amp;gt; = mean geometrical path length&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;\cos(\theta)&amp;gt; = 2 \pi \int_{-1}^1 \sum_{\ell} P_{\ell}(\cos \theta) \int f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = e^{-s/\lambda_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\lambda_1} = 2 \pi N \int_0^{\pi} \left [ 1-P_1(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are 3 lengths&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq_PathLength.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = geometrical path length between endpoints of the step =&amp;lt;math&amp;gt; \left \{  {line \; if \; \vec{B} = 0 \atop arc \; if \; \vec{B} \ne 0 } \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; = true path length = actual length of the path taken by particle&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt;&amp;lt;/math&amp;gt; - mean geometrical path length along the z-axis&lt;br /&gt;
&lt;br /&gt;
In GEANT4 the &amp;lt;math&amp;gt;\lambda_{\ell}&amp;lt;/math&amp;gt;'s are taken from&lt;br /&gt;
&lt;br /&gt;
If 100 eV &amp;lt; K.E. of electron or positron &amp;lt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:D. Liljequist, J. Applied Phys, vol 62 (1987), 342&lt;br /&gt;
:J. Applied Phys, vol 68 (1990), 3061&lt;br /&gt;
&lt;br /&gt;
If K.E. &amp;gt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:R. Mogol, Atomic Data, Nucl, Data tables, vol 65 (1997) pg 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;z&amp;gt; now known GEANT will try to determine &amp;quot;&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&amp;quot; for the energy loss and scattering calculations.&lt;br /&gt;
&lt;br /&gt;
A model is used for this where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\frac{1}{\alpha} \left [ 1 - (1- \alpha \omega z)^{\frac{1}{\omega}})\right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\omega = 1 + \frac{1}{\alpha \lambda_{10}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\alpha =\left \{  {\frac{\lambda_{10} - \lambda_{11}}{s \lambda_{10}}\;\;\;\; K.E. \ge M_{particle} \atop \frac{1}{R}\;\;\;\; K.E. &amp;lt; M_{particle}} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = stepsize&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda_{10} - \frac{\lambda_1}{1-\alpha s}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_{11} = \lambda_1&amp;lt;/math&amp;gt; at end of strep&lt;br /&gt;
&lt;br /&gt;
while &amp;lt;math&amp;gt;&amp;lt;cos \theta &amp;gt;&amp;lt;/math&amp;gt; is calculable, GEANT4 evaluates &amp;lt;math&amp;gt;\cos (\theta)&amp;lt;/math&amp;gt; from a probability distribution whose general form is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g[\cos(\theta)] = p \left ( qg_1[\cos(\theta)] + (1-q)g_3[\cos(\theta)] \right ) + (1-p)g_2[\cos(\theta)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g_1(x) = C1e^{-a(1-x)}&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;g_2(x) = \frac{C_2}{(b-x)^d}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;g_3(x) = C_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;C_1, C_2, C_3&amp;lt;/math&amp;gt; are normalization constants&lt;br /&gt;
:&amp;lt;math&amp;gt;p,q,a,b,d&amp;lt;/math&amp;gt; are parameters which follow the work reported in &lt;br /&gt;
&lt;br /&gt;
:V.L. Highland, NIM, vol 219 (1975) pg497&lt;br /&gt;
&lt;br /&gt;
The GEANT4 files in version 4.8 were located in &lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MscModel.cc&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130043</id>
		<title>TF SPIM StoppingPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130043"/>
		<updated>2025-02-26T17:44:48Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* (Vavilou's Theory) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Stopping Power=&lt;br /&gt;
== Bethe Equation ==&lt;br /&gt;
===Classical Energy Loss ===&lt;br /&gt;
&lt;br /&gt;
Consider the energy lost when a particle of charge (&amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt;) traveling at speed &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is scattered by a target of charge (&amp;lt;math&amp;gt;Ze&amp;lt;/math&amp;gt;).  Assume only the coulomb force causes the particle to scatter from the target as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Bethe_ClassCoulScat.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Notice:&lt;br /&gt;
: as &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is scattered the horizontal component of the coulomb force (&amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt;) flips direction; ie net horizontal force for the scattering&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F_{vertical} = k \frac{zZe^2}{r^2} \sin(\theta) = k \frac{zZe^2}{r^2}  \frac{b}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: k =&amp;lt;math&amp;gt;\frac{1}{4 \pi \epsilon_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
: r = distance between incident projectile and target atom&lt;br /&gt;
: b= impact parameter of collision &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the definition of Impulse one can determine the momentum change of &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta p = \int F dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's assume that the energy lost by the incident particle &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is absorbed by an electron in the target atom.  This energy may be cast in terms of the incident particles momentum change as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{(\Delta p)^2}{2m_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By calculating the change in momentum (&amp;lt;math&amp;gt;\Delta p&amp;lt;/math&amp;gt;) of the incident particle we can infer that the energy lost by the incident particle is absorbed by one of the target material's atomic electrons.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta P = \int F dt = \int k \frac{zZe^2b}{r^3}  dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using  &amp;lt;math&amp;gt;dt = \frac{dx}{v} = \frac{d x}{\beta c}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;= k \frac{zZe^2b}{\beta c} \int_{-\infty}^{+\infty} \frac{ dx}{(x^2+b^2)^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{kzZe^2b}{\beta c b^2} \int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x^2}{b^2})^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x}{b^2})^{3/2}}=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2kzZe^2b}{\beta c b^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
casting this in terms of the classical atomic electron radius &amp;lt;math&amp;gt;r_e&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;r_e = \frac{k e^2}{m_e v^2} \sim \frac{k e^2}{m_e c^2}&amp;lt;/math&amp;gt;  just equate &amp;lt;math&amp;gt;F = \frac{ke^2}{r_e^2} = m \frac{v^2}{r_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2zZr_e m_e c}{\beta  b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \frac{(\Delta p)^2}{2m_e} = 2 \left ( \frac{r_e m_e}{\beta b}\right )^2 \frac {z^2 Z^2 c^2}{m_e}&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = 1 here because I shall assume the energy is lost to just the electron and the Atom is a spectator&lt;br /&gt;
&lt;br /&gt;
Now let's calculate an expression representing the AVERAGE energy lost for an incident particle traversing a material of some thickness.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(\Delta E)&amp;lt;/math&amp;gt; = Probability of an interaction taking place which results in an energy loss &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we let&lt;br /&gt;
&lt;br /&gt;
Z  = Atomic Number = # electrons in target Atom = number of protons in an Atom&lt;br /&gt;
&lt;br /&gt;
N = Avagadros number  = &amp;lt;math&amp;gt;6.022 \times 10^{23}  \frac{Atoms}{mol}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A = Atomic mass =  &amp;lt;math&amp;gt;\frac{g}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt;  = probability of hitting an atomic electron in the area of an annulus of radius (&amp;lt;math&amp;gt;b + db&amp;lt;/math&amp;gt;) with an energy transfer between &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta E + d(\Delta E)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;\frac{-dE }{dx}= \int_0^{\infty} dP(\Delta E) \Delta E&amp;lt;/math&amp;gt; = energy lost by the incident particle per distance traversed through the material&lt;br /&gt;
&lt;br /&gt;
I am just adding up all the energy losses weighted by the probability of the energy loss to find the average (total) energy loss.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; :&lt;br /&gt;
: &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; = probability of an energy transfer taking place = probability of an interaction = &amp;lt;math&amp;gt;\frac{N}{A} d \sigma&amp;lt;/math&amp;gt;  [ Atoms &amp;lt;math&amp;gt;cm^2&amp;lt;/math&amp;gt;/g]&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;dP(\Delta E) = \frac{N}{A} d \sigma =\frac{N}{A} (2 \pi b db) Z&amp;lt;/math&amp;gt; &lt;br /&gt;
:In practice &amp;lt;math&amp;gt; \sigma&amp;lt;/math&amp;gt; is a measured cross-section which is a function of energy.&lt;br /&gt;
:classically &amp;lt;math&amp;gt;\sigma = \pi b^2 ; d \sigma = 2\pi b db&amp;lt;/math&amp;gt; so let's use this as a first approximation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{-dE}{dx} =  \int_0^{\infty} \frac{N}{A} (2 \pi b db) Z \Delta E = \frac{2 \pi N Z}{A} \int_0^{\infty} \Delta E b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{2 \pi N Z}{A} \int_0^{\infty} \left [ \frac{2 r_e^2 m_e c^2 z^2}{\beta^2 b^2}\right ] b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;4 \pi N r_e^2 m_e c^2 \frac{z^2 Z}{A \beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
:=&amp;lt;math&amp;gt;\frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\mathcal{K}}{A} = \frac{4 \pi N r_e^2 m_e c^2}{A} = 0.307 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;''' if A=1'''&lt;br /&gt;
&lt;br /&gt;
The limits of the above integral should be more physical in order to reflect the limits of the physics interaction.  Let &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; represent the minimum and maximum possible impact parameter where the physics is described,  as shown above,  by the coulomb force.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;b \rightarrow 0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\frac{d E}{dx}&amp;lt;/math&amp;gt; diverges and the energy transfer &amp;lt;math&amp;gt;\rightarrow \infty : \Delta E \sim \frac{1}{b}&amp;lt;/math&amp;gt;.  Physically there is a maximum energy that may be transferred before the physics of the problem changes (ie: nuclear excitation, jet production, ...).  The de Borglie wavelength of the atom is used to estimate a value for &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt; such that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;b_{min} \sim  \frac{1}{2} \lambda_{de Broglie} = \frac{h}{2p} = \frac{h}{2 \gamma m_e \beta c}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
As &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger the interaction is &amp;quot;softer&amp;quot; and longer.  If the interaction time (&amp;lt;math&amp;gt;\tau_i&amp;lt;/math&amp;gt;) is so long that it is equivalent to an electron orbit (&amp;lt;math&amp;gt;\tau_R&amp;lt;/math&amp;gt;) then the atom looks more like it is neutrally charged.  You move from an interaction in which the electron orbit is perturbed adiabatically such that there is no orbit change and the minimum amount of energy is transferred to no interaction taking place because the atom is neutral.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_i = \frac{b_{max}}{v} (\sqrt{1-\beta^2})&amp;lt;/math&amp;gt;  : fields at high velocities get Lorentz contracted&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_R \equiv \frac{h}{I}&amp;lt;/math&amp;gt; : I &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt; mean excitation energy of target material ( &amp;lt;math&amp;gt;E = h \nu = h/ \tau&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Condition for &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;\tau_i = \tau_R&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow b_{max} = \frac{h \gamma \beta c}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\frac{dE}{dx} = \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{b_{max}}{b_{min}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{2 \gamma^2 m_e \beta^2 c^2}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Find &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; for a 10 MeV proton hitting a liquid hydrogen (&amp;lt;math&amp;gt;LH_2&amp;lt;/math&amp;gt;) target===&lt;br /&gt;
A = Z=z=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;m_e c^2&amp;lt;/math&amp;gt; = 0.511 MeV &amp;lt;br&amp;gt;&lt;br /&gt;
I = 21.8 eV : see gray data point for Liquid &amp;lt;math&amp;gt;H_2&amp;lt;/math&amp;gt; From  Figure 27.5 on pg 6 of [http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG] below.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PDG_IonizationPotential.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
Just need to know &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;a 10 MeV proton&amp;quot; &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; Kinetic Energy (K.E.) = 10 MeV = &amp;lt;math&amp;gt;(\gamma - 1) mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \gamma = \frac{K.E.}{mc^2} + 1 = \frac{10 MeV}{938 MeV} + 1 \sim 1 = \frac{1}{\sqrt{1-\beta^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proton is not relativistic&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;v^2 = \frac{2 K.E.}{m} = \frac{2 \cdot 10 MeV}{938 MeV/c^2} = 2 \times 10^{-2} c^2 \Rightarrow \beta^2 = \frac{v^2}{c^2} = 2\times 10^{-2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plugging in the numbers:&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} = \left ( 0.307 \frac{MeV \cdot cm^2}{g}\right ) (1)^2 (1) \frac{1}{2 \times10^{-2}} \ln \left( \frac{2 (1) (0.511 MeV) (2 \times10^{-2})}{21.8 eV} \frac{10^6 eV}{MeV}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= 105 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;How much energy is lost after 0.3 cm?&lt;br /&gt;
&lt;br /&gt;
'''Notice that the units for energy loss are normalized by the density of the material'''&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_{LH_2}&amp;lt;/math&amp;gt; = 0.07 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the actual energy lost I need to multiply by the density.   So for any given atom the energy loss will depend on the state (solid, gas, liqid) of the atom as this effects the density of the material.  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta E = (105 \frac{MeV cm^2}{g}) (0.07 \frac{g}{cm^3}) (0.3 cm)&amp;lt;/math&amp;gt; = 2.2 MeV&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_HydrogenStoppingPower.pdf]] Compare with Triumf Kinematics Handbook, 2nd edition, September 1987, L.G. Greeniaus&lt;br /&gt;
&lt;br /&gt;
==Bethe-Bloch Equation ==&lt;br /&gt;
&lt;br /&gt;
While the classical equation above works in a limited kinematic regime, the Bethe-Bloch equation includes the corrections needed to cover most kinematic regimes for heavy particle energy loss.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} = \mathcal{K} z^2 \frac{Z}{A} \frac{1}{\beta^2} \left [ \frac{1}{2} \ln \left (\frac{2 m_e c^2 \beta^2 \gamma^2 }{I} \frac{ T_{max}}{I} \right) - \beta^2 - \frac{\delta}{2}\right ]&amp;lt;/math&amp;gt;[http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG reference Eq 27.1 pg 1]&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;T_{max} = \frac{2 m_e c^2 \beta^2 \gamma^2}{1+ \frac{2 \gamma m_e}{M} + \frac{m_e}{M}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= Max K.E. transferable to the Target of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in a single collision.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;-\beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: =  correction for electron spin and very distant collisions which deforms the electron atomic orbits each process reducing dE/dx by &amp;lt;math&amp;gt;\frac{\beta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:= density correction term: in the classical derivation the material is treated as just a system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms uniformly distributed in space.  These Atoms, however, give the material polarizability which can reduce the electric field (dielectric).&lt;br /&gt;
&lt;br /&gt;
== GEANT 4 implementation ==&lt;br /&gt;
&lt;br /&gt;
The GEANT4 file  (version 4.8.p01)&lt;br /&gt;
&lt;br /&gt;
source/processes/electromagnetic/standard/src/G4BetheBlockModel.cc&lt;br /&gt;
&lt;br /&gt;
is used to calculate hadron energy loss.&lt;br /&gt;
&lt;br /&gt;
line 132 (line 257 in version 4.9.5)  &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} =  \log \left ( \frac{2 m_e c^2 \tau (\tau +2) E_{min}}{I^2}\right) - \left (1 - \frac{E_{min}}{E_{max}} \right ) \beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \tau = \frac{K.E.}{M}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 143 (line 267 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \log  ( \tau (\tau + 2) ) -cden&amp;lt;/math&amp;gt; = density corection = &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 148 (line 270 in vers. 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \frac{2c}{Z_{target}}&amp;lt;/math&amp;gt; = shell correction, corrects for the classical asumption that the atomic electron's velocity is initially zero; or the the incident particles velocity is far greater than the atomic electron's velocity.&lt;br /&gt;
&lt;br /&gt;
line 154 (line 273 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} *= \frac{2 \pi m_e c^2 r_e^2 z^2}{\beta^2} \rho_e \;\;\;\; \rho_e \propto \frac{NZ}{A}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Energy Dependence ==&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_EnergyLoss_EnergyDependence.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
The above curve shows the energy loss per distance traveled (&amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt;) as a function of the incident particles energy.  There are three basic regions.  At low incident energies ( &amp;lt; 10^5 eV) the incident particle tends to excite or even ionize the atoms in the material it is penetrating.  The maximum amount of energy loss per distance traveled is defined as the Bragg peak.  The region after the Bragg peak, in which the energy loss per distance traveled reaches its smallest value, is refered to as the point of minimum ionizing.  Minimimum ionizing particles will have incident energies corresponding to this value or larger.  The characteristic of the minimum ionizing particles is that their energy loss per distance traveled is essentially constant making simulations easier until the particle's energy drops below the minimum ionizing energy level as it passes through the material.&lt;br /&gt;
&lt;br /&gt;
In general the Bethe-Bloch equation breaks down at low energies (below the Bragg peak)  and is a good description (to within 10%) for &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10 \frac{MeV}{a.m.u.} &amp;lt; E &amp;lt; 2 \frac{GeV}{a.m.u.}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; &amp;lt; 26 (Iron)  : a.m.u = Atomic Mass Unit&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\frac{1}{\beta^2}&amp;lt;/math&amp;gt; term in the Bethe-Bloch equation dominates between the Bragg peak and the minimum ionization region.&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\ln&amp;lt;/math&amp;gt; term and its corrections influence the dependence of  &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; as you move up in energy beyond the minimum ionization point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Energy Straggling ===&lt;br /&gt;
&lt;br /&gt;
While the Bethe-Bloch formula gives you a way to quantify the amount of energy a heavy charged particle  loses as a function of the distance traveled, you should realize that when you calculate the total energy lost via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta E = \int_{E_i}^{E_f} \left ( \frac{dE}{dx} \right ) dx&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you are only determining the AVERAGE energy loss.  In other words, Bethe-Bloch is the Astochastic process describing energy loss.&lt;br /&gt;
&lt;br /&gt;
In reality the energy loss process is a stochastic process because of the statistical fluctuations which occur in the actual number of collisions which take place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Thick Absorber ====&lt;br /&gt;
&lt;br /&gt;
A thick absorber is one in which a large number of collisions takes place.   In this situation the central limit theorem from statistics tells you that the larger the number of random variable samples , &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, involved the more the observable will follow a Gaussian distribution. The Gaussian distribution is a good approximation to the binomial distribution when the number of trials is large.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Binomial_with_Large_N_becomes_Gaussian]]&lt;br /&gt;
&lt;br /&gt;
, and to a Poisson distribution when the mean is a lot larger than 1.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Gaussian_approximation_to_Poisson_when]]&lt;br /&gt;
&lt;br /&gt;
The gaussian probability function is defined as &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto e^{\frac{(\Delta - \bar{\Delta})^2}{ \sigma^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Full Width at Half Max (FWHM) of the distribution = &amp;lt;math&amp;gt;\left ( 2 \sqrt{2 \ln 2} \right ) \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of energy loss, the variance using the Bethe-Bloch equation should be &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_0^2 = 4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the realitivistic variance is &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 = [\frac{1-\beta^2/2}{1-\beta^2} ]\sigma_0^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for very thick absorbers see&lt;br /&gt;
&lt;br /&gt;
C. Tschaler, NIM '''64''', (1968) 237 ; ''ibid'', '''61''', (1968) 141&lt;br /&gt;
&lt;br /&gt;
When simulating energy loss of heavy charged particles the Bethe-Bloch equation may be used to calculate a &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; which can determine the average energy loss at the given kinetic energy of the particle.  This average is then smeared according to a gaussian distribution of variance &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 =4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x [\frac{1-\beta^2/2}{1-\beta^2} ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Thin Absorbers====&lt;br /&gt;
&lt;br /&gt;
In thin absorbers the number of collisions is small preventing the use of the central limit theorem to describe the stochastic process of energy loss in terms of a Gaussian distribution.  The large energy transfers that are possible cause the energy loss distribution to look like a Gaussian  with a high energy tail (or foot).&lt;br /&gt;
&lt;br /&gt;
The skewness of the resulting energy loss distribution is quantified as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\kappa = \frac{\bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta  \equiv 2 \pi N_a r_e^2 m_e c^2 \rho \frac{Z}{A} \left ( \frac{z}{\beta}\right)^2 x &amp;lt;/math&amp;gt; = lead term in Bethe Bloch equation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt; = density of absorbing material.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right ) \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; = max energy transfered in 1 collision (headon / knock out collision)&lt;br /&gt;
&lt;br /&gt;
This comes from the relativistic kinematics of an Elastic Collision.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:SPIM_ThinAbsorbers_Scatering.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\gamma = \frac{E_{tot}}{Mc^2} = \frac{ \sqrt{(pc)^2 + (Mc^2)^2}}{Mc^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\beta= \frac{pc}{\gamma Mc^2} = \frac{pc}{E_{tot}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = E_{tot} - Mc^2 = \gamma Mc^2 - Mc^2 = (\gamma - 1 ) Mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = \sqrt{(pc)^2 + (Mc^2)^2} - Mc^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;   (p^{\prime}c)^2 = E_k^2 + 2E_km_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conservation of Momentum &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{p} = \vec{p}^{\; \prime \prime} + \vec{p}^{\; \prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conservation of Energy &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_{tot} + m_ec^2 = E_{tot}^{\prime \prime} + E_{tot}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sqrt{(pc)^2 + (Mc^2)^2} + m_ec^2 = \sqrt{(p^{\; \prime \prime} c)^2 + (Mc^2)^2}  + E_k +  m_e c^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using conservation of E &amp;amp; P as well as substituting for &amp;lt;math&amp;gt;p^{\prime}&amp;lt;/math&amp;gt; you can show&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(p^{\; \prime \prime}c)^2 = (pc)^2 - 2E_k\sqrt{(pc)^2 +(Mc^2)^2} + E_k^2&amp;lt;/math&amp;gt; : cons of E&lt;br /&gt;
:&amp;lt;math&amp;gt;= (pc)^2 + E_k^2 + 2E_km_ec^2 -2pc\sqrt{E_k^2+2E_km_ec^2} \cos(\theta)&amp;lt;/math&amp;gt; : cons of P&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;pc \cos(\theta) \sqrt{1+\frac{2m_ec^2}{E_k}} = \sqrt{(pc)^2+(Mc^2)^2} + m_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;E_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_k = \frac{2m_ec^2(pc)^2\cos^2 (\theta)}{[\sqrt{(pc)^2 + (Mc^2)^2} +m_ec^2]^2 - (pc)^2 \cos^2 (\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== (Landau Theory) =====&lt;br /&gt;
&amp;lt;math&amp;gt;\kappa \leq 0.01&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Landau assumed&lt;br /&gt;
:# &amp;lt;math&amp;gt;W_{max} = \infty&amp;lt;/math&amp;gt; is max energy transfer&lt;br /&gt;
:# electrons are free (energy transfer is so large you can neglect binding)&lt;br /&gt;
:# incident particle maintains velocity (large momentum transfer from big mass to small mass) (bowling ball hits ping pong ball)&lt;br /&gt;
&lt;br /&gt;
L. Landau, &amp;quot;On the Energy Loss of Fast Particles by Ionization&amp;quot;, J. Phys., vol 8 (1944), pg 201&lt;br /&gt;
&lt;br /&gt;
instead of a gaussian distribution Landau used&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto \frac{1}{\bar{\Delta}\pi} \int_0^{\infty} e^{-u \ln u - u \lambda} \sin(\pi u) du&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda = \frac{1}{\bar{\Delta}} \left [ \Delta - \bar{\Delta} \ln \bar{\Delta} - \ln \epsilon + 1 -C \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\bar{\Delta} = 2\pi N_a r_e^2 m_e c^2 \rho \frac{Zz^2}{A \beta^2}x&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln \epsilon = \ln \left [ \frac{(1-\beta^2)I^2}{2m_ec^2 \beta^2} \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Landau_ThinAbsorberDist.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== (Vavilou's Theory) =====&lt;br /&gt;
&lt;br /&gt;
Vavilous paper&lt;br /&gt;
&lt;br /&gt;
P.V. Vavilou, &amp;quot;Ionization losses of High Energy Heavy Particles&amp;quot;, Soviet Physics JETP, vol 5 (1950? )pg 749&lt;br /&gt;
&lt;br /&gt;
describe the physics for the case &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;0.01 &amp;lt; \kappa &amp;lt; \infty &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution function derived is shown below as well as a conceptual overlay of Vavilou's and Landau's distributions.  (The &amp;lt;math&amp;gt;\zeta f(x,\Delta)&amp;lt;/math&amp;gt; in the picture should be a &amp;lt;math&amp;gt;\bar{\Delta}P(x,\Delta)&amp;lt;/math&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) = \frac{1}{\bar{\Delta}\pi} x e^{x(1+\beta^2C)} \int_0^{\infty} e^{xf_1} \cos(y \lambda_1 + xf_2) dy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f_1 = \beta^2 \left [ \ln(y) - C_i(y)\right ] - \cos(y) - y S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f_2 = y\left [ \ln(y) - C_i(y)\right ] + \sin(y) + \beta^2  S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C_i(y) \equiv - \int_y^{\infty} \frac{\cos(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;S_i(y) \equiv \int_0^{y} \frac{\sin(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;C_i and S_i&amp;lt;/math&amp;gt; are the sine and cosine integral functions given in Vavilous' paper&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Vavilou_Landau_ThinAbsorber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation ====&lt;br /&gt;
&lt;br /&gt;
GEANT 4 uses the skewness parameter &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; to determine if it will use a &amp;quot;fluctuations model&amp;quot; to calculate energy straggling or the gaussian model described in section 3.2.1.&lt;br /&gt;
&lt;br /&gt;
===== kappa &amp;gt; 10 =====&lt;br /&gt;
If &lt;br /&gt;
: &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt; &amp;gt; 10 &lt;br /&gt;
and we have a thick absorber ( large step size) then the Gausian function in 3.2.1 is used to calculate energy straggling.&lt;br /&gt;
&lt;br /&gt;
What happens is &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; is calculated via &amp;lt;math&amp;gt;\int_{E_i}^{E_f} \frac{dE}{dx} dx&amp;lt;/math&amp;gt; then the actual energy loss predicted by the simulation is chosen from a Gaussian distribution to account for energy straggling such that the &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; of this Gaussian distribution is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma^2 = 2 \pi r_e^2m_ec^2N_{el} \frac{Z_h}{\beta^2} T_C s (1 - \frac{\beta^2}{2})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N_{el}&amp;lt;/math&amp;gt; = electron density of the medium&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_h&amp;lt;/math&amp;gt; = charge of the incident particle&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = step size&lt;br /&gt;
:&amp;lt;math&amp;gt; T_C&amp;lt;/math&amp;gt; = cutoff kinetic energy for &amp;lt;math&amp;gt;\delta &amp;lt;/math&amp;gt;-electrons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_C&amp;lt;/math&amp;gt; tells GEANT where to put the cutoff for using the Gaussian distribution for energy straggling.  This tells the simulation the low energy cutoff where Bethe-Bloch starts to fail due to ionization.&lt;br /&gt;
&lt;br /&gt;
=====Delta-electrons =====&lt;br /&gt;
What is a &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electron?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons are also known as &amp;quot;knock -on&amp;quot; electrons or delta rays.&lt;br /&gt;
&lt;br /&gt;
As heavy particles traverse a medium they can ionize electrons from atoms.  The ejected electrons (&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons) can be given enough energy to ionize as well.&lt;br /&gt;
&lt;br /&gt;
In a cloud chamber (a supercooled volume of super saturated water vapor which ionizes as charged particles pass through)  such and event would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_DeltaRay_CloudChamber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
The blue spiral in the above gas chamber picture is a high energy electron ejected from a collision that spirals in the B-field ejecting low energy electrons at the end.  The B-field is directed out of the picture.&lt;br /&gt;
&lt;br /&gt;
The physics of ionization is different from the physics used to calculate Bethe-Bloch energy loss.  Remember Bethe-Bloch  starts to break down at low energies below the Bragg peak.  &lt;br /&gt;
&lt;br /&gt;
Because of this GEANT 4 sets the cutoff for this process to be&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;T_{cut}&amp;lt;/math&amp;gt; &amp;gt; 1 keV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:  The BE energies of an electron in Hydrogen is 13.6 ev and the electrons in Argon have binding energies between 15.7 eV and 3.2 keV.&lt;br /&gt;
&lt;br /&gt;
===== Fluctuations Model: kappa &amp;lt; 10=====&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}} &amp;lt; \frac{\Delta E}{T_C}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then GEANT 4 uses a &amp;quot;Fluctuations Model&amp;quot; to determine energy loss instead of Bethe-Bloch.&lt;br /&gt;
&lt;br /&gt;
; Fluctuations Model&lt;br /&gt;
:# the atom is assumed to have 2 energy levels &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:# you can excite the atom and lose either &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt; or you can ionize the atom and lose energy according to a &amp;lt;math&amp;gt;\frac{1}{E^2}&amp;lt;/math&amp;gt; function &amp;lt;math&amp;gt;u_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total energy loss in a step will be &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \Delta E_{exc} + \Delta E_{ion}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{exc} = \eta_1 E_1 + \eta_2 E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{ion} = \sum_{j=1}^{\eta_3} \frac{I}{1 - u_j \frac{T_{up}-I}{T_{up}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\eta_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\eta_2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\eta_3&amp;lt;/math&amp;gt; are the number of collisions which are sampled from a poison distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;u_j = \int_{I}^{E_j} \frac{I T_{up}}{T_{up} - I} \frac{dx}{x^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_j = \frac{I}{1- rand  \frac{T_{up}-1}{T_{up}}}&amp;lt;/math&amp;gt; : rand = random number between 0 and 1&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T_{up} = \left \{  {~ 1 keV \;  threshold \;energy \;for \; \delta- ray \; production \atop T_{max} \; \;\;\; if \; T_{max} &amp;lt; 1 keV} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; = mean ionization energy&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_2 \approx (10 eV) Z^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln E_1 = \frac{\ln (I) - f_2 \ln (E_2)}{f_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1 + f_2 =1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2 =\left \{  {0 \; z=1 \atop \frac{2}{z} \; z \ge 2} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fluctuation model was comparted with data in &lt;br /&gt;
&lt;br /&gt;
K. Lassila-Perini and L. Urban, NIM, A362 (1995) pg 416&lt;br /&gt;
&lt;br /&gt;
The cross sections used for excitation and ionization may be found in &lt;br /&gt;
&lt;br /&gt;
H. Bichel, Rev. Mod. Phys., vol 60 (1988) pg 663&lt;br /&gt;
&lt;br /&gt;
=== Range Straggling===&lt;br /&gt;
&lt;br /&gt;
;Def of Range (R):&lt;br /&gt;
: The distance traveled before all the particles energy is lost.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;R \equiv \int_0^T \frac{dE}{\frac{dE}{dx}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:  = theoretical calculation of the path length traveled by a particle of incident energy &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note units: &amp;lt;math&amp;gt;\left [ R \right ] =  \frac{g}{cm^2} ; \left [ \frac{dE}{dx} \right ] = \frac{MeV \cdot cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the Energy Straggling introduced in the previous section can explain why identical particles penetrate material to different depths.   The energy straggling results in Range straggling.&lt;br /&gt;
&lt;br /&gt;
If we do a shielding experiment where we have a source of incident particles of energy E and we count how many &amp;quot;punch&amp;quot; through a material of thickness (x) we would see a transmission coefficient &amp;lt;math&amp;gt;\left ( \frac{N_{out}}{N_{in}} \right) &amp;lt;/math&amp;gt; which would look like&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStraggling.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
====Fractional Range Straggling ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \equiv&amp;lt;/math&amp;gt; fractional range straggling&lt;br /&gt;
&lt;br /&gt;
Assuming the energy loss of a non-relativistic heavy ion through matter follows a Gaussian (thick absorber)&lt;br /&gt;
&lt;br /&gt;
Then it can be shown that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{M}{A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; = mass of the target electrons&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; = atomic mass of the Projectile&lt;br /&gt;
&lt;br /&gt;
since &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e = 9.11 \times 10^{-31}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
: 1 a.m.u. = &amp;lt;math&amp;gt;1.66 \times 10^{-27}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{9.11 \times 10^{-31}}{1.66 \times 10^{-27}A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: = 1.17 % if using a proton (A=1)&lt;br /&gt;
&lt;br /&gt;
The above is a &amp;quot;back of the envelope&amp;quot; estimate.  The experimentally measured values for Cu, Al, and Be target using a proton projectile are &lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStrag_SigmaR_overR.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
If the incident projectile is an electron then &amp;lt;math&amp;gt;\frac{\sigma_R}{R}  \approx \frac{1}{2}&amp;lt;/math&amp;gt; making electron range straggling a vague concept.&lt;br /&gt;
&lt;br /&gt;
There are several definitions of electron range&lt;br /&gt;
&lt;br /&gt;
;1.) Maximum Range (&amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:This range is defined using the continuous slowing down approximation (CSDA) where electrons are assumed to have many collisions over very small distances making it appear to be continuous energy loss instead of discrete.  The range is then calculated by integrating over these average energy losses &amp;lt;math&amp;gt;\frac{dE}{dx} \cdot s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;2.) Practical Range (&amp;lt;math&amp;gt;R_P&amp;lt;/math&amp;gt;):&lt;br /&gt;
: This stopping distance is defined by extrapolating the electron transmission curve to zero (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PracticalRangStraggline_4Electrons.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
=== Electron Capture and Loss ===&lt;br /&gt;
====Bohr Criterion====&lt;br /&gt;
:&amp;quot;A rapidly moving nucleus is fully ionized if its velocity exceeds that of its most tightly bound electron&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Bohr Model:&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow E = \frac{mz^2e^4}{8 \epsilon_0^2 h^2 n^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the inner most electron (&amp;lt;math&amp;gt;n=1&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
:Electron K.E. = &amp;lt;math&amp;gt;\frac{1}{2} mv^2 = \frac{mz^2e^4}{2(4\pi \epsilon_0)^2 \hbar^2} \Rightarrow v = \frac{z e^2}{4 \pi \epsilon_0 \hbar}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:the fine structure constant &amp;lt;math&amp;gt;\alpha \equiv \frac{e^2}{4 \pi \epsilon_0 \hbar c} = \frac{1}{137}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; v = zc \alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;v &amp;gt; zc \alpha&amp;lt;/math&amp;gt; the nucleus is fully ionized&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;\frac{z}{v/c} = \frac{z}{\beta} &amp;lt; \frac{1}{\alpha} = 137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively if the ion is moving through a material with a speed such that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{z}{\beta} &amp;gt; \frac{1}{\alpha} =137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then electrons may be captured by the projectile and lost by the target.&lt;br /&gt;
&lt;br /&gt;
==== Z-effective====&lt;br /&gt;
Describing the charge state of your heavy ion traveling through matter at a velocity below the Bohr criterion is very complicated.  There is a competition between electron capture and loss.  Accurate cross sections are needed to simulate the process reliably.&lt;br /&gt;
&lt;br /&gt;
Some insight into this process can be found using the Thomas-Fermi model &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;V \propto \frac{Ze^{-r/a}}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to describe an atom moving slow enough so it has captured many electrons but fast enough so its not neutral.  In the Thomas-Fermi model the distribution of electrons in an atom is described as being uniformly distributed such that there are 2 electrons in each discrete volume of phase space( the space in which all possible states of a system are represented)  defined using planks constant as &amp;lt;math&amp;gt;h^3&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
For the purpose of simulations you would like a relationship for &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
It is usually adequate to use fits for empirical data as long as we know that we are in the kinematic range in which those fits are valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when &amp;lt;math&amp;gt;E &amp;lt; 10&amp;lt;/math&amp;gt; MeV the data indicates that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Z_{eff} = Z(1 - e^{-\beta\frac{B}{Z^{2/3}}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;B = 130 \pm 5&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_{eff} \equiv&amp;lt;/math&amp;gt; effective charge f the projectile = &amp;lt;math&amp;gt;Z - \bar{q}_c&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = number of protons&lt;br /&gt;
:&amp;lt;math&amp;gt;\bar{q}_c&amp;lt;/math&amp;gt; = average number of captured electrons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''When calculating stopping power for E &amp;lt; 10 MeV you use &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in the Bethe-Bloch equation.'''&lt;br /&gt;
&lt;br /&gt;
Note:  As the ions charge state fluctuates while it slows down (or if accelerated through materials) you will need to recalculate the energy loss, and as a result you will get larger energy loss fluctuations in this energy range.&lt;br /&gt;
&lt;br /&gt;
For thin absorber you will look for stripping and loss cross sections.&lt;br /&gt;
&lt;br /&gt;
: Here a thin absorber is one whose thickness is less than the charge equilibrium distance defined as the distance traveled until the projectile's velocity is &amp;lt;math&amp;gt; v \ll zc\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rule of thumb is that a thin absorber for low energy ions has a thickness &amp;lt;math&amp;gt;\le \frac{5 \frac{\mu g}{cm^2}}{\rho}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For thick absorbers:  The experimentally determined expression for the change in &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta Z_{eff} = \frac{1}{2} \sqrt{ \left [  Z_{eff} \left (1 - \frac{Z_{eff}}{Z} \right )^{1.67}\right ] }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Scattering ===&lt;br /&gt;
&lt;br /&gt;
The Bethe-Bloch equation tells us how much energy is lost and GEANT4s calculation of this energy is described above.&lt;br /&gt;
&lt;br /&gt;
Now we need to know which direction the scattered particle goes after it has lost this energy.&lt;br /&gt;
&lt;br /&gt;
The work of Moliere describes the angular deflection of the particle which lost the energy thereby leading to a prediction of the Cross-section.  GEANT4 though uses the more complete Lewis theory to describe Multiple Coulomb Scattering (MCS) sometimes generically referred to as multiple scattering.&lt;br /&gt;
&lt;br /&gt;
There are 3 regions in which coulomb scattering is calculated&lt;br /&gt;
&lt;br /&gt;
; 1.) Single Scattering:&lt;br /&gt;
: For thin materials.&lt;br /&gt;
: If the probability of more than 1 coulomb scattering is small &lt;br /&gt;
:Then use the Rutherford formula for &amp;lt;math&amp;gt;\frac{d \sigma}{d \Omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;2.)Multiple Scattering:&lt;br /&gt;
: In this case the number of independent scatterings is large (N &amp;gt; 20) and the energy loss is small such that the problem can be treated statisticaly to obtain a probability distribution for the net deflection angle &amp;lt;math&amp;gt; [P(\theta)]&amp;lt;/math&amp;gt; as a function of the material thickness that is traversed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;3.) Plural Scattering:&lt;br /&gt;
: If 1&amp;lt; N &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; 20 then you can't use Rutherford to describe the scattering nor use a normal random statistical description.&lt;br /&gt;
&lt;br /&gt;
see E. Keil, Z. Naturforsch, vol 15 (1960), pg 1031&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews of rigorous multiple scattering calculations may be found in &lt;br /&gt;
: P.C. Hemmer, et. al., Phys. Rev, vol 168 (1968), pg 294&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation of MSC (N&amp;gt;20) ====&lt;br /&gt;
&lt;br /&gt;
GEANT4 models MSC when N&amp;gt;20 using model functions to determine the angular and spatial distributions chosen to give the same moments of these distributions as the Lewis theory.&lt;br /&gt;
&lt;br /&gt;
:H.W. Lewis, Phys. Rev., vol 78 (1950), pg 526&lt;br /&gt;
&lt;br /&gt;
modern versions of the above are at&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
: I. Kawrakow, et. al., NIM, B142 (1998) pg 253&lt;br /&gt;
&lt;br /&gt;
When N&amp;gt;20 multiple scattering can be described as a statistical process using a modified version of the Boltzman transport equation from statistical mechanics.  &lt;br /&gt;
&lt;br /&gt;
;Note: The simulation step size is chosen such that (N&amp;gt;20),  If you have materials so thin that N &amp;lt; 20 then GEANT4 will likely skip the material.  (one way around this is to increase the thickness and change the density).  If the material thickness can't be increased because its sandwhiched between two other materials then you will need to write a special step algorithm for the volume and have GEANT4 use it for the step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) \equiv&amp;lt;/math&amp;gt; the distribution function for a system of incident particles traveling through a material.&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s =&amp;lt;/math&amp;gt; arc length of the particle's path through the material&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{x} =&amp;lt;/math&amp;gt; position of a charged particle&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{v} =&amp;lt;/math&amp;gt; direction of motion of the particle &amp;lt;math&amp;gt;\frac{\vec{v}}{|\vec{v}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multiple scattering experienced by a single charged particle traveling through the material is then simulated by sampling from the distribution &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The governing transport/diffusion equation is based on the continuity equation but with a &amp;quot;sink&amp;quot; term representing the possibility of collisions ejecting particles out of the volume.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f(s,\vec{x},\hat{v} ) }{\partial s} + \hat{v} \bullet \vec{\nabla}f(s,\vec{x},\hat{v} ) = N \int \sigma(\hat{v} \bullet\hat{v}^{\prime} )\left [ f(s,\vec{x},\hat{v}^{\prime} )  - f(s,\vec{x},\hat{v} ) \right ] d \hat{v}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; = number of atoms per volume&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\hat{v} \bullet\hat{v}^{\prime} )&amp;lt;/math&amp;gt; = cross sections for elastic scattering per Solid angle &amp;lt;math&amp;gt;\left ( \frac{d \sigma}{d \Omega} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the above diffusion equation the distribution function, &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt; is expanded in Spherical Harmonics ( &amp;lt;math&amp;gt;Y_{\ell}^m(\theta,\phi)&amp;lt;/math&amp;gt; ) and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; expand  in Legendre Polynomials (&amp;lt;math&amp;gt;P_N(cos \theta)&amp;lt;/math&amp;gt;) since it has no &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; angle dependence.&lt;br /&gt;
&lt;br /&gt;
;Note: For Coulomb Scattering in polar coordinates you can write the potential in terms of Legendre Polynomials such that:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;U=k \frac{q}{r}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{\sqrt{r^2-a^2-2ar \cos \theta}}&amp;lt;/math&amp;gt;  in polar coordinates&lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{r} \sum_{n=0}^{\infty} P_n(\cos \theta) \left ( \frac{a}{r}\right )^n&amp;lt;/math&amp;gt; (the sqrt term above is expanded using binomial series&lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} ) = \sum_{\ell,m} f_{\ell,m}(\vec{x},s) Y_{\ell}^m(\hat{v})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting into the diffusion equation and doing the integral on the righ hand side you get&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f_{\ell,m}(\vec{x},s) }{\partial s} + \frac{f_{\ell,m}(s,\vec{x},\hat{v} }{\lambda_{\ell}} = - \sum_{\lambda, i, j} \vec{\nabla} f_{i,j}(\vec{x},s ) \bullet \int Y_{\ell,m}^{\star} \hat{v} Y_{i,j} d \hat{v} \; \; \; \; \; \; \; \;\hat{v} = f(\theta.\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{1}{\lambda_{\ell}} = 2 \pi N \int_0^{\pi} \left [ 1-P_{\ell}(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt;\ell^{th}&amp;lt;/math&amp;gt; transport mean free path for the &amp;lt;math&amp;gt;f_{\ell}&amp;lt;/math&amp;gt; distribution function ( &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; symmetry is assumed making it &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; independent)&lt;br /&gt;
&lt;br /&gt;
From the above one can find the average distances traveled and the average deflection angle of the distribution.  Again, see :&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moments&amp;quot; of &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) &amp;lt;/math&amp;gt;  are defined as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt; = 2 \pi \int z f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = \lambda_1 \left [ 1-e^{-s/\lambda_1}\right ]&amp;lt;/math&amp;gt; = mean geometrical path length&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;\cos(\theta)&amp;gt; = 2 \pi \int_{-1}^1 \sum_{\ell} P_{\ell}(\cos \theta) \int f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = e^{-s/\lambda_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\lambda_1} = 2 \pi N \int_0^{\pi} \left [ 1-P_1(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are 3 lengths&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq_PathLength.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = geometrical path length between endpoints of the step =&amp;lt;math&amp;gt; \left \{  {line \; if \; \vec{B} = 0 \atop arc \; if \; \vec{B} \ne 0 } \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; = true path length = actual length of the path taken by particle&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt;&amp;lt;/math&amp;gt; - mean geometrical path length along the z-axis&lt;br /&gt;
&lt;br /&gt;
In GEANT4 the &amp;lt;math&amp;gt;\lambda_{\ell}&amp;lt;/math&amp;gt;'s are taken from&lt;br /&gt;
&lt;br /&gt;
If 100 eV &amp;lt; K.E. of electron or positron &amp;lt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:D. Liljequist, J. Applied Phys, vol 62 (1987), 342&lt;br /&gt;
:J. Applied Phys, vol 68 (1990), 3061&lt;br /&gt;
&lt;br /&gt;
If K.E. &amp;gt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:R. Mogol, Atomic Data, Nucl, Data tables, vol 65 (1997) pg 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;z&amp;gt; now known GEANT will try to determine &amp;quot;&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&amp;quot; for the energy loss and scattering calculations.&lt;br /&gt;
&lt;br /&gt;
A model is used for this where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\frac{1}{\alpha} \left [ 1 - (1- \alpha \omega z)^{\frac{1}{\omega}})\right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\omega = 1 + \frac{1}{\alpha \lambda_{10}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\alpha =\left \{  {\frac{\lambda_{10} - \lambda_{11}}{s \lambda_{10}}\;\;\;\; K.E. \ge M_{particle} \atop \frac{1}{R}\;\;\;\; K.E. &amp;lt; M_{particle}} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = stepsize&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda_{10} - \frac{\lambda_1}{1-\alpha s}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_{11} = \lambda_1&amp;lt;/math&amp;gt; at end of strep&lt;br /&gt;
&lt;br /&gt;
while &amp;lt;math&amp;gt;&amp;lt;cos \theta &amp;gt;&amp;lt;/math&amp;gt; is calculable, GEANT4 evaluates &amp;lt;math&amp;gt;\cos (\theta)&amp;lt;/math&amp;gt; from a probability distribution whose general form is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g[\cos(\theta)] = p \left ( qg_1[\cos(\theta)] + (1-q)g_3[\cos(\theta)] \right ) + (1-p)g_2[\cos(\theta)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g_1(x) = C1e^{-a(1-x)}&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;g_2(x) = \frac{C_2}{(b-x)^d}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;g_3(x) = C_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;C_1, C_2, C_3&amp;lt;/math&amp;gt; are normalization constants&lt;br /&gt;
:&amp;lt;math&amp;gt;p,q,a,b,d&amp;lt;/math&amp;gt; are parameters which follow the work reported in &lt;br /&gt;
&lt;br /&gt;
:V.L. Highland, NIM, vol 219 (1975) pg497&lt;br /&gt;
&lt;br /&gt;
The GEANT4 files in version 4.8 were located in &lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MscModel.cc&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130042</id>
		<title>TF SPIM StoppingPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130042"/>
		<updated>2025-02-26T05:42:49Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Delta-electrons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Stopping Power=&lt;br /&gt;
== Bethe Equation ==&lt;br /&gt;
===Classical Energy Loss ===&lt;br /&gt;
&lt;br /&gt;
Consider the energy lost when a particle of charge (&amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt;) traveling at speed &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is scattered by a target of charge (&amp;lt;math&amp;gt;Ze&amp;lt;/math&amp;gt;).  Assume only the coulomb force causes the particle to scatter from the target as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Bethe_ClassCoulScat.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Notice:&lt;br /&gt;
: as &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is scattered the horizontal component of the coulomb force (&amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt;) flips direction; ie net horizontal force for the scattering&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F_{vertical} = k \frac{zZe^2}{r^2} \sin(\theta) = k \frac{zZe^2}{r^2}  \frac{b}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: k =&amp;lt;math&amp;gt;\frac{1}{4 \pi \epsilon_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
: r = distance between incident projectile and target atom&lt;br /&gt;
: b= impact parameter of collision &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the definition of Impulse one can determine the momentum change of &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta p = \int F dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's assume that the energy lost by the incident particle &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is absorbed by an electron in the target atom.  This energy may be cast in terms of the incident particles momentum change as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{(\Delta p)^2}{2m_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By calculating the change in momentum (&amp;lt;math&amp;gt;\Delta p&amp;lt;/math&amp;gt;) of the incident particle we can infer that the energy lost by the incident particle is absorbed by one of the target material's atomic electrons.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta P = \int F dt = \int k \frac{zZe^2b}{r^3}  dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using  &amp;lt;math&amp;gt;dt = \frac{dx}{v} = \frac{d x}{\beta c}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;= k \frac{zZe^2b}{\beta c} \int_{-\infty}^{+\infty} \frac{ dx}{(x^2+b^2)^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{kzZe^2b}{\beta c b^2} \int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x^2}{b^2})^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x}{b^2})^{3/2}}=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2kzZe^2b}{\beta c b^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
casting this in terms of the classical atomic electron radius &amp;lt;math&amp;gt;r_e&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;r_e = \frac{k e^2}{m_e v^2} \sim \frac{k e^2}{m_e c^2}&amp;lt;/math&amp;gt;  just equate &amp;lt;math&amp;gt;F = \frac{ke^2}{r_e^2} = m \frac{v^2}{r_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2zZr_e m_e c}{\beta  b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \frac{(\Delta p)^2}{2m_e} = 2 \left ( \frac{r_e m_e}{\beta b}\right )^2 \frac {z^2 Z^2 c^2}{m_e}&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = 1 here because I shall assume the energy is lost to just the electron and the Atom is a spectator&lt;br /&gt;
&lt;br /&gt;
Now let's calculate an expression representing the AVERAGE energy lost for an incident particle traversing a material of some thickness.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(\Delta E)&amp;lt;/math&amp;gt; = Probability of an interaction taking place which results in an energy loss &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we let&lt;br /&gt;
&lt;br /&gt;
Z  = Atomic Number = # electrons in target Atom = number of protons in an Atom&lt;br /&gt;
&lt;br /&gt;
N = Avagadros number  = &amp;lt;math&amp;gt;6.022 \times 10^{23}  \frac{Atoms}{mol}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A = Atomic mass =  &amp;lt;math&amp;gt;\frac{g}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt;  = probability of hitting an atomic electron in the area of an annulus of radius (&amp;lt;math&amp;gt;b + db&amp;lt;/math&amp;gt;) with an energy transfer between &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta E + d(\Delta E)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;\frac{-dE }{dx}= \int_0^{\infty} dP(\Delta E) \Delta E&amp;lt;/math&amp;gt; = energy lost by the incident particle per distance traversed through the material&lt;br /&gt;
&lt;br /&gt;
I am just adding up all the energy losses weighted by the probability of the energy loss to find the average (total) energy loss.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; :&lt;br /&gt;
: &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; = probability of an energy transfer taking place = probability of an interaction = &amp;lt;math&amp;gt;\frac{N}{A} d \sigma&amp;lt;/math&amp;gt;  [ Atoms &amp;lt;math&amp;gt;cm^2&amp;lt;/math&amp;gt;/g]&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;dP(\Delta E) = \frac{N}{A} d \sigma =\frac{N}{A} (2 \pi b db) Z&amp;lt;/math&amp;gt; &lt;br /&gt;
:In practice &amp;lt;math&amp;gt; \sigma&amp;lt;/math&amp;gt; is a measured cross-section which is a function of energy.&lt;br /&gt;
:classically &amp;lt;math&amp;gt;\sigma = \pi b^2 ; d \sigma = 2\pi b db&amp;lt;/math&amp;gt; so let's use this as a first approximation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{-dE}{dx} =  \int_0^{\infty} \frac{N}{A} (2 \pi b db) Z \Delta E = \frac{2 \pi N Z}{A} \int_0^{\infty} \Delta E b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{2 \pi N Z}{A} \int_0^{\infty} \left [ \frac{2 r_e^2 m_e c^2 z^2}{\beta^2 b^2}\right ] b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;4 \pi N r_e^2 m_e c^2 \frac{z^2 Z}{A \beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
:=&amp;lt;math&amp;gt;\frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\mathcal{K}}{A} = \frac{4 \pi N r_e^2 m_e c^2}{A} = 0.307 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;''' if A=1'''&lt;br /&gt;
&lt;br /&gt;
The limits of the above integral should be more physical in order to reflect the limits of the physics interaction.  Let &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; represent the minimum and maximum possible impact parameter where the physics is described,  as shown above,  by the coulomb force.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;b \rightarrow 0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\frac{d E}{dx}&amp;lt;/math&amp;gt; diverges and the energy transfer &amp;lt;math&amp;gt;\rightarrow \infty : \Delta E \sim \frac{1}{b}&amp;lt;/math&amp;gt;.  Physically there is a maximum energy that may be transferred before the physics of the problem changes (ie: nuclear excitation, jet production, ...).  The de Borglie wavelength of the atom is used to estimate a value for &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt; such that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;b_{min} \sim  \frac{1}{2} \lambda_{de Broglie} = \frac{h}{2p} = \frac{h}{2 \gamma m_e \beta c}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
As &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger the interaction is &amp;quot;softer&amp;quot; and longer.  If the interaction time (&amp;lt;math&amp;gt;\tau_i&amp;lt;/math&amp;gt;) is so long that it is equivalent to an electron orbit (&amp;lt;math&amp;gt;\tau_R&amp;lt;/math&amp;gt;) then the atom looks more like it is neutrally charged.  You move from an interaction in which the electron orbit is perturbed adiabatically such that there is no orbit change and the minimum amount of energy is transferred to no interaction taking place because the atom is neutral.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_i = \frac{b_{max}}{v} (\sqrt{1-\beta^2})&amp;lt;/math&amp;gt;  : fields at high velocities get Lorentz contracted&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_R \equiv \frac{h}{I}&amp;lt;/math&amp;gt; : I &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt; mean excitation energy of target material ( &amp;lt;math&amp;gt;E = h \nu = h/ \tau&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Condition for &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;\tau_i = \tau_R&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow b_{max} = \frac{h \gamma \beta c}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\frac{dE}{dx} = \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{b_{max}}{b_{min}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{2 \gamma^2 m_e \beta^2 c^2}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Find &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; for a 10 MeV proton hitting a liquid hydrogen (&amp;lt;math&amp;gt;LH_2&amp;lt;/math&amp;gt;) target===&lt;br /&gt;
A = Z=z=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;m_e c^2&amp;lt;/math&amp;gt; = 0.511 MeV &amp;lt;br&amp;gt;&lt;br /&gt;
I = 21.8 eV : see gray data point for Liquid &amp;lt;math&amp;gt;H_2&amp;lt;/math&amp;gt; From  Figure 27.5 on pg 6 of [http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG] below.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PDG_IonizationPotential.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
Just need to know &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;a 10 MeV proton&amp;quot; &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; Kinetic Energy (K.E.) = 10 MeV = &amp;lt;math&amp;gt;(\gamma - 1) mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \gamma = \frac{K.E.}{mc^2} + 1 = \frac{10 MeV}{938 MeV} + 1 \sim 1 = \frac{1}{\sqrt{1-\beta^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proton is not relativistic&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;v^2 = \frac{2 K.E.}{m} = \frac{2 \cdot 10 MeV}{938 MeV/c^2} = 2 \times 10^{-2} c^2 \Rightarrow \beta^2 = \frac{v^2}{c^2} = 2\times 10^{-2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plugging in the numbers:&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} = \left ( 0.307 \frac{MeV \cdot cm^2}{g}\right ) (1)^2 (1) \frac{1}{2 \times10^{-2}} \ln \left( \frac{2 (1) (0.511 MeV) (2 \times10^{-2})}{21.8 eV} \frac{10^6 eV}{MeV}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= 105 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;How much energy is lost after 0.3 cm?&lt;br /&gt;
&lt;br /&gt;
'''Notice that the units for energy loss are normalized by the density of the material'''&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_{LH_2}&amp;lt;/math&amp;gt; = 0.07 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the actual energy lost I need to multiply by the density.   So for any given atom the energy loss will depend on the state (solid, gas, liqid) of the atom as this effects the density of the material.  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta E = (105 \frac{MeV cm^2}{g}) (0.07 \frac{g}{cm^3}) (0.3 cm)&amp;lt;/math&amp;gt; = 2.2 MeV&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_HydrogenStoppingPower.pdf]] Compare with Triumf Kinematics Handbook, 2nd edition, September 1987, L.G. Greeniaus&lt;br /&gt;
&lt;br /&gt;
==Bethe-Bloch Equation ==&lt;br /&gt;
&lt;br /&gt;
While the classical equation above works in a limited kinematic regime, the Bethe-Bloch equation includes the corrections needed to cover most kinematic regimes for heavy particle energy loss.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} = \mathcal{K} z^2 \frac{Z}{A} \frac{1}{\beta^2} \left [ \frac{1}{2} \ln \left (\frac{2 m_e c^2 \beta^2 \gamma^2 }{I} \frac{ T_{max}}{I} \right) - \beta^2 - \frac{\delta}{2}\right ]&amp;lt;/math&amp;gt;[http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG reference Eq 27.1 pg 1]&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;T_{max} = \frac{2 m_e c^2 \beta^2 \gamma^2}{1+ \frac{2 \gamma m_e}{M} + \frac{m_e}{M}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= Max K.E. transferable to the Target of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in a single collision.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;-\beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: =  correction for electron spin and very distant collisions which deforms the electron atomic orbits each process reducing dE/dx by &amp;lt;math&amp;gt;\frac{\beta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:= density correction term: in the classical derivation the material is treated as just a system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms uniformly distributed in space.  These Atoms, however, give the material polarizability which can reduce the electric field (dielectric).&lt;br /&gt;
&lt;br /&gt;
== GEANT 4 implementation ==&lt;br /&gt;
&lt;br /&gt;
The GEANT4 file  (version 4.8.p01)&lt;br /&gt;
&lt;br /&gt;
source/processes/electromagnetic/standard/src/G4BetheBlockModel.cc&lt;br /&gt;
&lt;br /&gt;
is used to calculate hadron energy loss.&lt;br /&gt;
&lt;br /&gt;
line 132 (line 257 in version 4.9.5)  &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} =  \log \left ( \frac{2 m_e c^2 \tau (\tau +2) E_{min}}{I^2}\right) - \left (1 - \frac{E_{min}}{E_{max}} \right ) \beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \tau = \frac{K.E.}{M}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 143 (line 267 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \log  ( \tau (\tau + 2) ) -cden&amp;lt;/math&amp;gt; = density corection = &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 148 (line 270 in vers. 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \frac{2c}{Z_{target}}&amp;lt;/math&amp;gt; = shell correction, corrects for the classical asumption that the atomic electron's velocity is initially zero; or the the incident particles velocity is far greater than the atomic electron's velocity.&lt;br /&gt;
&lt;br /&gt;
line 154 (line 273 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} *= \frac{2 \pi m_e c^2 r_e^2 z^2}{\beta^2} \rho_e \;\;\;\; \rho_e \propto \frac{NZ}{A}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Energy Dependence ==&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_EnergyLoss_EnergyDependence.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
The above curve shows the energy loss per distance traveled (&amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt;) as a function of the incident particles energy.  There are three basic regions.  At low incident energies ( &amp;lt; 10^5 eV) the incident particle tends to excite or even ionize the atoms in the material it is penetrating.  The maximum amount of energy loss per distance traveled is defined as the Bragg peak.  The region after the Bragg peak, in which the energy loss per distance traveled reaches its smallest value, is refered to as the point of minimum ionizing.  Minimimum ionizing particles will have incident energies corresponding to this value or larger.  The characteristic of the minimum ionizing particles is that their energy loss per distance traveled is essentially constant making simulations easier until the particle's energy drops below the minimum ionizing energy level as it passes through the material.&lt;br /&gt;
&lt;br /&gt;
In general the Bethe-Bloch equation breaks down at low energies (below the Bragg peak)  and is a good description (to within 10%) for &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10 \frac{MeV}{a.m.u.} &amp;lt; E &amp;lt; 2 \frac{GeV}{a.m.u.}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; &amp;lt; 26 (Iron)  : a.m.u = Atomic Mass Unit&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\frac{1}{\beta^2}&amp;lt;/math&amp;gt; term in the Bethe-Bloch equation dominates between the Bragg peak and the minimum ionization region.&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\ln&amp;lt;/math&amp;gt; term and its corrections influence the dependence of  &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; as you move up in energy beyond the minimum ionization point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Energy Straggling ===&lt;br /&gt;
&lt;br /&gt;
While the Bethe-Bloch formula gives you a way to quantify the amount of energy a heavy charged particle  loses as a function of the distance traveled, you should realize that when you calculate the total energy lost via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta E = \int_{E_i}^{E_f} \left ( \frac{dE}{dx} \right ) dx&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you are only determining the AVERAGE energy loss.  In other words, Bethe-Bloch is the Astochastic process describing energy loss.&lt;br /&gt;
&lt;br /&gt;
In reality the energy loss process is a stochastic process because of the statistical fluctuations which occur in the actual number of collisions which take place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Thick Absorber ====&lt;br /&gt;
&lt;br /&gt;
A thick absorber is one in which a large number of collisions takes place.   In this situation the central limit theorem from statistics tells you that the larger the number of random variable samples , &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, involved the more the observable will follow a Gaussian distribution. The Gaussian distribution is a good approximation to the binomial distribution when the number of trials is large.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Binomial_with_Large_N_becomes_Gaussian]]&lt;br /&gt;
&lt;br /&gt;
, and to a Poisson distribution when the mean is a lot larger than 1.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Gaussian_approximation_to_Poisson_when]]&lt;br /&gt;
&lt;br /&gt;
The gaussian probability function is defined as &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto e^{\frac{(\Delta - \bar{\Delta})^2}{ \sigma^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Full Width at Half Max (FWHM) of the distribution = &amp;lt;math&amp;gt;\left ( 2 \sqrt{2 \ln 2} \right ) \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of energy loss, the variance using the Bethe-Bloch equation should be &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_0^2 = 4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the realitivistic variance is &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 = [\frac{1-\beta^2/2}{1-\beta^2} ]\sigma_0^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for very thick absorbers see&lt;br /&gt;
&lt;br /&gt;
C. Tschaler, NIM '''64''', (1968) 237 ; ''ibid'', '''61''', (1968) 141&lt;br /&gt;
&lt;br /&gt;
When simulating energy loss of heavy charged particles the Bethe-Bloch equation may be used to calculate a &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; which can determine the average energy loss at the given kinetic energy of the particle.  This average is then smeared according to a gaussian distribution of variance &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 =4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x [\frac{1-\beta^2/2}{1-\beta^2} ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Thin Absorbers====&lt;br /&gt;
&lt;br /&gt;
In thin absorbers the number of collisions is small preventing the use of the central limit theorem to describe the stochastic process of energy loss in terms of a Gaussian distribution.  The large energy transfers that are possible cause the energy loss distribution to look like a Gaussian  with a high energy tail (or foot).&lt;br /&gt;
&lt;br /&gt;
The skewness of the resulting energy loss distribution is quantified as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\kappa = \frac{\bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta  \equiv 2 \pi N_a r_e^2 m_e c^2 \rho \frac{Z}{A} \left ( \frac{z}{\beta}\right)^2 x &amp;lt;/math&amp;gt; = lead term in Bethe Bloch equation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt; = density of absorbing material.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right ) \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; = max energy transfered in 1 collision (headon / knock out collision)&lt;br /&gt;
&lt;br /&gt;
This comes from the relativistic kinematics of an Elastic Collision.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:SPIM_ThinAbsorbers_Scatering.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\gamma = \frac{E_{tot}}{Mc^2} = \frac{ \sqrt{(pc)^2 + (Mc^2)^2}}{Mc^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\beta= \frac{pc}{\gamma Mc^2} = \frac{pc}{E_{tot}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = E_{tot} - Mc^2 = \gamma Mc^2 - Mc^2 = (\gamma - 1 ) Mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = \sqrt{(pc)^2 + (Mc^2)^2} - Mc^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;   (p^{\prime}c)^2 = E_k^2 + 2E_km_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conservation of Momentum &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{p} = \vec{p}^{\; \prime \prime} + \vec{p}^{\; \prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conservation of Energy &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_{tot} + m_ec^2 = E_{tot}^{\prime \prime} + E_{tot}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sqrt{(pc)^2 + (Mc^2)^2} + m_ec^2 = \sqrt{(p^{\; \prime \prime} c)^2 + (Mc^2)^2}  + E_k +  m_e c^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using conservation of E &amp;amp; P as well as substituting for &amp;lt;math&amp;gt;p^{\prime}&amp;lt;/math&amp;gt; you can show&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(p^{\; \prime \prime}c)^2 = (pc)^2 - 2E_k\sqrt{(pc)^2 +(Mc^2)^2} + E_k^2&amp;lt;/math&amp;gt; : cons of E&lt;br /&gt;
:&amp;lt;math&amp;gt;= (pc)^2 + E_k^2 + 2E_km_ec^2 -2pc\sqrt{E_k^2+2E_km_ec^2} \cos(\theta)&amp;lt;/math&amp;gt; : cons of P&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;pc \cos(\theta) \sqrt{1+\frac{2m_ec^2}{E_k}} = \sqrt{(pc)^2+(Mc^2)^2} + m_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;E_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_k = \frac{2m_ec^2(pc)^2\cos^2 (\theta)}{[\sqrt{(pc)^2 + (Mc^2)^2} +m_ec^2]^2 - (pc)^2 \cos^2 (\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== (Landau Theory) =====&lt;br /&gt;
&amp;lt;math&amp;gt;\kappa \leq 0.01&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Landau assumed&lt;br /&gt;
:# &amp;lt;math&amp;gt;W_{max} = \infty&amp;lt;/math&amp;gt; is max energy transfer&lt;br /&gt;
:# electrons are free (energy transfer is so large you can neglect binding)&lt;br /&gt;
:# incident particle maintains velocity (large momentum transfer from big mass to small mass) (bowling ball hits ping pong ball)&lt;br /&gt;
&lt;br /&gt;
L. Landau, &amp;quot;On the Energy Loss of Fast Particles by Ionization&amp;quot;, J. Phys., vol 8 (1944), pg 201&lt;br /&gt;
&lt;br /&gt;
instead of a gaussian distribution Landau used&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto \frac{1}{\bar{\Delta}\pi} \int_0^{\infty} e^{-u \ln u - u \lambda} \sin(\pi u) du&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda = \frac{1}{\bar{\Delta}} \left [ \Delta - \bar{\Delta} \ln \bar{\Delta} - \ln \epsilon + 1 -C \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\bar{\Delta} = 2\pi N_a r_e^2 m_e c^2 \rho \frac{Zz^2}{A \beta^2}x&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln \epsilon = \ln \left [ \frac{(1-\beta^2)I^2}{2m_ec^2 \beta^2} \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Landau_ThinAbsorberDist.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== (Vavilou's Theory) =====&lt;br /&gt;
&lt;br /&gt;
Vavilous paper&lt;br /&gt;
&lt;br /&gt;
P.V. Vavilou, &amp;quot;Ionization losses of High Energy Heavy Particles&amp;quot;, Soviet Physics JETP, vol 5 (1950? )pg 749&lt;br /&gt;
&lt;br /&gt;
describe the physics for the case &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;0.01 &amp;lt; \kappa &amp;lt; \infty &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution function derived is shown below as well as a conceptual overlay of Vavilou's and Landau's distributions.  (The &amp;lt;math&amp;gt;\zeta f(x,\Delta)&amp;lt;/math&amp;gt; in the picture should be a &amp;lt;math&amp;gt;\bar{\Delta}P(x,\Delta)&amp;lt;/math&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) = \frac{1}{\bar{\Delta}\pi} x e^{x(1+\beta^2C)} \int_0^{\infty} e^{xf_1} \cos(y \lambda_1 + xf_2) dy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f_1 = \beta^2 \left [ \ln(y) - C_i(y)\right ] - \cos(y) - y S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f_2 = y\left [ \ln(y) - C_i(y)\right ] + \sin(y) + \beta^2  S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C_i(y) \equiv - \int_y^{\infty} \frac{\cos(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;S_i(y) \equiv \int_0^{y} \frac{\sin(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Vavilou_Landau_ThinAbsorber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation ====&lt;br /&gt;
&lt;br /&gt;
GEANT 4 uses the skewness parameter &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; to determine if it will use a &amp;quot;fluctuations model&amp;quot; to calculate energy straggling or the gaussian model described in section 3.2.1.&lt;br /&gt;
&lt;br /&gt;
===== kappa &amp;gt; 10 =====&lt;br /&gt;
If &lt;br /&gt;
: &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt; &amp;gt; 10 &lt;br /&gt;
and we have a thick absorber ( large step size) then the Gausian function in 3.2.1 is used to calculate energy straggling.&lt;br /&gt;
&lt;br /&gt;
What happens is &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; is calculated via &amp;lt;math&amp;gt;\int_{E_i}^{E_f} \frac{dE}{dx} dx&amp;lt;/math&amp;gt; then the actual energy loss predicted by the simulation is chosen from a Gaussian distribution to account for energy straggling such that the &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; of this Gaussian distribution is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma^2 = 2 \pi r_e^2m_ec^2N_{el} \frac{Z_h}{\beta^2} T_C s (1 - \frac{\beta^2}{2})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N_{el}&amp;lt;/math&amp;gt; = electron density of the medium&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_h&amp;lt;/math&amp;gt; = charge of the incident particle&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = step size&lt;br /&gt;
:&amp;lt;math&amp;gt; T_C&amp;lt;/math&amp;gt; = cutoff kinetic energy for &amp;lt;math&amp;gt;\delta &amp;lt;/math&amp;gt;-electrons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_C&amp;lt;/math&amp;gt; tells GEANT where to put the cutoff for using the Gaussian distribution for energy straggling.  This tells the simulation the low energy cutoff where Bethe-Bloch starts to fail due to ionization.&lt;br /&gt;
&lt;br /&gt;
=====Delta-electrons =====&lt;br /&gt;
What is a &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electron?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons are also known as &amp;quot;knock -on&amp;quot; electrons or delta rays.&lt;br /&gt;
&lt;br /&gt;
As heavy particles traverse a medium they can ionize electrons from atoms.  The ejected electrons (&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons) can be given enough energy to ionize as well.&lt;br /&gt;
&lt;br /&gt;
In a cloud chamber (a supercooled volume of super saturated water vapor which ionizes as charged particles pass through)  such and event would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_DeltaRay_CloudChamber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
The blue spiral in the above gas chamber picture is a high energy electron ejected from a collision that spirals in the B-field ejecting low energy electrons at the end.  The B-field is directed out of the picture.&lt;br /&gt;
&lt;br /&gt;
The physics of ionization is different from the physics used to calculate Bethe-Bloch energy loss.  Remember Bethe-Bloch  starts to break down at low energies below the Bragg peak.  &lt;br /&gt;
&lt;br /&gt;
Because of this GEANT 4 sets the cutoff for this process to be&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;T_{cut}&amp;lt;/math&amp;gt; &amp;gt; 1 keV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:  The BE energies of an electron in Hydrogen is 13.6 ev and the electrons in Argon have binding energies between 15.7 eV and 3.2 keV.&lt;br /&gt;
&lt;br /&gt;
===== Fluctuations Model: kappa &amp;lt; 10=====&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}} &amp;lt; \frac{\Delta E}{T_C}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then GEANT 4 uses a &amp;quot;Fluctuations Model&amp;quot; to determine energy loss instead of Bethe-Bloch.&lt;br /&gt;
&lt;br /&gt;
; Fluctuations Model&lt;br /&gt;
:# the atom is assumed to have 2 energy levels &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:# you can excite the atom and lose either &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt; or you can ionize the atom and lose energy according to a &amp;lt;math&amp;gt;\frac{1}{E^2}&amp;lt;/math&amp;gt; function &amp;lt;math&amp;gt;u_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total energy loss in a step will be &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \Delta E_{exc} + \Delta E_{ion}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{exc} = \eta_1 E_1 + \eta_2 E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{ion} = \sum_{j=1}^{\eta_3} \frac{I}{1 - u_j \frac{T_{up}-I}{T_{up}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\eta_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\eta_2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\eta_3&amp;lt;/math&amp;gt; are the number of collisions which are sampled from a poison distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;u_j = \int_{I}^{E_j} \frac{I T_{up}}{T_{up} - I} \frac{dx}{x^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_j = \frac{I}{1- rand  \frac{T_{up}-1}{T_{up}}}&amp;lt;/math&amp;gt; : rand = random number between 0 and 1&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T_{up} = \left \{  {~ 1 keV \;  threshold \;energy \;for \; \delta- ray \; production \atop T_{max} \; \;\;\; if \; T_{max} &amp;lt; 1 keV} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; = mean ionization energy&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_2 \approx (10 eV) Z^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln E_1 = \frac{\ln (I) - f_2 \ln (E_2)}{f_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1 + f_2 =1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2 =\left \{  {0 \; z=1 \atop \frac{2}{z} \; z \ge 2} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fluctuation model was comparted with data in &lt;br /&gt;
&lt;br /&gt;
K. Lassila-Perini and L. Urban, NIM, A362 (1995) pg 416&lt;br /&gt;
&lt;br /&gt;
The cross sections used for excitation and ionization may be found in &lt;br /&gt;
&lt;br /&gt;
H. Bichel, Rev. Mod. Phys., vol 60 (1988) pg 663&lt;br /&gt;
&lt;br /&gt;
=== Range Straggling===&lt;br /&gt;
&lt;br /&gt;
;Def of Range (R):&lt;br /&gt;
: The distance traveled before all the particles energy is lost.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;R \equiv \int_0^T \frac{dE}{\frac{dE}{dx}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:  = theoretical calculation of the path length traveled by a particle of incident energy &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note units: &amp;lt;math&amp;gt;\left [ R \right ] =  \frac{g}{cm^2} ; \left [ \frac{dE}{dx} \right ] = \frac{MeV \cdot cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the Energy Straggling introduced in the previous section can explain why identical particles penetrate material to different depths.   The energy straggling results in Range straggling.&lt;br /&gt;
&lt;br /&gt;
If we do a shielding experiment where we have a source of incident particles of energy E and we count how many &amp;quot;punch&amp;quot; through a material of thickness (x) we would see a transmission coefficient &amp;lt;math&amp;gt;\left ( \frac{N_{out}}{N_{in}} \right) &amp;lt;/math&amp;gt; which would look like&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStraggling.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
====Fractional Range Straggling ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \equiv&amp;lt;/math&amp;gt; fractional range straggling&lt;br /&gt;
&lt;br /&gt;
Assuming the energy loss of a non-relativistic heavy ion through matter follows a Gaussian (thick absorber)&lt;br /&gt;
&lt;br /&gt;
Then it can be shown that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{M}{A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; = mass of the target electrons&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; = atomic mass of the Projectile&lt;br /&gt;
&lt;br /&gt;
since &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e = 9.11 \times 10^{-31}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
: 1 a.m.u. = &amp;lt;math&amp;gt;1.66 \times 10^{-27}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{9.11 \times 10^{-31}}{1.66 \times 10^{-27}A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: = 1.17 % if using a proton (A=1)&lt;br /&gt;
&lt;br /&gt;
The above is a &amp;quot;back of the envelope&amp;quot; estimate.  The experimentally measured values for Cu, Al, and Be target using a proton projectile are &lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStrag_SigmaR_overR.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
If the incident projectile is an electron then &amp;lt;math&amp;gt;\frac{\sigma_R}{R}  \approx \frac{1}{2}&amp;lt;/math&amp;gt; making electron range straggling a vague concept.&lt;br /&gt;
&lt;br /&gt;
There are several definitions of electron range&lt;br /&gt;
&lt;br /&gt;
;1.) Maximum Range (&amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:This range is defined using the continuous slowing down approximation (CSDA) where electrons are assumed to have many collisions over very small distances making it appear to be continuous energy loss instead of discrete.  The range is then calculated by integrating over these average energy losses &amp;lt;math&amp;gt;\frac{dE}{dx} \cdot s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;2.) Practical Range (&amp;lt;math&amp;gt;R_P&amp;lt;/math&amp;gt;):&lt;br /&gt;
: This stopping distance is defined by extrapolating the electron transmission curve to zero (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PracticalRangStraggline_4Electrons.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
=== Electron Capture and Loss ===&lt;br /&gt;
====Bohr Criterion====&lt;br /&gt;
:&amp;quot;A rapidly moving nucleus is fully ionized if its velocity exceeds that of its most tightly bound electron&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Bohr Model:&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow E = \frac{mz^2e^4}{8 \epsilon_0^2 h^2 n^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the inner most electron (&amp;lt;math&amp;gt;n=1&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
:Electron K.E. = &amp;lt;math&amp;gt;\frac{1}{2} mv^2 = \frac{mz^2e^4}{2(4\pi \epsilon_0)^2 \hbar^2} \Rightarrow v = \frac{z e^2}{4 \pi \epsilon_0 \hbar}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:the fine structure constant &amp;lt;math&amp;gt;\alpha \equiv \frac{e^2}{4 \pi \epsilon_0 \hbar c} = \frac{1}{137}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; v = zc \alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;v &amp;gt; zc \alpha&amp;lt;/math&amp;gt; the nucleus is fully ionized&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;\frac{z}{v/c} = \frac{z}{\beta} &amp;lt; \frac{1}{\alpha} = 137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively if the ion is moving through a material with a speed such that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{z}{\beta} &amp;gt; \frac{1}{\alpha} =137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then electrons may be captured by the projectile and lost by the target.&lt;br /&gt;
&lt;br /&gt;
==== Z-effective====&lt;br /&gt;
Describing the charge state of your heavy ion traveling through matter at a velocity below the Bohr criterion is very complicated.  There is a competition between electron capture and loss.  Accurate cross sections are needed to simulate the process reliably.&lt;br /&gt;
&lt;br /&gt;
Some insight into this process can be found using the Thomas-Fermi model &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;V \propto \frac{Ze^{-r/a}}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to describe an atom moving slow enough so it has captured many electrons but fast enough so its not neutral.  In the Thomas-Fermi model the distribution of electrons in an atom is described as being uniformly distributed such that there are 2 electrons in each discrete volume of phase space( the space in which all possible states of a system are represented)  defined using planks constant as &amp;lt;math&amp;gt;h^3&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
For the purpose of simulations you would like a relationship for &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
It is usually adequate to use fits for empirical data as long as we know that we are in the kinematic range in which those fits are valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when &amp;lt;math&amp;gt;E &amp;lt; 10&amp;lt;/math&amp;gt; MeV the data indicates that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Z_{eff} = Z(1 - e^{-\beta\frac{B}{Z^{2/3}}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;B = 130 \pm 5&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_{eff} \equiv&amp;lt;/math&amp;gt; effective charge f the projectile = &amp;lt;math&amp;gt;Z - \bar{q}_c&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = number of protons&lt;br /&gt;
:&amp;lt;math&amp;gt;\bar{q}_c&amp;lt;/math&amp;gt; = average number of captured electrons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''When calculating stopping power for E &amp;lt; 10 MeV you use &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in the Bethe-Bloch equation.'''&lt;br /&gt;
&lt;br /&gt;
Note:  As the ions charge state fluctuates while it slows down (or if accelerated through materials) you will need to recalculate the energy loss, and as a result you will get larger energy loss fluctuations in this energy range.&lt;br /&gt;
&lt;br /&gt;
For thin absorber you will look for stripping and loss cross sections.&lt;br /&gt;
&lt;br /&gt;
: Here a thin absorber is one whose thickness is less than the charge equilibrium distance defined as the distance traveled until the projectile's velocity is &amp;lt;math&amp;gt; v \ll zc\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rule of thumb is that a thin absorber for low energy ions has a thickness &amp;lt;math&amp;gt;\le \frac{5 \frac{\mu g}{cm^2}}{\rho}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For thick absorbers:  The experimentally determined expression for the change in &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta Z_{eff} = \frac{1}{2} \sqrt{ \left [  Z_{eff} \left (1 - \frac{Z_{eff}}{Z} \right )^{1.67}\right ] }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Scattering ===&lt;br /&gt;
&lt;br /&gt;
The Bethe-Bloch equation tells us how much energy is lost and GEANT4s calculation of this energy is described above.&lt;br /&gt;
&lt;br /&gt;
Now we need to know which direction the scattered particle goes after it has lost this energy.&lt;br /&gt;
&lt;br /&gt;
The work of Moliere describes the angular deflection of the particle which lost the energy thereby leading to a prediction of the Cross-section.  GEANT4 though uses the more complete Lewis theory to describe Multiple Coulomb Scattering (MCS) sometimes generically referred to as multiple scattering.&lt;br /&gt;
&lt;br /&gt;
There are 3 regions in which coulomb scattering is calculated&lt;br /&gt;
&lt;br /&gt;
; 1.) Single Scattering:&lt;br /&gt;
: For thin materials.&lt;br /&gt;
: If the probability of more than 1 coulomb scattering is small &lt;br /&gt;
:Then use the Rutherford formula for &amp;lt;math&amp;gt;\frac{d \sigma}{d \Omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;2.)Multiple Scattering:&lt;br /&gt;
: In this case the number of independent scatterings is large (N &amp;gt; 20) and the energy loss is small such that the problem can be treated statisticaly to obtain a probability distribution for the net deflection angle &amp;lt;math&amp;gt; [P(\theta)]&amp;lt;/math&amp;gt; as a function of the material thickness that is traversed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;3.) Plural Scattering:&lt;br /&gt;
: If 1&amp;lt; N &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; 20 then you can't use Rutherford to describe the scattering nor use a normal random statistical description.&lt;br /&gt;
&lt;br /&gt;
see E. Keil, Z. Naturforsch, vol 15 (1960), pg 1031&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews of rigorous multiple scattering calculations may be found in &lt;br /&gt;
: P.C. Hemmer, et. al., Phys. Rev, vol 168 (1968), pg 294&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation of MSC (N&amp;gt;20) ====&lt;br /&gt;
&lt;br /&gt;
GEANT4 models MSC when N&amp;gt;20 using model functions to determine the angular and spatial distributions chosen to give the same moments of these distributions as the Lewis theory.&lt;br /&gt;
&lt;br /&gt;
:H.W. Lewis, Phys. Rev., vol 78 (1950), pg 526&lt;br /&gt;
&lt;br /&gt;
modern versions of the above are at&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
: I. Kawrakow, et. al., NIM, B142 (1998) pg 253&lt;br /&gt;
&lt;br /&gt;
When N&amp;gt;20 multiple scattering can be described as a statistical process using a modified version of the Boltzman transport equation from statistical mechanics.  &lt;br /&gt;
&lt;br /&gt;
;Note: The simulation step size is chosen such that (N&amp;gt;20),  If you have materials so thin that N &amp;lt; 20 then GEANT4 will likely skip the material.  (one way around this is to increase the thickness and change the density).  If the material thickness can't be increased because its sandwhiched between two other materials then you will need to write a special step algorithm for the volume and have GEANT4 use it for the step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) \equiv&amp;lt;/math&amp;gt; the distribution function for a system of incident particles traveling through a material.&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s =&amp;lt;/math&amp;gt; arc length of the particle's path through the material&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{x} =&amp;lt;/math&amp;gt; position of a charged particle&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{v} =&amp;lt;/math&amp;gt; direction of motion of the particle &amp;lt;math&amp;gt;\frac{\vec{v}}{|\vec{v}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multiple scattering experienced by a single charged particle traveling through the material is then simulated by sampling from the distribution &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The governing transport/diffusion equation is based on the continuity equation but with a &amp;quot;sink&amp;quot; term representing the possibility of collisions ejecting particles out of the volume.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f(s,\vec{x},\hat{v} ) }{\partial s} + \hat{v} \bullet \vec{\nabla}f(s,\vec{x},\hat{v} ) = N \int \sigma(\hat{v} \bullet\hat{v}^{\prime} )\left [ f(s,\vec{x},\hat{v}^{\prime} )  - f(s,\vec{x},\hat{v} ) \right ] d \hat{v}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; = number of atoms per volume&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\hat{v} \bullet\hat{v}^{\prime} )&amp;lt;/math&amp;gt; = cross sections for elastic scattering per Solid angle &amp;lt;math&amp;gt;\left ( \frac{d \sigma}{d \Omega} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the above diffusion equation the distribution function, &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt; is expanded in Spherical Harmonics ( &amp;lt;math&amp;gt;Y_{\ell}^m(\theta,\phi)&amp;lt;/math&amp;gt; ) and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; expand  in Legendre Polynomials (&amp;lt;math&amp;gt;P_N(cos \theta)&amp;lt;/math&amp;gt;) since it has no &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; angle dependence.&lt;br /&gt;
&lt;br /&gt;
;Note: For Coulomb Scattering in polar coordinates you can write the potential in terms of Legendre Polynomials such that:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;U=k \frac{q}{r}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{\sqrt{r^2-a^2-2ar \cos \theta}}&amp;lt;/math&amp;gt;  in polar coordinates&lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{r} \sum_{n=0}^{\infty} P_n(\cos \theta) \left ( \frac{a}{r}\right )^n&amp;lt;/math&amp;gt; (the sqrt term above is expanded using binomial series&lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} ) = \sum_{\ell,m} f_{\ell,m}(\vec{x},s) Y_{\ell}^m(\hat{v})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting into the diffusion equation and doing the integral on the righ hand side you get&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f_{\ell,m}(\vec{x},s) }{\partial s} + \frac{f_{\ell,m}(s,\vec{x},\hat{v} }{\lambda_{\ell}} = - \sum_{\lambda, i, j} \vec{\nabla} f_{i,j}(\vec{x},s ) \bullet \int Y_{\ell,m}^{\star} \hat{v} Y_{i,j} d \hat{v} \; \; \; \; \; \; \; \;\hat{v} = f(\theta.\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{1}{\lambda_{\ell}} = 2 \pi N \int_0^{\pi} \left [ 1-P_{\ell}(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt;\ell^{th}&amp;lt;/math&amp;gt; transport mean free path for the &amp;lt;math&amp;gt;f_{\ell}&amp;lt;/math&amp;gt; distribution function ( &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; symmetry is assumed making it &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; independent)&lt;br /&gt;
&lt;br /&gt;
From the above one can find the average distances traveled and the average deflection angle of the distribution.  Again, see :&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moments&amp;quot; of &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) &amp;lt;/math&amp;gt;  are defined as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt; = 2 \pi \int z f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = \lambda_1 \left [ 1-e^{-s/\lambda_1}\right ]&amp;lt;/math&amp;gt; = mean geometrical path length&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;\cos(\theta)&amp;gt; = 2 \pi \int_{-1}^1 \sum_{\ell} P_{\ell}(\cos \theta) \int f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = e^{-s/\lambda_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\lambda_1} = 2 \pi N \int_0^{\pi} \left [ 1-P_1(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are 3 lengths&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq_PathLength.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = geometrical path length between endpoints of the step =&amp;lt;math&amp;gt; \left \{  {line \; if \; \vec{B} = 0 \atop arc \; if \; \vec{B} \ne 0 } \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; = true path length = actual length of the path taken by particle&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt;&amp;lt;/math&amp;gt; - mean geometrical path length along the z-axis&lt;br /&gt;
&lt;br /&gt;
In GEANT4 the &amp;lt;math&amp;gt;\lambda_{\ell}&amp;lt;/math&amp;gt;'s are taken from&lt;br /&gt;
&lt;br /&gt;
If 100 eV &amp;lt; K.E. of electron or positron &amp;lt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:D. Liljequist, J. Applied Phys, vol 62 (1987), 342&lt;br /&gt;
:J. Applied Phys, vol 68 (1990), 3061&lt;br /&gt;
&lt;br /&gt;
If K.E. &amp;gt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:R. Mogol, Atomic Data, Nucl, Data tables, vol 65 (1997) pg 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;z&amp;gt; now known GEANT will try to determine &amp;quot;&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&amp;quot; for the energy loss and scattering calculations.&lt;br /&gt;
&lt;br /&gt;
A model is used for this where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\frac{1}{\alpha} \left [ 1 - (1- \alpha \omega z)^{\frac{1}{\omega}})\right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\omega = 1 + \frac{1}{\alpha \lambda_{10}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\alpha =\left \{  {\frac{\lambda_{10} - \lambda_{11}}{s \lambda_{10}}\;\;\;\; K.E. \ge M_{particle} \atop \frac{1}{R}\;\;\;\; K.E. &amp;lt; M_{particle}} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = stepsize&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda_{10} - \frac{\lambda_1}{1-\alpha s}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_{11} = \lambda_1&amp;lt;/math&amp;gt; at end of strep&lt;br /&gt;
&lt;br /&gt;
while &amp;lt;math&amp;gt;&amp;lt;cos \theta &amp;gt;&amp;lt;/math&amp;gt; is calculable, GEANT4 evaluates &amp;lt;math&amp;gt;\cos (\theta)&amp;lt;/math&amp;gt; from a probability distribution whose general form is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g[\cos(\theta)] = p \left ( qg_1[\cos(\theta)] + (1-q)g_3[\cos(\theta)] \right ) + (1-p)g_2[\cos(\theta)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g_1(x) = C1e^{-a(1-x)}&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;g_2(x) = \frac{C_2}{(b-x)^d}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;g_3(x) = C_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;C_1, C_2, C_3&amp;lt;/math&amp;gt; are normalization constants&lt;br /&gt;
:&amp;lt;math&amp;gt;p,q,a,b,d&amp;lt;/math&amp;gt; are parameters which follow the work reported in &lt;br /&gt;
&lt;br /&gt;
:V.L. Highland, NIM, vol 219 (1975) pg497&lt;br /&gt;
&lt;br /&gt;
The GEANT4 files in version 4.8 were located in &lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MscModel.cc&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130041</id>
		<title>TF SPIM StoppingPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130041"/>
		<updated>2025-02-26T05:42:30Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Delta-electrons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Stopping Power=&lt;br /&gt;
== Bethe Equation ==&lt;br /&gt;
===Classical Energy Loss ===&lt;br /&gt;
&lt;br /&gt;
Consider the energy lost when a particle of charge (&amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt;) traveling at speed &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is scattered by a target of charge (&amp;lt;math&amp;gt;Ze&amp;lt;/math&amp;gt;).  Assume only the coulomb force causes the particle to scatter from the target as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Bethe_ClassCoulScat.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Notice:&lt;br /&gt;
: as &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is scattered the horizontal component of the coulomb force (&amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt;) flips direction; ie net horizontal force for the scattering&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F_{vertical} = k \frac{zZe^2}{r^2} \sin(\theta) = k \frac{zZe^2}{r^2}  \frac{b}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: k =&amp;lt;math&amp;gt;\frac{1}{4 \pi \epsilon_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
: r = distance between incident projectile and target atom&lt;br /&gt;
: b= impact parameter of collision &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the definition of Impulse one can determine the momentum change of &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta p = \int F dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's assume that the energy lost by the incident particle &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is absorbed by an electron in the target atom.  This energy may be cast in terms of the incident particles momentum change as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{(\Delta p)^2}{2m_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By calculating the change in momentum (&amp;lt;math&amp;gt;\Delta p&amp;lt;/math&amp;gt;) of the incident particle we can infer that the energy lost by the incident particle is absorbed by one of the target material's atomic electrons.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta P = \int F dt = \int k \frac{zZe^2b}{r^3}  dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using  &amp;lt;math&amp;gt;dt = \frac{dx}{v} = \frac{d x}{\beta c}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;= k \frac{zZe^2b}{\beta c} \int_{-\infty}^{+\infty} \frac{ dx}{(x^2+b^2)^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{kzZe^2b}{\beta c b^2} \int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x^2}{b^2})^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x}{b^2})^{3/2}}=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2kzZe^2b}{\beta c b^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
casting this in terms of the classical atomic electron radius &amp;lt;math&amp;gt;r_e&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;r_e = \frac{k e^2}{m_e v^2} \sim \frac{k e^2}{m_e c^2}&amp;lt;/math&amp;gt;  just equate &amp;lt;math&amp;gt;F = \frac{ke^2}{r_e^2} = m \frac{v^2}{r_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2zZr_e m_e c}{\beta  b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \frac{(\Delta p)^2}{2m_e} = 2 \left ( \frac{r_e m_e}{\beta b}\right )^2 \frac {z^2 Z^2 c^2}{m_e}&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = 1 here because I shall assume the energy is lost to just the electron and the Atom is a spectator&lt;br /&gt;
&lt;br /&gt;
Now let's calculate an expression representing the AVERAGE energy lost for an incident particle traversing a material of some thickness.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(\Delta E)&amp;lt;/math&amp;gt; = Probability of an interaction taking place which results in an energy loss &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we let&lt;br /&gt;
&lt;br /&gt;
Z  = Atomic Number = # electrons in target Atom = number of protons in an Atom&lt;br /&gt;
&lt;br /&gt;
N = Avagadros number  = &amp;lt;math&amp;gt;6.022 \times 10^{23}  \frac{Atoms}{mol}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A = Atomic mass =  &amp;lt;math&amp;gt;\frac{g}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt;  = probability of hitting an atomic electron in the area of an annulus of radius (&amp;lt;math&amp;gt;b + db&amp;lt;/math&amp;gt;) with an energy transfer between &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta E + d(\Delta E)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;\frac{-dE }{dx}= \int_0^{\infty} dP(\Delta E) \Delta E&amp;lt;/math&amp;gt; = energy lost by the incident particle per distance traversed through the material&lt;br /&gt;
&lt;br /&gt;
I am just adding up all the energy losses weighted by the probability of the energy loss to find the average (total) energy loss.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; :&lt;br /&gt;
: &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; = probability of an energy transfer taking place = probability of an interaction = &amp;lt;math&amp;gt;\frac{N}{A} d \sigma&amp;lt;/math&amp;gt;  [ Atoms &amp;lt;math&amp;gt;cm^2&amp;lt;/math&amp;gt;/g]&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;dP(\Delta E) = \frac{N}{A} d \sigma =\frac{N}{A} (2 \pi b db) Z&amp;lt;/math&amp;gt; &lt;br /&gt;
:In practice &amp;lt;math&amp;gt; \sigma&amp;lt;/math&amp;gt; is a measured cross-section which is a function of energy.&lt;br /&gt;
:classically &amp;lt;math&amp;gt;\sigma = \pi b^2 ; d \sigma = 2\pi b db&amp;lt;/math&amp;gt; so let's use this as a first approximation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{-dE}{dx} =  \int_0^{\infty} \frac{N}{A} (2 \pi b db) Z \Delta E = \frac{2 \pi N Z}{A} \int_0^{\infty} \Delta E b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{2 \pi N Z}{A} \int_0^{\infty} \left [ \frac{2 r_e^2 m_e c^2 z^2}{\beta^2 b^2}\right ] b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;4 \pi N r_e^2 m_e c^2 \frac{z^2 Z}{A \beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
:=&amp;lt;math&amp;gt;\frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\mathcal{K}}{A} = \frac{4 \pi N r_e^2 m_e c^2}{A} = 0.307 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;''' if A=1'''&lt;br /&gt;
&lt;br /&gt;
The limits of the above integral should be more physical in order to reflect the limits of the physics interaction.  Let &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; represent the minimum and maximum possible impact parameter where the physics is described,  as shown above,  by the coulomb force.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;b \rightarrow 0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\frac{d E}{dx}&amp;lt;/math&amp;gt; diverges and the energy transfer &amp;lt;math&amp;gt;\rightarrow \infty : \Delta E \sim \frac{1}{b}&amp;lt;/math&amp;gt;.  Physically there is a maximum energy that may be transferred before the physics of the problem changes (ie: nuclear excitation, jet production, ...).  The de Borglie wavelength of the atom is used to estimate a value for &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt; such that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;b_{min} \sim  \frac{1}{2} \lambda_{de Broglie} = \frac{h}{2p} = \frac{h}{2 \gamma m_e \beta c}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
As &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger the interaction is &amp;quot;softer&amp;quot; and longer.  If the interaction time (&amp;lt;math&amp;gt;\tau_i&amp;lt;/math&amp;gt;) is so long that it is equivalent to an electron orbit (&amp;lt;math&amp;gt;\tau_R&amp;lt;/math&amp;gt;) then the atom looks more like it is neutrally charged.  You move from an interaction in which the electron orbit is perturbed adiabatically such that there is no orbit change and the minimum amount of energy is transferred to no interaction taking place because the atom is neutral.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_i = \frac{b_{max}}{v} (\sqrt{1-\beta^2})&amp;lt;/math&amp;gt;  : fields at high velocities get Lorentz contracted&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_R \equiv \frac{h}{I}&amp;lt;/math&amp;gt; : I &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt; mean excitation energy of target material ( &amp;lt;math&amp;gt;E = h \nu = h/ \tau&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Condition for &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;\tau_i = \tau_R&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow b_{max} = \frac{h \gamma \beta c}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\frac{dE}{dx} = \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{b_{max}}{b_{min}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{2 \gamma^2 m_e \beta^2 c^2}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Find &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; for a 10 MeV proton hitting a liquid hydrogen (&amp;lt;math&amp;gt;LH_2&amp;lt;/math&amp;gt;) target===&lt;br /&gt;
A = Z=z=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;m_e c^2&amp;lt;/math&amp;gt; = 0.511 MeV &amp;lt;br&amp;gt;&lt;br /&gt;
I = 21.8 eV : see gray data point for Liquid &amp;lt;math&amp;gt;H_2&amp;lt;/math&amp;gt; From  Figure 27.5 on pg 6 of [http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG] below.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PDG_IonizationPotential.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
Just need to know &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;a 10 MeV proton&amp;quot; &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; Kinetic Energy (K.E.) = 10 MeV = &amp;lt;math&amp;gt;(\gamma - 1) mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \gamma = \frac{K.E.}{mc^2} + 1 = \frac{10 MeV}{938 MeV} + 1 \sim 1 = \frac{1}{\sqrt{1-\beta^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proton is not relativistic&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;v^2 = \frac{2 K.E.}{m} = \frac{2 \cdot 10 MeV}{938 MeV/c^2} = 2 \times 10^{-2} c^2 \Rightarrow \beta^2 = \frac{v^2}{c^2} = 2\times 10^{-2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plugging in the numbers:&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} = \left ( 0.307 \frac{MeV \cdot cm^2}{g}\right ) (1)^2 (1) \frac{1}{2 \times10^{-2}} \ln \left( \frac{2 (1) (0.511 MeV) (2 \times10^{-2})}{21.8 eV} \frac{10^6 eV}{MeV}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= 105 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;How much energy is lost after 0.3 cm?&lt;br /&gt;
&lt;br /&gt;
'''Notice that the units for energy loss are normalized by the density of the material'''&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_{LH_2}&amp;lt;/math&amp;gt; = 0.07 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the actual energy lost I need to multiply by the density.   So for any given atom the energy loss will depend on the state (solid, gas, liqid) of the atom as this effects the density of the material.  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta E = (105 \frac{MeV cm^2}{g}) (0.07 \frac{g}{cm^3}) (0.3 cm)&amp;lt;/math&amp;gt; = 2.2 MeV&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_HydrogenStoppingPower.pdf]] Compare with Triumf Kinematics Handbook, 2nd edition, September 1987, L.G. Greeniaus&lt;br /&gt;
&lt;br /&gt;
==Bethe-Bloch Equation ==&lt;br /&gt;
&lt;br /&gt;
While the classical equation above works in a limited kinematic regime, the Bethe-Bloch equation includes the corrections needed to cover most kinematic regimes for heavy particle energy loss.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} = \mathcal{K} z^2 \frac{Z}{A} \frac{1}{\beta^2} \left [ \frac{1}{2} \ln \left (\frac{2 m_e c^2 \beta^2 \gamma^2 }{I} \frac{ T_{max}}{I} \right) - \beta^2 - \frac{\delta}{2}\right ]&amp;lt;/math&amp;gt;[http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG reference Eq 27.1 pg 1]&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;T_{max} = \frac{2 m_e c^2 \beta^2 \gamma^2}{1+ \frac{2 \gamma m_e}{M} + \frac{m_e}{M}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= Max K.E. transferable to the Target of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in a single collision.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;-\beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: =  correction for electron spin and very distant collisions which deforms the electron atomic orbits each process reducing dE/dx by &amp;lt;math&amp;gt;\frac{\beta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:= density correction term: in the classical derivation the material is treated as just a system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms uniformly distributed in space.  These Atoms, however, give the material polarizability which can reduce the electric field (dielectric).&lt;br /&gt;
&lt;br /&gt;
== GEANT 4 implementation ==&lt;br /&gt;
&lt;br /&gt;
The GEANT4 file  (version 4.8.p01)&lt;br /&gt;
&lt;br /&gt;
source/processes/electromagnetic/standard/src/G4BetheBlockModel.cc&lt;br /&gt;
&lt;br /&gt;
is used to calculate hadron energy loss.&lt;br /&gt;
&lt;br /&gt;
line 132 (line 257 in version 4.9.5)  &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} =  \log \left ( \frac{2 m_e c^2 \tau (\tau +2) E_{min}}{I^2}\right) - \left (1 - \frac{E_{min}}{E_{max}} \right ) \beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \tau = \frac{K.E.}{M}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 143 (line 267 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \log  ( \tau (\tau + 2) ) -cden&amp;lt;/math&amp;gt; = density corection = &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 148 (line 270 in vers. 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \frac{2c}{Z_{target}}&amp;lt;/math&amp;gt; = shell correction, corrects for the classical asumption that the atomic electron's velocity is initially zero; or the the incident particles velocity is far greater than the atomic electron's velocity.&lt;br /&gt;
&lt;br /&gt;
line 154 (line 273 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} *= \frac{2 \pi m_e c^2 r_e^2 z^2}{\beta^2} \rho_e \;\;\;\; \rho_e \propto \frac{NZ}{A}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Energy Dependence ==&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_EnergyLoss_EnergyDependence.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
The above curve shows the energy loss per distance traveled (&amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt;) as a function of the incident particles energy.  There are three basic regions.  At low incident energies ( &amp;lt; 10^5 eV) the incident particle tends to excite or even ionize the atoms in the material it is penetrating.  The maximum amount of energy loss per distance traveled is defined as the Bragg peak.  The region after the Bragg peak, in which the energy loss per distance traveled reaches its smallest value, is refered to as the point of minimum ionizing.  Minimimum ionizing particles will have incident energies corresponding to this value or larger.  The characteristic of the minimum ionizing particles is that their energy loss per distance traveled is essentially constant making simulations easier until the particle's energy drops below the minimum ionizing energy level as it passes through the material.&lt;br /&gt;
&lt;br /&gt;
In general the Bethe-Bloch equation breaks down at low energies (below the Bragg peak)  and is a good description (to within 10%) for &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10 \frac{MeV}{a.m.u.} &amp;lt; E &amp;lt; 2 \frac{GeV}{a.m.u.}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; &amp;lt; 26 (Iron)  : a.m.u = Atomic Mass Unit&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\frac{1}{\beta^2}&amp;lt;/math&amp;gt; term in the Bethe-Bloch equation dominates between the Bragg peak and the minimum ionization region.&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\ln&amp;lt;/math&amp;gt; term and its corrections influence the dependence of  &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; as you move up in energy beyond the minimum ionization point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Energy Straggling ===&lt;br /&gt;
&lt;br /&gt;
While the Bethe-Bloch formula gives you a way to quantify the amount of energy a heavy charged particle  loses as a function of the distance traveled, you should realize that when you calculate the total energy lost via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta E = \int_{E_i}^{E_f} \left ( \frac{dE}{dx} \right ) dx&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you are only determining the AVERAGE energy loss.  In other words, Bethe-Bloch is the Astochastic process describing energy loss.&lt;br /&gt;
&lt;br /&gt;
In reality the energy loss process is a stochastic process because of the statistical fluctuations which occur in the actual number of collisions which take place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Thick Absorber ====&lt;br /&gt;
&lt;br /&gt;
A thick absorber is one in which a large number of collisions takes place.   In this situation the central limit theorem from statistics tells you that the larger the number of random variable samples , &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, involved the more the observable will follow a Gaussian distribution. The Gaussian distribution is a good approximation to the binomial distribution when the number of trials is large.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Binomial_with_Large_N_becomes_Gaussian]]&lt;br /&gt;
&lt;br /&gt;
, and to a Poisson distribution when the mean is a lot larger than 1.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Gaussian_approximation_to_Poisson_when]]&lt;br /&gt;
&lt;br /&gt;
The gaussian probability function is defined as &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto e^{\frac{(\Delta - \bar{\Delta})^2}{ \sigma^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Full Width at Half Max (FWHM) of the distribution = &amp;lt;math&amp;gt;\left ( 2 \sqrt{2 \ln 2} \right ) \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of energy loss, the variance using the Bethe-Bloch equation should be &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_0^2 = 4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the realitivistic variance is &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 = [\frac{1-\beta^2/2}{1-\beta^2} ]\sigma_0^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for very thick absorbers see&lt;br /&gt;
&lt;br /&gt;
C. Tschaler, NIM '''64''', (1968) 237 ; ''ibid'', '''61''', (1968) 141&lt;br /&gt;
&lt;br /&gt;
When simulating energy loss of heavy charged particles the Bethe-Bloch equation may be used to calculate a &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; which can determine the average energy loss at the given kinetic energy of the particle.  This average is then smeared according to a gaussian distribution of variance &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 =4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x [\frac{1-\beta^2/2}{1-\beta^2} ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Thin Absorbers====&lt;br /&gt;
&lt;br /&gt;
In thin absorbers the number of collisions is small preventing the use of the central limit theorem to describe the stochastic process of energy loss in terms of a Gaussian distribution.  The large energy transfers that are possible cause the energy loss distribution to look like a Gaussian  with a high energy tail (or foot).&lt;br /&gt;
&lt;br /&gt;
The skewness of the resulting energy loss distribution is quantified as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\kappa = \frac{\bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta  \equiv 2 \pi N_a r_e^2 m_e c^2 \rho \frac{Z}{A} \left ( \frac{z}{\beta}\right)^2 x &amp;lt;/math&amp;gt; = lead term in Bethe Bloch equation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt; = density of absorbing material.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right ) \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; = max energy transfered in 1 collision (headon / knock out collision)&lt;br /&gt;
&lt;br /&gt;
This comes from the relativistic kinematics of an Elastic Collision.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:SPIM_ThinAbsorbers_Scatering.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\gamma = \frac{E_{tot}}{Mc^2} = \frac{ \sqrt{(pc)^2 + (Mc^2)^2}}{Mc^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\beta= \frac{pc}{\gamma Mc^2} = \frac{pc}{E_{tot}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = E_{tot} - Mc^2 = \gamma Mc^2 - Mc^2 = (\gamma - 1 ) Mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = \sqrt{(pc)^2 + (Mc^2)^2} - Mc^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;   (p^{\prime}c)^2 = E_k^2 + 2E_km_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conservation of Momentum &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{p} = \vec{p}^{\; \prime \prime} + \vec{p}^{\; \prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conservation of Energy &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_{tot} + m_ec^2 = E_{tot}^{\prime \prime} + E_{tot}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sqrt{(pc)^2 + (Mc^2)^2} + m_ec^2 = \sqrt{(p^{\; \prime \prime} c)^2 + (Mc^2)^2}  + E_k +  m_e c^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using conservation of E &amp;amp; P as well as substituting for &amp;lt;math&amp;gt;p^{\prime}&amp;lt;/math&amp;gt; you can show&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(p^{\; \prime \prime}c)^2 = (pc)^2 - 2E_k\sqrt{(pc)^2 +(Mc^2)^2} + E_k^2&amp;lt;/math&amp;gt; : cons of E&lt;br /&gt;
:&amp;lt;math&amp;gt;= (pc)^2 + E_k^2 + 2E_km_ec^2 -2pc\sqrt{E_k^2+2E_km_ec^2} \cos(\theta)&amp;lt;/math&amp;gt; : cons of P&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;pc \cos(\theta) \sqrt{1+\frac{2m_ec^2}{E_k}} = \sqrt{(pc)^2+(Mc^2)^2} + m_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;E_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_k = \frac{2m_ec^2(pc)^2\cos^2 (\theta)}{[\sqrt{(pc)^2 + (Mc^2)^2} +m_ec^2]^2 - (pc)^2 \cos^2 (\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== (Landau Theory) =====&lt;br /&gt;
&amp;lt;math&amp;gt;\kappa \leq 0.01&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Landau assumed&lt;br /&gt;
:# &amp;lt;math&amp;gt;W_{max} = \infty&amp;lt;/math&amp;gt; is max energy transfer&lt;br /&gt;
:# electrons are free (energy transfer is so large you can neglect binding)&lt;br /&gt;
:# incident particle maintains velocity (large momentum transfer from big mass to small mass) (bowling ball hits ping pong ball)&lt;br /&gt;
&lt;br /&gt;
L. Landau, &amp;quot;On the Energy Loss of Fast Particles by Ionization&amp;quot;, J. Phys., vol 8 (1944), pg 201&lt;br /&gt;
&lt;br /&gt;
instead of a gaussian distribution Landau used&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto \frac{1}{\bar{\Delta}\pi} \int_0^{\infty} e^{-u \ln u - u \lambda} \sin(\pi u) du&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda = \frac{1}{\bar{\Delta}} \left [ \Delta - \bar{\Delta} \ln \bar{\Delta} - \ln \epsilon + 1 -C \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\bar{\Delta} = 2\pi N_a r_e^2 m_e c^2 \rho \frac{Zz^2}{A \beta^2}x&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln \epsilon = \ln \left [ \frac{(1-\beta^2)I^2}{2m_ec^2 \beta^2} \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Landau_ThinAbsorberDist.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== (Vavilou's Theory) =====&lt;br /&gt;
&lt;br /&gt;
Vavilous paper&lt;br /&gt;
&lt;br /&gt;
P.V. Vavilou, &amp;quot;Ionization losses of High Energy Heavy Particles&amp;quot;, Soviet Physics JETP, vol 5 (1950? )pg 749&lt;br /&gt;
&lt;br /&gt;
describe the physics for the case &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;0.01 &amp;lt; \kappa &amp;lt; \infty &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution function derived is shown below as well as a conceptual overlay of Vavilou's and Landau's distributions.  (The &amp;lt;math&amp;gt;\zeta f(x,\Delta)&amp;lt;/math&amp;gt; in the picture should be a &amp;lt;math&amp;gt;\bar{\Delta}P(x,\Delta)&amp;lt;/math&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) = \frac{1}{\bar{\Delta}\pi} x e^{x(1+\beta^2C)} \int_0^{\infty} e^{xf_1} \cos(y \lambda_1 + xf_2) dy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f_1 = \beta^2 \left [ \ln(y) - C_i(y)\right ] - \cos(y) - y S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f_2 = y\left [ \ln(y) - C_i(y)\right ] + \sin(y) + \beta^2  S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C_i(y) \equiv - \int_y^{\infty} \frac{\cos(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;S_i(y) \equiv \int_0^{y} \frac{\sin(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Vavilou_Landau_ThinAbsorber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation ====&lt;br /&gt;
&lt;br /&gt;
GEANT 4 uses the skewness parameter &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; to determine if it will use a &amp;quot;fluctuations model&amp;quot; to calculate energy straggling or the gaussian model described in section 3.2.1.&lt;br /&gt;
&lt;br /&gt;
===== kappa &amp;gt; 10 =====&lt;br /&gt;
If &lt;br /&gt;
: &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt; &amp;gt; 10 &lt;br /&gt;
and we have a thick absorber ( large step size) then the Gausian function in 3.2.1 is used to calculate energy straggling.&lt;br /&gt;
&lt;br /&gt;
What happens is &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; is calculated via &amp;lt;math&amp;gt;\int_{E_i}^{E_f} \frac{dE}{dx} dx&amp;lt;/math&amp;gt; then the actual energy loss predicted by the simulation is chosen from a Gaussian distribution to account for energy straggling such that the &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; of this Gaussian distribution is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma^2 = 2 \pi r_e^2m_ec^2N_{el} \frac{Z_h}{\beta^2} T_C s (1 - \frac{\beta^2}{2})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N_{el}&amp;lt;/math&amp;gt; = electron density of the medium&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_h&amp;lt;/math&amp;gt; = charge of the incident particle&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = step size&lt;br /&gt;
:&amp;lt;math&amp;gt; T_C&amp;lt;/math&amp;gt; = cutoff kinetic energy for &amp;lt;math&amp;gt;\delta &amp;lt;/math&amp;gt;-electrons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_C&amp;lt;/math&amp;gt; tells GEANT where to put the cutoff for using the Gaussian distribution for energy straggling.  This tells the simulation the low energy cutoff where Bethe-Bloch starts to fail due to ionization.&lt;br /&gt;
&lt;br /&gt;
=====Delta-electrons =====&lt;br /&gt;
What is a &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electron?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons are also known as &amp;quot;knock -on&amp;quot; electrons and delta rays.&lt;br /&gt;
&lt;br /&gt;
As heavy particles traverse a medium they can ionize electrons from atoms.  The ejected electrons (&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons) can be given enough energy to ionize as well.&lt;br /&gt;
&lt;br /&gt;
In a cloud chamber (a supercooled volume of super saturated water vapor which ionizes as charged particles pass through)  such and event would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_DeltaRay_CloudChamber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
The blue spiral in the above gas chamber picture is a high energy electron ejected from a collision that spirals in the B-field ejecting low energy electrons at the end.  The B-field is directed out of the picture.&lt;br /&gt;
&lt;br /&gt;
The physics of ionization is different from the physics used to calculate Bethe-Bloch energy loss.  Remember Bethe-Bloch  starts to break down at low energies below the Bragg peak.  &lt;br /&gt;
&lt;br /&gt;
Because of this GEANT 4 sets the cutoff for this process to be&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;T_{cut}&amp;lt;/math&amp;gt; &amp;gt; 1 keV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:  The BE energies of an electron in Hydrogen is 13.6 ev and the electrons in Argon have binding energies between 15.7 eV and 3.2 keV.&lt;br /&gt;
&lt;br /&gt;
===== Fluctuations Model: kappa &amp;lt; 10=====&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}} &amp;lt; \frac{\Delta E}{T_C}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then GEANT 4 uses a &amp;quot;Fluctuations Model&amp;quot; to determine energy loss instead of Bethe-Bloch.&lt;br /&gt;
&lt;br /&gt;
; Fluctuations Model&lt;br /&gt;
:# the atom is assumed to have 2 energy levels &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:# you can excite the atom and lose either &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt; or you can ionize the atom and lose energy according to a &amp;lt;math&amp;gt;\frac{1}{E^2}&amp;lt;/math&amp;gt; function &amp;lt;math&amp;gt;u_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total energy loss in a step will be &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \Delta E_{exc} + \Delta E_{ion}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{exc} = \eta_1 E_1 + \eta_2 E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{ion} = \sum_{j=1}^{\eta_3} \frac{I}{1 - u_j \frac{T_{up}-I}{T_{up}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\eta_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\eta_2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\eta_3&amp;lt;/math&amp;gt; are the number of collisions which are sampled from a poison distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;u_j = \int_{I}^{E_j} \frac{I T_{up}}{T_{up} - I} \frac{dx}{x^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_j = \frac{I}{1- rand  \frac{T_{up}-1}{T_{up}}}&amp;lt;/math&amp;gt; : rand = random number between 0 and 1&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T_{up} = \left \{  {~ 1 keV \;  threshold \;energy \;for \; \delta- ray \; production \atop T_{max} \; \;\;\; if \; T_{max} &amp;lt; 1 keV} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; = mean ionization energy&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_2 \approx (10 eV) Z^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln E_1 = \frac{\ln (I) - f_2 \ln (E_2)}{f_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1 + f_2 =1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2 =\left \{  {0 \; z=1 \atop \frac{2}{z} \; z \ge 2} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fluctuation model was comparted with data in &lt;br /&gt;
&lt;br /&gt;
K. Lassila-Perini and L. Urban, NIM, A362 (1995) pg 416&lt;br /&gt;
&lt;br /&gt;
The cross sections used for excitation and ionization may be found in &lt;br /&gt;
&lt;br /&gt;
H. Bichel, Rev. Mod. Phys., vol 60 (1988) pg 663&lt;br /&gt;
&lt;br /&gt;
=== Range Straggling===&lt;br /&gt;
&lt;br /&gt;
;Def of Range (R):&lt;br /&gt;
: The distance traveled before all the particles energy is lost.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;R \equiv \int_0^T \frac{dE}{\frac{dE}{dx}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:  = theoretical calculation of the path length traveled by a particle of incident energy &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note units: &amp;lt;math&amp;gt;\left [ R \right ] =  \frac{g}{cm^2} ; \left [ \frac{dE}{dx} \right ] = \frac{MeV \cdot cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the Energy Straggling introduced in the previous section can explain why identical particles penetrate material to different depths.   The energy straggling results in Range straggling.&lt;br /&gt;
&lt;br /&gt;
If we do a shielding experiment where we have a source of incident particles of energy E and we count how many &amp;quot;punch&amp;quot; through a material of thickness (x) we would see a transmission coefficient &amp;lt;math&amp;gt;\left ( \frac{N_{out}}{N_{in}} \right) &amp;lt;/math&amp;gt; which would look like&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStraggling.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
====Fractional Range Straggling ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \equiv&amp;lt;/math&amp;gt; fractional range straggling&lt;br /&gt;
&lt;br /&gt;
Assuming the energy loss of a non-relativistic heavy ion through matter follows a Gaussian (thick absorber)&lt;br /&gt;
&lt;br /&gt;
Then it can be shown that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{M}{A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; = mass of the target electrons&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; = atomic mass of the Projectile&lt;br /&gt;
&lt;br /&gt;
since &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e = 9.11 \times 10^{-31}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
: 1 a.m.u. = &amp;lt;math&amp;gt;1.66 \times 10^{-27}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{9.11 \times 10^{-31}}{1.66 \times 10^{-27}A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: = 1.17 % if using a proton (A=1)&lt;br /&gt;
&lt;br /&gt;
The above is a &amp;quot;back of the envelope&amp;quot; estimate.  The experimentally measured values for Cu, Al, and Be target using a proton projectile are &lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStrag_SigmaR_overR.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
If the incident projectile is an electron then &amp;lt;math&amp;gt;\frac{\sigma_R}{R}  \approx \frac{1}{2}&amp;lt;/math&amp;gt; making electron range straggling a vague concept.&lt;br /&gt;
&lt;br /&gt;
There are several definitions of electron range&lt;br /&gt;
&lt;br /&gt;
;1.) Maximum Range (&amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:This range is defined using the continuous slowing down approximation (CSDA) where electrons are assumed to have many collisions over very small distances making it appear to be continuous energy loss instead of discrete.  The range is then calculated by integrating over these average energy losses &amp;lt;math&amp;gt;\frac{dE}{dx} \cdot s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;2.) Practical Range (&amp;lt;math&amp;gt;R_P&amp;lt;/math&amp;gt;):&lt;br /&gt;
: This stopping distance is defined by extrapolating the electron transmission curve to zero (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PracticalRangStraggline_4Electrons.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
=== Electron Capture and Loss ===&lt;br /&gt;
====Bohr Criterion====&lt;br /&gt;
:&amp;quot;A rapidly moving nucleus is fully ionized if its velocity exceeds that of its most tightly bound electron&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Bohr Model:&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow E = \frac{mz^2e^4}{8 \epsilon_0^2 h^2 n^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the inner most electron (&amp;lt;math&amp;gt;n=1&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
:Electron K.E. = &amp;lt;math&amp;gt;\frac{1}{2} mv^2 = \frac{mz^2e^4}{2(4\pi \epsilon_0)^2 \hbar^2} \Rightarrow v = \frac{z e^2}{4 \pi \epsilon_0 \hbar}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:the fine structure constant &amp;lt;math&amp;gt;\alpha \equiv \frac{e^2}{4 \pi \epsilon_0 \hbar c} = \frac{1}{137}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; v = zc \alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;v &amp;gt; zc \alpha&amp;lt;/math&amp;gt; the nucleus is fully ionized&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;\frac{z}{v/c} = \frac{z}{\beta} &amp;lt; \frac{1}{\alpha} = 137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively if the ion is moving through a material with a speed such that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{z}{\beta} &amp;gt; \frac{1}{\alpha} =137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then electrons may be captured by the projectile and lost by the target.&lt;br /&gt;
&lt;br /&gt;
==== Z-effective====&lt;br /&gt;
Describing the charge state of your heavy ion traveling through matter at a velocity below the Bohr criterion is very complicated.  There is a competition between electron capture and loss.  Accurate cross sections are needed to simulate the process reliably.&lt;br /&gt;
&lt;br /&gt;
Some insight into this process can be found using the Thomas-Fermi model &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;V \propto \frac{Ze^{-r/a}}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to describe an atom moving slow enough so it has captured many electrons but fast enough so its not neutral.  In the Thomas-Fermi model the distribution of electrons in an atom is described as being uniformly distributed such that there are 2 electrons in each discrete volume of phase space( the space in which all possible states of a system are represented)  defined using planks constant as &amp;lt;math&amp;gt;h^3&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
For the purpose of simulations you would like a relationship for &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
It is usually adequate to use fits for empirical data as long as we know that we are in the kinematic range in which those fits are valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when &amp;lt;math&amp;gt;E &amp;lt; 10&amp;lt;/math&amp;gt; MeV the data indicates that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Z_{eff} = Z(1 - e^{-\beta\frac{B}{Z^{2/3}}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;B = 130 \pm 5&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_{eff} \equiv&amp;lt;/math&amp;gt; effective charge f the projectile = &amp;lt;math&amp;gt;Z - \bar{q}_c&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = number of protons&lt;br /&gt;
:&amp;lt;math&amp;gt;\bar{q}_c&amp;lt;/math&amp;gt; = average number of captured electrons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''When calculating stopping power for E &amp;lt; 10 MeV you use &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in the Bethe-Bloch equation.'''&lt;br /&gt;
&lt;br /&gt;
Note:  As the ions charge state fluctuates while it slows down (or if accelerated through materials) you will need to recalculate the energy loss, and as a result you will get larger energy loss fluctuations in this energy range.&lt;br /&gt;
&lt;br /&gt;
For thin absorber you will look for stripping and loss cross sections.&lt;br /&gt;
&lt;br /&gt;
: Here a thin absorber is one whose thickness is less than the charge equilibrium distance defined as the distance traveled until the projectile's velocity is &amp;lt;math&amp;gt; v \ll zc\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rule of thumb is that a thin absorber for low energy ions has a thickness &amp;lt;math&amp;gt;\le \frac{5 \frac{\mu g}{cm^2}}{\rho}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For thick absorbers:  The experimentally determined expression for the change in &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta Z_{eff} = \frac{1}{2} \sqrt{ \left [  Z_{eff} \left (1 - \frac{Z_{eff}}{Z} \right )^{1.67}\right ] }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Scattering ===&lt;br /&gt;
&lt;br /&gt;
The Bethe-Bloch equation tells us how much energy is lost and GEANT4s calculation of this energy is described above.&lt;br /&gt;
&lt;br /&gt;
Now we need to know which direction the scattered particle goes after it has lost this energy.&lt;br /&gt;
&lt;br /&gt;
The work of Moliere describes the angular deflection of the particle which lost the energy thereby leading to a prediction of the Cross-section.  GEANT4 though uses the more complete Lewis theory to describe Multiple Coulomb Scattering (MCS) sometimes generically referred to as multiple scattering.&lt;br /&gt;
&lt;br /&gt;
There are 3 regions in which coulomb scattering is calculated&lt;br /&gt;
&lt;br /&gt;
; 1.) Single Scattering:&lt;br /&gt;
: For thin materials.&lt;br /&gt;
: If the probability of more than 1 coulomb scattering is small &lt;br /&gt;
:Then use the Rutherford formula for &amp;lt;math&amp;gt;\frac{d \sigma}{d \Omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;2.)Multiple Scattering:&lt;br /&gt;
: In this case the number of independent scatterings is large (N &amp;gt; 20) and the energy loss is small such that the problem can be treated statisticaly to obtain a probability distribution for the net deflection angle &amp;lt;math&amp;gt; [P(\theta)]&amp;lt;/math&amp;gt; as a function of the material thickness that is traversed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;3.) Plural Scattering:&lt;br /&gt;
: If 1&amp;lt; N &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; 20 then you can't use Rutherford to describe the scattering nor use a normal random statistical description.&lt;br /&gt;
&lt;br /&gt;
see E. Keil, Z. Naturforsch, vol 15 (1960), pg 1031&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews of rigorous multiple scattering calculations may be found in &lt;br /&gt;
: P.C. Hemmer, et. al., Phys. Rev, vol 168 (1968), pg 294&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation of MSC (N&amp;gt;20) ====&lt;br /&gt;
&lt;br /&gt;
GEANT4 models MSC when N&amp;gt;20 using model functions to determine the angular and spatial distributions chosen to give the same moments of these distributions as the Lewis theory.&lt;br /&gt;
&lt;br /&gt;
:H.W. Lewis, Phys. Rev., vol 78 (1950), pg 526&lt;br /&gt;
&lt;br /&gt;
modern versions of the above are at&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
: I. Kawrakow, et. al., NIM, B142 (1998) pg 253&lt;br /&gt;
&lt;br /&gt;
When N&amp;gt;20 multiple scattering can be described as a statistical process using a modified version of the Boltzman transport equation from statistical mechanics.  &lt;br /&gt;
&lt;br /&gt;
;Note: The simulation step size is chosen such that (N&amp;gt;20),  If you have materials so thin that N &amp;lt; 20 then GEANT4 will likely skip the material.  (one way around this is to increase the thickness and change the density).  If the material thickness can't be increased because its sandwhiched between two other materials then you will need to write a special step algorithm for the volume and have GEANT4 use it for the step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) \equiv&amp;lt;/math&amp;gt; the distribution function for a system of incident particles traveling through a material.&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s =&amp;lt;/math&amp;gt; arc length of the particle's path through the material&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{x} =&amp;lt;/math&amp;gt; position of a charged particle&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{v} =&amp;lt;/math&amp;gt; direction of motion of the particle &amp;lt;math&amp;gt;\frac{\vec{v}}{|\vec{v}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multiple scattering experienced by a single charged particle traveling through the material is then simulated by sampling from the distribution &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The governing transport/diffusion equation is based on the continuity equation but with a &amp;quot;sink&amp;quot; term representing the possibility of collisions ejecting particles out of the volume.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f(s,\vec{x},\hat{v} ) }{\partial s} + \hat{v} \bullet \vec{\nabla}f(s,\vec{x},\hat{v} ) = N \int \sigma(\hat{v} \bullet\hat{v}^{\prime} )\left [ f(s,\vec{x},\hat{v}^{\prime} )  - f(s,\vec{x},\hat{v} ) \right ] d \hat{v}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; = number of atoms per volume&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\hat{v} \bullet\hat{v}^{\prime} )&amp;lt;/math&amp;gt; = cross sections for elastic scattering per Solid angle &amp;lt;math&amp;gt;\left ( \frac{d \sigma}{d \Omega} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the above diffusion equation the distribution function, &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt; is expanded in Spherical Harmonics ( &amp;lt;math&amp;gt;Y_{\ell}^m(\theta,\phi)&amp;lt;/math&amp;gt; ) and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; expand  in Legendre Polynomials (&amp;lt;math&amp;gt;P_N(cos \theta)&amp;lt;/math&amp;gt;) since it has no &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; angle dependence.&lt;br /&gt;
&lt;br /&gt;
;Note: For Coulomb Scattering in polar coordinates you can write the potential in terms of Legendre Polynomials such that:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;U=k \frac{q}{r}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{\sqrt{r^2-a^2-2ar \cos \theta}}&amp;lt;/math&amp;gt;  in polar coordinates&lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{r} \sum_{n=0}^{\infty} P_n(\cos \theta) \left ( \frac{a}{r}\right )^n&amp;lt;/math&amp;gt; (the sqrt term above is expanded using binomial series&lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} ) = \sum_{\ell,m} f_{\ell,m}(\vec{x},s) Y_{\ell}^m(\hat{v})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting into the diffusion equation and doing the integral on the righ hand side you get&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f_{\ell,m}(\vec{x},s) }{\partial s} + \frac{f_{\ell,m}(s,\vec{x},\hat{v} }{\lambda_{\ell}} = - \sum_{\lambda, i, j} \vec{\nabla} f_{i,j}(\vec{x},s ) \bullet \int Y_{\ell,m}^{\star} \hat{v} Y_{i,j} d \hat{v} \; \; \; \; \; \; \; \;\hat{v} = f(\theta.\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{1}{\lambda_{\ell}} = 2 \pi N \int_0^{\pi} \left [ 1-P_{\ell}(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt;\ell^{th}&amp;lt;/math&amp;gt; transport mean free path for the &amp;lt;math&amp;gt;f_{\ell}&amp;lt;/math&amp;gt; distribution function ( &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; symmetry is assumed making it &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; independent)&lt;br /&gt;
&lt;br /&gt;
From the above one can find the average distances traveled and the average deflection angle of the distribution.  Again, see :&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moments&amp;quot; of &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) &amp;lt;/math&amp;gt;  are defined as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt; = 2 \pi \int z f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = \lambda_1 \left [ 1-e^{-s/\lambda_1}\right ]&amp;lt;/math&amp;gt; = mean geometrical path length&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;\cos(\theta)&amp;gt; = 2 \pi \int_{-1}^1 \sum_{\ell} P_{\ell}(\cos \theta) \int f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = e^{-s/\lambda_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\lambda_1} = 2 \pi N \int_0^{\pi} \left [ 1-P_1(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are 3 lengths&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq_PathLength.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = geometrical path length between endpoints of the step =&amp;lt;math&amp;gt; \left \{  {line \; if \; \vec{B} = 0 \atop arc \; if \; \vec{B} \ne 0 } \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; = true path length = actual length of the path taken by particle&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt;&amp;lt;/math&amp;gt; - mean geometrical path length along the z-axis&lt;br /&gt;
&lt;br /&gt;
In GEANT4 the &amp;lt;math&amp;gt;\lambda_{\ell}&amp;lt;/math&amp;gt;'s are taken from&lt;br /&gt;
&lt;br /&gt;
If 100 eV &amp;lt; K.E. of electron or positron &amp;lt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:D. Liljequist, J. Applied Phys, vol 62 (1987), 342&lt;br /&gt;
:J. Applied Phys, vol 68 (1990), 3061&lt;br /&gt;
&lt;br /&gt;
If K.E. &amp;gt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:R. Mogol, Atomic Data, Nucl, Data tables, vol 65 (1997) pg 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;z&amp;gt; now known GEANT will try to determine &amp;quot;&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&amp;quot; for the energy loss and scattering calculations.&lt;br /&gt;
&lt;br /&gt;
A model is used for this where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\frac{1}{\alpha} \left [ 1 - (1- \alpha \omega z)^{\frac{1}{\omega}})\right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\omega = 1 + \frac{1}{\alpha \lambda_{10}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\alpha =\left \{  {\frac{\lambda_{10} - \lambda_{11}}{s \lambda_{10}}\;\;\;\; K.E. \ge M_{particle} \atop \frac{1}{R}\;\;\;\; K.E. &amp;lt; M_{particle}} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = stepsize&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda_{10} - \frac{\lambda_1}{1-\alpha s}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_{11} = \lambda_1&amp;lt;/math&amp;gt; at end of strep&lt;br /&gt;
&lt;br /&gt;
while &amp;lt;math&amp;gt;&amp;lt;cos \theta &amp;gt;&amp;lt;/math&amp;gt; is calculable, GEANT4 evaluates &amp;lt;math&amp;gt;\cos (\theta)&amp;lt;/math&amp;gt; from a probability distribution whose general form is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g[\cos(\theta)] = p \left ( qg_1[\cos(\theta)] + (1-q)g_3[\cos(\theta)] \right ) + (1-p)g_2[\cos(\theta)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g_1(x) = C1e^{-a(1-x)}&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;g_2(x) = \frac{C_2}{(b-x)^d}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;g_3(x) = C_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;C_1, C_2, C_3&amp;lt;/math&amp;gt; are normalization constants&lt;br /&gt;
:&amp;lt;math&amp;gt;p,q,a,b,d&amp;lt;/math&amp;gt; are parameters which follow the work reported in &lt;br /&gt;
&lt;br /&gt;
:V.L. Highland, NIM, vol 219 (1975) pg497&lt;br /&gt;
&lt;br /&gt;
The GEANT4 files in version 4.8 were located in &lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MscModel.cc&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130040</id>
		<title>TF SPIM StoppingPower</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_StoppingPower&amp;diff=130040"/>
		<updated>2025-02-26T05:37:54Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Fluctuations Model: kappa &amp;lt; 10 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Stopping Power=&lt;br /&gt;
== Bethe Equation ==&lt;br /&gt;
===Classical Energy Loss ===&lt;br /&gt;
&lt;br /&gt;
Consider the energy lost when a particle of charge (&amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt;) traveling at speed &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is scattered by a target of charge (&amp;lt;math&amp;gt;Ze&amp;lt;/math&amp;gt;).  Assume only the coulomb force causes the particle to scatter from the target as shown below.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Bethe_ClassCoulScat.jpg]]&lt;br /&gt;
&lt;br /&gt;
; Notice:&lt;br /&gt;
: as &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is scattered the horizontal component of the coulomb force (&amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt;) flips direction; ie net horizontal force for the scattering&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;F_{vertical} = k \frac{zZe^2}{r^2} \sin(\theta) = k \frac{zZe^2}{r^2}  \frac{b}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: k =&amp;lt;math&amp;gt;\frac{1}{4 \pi \epsilon_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
: r = distance between incident projectile and target atom&lt;br /&gt;
: b= impact parameter of collision &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the definition of Impulse one can determine the momentum change of &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta p = \int F dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's assume that the energy lost by the incident particle &amp;lt;math&amp;gt;ze&amp;lt;/math&amp;gt; is absorbed by an electron in the target atom.  This energy may be cast in terms of the incident particles momentum change as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{(\Delta p)^2}{2m_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By calculating the change in momentum (&amp;lt;math&amp;gt;\Delta p&amp;lt;/math&amp;gt;) of the incident particle we can infer that the energy lost by the incident particle is absorbed by one of the target material's atomic electrons.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta P = \int F dt = \int k \frac{zZe^2b}{r^3}  dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using  &amp;lt;math&amp;gt;dt = \frac{dx}{v} = \frac{d x}{\beta c}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;= k \frac{zZe^2b}{\beta c} \int_{-\infty}^{+\infty} \frac{ dx}{(x^2+b^2)^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{kzZe^2b}{\beta c b^2} \int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x^2}{b^2})^{3/2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\int_{-\infty}^{+\infty} \frac{ dx/b}{(1+\frac{x}{b^2})^{3/2}}=2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2kzZe^2b}{\beta c b^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
casting this in terms of the classical atomic electron radius &amp;lt;math&amp;gt;r_e&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;r_e = \frac{k e^2}{m_e v^2} \sim \frac{k e^2}{m_e c^2}&amp;lt;/math&amp;gt;  just equate &amp;lt;math&amp;gt;F = \frac{ke^2}{r_e^2} = m \frac{v^2}{r_e}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta p = \frac{2zZr_e m_e c}{\beta  b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \frac{(\Delta p)^2}{2m_e} = 2 \left ( \frac{r_e m_e}{\beta b}\right )^2 \frac {z^2 Z^2 c^2}{m_e}&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = 1 here because I shall assume the energy is lost to just the electron and the Atom is a spectator&lt;br /&gt;
&lt;br /&gt;
Now let's calculate an expression representing the AVERAGE energy lost for an incident particle traversing a material of some thickness.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(\Delta E)&amp;lt;/math&amp;gt; = Probability of an interaction taking place which results in an energy loss &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we let&lt;br /&gt;
&lt;br /&gt;
Z  = Atomic Number = # electrons in target Atom = number of protons in an Atom&lt;br /&gt;
&lt;br /&gt;
N = Avagadros number  = &amp;lt;math&amp;gt;6.022 \times 10^{23}  \frac{Atoms}{mol}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A = Atomic mass =  &amp;lt;math&amp;gt;\frac{g}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt;  = probability of hitting an atomic electron in the area of an annulus of radius (&amp;lt;math&amp;gt;b + db&amp;lt;/math&amp;gt;) with an energy transfer between &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta E + d(\Delta E)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;\frac{-dE }{dx}= \int_0^{\infty} dP(\Delta E) \Delta E&amp;lt;/math&amp;gt; = energy lost by the incident particle per distance traversed through the material&lt;br /&gt;
&lt;br /&gt;
I am just adding up all the energy losses weighted by the probability of the energy loss to find the average (total) energy loss.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; :&lt;br /&gt;
: &amp;lt;math&amp;gt;dP(\Delta E)&amp;lt;/math&amp;gt; = probability of an energy transfer taking place = probability of an interaction = &amp;lt;math&amp;gt;\frac{N}{A} d \sigma&amp;lt;/math&amp;gt;  [ Atoms &amp;lt;math&amp;gt;cm^2&amp;lt;/math&amp;gt;/g]&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;dP(\Delta E) = \frac{N}{A} d \sigma =\frac{N}{A} (2 \pi b db) Z&amp;lt;/math&amp;gt; &lt;br /&gt;
:In practice &amp;lt;math&amp;gt; \sigma&amp;lt;/math&amp;gt; is a measured cross-section which is a function of energy.&lt;br /&gt;
:classically &amp;lt;math&amp;gt;\sigma = \pi b^2 ; d \sigma = 2\pi b db&amp;lt;/math&amp;gt; so let's use this as a first approximation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{-dE}{dx} =  \int_0^{\infty} \frac{N}{A} (2 \pi b db) Z \Delta E = \frac{2 \pi N Z}{A} \int_0^{\infty} \Delta E b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{2 \pi N Z}{A} \int_0^{\infty} \left [ \frac{2 r_e^2 m_e c^2 z^2}{\beta^2 b^2}\right ] b db&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;4 \pi N r_e^2 m_e c^2 \frac{z^2 Z}{A \beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
:=&amp;lt;math&amp;gt;\frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\mathcal{K}}{A} = \frac{4 \pi N r_e^2 m_e c^2}{A} = 0.307 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;''' if A=1'''&lt;br /&gt;
&lt;br /&gt;
The limits of the above integral should be more physical in order to reflect the limits of the physics interaction.  Let &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; represent the minimum and maximum possible impact parameter where the physics is described,  as shown above,  by the coulomb force.&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;b \rightarrow 0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\frac{d E}{dx}&amp;lt;/math&amp;gt; diverges and the energy transfer &amp;lt;math&amp;gt;\rightarrow \infty : \Delta E \sim \frac{1}{b}&amp;lt;/math&amp;gt;.  Physically there is a maximum energy that may be transferred before the physics of the problem changes (ie: nuclear excitation, jet production, ...).  The de Borglie wavelength of the atom is used to estimate a value for &amp;lt;math&amp;gt;b_{min}&amp;lt;/math&amp;gt; such that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;b_{min} \sim  \frac{1}{2} \lambda_{de Broglie} = \frac{h}{2p} = \frac{h}{2 \gamma m_e \beta c}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;What is &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
As &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger the interaction is &amp;quot;softer&amp;quot; and longer.  If the interaction time (&amp;lt;math&amp;gt;\tau_i&amp;lt;/math&amp;gt;) is so long that it is equivalent to an electron orbit (&amp;lt;math&amp;gt;\tau_R&amp;lt;/math&amp;gt;) then the atom looks more like it is neutrally charged.  You move from an interaction in which the electron orbit is perturbed adiabatically such that there is no orbit change and the minimum amount of energy is transferred to no interaction taking place because the atom is neutral.&lt;br /&gt;
&lt;br /&gt;
Let&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_i = \frac{b_{max}}{v} (\sqrt{1-\beta^2})&amp;lt;/math&amp;gt;  : fields at high velocities get Lorentz contracted&lt;br /&gt;
: &amp;lt;math&amp;gt;\tau_R \equiv \frac{h}{I}&amp;lt;/math&amp;gt; : I &amp;lt;math&amp;gt;\equiv&amp;lt;/math&amp;gt; mean excitation energy of target material ( &amp;lt;math&amp;gt;E = h \nu = h/ \tau&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Condition for &amp;lt;math&amp;gt;b_{max}&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;\tau_i = \tau_R&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow b_{max} = \frac{h \gamma \beta c}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\frac{dE}{dx} = \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \int_0^{\infty} \frac{db}{b}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{b_{max}}{b_{min}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{\mathcal{K} }{A} \frac{z^2 Z}{\beta^2} \ln \frac{2 \gamma^2 m_e \beta^2 c^2}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Find &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; for a 10 MeV proton hitting a liquid hydrogen (&amp;lt;math&amp;gt;LH_2&amp;lt;/math&amp;gt;) target===&lt;br /&gt;
A = Z=z=1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;m_e c^2&amp;lt;/math&amp;gt; = 0.511 MeV &amp;lt;br&amp;gt;&lt;br /&gt;
I = 21.8 eV : see gray data point for Liquid &amp;lt;math&amp;gt;H_2&amp;lt;/math&amp;gt; From  Figure 27.5 on pg 6 of [http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG] below.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PDG_IonizationPotential.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
Just need to know &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;a 10 MeV proton&amp;quot; &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; Kinetic Energy (K.E.) = 10 MeV = &amp;lt;math&amp;gt;(\gamma - 1) mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \gamma = \frac{K.E.}{mc^2} + 1 = \frac{10 MeV}{938 MeV} + 1 \sim 1 = \frac{1}{\sqrt{1-\beta^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proton is not relativistic&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;v^2 = \frac{2 K.E.}{m} = \frac{2 \cdot 10 MeV}{938 MeV/c^2} = 2 \times 10^{-2} c^2 \Rightarrow \beta^2 = \frac{v^2}{c^2} = 2\times 10^{-2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plugging in the numbers:&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} = \left ( 0.307 \frac{MeV \cdot cm^2}{g}\right ) (1)^2 (1) \frac{1}{2 \times10^{-2}} \ln \left( \frac{2 (1) (0.511 MeV) (2 \times10^{-2})}{21.8 eV} \frac{10^6 eV}{MeV}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;= 105 \frac{MeV cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;How much energy is lost after 0.3 cm?&lt;br /&gt;
&lt;br /&gt;
'''Notice that the units for energy loss are normalized by the density of the material'''&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_{LH_2}&amp;lt;/math&amp;gt; = 0.07 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the actual energy lost I need to multiply by the density.   So for any given atom the energy loss will depend on the state (solid, gas, liqid) of the atom as this effects the density of the material.  &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta E = (105 \frac{MeV cm^2}{g}) (0.07 \frac{g}{cm^3}) (0.3 cm)&amp;lt;/math&amp;gt; = 2.2 MeV&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_HydrogenStoppingPower.pdf]] Compare with Triumf Kinematics Handbook, 2nd edition, September 1987, L.G. Greeniaus&lt;br /&gt;
&lt;br /&gt;
==Bethe-Bloch Equation ==&lt;br /&gt;
&lt;br /&gt;
While the classical equation above works in a limited kinematic regime, the Bethe-Bloch equation includes the corrections needed to cover most kinematic regimes for heavy particle energy loss.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} = \mathcal{K} z^2 \frac{Z}{A} \frac{1}{\beta^2} \left [ \frac{1}{2} \ln \left (\frac{2 m_e c^2 \beta^2 \gamma^2 }{I} \frac{ T_{max}}{I} \right) - \beta^2 - \frac{\delta}{2}\right ]&amp;lt;/math&amp;gt;[http://pdg.lbl.gov/2007/reviews/passagerpp.pdf PDG reference Eq 27.1 pg 1]&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;T_{max} = \frac{2 m_e c^2 \beta^2 \gamma^2}{1+ \frac{2 \gamma m_e}{M} + \frac{m_e}{M}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= Max K.E. transferable to the Target of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in a single collision.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;-\beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: =  correction for electron spin and very distant collisions which deforms the electron atomic orbits each process reducing dE/dx by &amp;lt;math&amp;gt;\frac{\beta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:= density correction term: in the classical derivation the material is treated as just a system of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; atoms uniformly distributed in space.  These Atoms, however, give the material polarizability which can reduce the electric field (dielectric).&lt;br /&gt;
&lt;br /&gt;
== GEANT 4 implementation ==&lt;br /&gt;
&lt;br /&gt;
The GEANT4 file  (version 4.8.p01)&lt;br /&gt;
&lt;br /&gt;
source/processes/electromagnetic/standard/src/G4BetheBlockModel.cc&lt;br /&gt;
&lt;br /&gt;
is used to calculate hadron energy loss.&lt;br /&gt;
&lt;br /&gt;
line 132 (line 257 in version 4.9.5)  &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{dE}{dx} =  \log \left ( \frac{2 m_e c^2 \tau (\tau +2) E_{min}}{I^2}\right) - \left (1 - \frac{E_{min}}{E_{max}} \right ) \beta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \tau = \frac{K.E.}{M}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 143 (line 267 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \log  ( \tau (\tau + 2) ) -cden&amp;lt;/math&amp;gt; = density corection = &amp;lt;math&amp;gt;\frac{\delta}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
line 148 (line 270 in vers. 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{dE}{dx} -= \frac{2c}{Z_{target}}&amp;lt;/math&amp;gt; = shell correction, corrects for the classical asumption that the atomic electron's velocity is initially zero; or the the incident particles velocity is far greater than the atomic electron's velocity.&lt;br /&gt;
&lt;br /&gt;
line 154 (line 273 in version 4.9.5) &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{dE}{dx} *= \frac{2 \pi m_e c^2 r_e^2 z^2}{\beta^2} \rho_e \;\;\;\; \rho_e \propto \frac{NZ}{A}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Energy Dependence ==&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_EnergyLoss_EnergyDependence.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
The above curve shows the energy loss per distance traveled (&amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt;) as a function of the incident particles energy.  There are three basic regions.  At low incident energies ( &amp;lt; 10^5 eV) the incident particle tends to excite or even ionize the atoms in the material it is penetrating.  The maximum amount of energy loss per distance traveled is defined as the Bragg peak.  The region after the Bragg peak, in which the energy loss per distance traveled reaches its smallest value, is refered to as the point of minimum ionizing.  Minimimum ionizing particles will have incident energies corresponding to this value or larger.  The characteristic of the minimum ionizing particles is that their energy loss per distance traveled is essentially constant making simulations easier until the particle's energy drops below the minimum ionizing energy level as it passes through the material.&lt;br /&gt;
&lt;br /&gt;
In general the Bethe-Bloch equation breaks down at low energies (below the Bragg peak)  and is a good description (to within 10%) for &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10 \frac{MeV}{a.m.u.} &amp;lt; E &amp;lt; 2 \frac{GeV}{a.m.u.}&amp;lt;/math&amp;gt;  and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; &amp;lt; 26 (Iron)  : a.m.u = Atomic Mass Unit&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\frac{1}{\beta^2}&amp;lt;/math&amp;gt; term in the Bethe-Bloch equation dominates between the Bragg peak and the minimum ionization region.&lt;br /&gt;
&lt;br /&gt;
the &amp;lt;math&amp;gt;\ln&amp;lt;/math&amp;gt; term and its corrections influence the dependence of  &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; as you move up in energy beyond the minimum ionization point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Energy Straggling ===&lt;br /&gt;
&lt;br /&gt;
While the Bethe-Bloch formula gives you a way to quantify the amount of energy a heavy charged particle  loses as a function of the distance traveled, you should realize that when you calculate the total energy lost via&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Delta E = \int_{E_i}^{E_f} \left ( \frac{dE}{dx} \right ) dx&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you are only determining the AVERAGE energy loss.  In other words, Bethe-Bloch is the Astochastic process describing energy loss.&lt;br /&gt;
&lt;br /&gt;
In reality the energy loss process is a stochastic process because of the statistical fluctuations which occur in the actual number of collisions which take place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Thick Absorber ====&lt;br /&gt;
&lt;br /&gt;
A thick absorber is one in which a large number of collisions takes place.   In this situation the central limit theorem from statistics tells you that the larger the number of random variable samples , &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, involved the more the observable will follow a Gaussian distribution. The Gaussian distribution is a good approximation to the binomial distribution when the number of trials is large.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Binomial_with_Large_N_becomes_Gaussian]]&lt;br /&gt;
&lt;br /&gt;
, and to a Poisson distribution when the mean is a lot larger than 1.&lt;br /&gt;
&lt;br /&gt;
[[Forest_ErrAna_StatDist#Gaussian_approximation_to_Poisson_when]]&lt;br /&gt;
&lt;br /&gt;
The gaussian probability function is defined as &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto e^{\frac{(\Delta - \bar{\Delta})^2}{ \sigma^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Full Width at Half Max (FWHM) of the distribution = &amp;lt;math&amp;gt;\left ( 2 \sqrt{2 \ln 2} \right ) \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of energy loss, the variance using the Bethe-Bloch equation should be &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_0^2 = 4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the realitivistic variance is &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 = [\frac{1-\beta^2/2}{1-\beta^2} ]\sigma_0^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for very thick absorbers see&lt;br /&gt;
&lt;br /&gt;
C. Tschaler, NIM '''64''', (1968) 237 ; ''ibid'', '''61''', (1968) 141&lt;br /&gt;
&lt;br /&gt;
When simulating energy loss of heavy charged particles the Bethe-Bloch equation may be used to calculate a &amp;lt;math&amp;gt;\frac{dE}{dx}&amp;lt;/math&amp;gt; which can determine the average energy loss at the given kinetic energy of the particle.  This average is then smeared according to a gaussian distribution of variance &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma^2 =4 \pi N r_e^2 (m_e c^2)^2 \rho \frac{Z}{A} x [\frac{1-\beta^2/2}{1-\beta^2} ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Thin Absorbers====&lt;br /&gt;
&lt;br /&gt;
In thin absorbers the number of collisions is small preventing the use of the central limit theorem to describe the stochastic process of energy loss in terms of a Gaussian distribution.  The large energy transfers that are possible cause the energy loss distribution to look like a Gaussian  with a high energy tail (or foot).&lt;br /&gt;
&lt;br /&gt;
The skewness of the resulting energy loss distribution is quantified as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\kappa = \frac{\bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta  \equiv 2 \pi N_a r_e^2 m_e c^2 \rho \frac{Z}{A} \left ( \frac{z}{\beta}\right)^2 x &amp;lt;/math&amp;gt; = lead term in Bethe Bloch equation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho&amp;lt;/math&amp;gt; = density of absorbing material.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right ) \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; = max energy transfered in 1 collision (headon / knock out collision)&lt;br /&gt;
&lt;br /&gt;
This comes from the relativistic kinematics of an Elastic Collision.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:SPIM_ThinAbsorbers_Scatering.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\gamma = \frac{E_{tot}}{Mc^2} = \frac{ \sqrt{(pc)^2 + (Mc^2)^2}}{Mc^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\beta= \frac{pc}{\gamma Mc^2} = \frac{pc}{E_{tot}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = E_{tot} - Mc^2 = \gamma Mc^2 - Mc^2 = (\gamma - 1 ) Mc^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;E_k = \sqrt{(pc)^2 + (Mc^2)^2} - Mc^2 &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;   (p^{\prime}c)^2 = E_k^2 + 2E_km_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conservation of Momentum &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{p} = \vec{p}^{\; \prime \prime} + \vec{p}^{\; \prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conservation of Energy &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_{tot} + m_ec^2 = E_{tot}^{\prime \prime} + E_{tot}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sqrt{(pc)^2 + (Mc^2)^2} + m_ec^2 = \sqrt{(p^{\; \prime \prime} c)^2 + (Mc^2)^2}  + E_k +  m_e c^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using conservation of E &amp;amp; P as well as substituting for &amp;lt;math&amp;gt;p^{\prime}&amp;lt;/math&amp;gt; you can show&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(p^{\; \prime \prime}c)^2 = (pc)^2 - 2E_k\sqrt{(pc)^2 +(Mc^2)^2} + E_k^2&amp;lt;/math&amp;gt; : cons of E&lt;br /&gt;
:&amp;lt;math&amp;gt;= (pc)^2 + E_k^2 + 2E_km_ec^2 -2pc\sqrt{E_k^2+2E_km_ec^2} \cos(\theta)&amp;lt;/math&amp;gt; : cons of P&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;pc \cos(\theta) \sqrt{1+\frac{2m_ec^2}{E_k}} = \sqrt{(pc)^2+(Mc^2)^2} + m_ec^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;E_k&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_k = \frac{2m_ec^2(pc)^2\cos^2 (\theta)}{[\sqrt{(pc)^2 + (Mc^2)^2} +m_ec^2]^2 - (pc)^2 \cos^2 (\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== (Landau Theory) =====&lt;br /&gt;
&amp;lt;math&amp;gt;\kappa \leq 0.01&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Landau assumed&lt;br /&gt;
:# &amp;lt;math&amp;gt;W_{max} = \infty&amp;lt;/math&amp;gt; is max energy transfer&lt;br /&gt;
:# electrons are free (energy transfer is so large you can neglect binding)&lt;br /&gt;
:# incident particle maintains velocity (large momentum transfer from big mass to small mass) (bowling ball hits ping pong ball)&lt;br /&gt;
&lt;br /&gt;
L. Landau, &amp;quot;On the Energy Loss of Fast Particles by Ionization&amp;quot;, J. Phys., vol 8 (1944), pg 201&lt;br /&gt;
&lt;br /&gt;
instead of a gaussian distribution Landau used&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) \propto \frac{1}{\bar{\Delta}\pi} \int_0^{\infty} e^{-u \ln u - u \lambda} \sin(\pi u) du&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda = \frac{1}{\bar{\Delta}} \left [ \Delta - \bar{\Delta} \ln \bar{\Delta} - \ln \epsilon + 1 -C \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\bar{\Delta} = 2\pi N_a r_e^2 m_e c^2 \rho \frac{Zz^2}{A \beta^2}x&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln \epsilon = \ln \left [ \frac{(1-\beta^2)I^2}{2m_ec^2 \beta^2} \right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Landau_ThinAbsorberDist.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== (Vavilou's Theory) =====&lt;br /&gt;
&lt;br /&gt;
Vavilous paper&lt;br /&gt;
&lt;br /&gt;
P.V. Vavilou, &amp;quot;Ionization losses of High Energy Heavy Particles&amp;quot;, Soviet Physics JETP, vol 5 (1950? )pg 749&lt;br /&gt;
&lt;br /&gt;
describe the physics for the case &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;math&amp;gt;0.01 &amp;lt; \kappa &amp;lt; \infty &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution function derived is shown below as well as a conceptual overlay of Vavilou's and Landau's distributions.  (The &amp;lt;math&amp;gt;\zeta f(x,\Delta)&amp;lt;/math&amp;gt; in the picture should be a &amp;lt;math&amp;gt;\bar{\Delta}P(x,\Delta)&amp;lt;/math&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;P(x,\Delta) = \frac{1}{\bar{\Delta}\pi} x e^{x(1+\beta^2C)} \int_0^{\infty} e^{xf_1} \cos(y \lambda_1 + xf_2) dy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f_1 = \beta^2 \left [ \ln(y) - C_i(y)\right ] - \cos(y) - y S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;f_2 = y\left [ \ln(y) - C_i(y)\right ] + \sin(y) + \beta^2  S_i(y)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C_i(y) \equiv - \int_y^{\infty} \frac{\cos(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;S_i(y) \equiv \int_0^{y} \frac{\sin(t)}{t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;C = 0.577&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_Vavilou_Landau_ThinAbsorber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation ====&lt;br /&gt;
&lt;br /&gt;
GEANT 4 uses the skewness parameter &amp;lt;math&amp;gt;\kappa&amp;lt;/math&amp;gt; to determine if it will use a &amp;quot;fluctuations model&amp;quot; to calculate energy straggling or the gaussian model described in section 3.2.1.&lt;br /&gt;
&lt;br /&gt;
===== kappa &amp;gt; 10 =====&lt;br /&gt;
If &lt;br /&gt;
: &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}}&amp;lt;/math&amp;gt; &amp;gt; 10 &lt;br /&gt;
and we have a thick absorber ( large step size) then the Gausian function in 3.2.1 is used to calculate energy straggling.&lt;br /&gt;
&lt;br /&gt;
What happens is &amp;lt;math&amp;gt;\Delta E&amp;lt;/math&amp;gt; is calculated via &amp;lt;math&amp;gt;\int_{E_i}^{E_f} \frac{dE}{dx} dx&amp;lt;/math&amp;gt; then the actual energy loss predicted by the simulation is chosen from a Gaussian distribution to account for energy straggling such that the &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; of this Gaussian distribution is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma^2 = 2 \pi r_e^2m_ec^2N_{el} \frac{Z_h}{\beta^2} T_C s (1 - \frac{\beta^2}{2})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N_{el}&amp;lt;/math&amp;gt; = electron density of the medium&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_h&amp;lt;/math&amp;gt; = charge of the incident particle&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = step size&lt;br /&gt;
:&amp;lt;math&amp;gt; T_C&amp;lt;/math&amp;gt; = cutoff kinetic energy for &amp;lt;math&amp;gt;\delta &amp;lt;/math&amp;gt;-electrons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T_C&amp;lt;/math&amp;gt; tells GEANT where to put the cutoff for using the Gaussian distribution for energy straggling.  This tells the simulation the low energy cutoff where Bethe-Bloch starts to fail due to ionization.&lt;br /&gt;
&lt;br /&gt;
=====Delta-electrons =====&lt;br /&gt;
What is a &amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electron?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\delta&amp;lt;/math&amp;gt; - electrons are also known as &amp;quot;knock -on&amp;quot; electrons and delta rays.&lt;br /&gt;
&lt;br /&gt;
As heavy particles traverse a medium they can ionize electrons from atoms.  The ejected electrons can be given enough energy to ionize as well.&lt;br /&gt;
&lt;br /&gt;
In a cloud chamber (a supercooled volume of super saturated water vapor which ionizes as charged particles pass through)  such and event would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_DeltaRay_CloudChamber.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
The blue spiral in the above gas chamber picture is a high energy electron ejected from a collision that spirals in the B-field ejecting low energy electrons at the end.  The B-field is directed out of the picture.&lt;br /&gt;
&lt;br /&gt;
The physics of ionization is different from the physics used to calculate Bethe-Bloch energy loss.  Remember Bethe-Bloch  starts to break down at low energies below the Bragg peak.  &lt;br /&gt;
&lt;br /&gt;
Because of this GEANT 4 sets the cutoff for this process to be&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;T_{cut}&amp;lt;/math&amp;gt; &amp;gt; 1 keV&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:  The BE energies of an electron in Hydrogen is 13.6 ev and the electrons in Argon have binding energies between 15.7 eV and 3.2 keV.&lt;br /&gt;
&lt;br /&gt;
===== Fluctuations Model: kappa &amp;lt; 10=====&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\kappa \equiv \frac{ \bar{\Delta}}{W_{max}} &amp;lt; \frac{\Delta E}{T_C}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Then GEANT 4 uses a &amp;quot;Fluctuations Model&amp;quot; to determine energy loss instead of Bethe-Bloch.&lt;br /&gt;
&lt;br /&gt;
; Fluctuations Model&lt;br /&gt;
:# the atom is assumed to have 2 energy levels &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:# you can excite the atom and lose either &amp;lt;math&amp;gt;E_1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;E_2&amp;lt;/math&amp;gt; or you can ionize the atom and lose energy according to a &amp;lt;math&amp;gt;\frac{1}{E^2}&amp;lt;/math&amp;gt; function &amp;lt;math&amp;gt;u_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The total energy loss in a step will be &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E = \Delta E_{exc} + \Delta E_{ion}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{exc} = \eta_1 E_1 + \eta_2 E_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\Delta E_{ion} = \sum_{j=1}^{\eta_3} \frac{I}{1 - u_j \frac{T_{up}-I}{T_{up}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\eta_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\eta_2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\eta_3&amp;lt;/math&amp;gt; are the number of collisions which are sampled from a poison distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;u_j = \int_{I}^{E_j} \frac{I T_{up}}{T_{up} - I} \frac{dx}{x^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;E_j = \frac{I}{1- rand  \frac{T_{up}-1}{T_{up}}}&amp;lt;/math&amp;gt; : rand = random number between 0 and 1&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;T_{up} = \left \{  {~ 1 keV \;  threshold \;energy \;for \; \delta- ray \; production \atop T_{max} \; \;\;\; if \; T_{max} &amp;lt; 1 keV} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; = mean ionization energy&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;E_2 \approx (10 eV) Z^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln E_1 = \frac{\ln (I) - f_2 \ln (E_2)}{f_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1 + f_2 =1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2 =\left \{  {0 \; z=1 \atop \frac{2}{z} \; z \ge 2} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fluctuation model was comparted with data in &lt;br /&gt;
&lt;br /&gt;
K. Lassila-Perini and L. Urban, NIM, A362 (1995) pg 416&lt;br /&gt;
&lt;br /&gt;
The cross sections used for excitation and ionization may be found in &lt;br /&gt;
&lt;br /&gt;
H. Bichel, Rev. Mod. Phys., vol 60 (1988) pg 663&lt;br /&gt;
&lt;br /&gt;
=== Range Straggling===&lt;br /&gt;
&lt;br /&gt;
;Def of Range (R):&lt;br /&gt;
: The distance traveled before all the particles energy is lost.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;R \equiv \int_0^T \frac{dE}{\frac{dE}{dx}}&amp;lt;/math&amp;gt; &lt;br /&gt;
:  = theoretical calculation of the path length traveled by a particle of incident energy &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note units: &amp;lt;math&amp;gt;\left [ R \right ] =  \frac{g}{cm^2} ; \left [ \frac{dE}{dx} \right ] = \frac{MeV \cdot cm^2}{g}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the Energy Straggling introduced in the previous section can explain why identical particles penetrate material to different depths.   The energy straggling results in Range straggling.&lt;br /&gt;
&lt;br /&gt;
If we do a shielding experiment where we have a source of incident particles of energy E and we count how many &amp;quot;punch&amp;quot; through a material of thickness (x) we would see a transmission coefficient &amp;lt;math&amp;gt;\left ( \frac{N_{out}}{N_{in}} \right) &amp;lt;/math&amp;gt; which would look like&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStraggling.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
====Fractional Range Straggling ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \equiv&amp;lt;/math&amp;gt; fractional range straggling&lt;br /&gt;
&lt;br /&gt;
Assuming the energy loss of a non-relativistic heavy ion through matter follows a Gaussian (thick absorber)&lt;br /&gt;
&lt;br /&gt;
Then it can be shown that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{M}{A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; = mass of the target electrons&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; = atomic mass of the Projectile&lt;br /&gt;
&lt;br /&gt;
since &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e = 9.11 \times 10^{-31}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
: 1 a.m.u. = &amp;lt;math&amp;gt;1.66 \times 10^{-27}&amp;lt;/math&amp;gt; kg&lt;br /&gt;
&lt;br /&gt;
then &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\sigma_R}{R} \approx \frac{1}{2} \sqrt{\frac{9.11 \times 10^{-31}}{1.66 \times 10^{-27}A}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: = 1.17 % if using a proton (A=1)&lt;br /&gt;
&lt;br /&gt;
The above is a &amp;quot;back of the envelope&amp;quot; estimate.  The experimentally measured values for Cu, Al, and Be target using a proton projectile are &lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_RangeStrag_SigmaR_overR.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
If the incident projectile is an electron then &amp;lt;math&amp;gt;\frac{\sigma_R}{R}  \approx \frac{1}{2}&amp;lt;/math&amp;gt; making electron range straggling a vague concept.&lt;br /&gt;
&lt;br /&gt;
There are several definitions of electron range&lt;br /&gt;
&lt;br /&gt;
;1.) Maximum Range (&amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:This range is defined using the continuous slowing down approximation (CSDA) where electrons are assumed to have many collisions over very small distances making it appear to be continuous energy loss instead of discrete.  The range is then calculated by integrating over these average energy losses &amp;lt;math&amp;gt;\frac{dE}{dx} \cdot s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;2.) Practical Range (&amp;lt;math&amp;gt;R_P&amp;lt;/math&amp;gt;):&lt;br /&gt;
: This stopping distance is defined by extrapolating the electron transmission curve to zero (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PracticalRangStraggline_4Electrons.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
=== Electron Capture and Loss ===&lt;br /&gt;
====Bohr Criterion====&lt;br /&gt;
:&amp;quot;A rapidly moving nucleus is fully ionized if its velocity exceeds that of its most tightly bound electron&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The Bohr Model:&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow E = \frac{mz^2e^4}{8 \epsilon_0^2 h^2 n^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for the inner most electron (&amp;lt;math&amp;gt;n=1&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
:Electron K.E. = &amp;lt;math&amp;gt;\frac{1}{2} mv^2 = \frac{mz^2e^4}{2(4\pi \epsilon_0)^2 \hbar^2} \Rightarrow v = \frac{z e^2}{4 \pi \epsilon_0 \hbar}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:the fine structure constant &amp;lt;math&amp;gt;\alpha \equiv \frac{e^2}{4 \pi \epsilon_0 \hbar c} = \frac{1}{137}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; v = zc \alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;v &amp;gt; zc \alpha&amp;lt;/math&amp;gt; the nucleus is fully ionized&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;math&amp;gt;\frac{z}{v/c} = \frac{z}{\beta} &amp;lt; \frac{1}{\alpha} = 137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternatively if the ion is moving through a material with a speed such that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{z}{\beta} &amp;gt; \frac{1}{\alpha} =137&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then electrons may be captured by the projectile and lost by the target.&lt;br /&gt;
&lt;br /&gt;
==== Z-effective====&lt;br /&gt;
Describing the charge state of your heavy ion traveling through matter at a velocity below the Bohr criterion is very complicated.  There is a competition between electron capture and loss.  Accurate cross sections are needed to simulate the process reliably.&lt;br /&gt;
&lt;br /&gt;
Some insight into this process can be found using the Thomas-Fermi model &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;V \propto \frac{Ze^{-r/a}}{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to describe an atom moving slow enough so it has captured many electrons but fast enough so its not neutral.  In the Thomas-Fermi model the distribution of electrons in an atom is described as being uniformly distributed such that there are 2 electrons in each discrete volume of phase space( the space in which all possible states of a system are represented)  defined using planks constant as &amp;lt;math&amp;gt;h^3&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
For the purpose of simulations you would like a relationship for &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
It is usually adequate to use fits for empirical data as long as we know that we are in the kinematic range in which those fits are valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when &amp;lt;math&amp;gt;E &amp;lt; 10&amp;lt;/math&amp;gt; MeV the data indicates that&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;Z_{eff} = Z(1 - e^{-\beta\frac{B}{Z^{2/3}}})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;B = 130 \pm 5&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;Z_{eff} \equiv&amp;lt;/math&amp;gt; effective charge f the projectile = &amp;lt;math&amp;gt;Z - \bar{q}_c&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; = number of protons&lt;br /&gt;
:&amp;lt;math&amp;gt;\bar{q}_c&amp;lt;/math&amp;gt; = average number of captured electrons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''When calculating stopping power for E &amp;lt; 10 MeV you use &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; in the Bethe-Bloch equation.'''&lt;br /&gt;
&lt;br /&gt;
Note:  As the ions charge state fluctuates while it slows down (or if accelerated through materials) you will need to recalculate the energy loss, and as a result you will get larger energy loss fluctuations in this energy range.&lt;br /&gt;
&lt;br /&gt;
For thin absorber you will look for stripping and loss cross sections.&lt;br /&gt;
&lt;br /&gt;
: Here a thin absorber is one whose thickness is less than the charge equilibrium distance defined as the distance traveled until the projectile's velocity is &amp;lt;math&amp;gt; v \ll zc\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A rule of thumb is that a thin absorber for low energy ions has a thickness &amp;lt;math&amp;gt;\le \frac{5 \frac{\mu g}{cm^2}}{\rho}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For thick absorbers:  The experimentally determined expression for the change in &amp;lt;math&amp;gt;Z_{eff}&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt; is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta Z_{eff} = \frac{1}{2} \sqrt{ \left [  Z_{eff} \left (1 - \frac{Z_{eff}}{Z} \right )^{1.67}\right ] }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple Scattering ===&lt;br /&gt;
&lt;br /&gt;
The Bethe-Bloch equation tells us how much energy is lost and GEANT4s calculation of this energy is described above.&lt;br /&gt;
&lt;br /&gt;
Now we need to know which direction the scattered particle goes after it has lost this energy.&lt;br /&gt;
&lt;br /&gt;
The work of Moliere describes the angular deflection of the particle which lost the energy thereby leading to a prediction of the Cross-section.  GEANT4 though uses the more complete Lewis theory to describe Multiple Coulomb Scattering (MCS) sometimes generically referred to as multiple scattering.&lt;br /&gt;
&lt;br /&gt;
There are 3 regions in which coulomb scattering is calculated&lt;br /&gt;
&lt;br /&gt;
; 1.) Single Scattering:&lt;br /&gt;
: For thin materials.&lt;br /&gt;
: If the probability of more than 1 coulomb scattering is small &lt;br /&gt;
:Then use the Rutherford formula for &amp;lt;math&amp;gt;\frac{d \sigma}{d \Omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;2.)Multiple Scattering:&lt;br /&gt;
: In this case the number of independent scatterings is large (N &amp;gt; 20) and the energy loss is small such that the problem can be treated statisticaly to obtain a probability distribution for the net deflection angle &amp;lt;math&amp;gt; [P(\theta)]&amp;lt;/math&amp;gt; as a function of the material thickness that is traversed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;3.) Plural Scattering:&lt;br /&gt;
: If 1&amp;lt; N &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; 20 then you can't use Rutherford to describe the scattering nor use a normal random statistical description.&lt;br /&gt;
&lt;br /&gt;
see E. Keil, Z. Naturforsch, vol 15 (1960), pg 1031&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reviews of rigorous multiple scattering calculations may be found in &lt;br /&gt;
: P.C. Hemmer, et. al., Phys. Rev, vol 168 (1968), pg 294&lt;br /&gt;
&lt;br /&gt;
==== GEANT4's implementation of MSC (N&amp;gt;20) ====&lt;br /&gt;
&lt;br /&gt;
GEANT4 models MSC when N&amp;gt;20 using model functions to determine the angular and spatial distributions chosen to give the same moments of these distributions as the Lewis theory.&lt;br /&gt;
&lt;br /&gt;
:H.W. Lewis, Phys. Rev., vol 78 (1950), pg 526&lt;br /&gt;
&lt;br /&gt;
modern versions of the above are at&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
: I. Kawrakow, et. al., NIM, B142 (1998) pg 253&lt;br /&gt;
&lt;br /&gt;
When N&amp;gt;20 multiple scattering can be described as a statistical process using a modified version of the Boltzman transport equation from statistical mechanics.  &lt;br /&gt;
&lt;br /&gt;
;Note: The simulation step size is chosen such that (N&amp;gt;20),  If you have materials so thin that N &amp;lt; 20 then GEANT4 will likely skip the material.  (one way around this is to increase the thickness and change the density).  If the material thickness can't be increased because its sandwhiched between two other materials then you will need to write a special step algorithm for the volume and have GEANT4 use it for the step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) \equiv&amp;lt;/math&amp;gt; the distribution function for a system of incident particles traveling through a material.&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s =&amp;lt;/math&amp;gt; arc length of the particle's path through the material&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{x} =&amp;lt;/math&amp;gt; position of a charged particle&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{v} =&amp;lt;/math&amp;gt; direction of motion of the particle &amp;lt;math&amp;gt;\frac{\vec{v}}{|\vec{v}|}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The multiple scattering experienced by a single charged particle traveling through the material is then simulated by sampling from the distribution &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The governing transport/diffusion equation is based on the continuity equation but with a &amp;quot;sink&amp;quot; term representing the possibility of collisions ejecting particles out of the volume.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f(s,\vec{x},\hat{v} ) }{\partial s} + \hat{v} \bullet \vec{\nabla}f(s,\vec{x},\hat{v} ) = N \int \sigma(\hat{v} \bullet\hat{v}^{\prime} )\left [ f(s,\vec{x},\hat{v}^{\prime} )  - f(s,\vec{x},\hat{v} ) \right ] d \hat{v}^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; = number of atoms per volume&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\hat{v} \bullet\hat{v}^{\prime} )&amp;lt;/math&amp;gt; = cross sections for elastic scattering per Solid angle &amp;lt;math&amp;gt;\left ( \frac{d \sigma}{d \Omega} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the above diffusion equation the distribution function, &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} )&amp;lt;/math&amp;gt; is expanded in Spherical Harmonics ( &amp;lt;math&amp;gt;Y_{\ell}^m(\theta,\phi)&amp;lt;/math&amp;gt; ) and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; expand  in Legendre Polynomials (&amp;lt;math&amp;gt;P_N(cos \theta)&amp;lt;/math&amp;gt;) since it has no &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; angle dependence.&lt;br /&gt;
&lt;br /&gt;
;Note: For Coulomb Scattering in polar coordinates you can write the potential in terms of Legendre Polynomials such that:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;U=k \frac{q}{r}&amp;lt;/math&amp;gt; &lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{\sqrt{r^2-a^2-2ar \cos \theta}}&amp;lt;/math&amp;gt;  in polar coordinates&lt;br /&gt;
:= &amp;lt;math&amp;gt;k\frac{q}{r} \sum_{n=0}^{\infty} P_n(\cos \theta) \left ( \frac{a}{r}\right )^n&amp;lt;/math&amp;gt; (the sqrt term above is expanded using binomial series&lt;br /&gt;
&lt;br /&gt;
:  &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v} ) = \sum_{\ell,m} f_{\ell,m}(\vec{x},s) Y_{\ell}^m(\hat{v})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting into the diffusion equation and doing the integral on the righ hand side you get&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{\partial f_{\ell,m}(\vec{x},s) }{\partial s} + \frac{f_{\ell,m}(s,\vec{x},\hat{v} }{\lambda_{\ell}} = - \sum_{\lambda, i, j} \vec{\nabla} f_{i,j}(\vec{x},s ) \bullet \int Y_{\ell,m}^{\star} \hat{v} Y_{i,j} d \hat{v} \; \; \; \; \; \; \; \;\hat{v} = f(\theta.\phi)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{1}{\lambda_{\ell}} = 2 \pi N \int_0^{\pi} \left [ 1-P_{\ell}(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt;\ell^{th}&amp;lt;/math&amp;gt; transport mean free path for the &amp;lt;math&amp;gt;f_{\ell}&amp;lt;/math&amp;gt; distribution function ( &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; symmetry is assumed making it &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; independent)&lt;br /&gt;
&lt;br /&gt;
From the above one can find the average distances traveled and the average deflection angle of the distribution.  Again, see :&lt;br /&gt;
&lt;br /&gt;
: J.M. Fernandez-Varea, et. al., NIM, B73 (1993), pg 447&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;moments&amp;quot; of &amp;lt;math&amp;gt;f(s,\vec{x},\hat{v}) &amp;lt;/math&amp;gt;  are defined as &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt; = 2 \pi \int z f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = \lambda_1 \left [ 1-e^{-s/\lambda_1}\right ]&amp;lt;/math&amp;gt; = mean geometrical path length&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;\cos(\theta)&amp;gt; = 2 \pi \int_{-1}^1 \sum_{\ell} P_{\ell}(\cos \theta) \int f(s,\vec{x},\hat{v}) \sin(\theta) d \theta d |\vec{x}| = e^{-s/\lambda_1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\lambda_1} = 2 \pi N \int_0^{\pi} \left [ 1-P_1(\cos \theta)\right ] \sigma(\theta) \sin(\theta) d \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice there are 3 lengths&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_MultScatDiffEq_PathLength.jpg | 400 px]]&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = geometrical path length between endpoints of the step =&amp;lt;math&amp;gt; \left \{  {line \; if \; \vec{B} = 0 \atop arc \; if \; \vec{B} \ne 0 } \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; = true path length = actual length of the path taken by particle&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;z&amp;gt;&amp;lt;/math&amp;gt; - mean geometrical path length along the z-axis&lt;br /&gt;
&lt;br /&gt;
In GEANT4 the &amp;lt;math&amp;gt;\lambda_{\ell}&amp;lt;/math&amp;gt;'s are taken from&lt;br /&gt;
&lt;br /&gt;
If 100 eV &amp;lt; K.E. of electron or positron &amp;lt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:D. Liljequist, J. Applied Phys, vol 62 (1987), 342&lt;br /&gt;
:J. Applied Phys, vol 68 (1990), 3061&lt;br /&gt;
&lt;br /&gt;
If K.E. &amp;gt; 10 MeV&lt;br /&gt;
&lt;br /&gt;
:R. Mogol, Atomic Data, Nucl, Data tables, vol 65 (1997) pg 55&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with &amp;lt;z&amp;gt; now known GEANT will try to determine &amp;quot;&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&amp;quot; for the energy loss and scattering calculations.&lt;br /&gt;
&lt;br /&gt;
A model is used for this where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\frac{1}{\alpha} \left [ 1 - (1- \alpha \omega z)^{\frac{1}{\omega}})\right ]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\omega = 1 + \frac{1}{\alpha \lambda_{10}}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\alpha =\left \{  {\frac{\lambda_{10} - \lambda_{11}}{s \lambda_{10}}\;\;\;\; K.E. \ge M_{particle} \atop \frac{1}{R}\;\;\;\; K.E. &amp;lt; M_{particle}} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; = stepsize&lt;br /&gt;
: &amp;lt;math&amp;gt;\lambda_{10} - \frac{\lambda_1}{1-\alpha s}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\lambda_{11} = \lambda_1&amp;lt;/math&amp;gt; at end of strep&lt;br /&gt;
&lt;br /&gt;
while &amp;lt;math&amp;gt;&amp;lt;cos \theta &amp;gt;&amp;lt;/math&amp;gt; is calculable, GEANT4 evaluates &amp;lt;math&amp;gt;\cos (\theta)&amp;lt;/math&amp;gt; from a probability distribution whose general form is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g[\cos(\theta)] = p \left ( qg_1[\cos(\theta)] + (1-q)g_3[\cos(\theta)] \right ) + (1-p)g_2[\cos(\theta)]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g_1(x) = C1e^{-a(1-x)}&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;g_2(x) = \frac{C_2}{(b-x)^d}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;g_3(x) = C_3&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;C_1, C_2, C_3&amp;lt;/math&amp;gt; are normalization constants&lt;br /&gt;
:&amp;lt;math&amp;gt;p,q,a,b,d&amp;lt;/math&amp;gt; are parameters which follow the work reported in &lt;br /&gt;
&lt;br /&gt;
:V.L. Highland, NIM, vol 219 (1975) pg497&lt;br /&gt;
&lt;br /&gt;
The GEANT4 files in version 4.8 were located in &lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MscModel.cc&lt;br /&gt;
&lt;br /&gt;
/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130039</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130039"/>
		<updated>2025-02-24T18:43:03Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Homework 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it using the PI simulation program&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;asci2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x asci2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x*4&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x:evt.y&amp;quot;,&amp;quot;evt.x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x)&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x-evt.y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
Use the above equation to calculate the max energy loss (transfer) for a 10 GeV proton.&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.  &lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example B2a to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130038</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130038"/>
		<updated>2025-02-24T18:41:33Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Homework 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it using the PI simulation program&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;asci2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x asci2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x*4&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x:evt.y&amp;quot;,&amp;quot;evt.x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x)&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x-evt.y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.  Use the equation from question 1 above to calculate the max energy loss for this relativistic particle and compare it to the values in the PDF file for range below.&lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example B2a to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130037</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130037"/>
		<updated>2025-02-24T17:47:56Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Homework 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it using the PI simulation program&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;asci2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x asci2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x*4&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x:evt.y&amp;quot;,&amp;quot;evt.x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x)&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x-evt.y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.  Use the equation from question 1 above to calculate the max energy loss for this relativistic particle and compare it to the values in the PDF file for range below.&lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example N02 to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130036</id>
		<title>TF GEANT4.11</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130036"/>
		<updated>2025-02-24T17:00:18Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
== System requirements==&lt;br /&gt;
&lt;br /&gt;
===Installing on Ubuntu 24===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
install OpenGL&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglu1-mesa-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglut-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxpm-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxmu-dev&lt;br /&gt;
&lt;br /&gt;
sudo apt search libexpat1-dev&lt;br /&gt;
&lt;br /&gt;
maybe  &lt;br /&gt;
&lt;br /&gt;
sudo apt install libcurl4-openssl-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install libmotif-dev&lt;br /&gt;
&lt;br /&gt;
==resources==&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/InstallationGuide/html/installguide.html#buildandinstall&lt;br /&gt;
&lt;br /&gt;
==Step -by- Step commands==&lt;br /&gt;
&lt;br /&gt;
 mkdir geant4.11&lt;br /&gt;
&lt;br /&gt;
 cd geant4.11&lt;br /&gt;
&lt;br /&gt;
using git to get version 4.11.2&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Geant4/geant4.git&lt;br /&gt;
&lt;br /&gt;
 cd geant4&lt;br /&gt;
&lt;br /&gt;
 git checkout v11.2.2&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
 mkdir build&lt;br /&gt;
&lt;br /&gt;
 cd build&lt;br /&gt;
&lt;br /&gt;
 cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11:BOOL=ON -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.11/install ~/src/GEANT4/geant4.11/geant4&lt;br /&gt;
&lt;br /&gt;
 make -j8&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
 cd ../geant4-install/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 source bin/geant4.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===examples===&lt;br /&gt;
&lt;br /&gt;
You can test your installation by compiling and running the example programs&lt;br /&gt;
&lt;br /&gt;
first try to compile example/basic/B2  located in the directory where you build everything&lt;br /&gt;
&lt;br /&gt;
source geant4-install/bin/geant4.csh &lt;br /&gt;
&lt;br /&gt;
cd geant4/examples/basic/B2/B2a&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===creating a copy of an example===&lt;br /&gt;
&lt;br /&gt;
cd&lt;br /&gt;
&lt;br /&gt;
mkdir HW&lt;br /&gt;
&lt;br /&gt;
cd HW&lt;br /&gt;
&lt;br /&gt;
cp -r geant4.10.02.p02/examples/basic/B2/B2a/* ./&lt;br /&gt;
&lt;br /&gt;
rm CMakeCache.txt&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
==Commands used for version 4.9.5==&lt;br /&gt;
&lt;br /&gt;
Download the source code to a subdirectory.&lt;br /&gt;
&lt;br /&gt;
 I stored it in /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
Then I created a build subdirectory&lt;br /&gt;
&lt;br /&gt;
 mkdir /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-build&lt;br /&gt;
&lt;br /&gt;
From inside the build directory I execute the cmake command using a switch to download the data files and install visulatization &lt;br /&gt;
&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_OPENGL_X11=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_XM=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEASNT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I install if teh make was succcessfull&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Build example N02===&lt;br /&gt;
&lt;br /&gt;
To build an example you need to create a build subdirectory under the subdirectory of teh example source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  cmake -DGeant4_DIR=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install ../&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TSG==&lt;br /&gt;
&lt;br /&gt;
 TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE, TSG)&lt;br /&gt;
 Default graphics system is: TSG_OFFSCREEN (based on build flags).&lt;br /&gt;
 Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).&lt;br /&gt;
 Note: Parameters specified on the command line will override these defaults.&lt;br /&gt;
      Use &amp;quot;vis/open&amp;quot; without parameters to get these defaults.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_MPA4&amp;diff=130035</id>
		<title>TF MPA4</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_MPA4&amp;diff=130035"/>
		<updated>2025-02-07T22:09:37Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[TF_Isotopes]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MPA4 logbook&lt;br /&gt;
&lt;br /&gt;
Run008.lst, started 2/7/25:14:03:02, ended 120.337 seconds later, 244,929 counts in ADC0&lt;br /&gt;
Run009.lst, started 2/7/25:14:09:11, ended 3600.466 seconds later, 781,118 counts in ADC0&lt;br /&gt;
&lt;br /&gt;
[[TF_Isotopes]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_MPA4&amp;diff=130034</id>
		<title>TF MPA4</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_MPA4&amp;diff=130034"/>
		<updated>2025-02-07T21:10:45Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[TF_Isotopes]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MPA4 logbook&lt;br /&gt;
&lt;br /&gt;
Run008.lst, started 2/7/25:14:03:02, ended 120.337 seconds later, 244,929 counts in ADC0&lt;br /&gt;
Run009.lst, started 2/7/25:14:09:11, ended &lt;br /&gt;
&lt;br /&gt;
[[TF_Isotopes]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_MPA4&amp;diff=130033</id>
		<title>TF MPA4</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_MPA4&amp;diff=130033"/>
		<updated>2025-02-07T21:06:18Z</updated>

		<summary type="html">&lt;p&gt;Foretony: Created page with &amp;quot;https://wiki.iac.isu.edu/index.php?title=TF_Isotopes&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;https://wiki.iac.isu.edu/index.php?title=[[TF_Isotopes]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_Isotopes&amp;diff=130032</id>
		<title>TF Isotopes</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_Isotopes&amp;diff=130032"/>
		<updated>2025-02-07T21:05:36Z</updated>

		<summary type="html">&lt;p&gt;Foretony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[User_talk:Foretony#TF_Isotopes]]&lt;br /&gt;
&lt;br /&gt;
[[TF_IsotopeTracers]]&lt;br /&gt;
&lt;br /&gt;
[[TF_Actinium]]&lt;br /&gt;
&lt;br /&gt;
[[TF_Antimony]]&lt;br /&gt;
&lt;br /&gt;
[[TF_MPA4]]&lt;br /&gt;
&lt;br /&gt;
[[User_talk:Foretony#TF_Isotopes]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130031</id>
		<title>TF GEANT4.11</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130031"/>
		<updated>2025-01-28T19:13:35Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Step -by- Step commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System requirements==&lt;br /&gt;
&lt;br /&gt;
===Installing on Ubuntu 24===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
install OpenGL&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglu1-mesa-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglut-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxpm-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxmu-dev&lt;br /&gt;
&lt;br /&gt;
sudo apt search libexpat1-dev&lt;br /&gt;
&lt;br /&gt;
maybe  &lt;br /&gt;
&lt;br /&gt;
sudo apt install libcurl4-openssl-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install libmotif-dev&lt;br /&gt;
&lt;br /&gt;
==resources==&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/InstallationGuide/html/installguide.html#buildandinstall&lt;br /&gt;
&lt;br /&gt;
==Step -by- Step commands==&lt;br /&gt;
&lt;br /&gt;
 mkdir geant4.11&lt;br /&gt;
&lt;br /&gt;
 cd geant4.11&lt;br /&gt;
&lt;br /&gt;
using git to get version 4.11.2&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Geant4/geant4.git&lt;br /&gt;
&lt;br /&gt;
 cd geant4&lt;br /&gt;
&lt;br /&gt;
 git checkout v11.2.2&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
 mkdir build&lt;br /&gt;
&lt;br /&gt;
 cd build&lt;br /&gt;
&lt;br /&gt;
 cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11:BOOL=ON -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.11/install ~/src/GEANT4/geant4.11/geant4&lt;br /&gt;
&lt;br /&gt;
 make -j8&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
 cd ../geant4-install/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 source bin/geant4.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===examples===&lt;br /&gt;
&lt;br /&gt;
You can test your installation by compiling and running the example programs&lt;br /&gt;
&lt;br /&gt;
first try to compile example/basic/B2  located in the directory where you build everything&lt;br /&gt;
&lt;br /&gt;
source geant4-install/bin/geant4.csh &lt;br /&gt;
&lt;br /&gt;
cd geant4/examples/basic/B2/B2a&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===creating a copy of an example===&lt;br /&gt;
&lt;br /&gt;
cd&lt;br /&gt;
&lt;br /&gt;
mkdir HW&lt;br /&gt;
&lt;br /&gt;
cd HW&lt;br /&gt;
&lt;br /&gt;
cp -r geant4.10.02.p02/examples/basic/B2/B2a/* ./&lt;br /&gt;
&lt;br /&gt;
rm CMakeCache.txt&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
==Commands used for version 4.9.5==&lt;br /&gt;
&lt;br /&gt;
Download the source code to a subdirectory.&lt;br /&gt;
&lt;br /&gt;
 I stored it in /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
Then I created a build subdirectory&lt;br /&gt;
&lt;br /&gt;
 mkdir /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-build&lt;br /&gt;
&lt;br /&gt;
From inside the build directory I execute the cmake command using a switch to download the data files and install visulatization &lt;br /&gt;
&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_OPENGL_X11=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_XM=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEASNT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I install if teh make was succcessfull&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Build example N02===&lt;br /&gt;
&lt;br /&gt;
To build an example you need to create a build subdirectory under the subdirectory of teh example source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  cmake -DGeant4_DIR=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install ../&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TSG==&lt;br /&gt;
&lt;br /&gt;
 TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE, TSG)&lt;br /&gt;
 Default graphics system is: TSG_OFFSCREEN (based on build flags).&lt;br /&gt;
 Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).&lt;br /&gt;
 Note: Parameters specified on the command line will override these defaults.&lt;br /&gt;
      Use &amp;quot;vis/open&amp;quot; without parameters to get these defaults.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130030</id>
		<title>TF GEANT4.11</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_GEANT4.11&amp;diff=130030"/>
		<updated>2025-01-27T21:57:00Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Step -by- Step commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System requirements==&lt;br /&gt;
&lt;br /&gt;
===Installing on Ubuntu 24===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
install OpenGL&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglu1-mesa-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libglut-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxpm-dev&lt;br /&gt;
&lt;br /&gt;
 sudo apt install libxmu-dev&lt;br /&gt;
&lt;br /&gt;
sudo apt search libexpat1-dev&lt;br /&gt;
&lt;br /&gt;
maybe  &lt;br /&gt;
&lt;br /&gt;
sudo apt install libcurl4-openssl-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install libmotif-dev&lt;br /&gt;
&lt;br /&gt;
==resources==&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/InstallationGuide/html/installguide.html#buildandinstall&lt;br /&gt;
&lt;br /&gt;
==Step -by- Step commands==&lt;br /&gt;
&lt;br /&gt;
 mkdir geant4.11&lt;br /&gt;
&lt;br /&gt;
 cd geant4.11&lt;br /&gt;
&lt;br /&gt;
using git to get version 4.11.2&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Geant4/geant4.git&lt;br /&gt;
&lt;br /&gt;
 cd geant4&lt;br /&gt;
&lt;br /&gt;
 git checkout v11.2.2&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
 mkdir build&lt;br /&gt;
&lt;br /&gt;
 cd build&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11:BOOL=ON -DCMAKE_INSTALL_PREFIX=/data/src/GEANT4/4.11/geant4-install /data/src/GEANT4/4.11/geant4&lt;br /&gt;
&lt;br /&gt;
 make -j8&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
 cd ../geant4-install/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 source bin/geant4.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===examples===&lt;br /&gt;
&lt;br /&gt;
You can test your installation by compiling and running the example programs&lt;br /&gt;
&lt;br /&gt;
first try to compile example/basic/B2  located in the directory where you build everything&lt;br /&gt;
&lt;br /&gt;
source geant4-install/bin/geant4.csh &lt;br /&gt;
&lt;br /&gt;
cd geant4/examples/basic/B2/B2a&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===creating a copy of an example===&lt;br /&gt;
&lt;br /&gt;
cd&lt;br /&gt;
&lt;br /&gt;
mkdir HW&lt;br /&gt;
&lt;br /&gt;
cd HW&lt;br /&gt;
&lt;br /&gt;
cp -r geant4.10.02.p02/examples/basic/B2/B2a/* ./&lt;br /&gt;
&lt;br /&gt;
rm CMakeCache.txt&lt;br /&gt;
&lt;br /&gt;
cmake .&lt;br /&gt;
&lt;br /&gt;
make -f Makefile&lt;br /&gt;
&lt;br /&gt;
./exampleB2a&lt;br /&gt;
&lt;br /&gt;
==Commands used for version 4.9.5==&lt;br /&gt;
&lt;br /&gt;
Download the source code to a subdirectory.&lt;br /&gt;
&lt;br /&gt;
 I stored it in /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
Then I created a build subdirectory&lt;br /&gt;
&lt;br /&gt;
 mkdir /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-build&lt;br /&gt;
&lt;br /&gt;
From inside the build directory I execute the cmake command using a switch to download the data files and install visulatization &lt;br /&gt;
&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_OPENGL_X11=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_XM=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEASNT4/geant4.9.5/geant4.9.5.p01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I install if teh make was succcessfull&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Build example N02===&lt;br /&gt;
&lt;br /&gt;
To build an example you need to create a build subdirectory under the subdirectory of teh example source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  cmake -DGeant4_DIR=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install ../&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==TSG==&lt;br /&gt;
&lt;br /&gt;
 TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE, TSG)&lt;br /&gt;
 Default graphics system is: TSG_OFFSCREEN (based on build flags).&lt;br /&gt;
 Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).&lt;br /&gt;
 Note: Parameters specified on the command line will override these defaults.&lt;br /&gt;
      Use &amp;quot;vis/open&amp;quot; without parameters to get these defaults.&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130029</id>
		<title>Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130029"/>
		<updated>2025-01-27T00:15:08Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Interactions of Electrons and Photons with Matter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Class Admin==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_ClassAdmin]]&lt;br /&gt;
&lt;br /&gt;
== Homework Problems==&lt;br /&gt;
[[HomeWork_Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_Intro]]&lt;br /&gt;
&lt;br /&gt;
= Energy Loss =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_StoppingPower]]&lt;br /&gt;
&lt;br /&gt;
Ann. Phys. vol. 5, 325, (1930)&lt;br /&gt;
&lt;br /&gt;
=Interactions of Electrons and Photons with Matter=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_e-gamma]]&lt;br /&gt;
&lt;br /&gt;
Physics Reference&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/679723/contributions/2792554/attachments/1559217/2454299/PhysicsReferenceManual.pdf&lt;br /&gt;
&lt;br /&gt;
Physics lists&lt;br /&gt;
https://geant4.web.cern.ch/documentation/dev/plg_html/PhysicsListGuide/physicslistguide.html&lt;br /&gt;
&lt;br /&gt;
Livermore is the default model &lt;br /&gt;
&lt;br /&gt;
https://www.epj-conferences.org/articles/epjconf/pdf/2019/19/epjconf_chep2018_02046.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
https://opengate.readthedocs.io/en/latest/introduction.html&lt;br /&gt;
&lt;br /&gt;
= Hadronic Interactions =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_HadronicInteractions]]&lt;br /&gt;
&lt;br /&gt;
= Final Project=&lt;br /&gt;
&lt;br /&gt;
A final project will be submitted that will be graded with the following metrics:&lt;br /&gt;
&lt;br /&gt;
1.) The document must be less than 15 pages.&lt;br /&gt;
&lt;br /&gt;
2.) The document must contain references in a bibliography (5 points) .&lt;br /&gt;
&lt;br /&gt;
3.) A comparison must be made between GEANT4's prediction and either the prediction of someone else or an experimental result(30 points).&lt;br /&gt;
&lt;br /&gt;
4.) The graphs must be of publication quality with font sizes similar or larger than the 12 point font (10 points).&lt;br /&gt;
&lt;br /&gt;
5.) The document must be grammatically correct (5 points).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
&lt;br /&gt;
[http://geant4.web.cern.ch/geant4/  GEANT4 Home Page]&lt;br /&gt;
&lt;br /&gt;
[http://root.cern.ch ROOT Home page]&lt;br /&gt;
&lt;br /&gt;
[http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/  Fermi Lab Example]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html NIST Range Tables]&lt;br /&gt;
&lt;br /&gt;
[http://ie.lbl.gov/xray/  X-ray specturm]&lt;br /&gt;
&lt;br /&gt;
[[Installing_GEANT4.9.3_Fsim]]&lt;br /&gt;
&lt;br /&gt;
== Saving/restoring Random number seed==&lt;br /&gt;
&lt;br /&gt;
You save the current state of the random number generator with the command&lt;br /&gt;
&lt;br /&gt;
/random/setSavingFlag 1&lt;br /&gt;
&lt;br /&gt;
/run/beamOn 100&lt;br /&gt;
&lt;br /&gt;
/random/saveThisRun&lt;br /&gt;
&lt;br /&gt;
A file is created called &lt;br /&gt;
&lt;br /&gt;
currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
/control/shell mv currentEvent.rndm currentEvent10.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can restore the random number generator and begin generating random number from the last save time&lt;br /&gt;
&lt;br /&gt;
/random/resetEngineFrom currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating Template==&lt;br /&gt;
&lt;br /&gt;
[[TForest_G4_Template]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.11==&lt;br /&gt;
&lt;br /&gt;
===4.11.2===&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.10==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===4.10.02===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.2]]&lt;br /&gt;
===4.10.01===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.1]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.6==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.6]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.5==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.5]]&lt;br /&gt;
&lt;br /&gt;
An old version of Installation notes for versions prior to 9.5&lt;br /&gt;
&lt;br /&gt;
[http://brems.iac.isu.edu/~tforest/NucSim/Day3/ Old Install Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visualization Libraries:&lt;br /&gt;
&lt;br /&gt;
[http://www.opengl.org/ OpenGL]&lt;br /&gt;
&lt;br /&gt;
[http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html  DAWN]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://doc.coin3d.org/Coin/  Coin3D]&lt;br /&gt;
&lt;br /&gt;
==Compiling G4 with ROOT==&lt;br /&gt;
&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
[[G4CompileWRootforTracks]]&lt;br /&gt;
&lt;br /&gt;
==Using SLURM==&lt;br /&gt;
&lt;br /&gt;
http://slurm.schedmd.com/quickstart.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/&lt;br /&gt;
&lt;br /&gt;
===simple batch script for one process job===&lt;br /&gt;
&lt;br /&gt;
create the file submit.sbatch below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#SBATCH --time=1&lt;br /&gt;
cd src/PI&lt;br /&gt;
./PI_MC 100000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the execute&lt;br /&gt;
&lt;br /&gt;
:sbatch submit.sbatch&lt;br /&gt;
&lt;br /&gt;
check if its running with &lt;br /&gt;
&lt;br /&gt;
:squeue&lt;br /&gt;
&lt;br /&gt;
to kill a batch job &lt;br /&gt;
&lt;br /&gt;
:scancel JOBID&lt;br /&gt;
&lt;br /&gt;
===On minerve===&lt;br /&gt;
&lt;br /&gt;
Sample script to submit 10 batch jobs.&lt;br /&gt;
&lt;br /&gt;
the filename is minervesubmit and you run like &lt;br /&gt;
 source minervesubmit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch&lt;br /&gt;
qsub submit10mil&lt;br /&gt;
qsub submit20mil&lt;br /&gt;
qsub submit30mil&lt;br /&gt;
qsub submit40mil&lt;br /&gt;
qsub submit50mil&lt;br /&gt;
qsub submit60mil&lt;br /&gt;
qsub submit70mil&lt;br /&gt;
qsub submit80mil&lt;br /&gt;
qsub submit90mil&lt;br /&gt;
qsub submit100mil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file submit10mil looks like this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#PBS -l nodes=1&lt;br /&gt;
#PBS -A FIAC&lt;br /&gt;
#PBS -M foretony@isu.edu&lt;br /&gt;
#PBS -m abe&lt;br /&gt;
#&lt;br /&gt;
source /home/foretony/src/GEANT4/geant4.9.5/geant4.9.6-install/bin/geant4.sh&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch/10mil&lt;br /&gt;
../../exampleN02 run1.mac &amp;gt; /dev/null &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qstat&lt;br /&gt;
&lt;br /&gt;
to check that the process is still running&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qdel jobID#&lt;br /&gt;
&lt;br /&gt;
if you want to kill the batch job, the jobID number shows up when you do stat.&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
Job id                    Name             User            Time Use S Queue&lt;br /&gt;
------------------------- ---------------- --------------- -------- - -----&lt;br /&gt;
27033.minerve             submit           foretony        00:41:55 R default        &lt;br /&gt;
[foretony@minerve HW10]$ qdel 27033&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Definitions of Materials==&lt;br /&gt;
&lt;br /&gt;
[[File:MCNP_Compendium_of_Material_Composition.pdf]]&lt;br /&gt;
&lt;br /&gt;
==Minerve2 GEANT 4.10.1 Xterm error==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On OS X El Capitan V 10.11.4 using XQuartz&lt;br /&gt;
&lt;br /&gt;
~/src/GEANT4/geant4.10.1/Simulations/B2/B2a/exsmpleB2a&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Use this open statement to create an OpenGL view:&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
/vis/sceneHandler/create OGL&lt;br /&gt;
/vis/viewer/create ! ! 600x600-0+0&lt;br /&gt;
libGL error: failed to load driver: swrast&lt;br /&gt;
X Error of failed request:  BadValue (integer parameter out of range for operation)&lt;br /&gt;
  Major opcode of failed request:  150 (GLX)&lt;br /&gt;
  Minor opcode of failed request:  3 (X_GLXCreateContext)&lt;br /&gt;
  Value in failed request:  0x0&lt;br /&gt;
  Serial number of failed request:  25&lt;br /&gt;
  Current serial number in output stream:  26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_OLD]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130028</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130028"/>
		<updated>2025-01-22T19:39:15Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* 3.) Histograms using ROOT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it using the PI simulation program&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;asci2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x asci2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x*4&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;evt.x:evt.y&amp;quot;,&amp;quot;evt.x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x)&amp;quot;);&lt;br /&gt;
Sim-&amp;gt;Draw(&amp;quot;asin(evt.x-evt.y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example N02 to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130027</id>
		<title>TF SPIM Intro</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130027"/>
		<updated>2025-01-22T17:41:50Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Definitions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction=&lt;br /&gt;
&lt;br /&gt;
Experimentalists use simulations to predict the sources of background which will interfere with the signal they plan on measuring.  An important aspect of this process is to understand how signals are produced in your measurement device.  Devices share the common problem of isolating a signal produced in the device from the noise that is present in the device.  &lt;br /&gt;
&lt;br /&gt;
Below is a description of how signals are produced in bulk materials.&lt;br /&gt;
&lt;br /&gt;
==Particle Detection ==&lt;br /&gt;
A device detects a particle only after the particle transfers energy to the device.&lt;br /&gt;
&lt;br /&gt;
Energy intrinsic to a device depends on the material used in a device&lt;br /&gt;
&lt;br /&gt;
Consider a device made of some material with an average atomic number (&amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;)  at some temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;).  The material's atoms are in constant thermal motion (unless you can manage to have T = zero degrees Klevin).&lt;br /&gt;
&lt;br /&gt;
Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E) = \frac{1}{kT} e^{-\frac{E}{kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E)&amp;lt;/math&amp;gt; represents the probability of any atom in the system having an energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= 1.38 \times 10^{-23} \frac{J}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  You may be more familiar with the Maxwell-Boltzmann distribution in the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;N(\nu) = 4 \pi N \left ( \frac{m}{2\pi k T} \right ) ^{3/2} v^2  e^{-mv^2/2kT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N(v) \Delta v&amp;lt;/math&amp;gt; would represent the molecules in the gas sample with speeds between &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v + \Delta v&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 1: P(E=5 eV) ===&lt;br /&gt;
&lt;br /&gt;
;What is the probability that an atom in a 12.011 gram block of carbon would have an energy of 5 eV? &lt;br /&gt;
&lt;br /&gt;
First lets check that the probability distribution is Normalized; ie: does &amp;lt;math&amp;gt;\int_0^{\infty} P(E) dE =1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Physically, &amp;lt;math&amp;gt;P(E=5eV)&amp;lt;/math&amp;gt; is calculated by integrating P(E) over some energy interval ( ie:&amp;lt;math&amp;gt; N(v) dv&amp;lt;/math&amp;gt;).  I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1 eV/kT} - e^{4.9 eV/kT}]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right )  =  \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right ) \left (6.42 \times 10^{18} \frac{eV}{J} \right )= 8.614 \times 10^{-5} \frac {eV}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
assuming a room temperature of &amp;lt;math&amp;gt;T=300 K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&amp;lt;math&amp;gt;kT = 0.0258 \frac{eV}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in other words the probability may be approximated by just using the distribution function alone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=5eV) = e^{-5/0.0258} \approx 10^{-85}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approximation breaks down as &amp;lt;math&amp;gt;E \rightarrow 0.0258 eV&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt;carbon atoms, we would not expect to see a 5 eV carbon atom in a sample size of &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt; carbon atoms when the probability of observing such an atom is &amp;lt;math&amp;gt;\approx 10^{-85}&amp;lt;/math&amp;gt;.  Note: The mass of the earth is about &amp;lt;math&amp;gt;10^{27}&amp;lt;/math&amp;gt; g &amp;lt;math&amp;gt;\approx 10^{50}&amp;lt;/math&amp;gt; atoms, so a carbon atom with an energy of 5 eV would be difficult to observe  in a detector the size of the earth .&lt;br /&gt;
&lt;br /&gt;
The average energy we expect to see would be calculated by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&amp;lt;E&amp;gt; = \int_{0}^{\infty} E \cdot P(E) dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
;Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.&lt;br /&gt;
&lt;br /&gt;
approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0258} \approx 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
approximately 10 eV of energy is needed to ionize an atom in a gas chamber&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=10 eV) = e^{-10/0.0258} \approx 10^{-169}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
But if you cool the silicon detector to 200 degrees Kelvin (200 K) then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0172} \approx 10^{-26} &amp;lt;&amp;lt; 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.&lt;br /&gt;
&lt;br /&gt;
also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it's quantum efficiency for absorbing energy.&lt;br /&gt;
&lt;br /&gt;
; What does this have to do with Simulations?&lt;br /&gt;
: You just did a SImulation.  Consider the following description of the Monte Carlo Method&lt;br /&gt;
&lt;br /&gt;
== The Monte Carlo method ==&lt;br /&gt;
; Stochastic&lt;br /&gt;
: from the greek word &amp;quot;stachos&amp;quot;&lt;br /&gt;
: a means of, relating to, or characterized by conjecture and randomness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A stochastic process is one whose behavior is non-deterministic in that the next state of the process is partially determined.&lt;br /&gt;
&lt;br /&gt;
The above particle detector was an example of describing a stochastic process using a probability distribution to determine the likely hood of finding an atom with a certain energy.&lt;br /&gt;
&lt;br /&gt;
Physics at the Quantum Mechanics  scale contains some of the clearest examples of such a non-deterministic systems.  The canonical systems in Thermodynamics is another example.&lt;br /&gt;
&lt;br /&gt;
Basically the monte-carlo method uses a random number generator (RNG) to generate a distribution (gaussian, uniform, Poission,...) which is used to solve a stochastic process based on an astochastic description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2 Calculation of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
;Astochastic description:&lt;br /&gt;
: &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; may be measured as the ratio of the area of a circle of radius &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; divided by the area of a square of length &amp;lt;math&amp;gt;2r&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PI_from_AreaRatio.jpg]]&amp;lt;math&amp;gt;\frac{A_{circle}}{A_{square}} = \frac{\pi r^2}{4r^2} = \frac{\pi}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure the value of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; if you physically measure the above ratios.&lt;br /&gt;
&lt;br /&gt;
; Stochastic description:&lt;br /&gt;
: Construct a dart board representing the above geometry, throw several darts at it, and look at a ratio of the number of darts in the circle to the total number of darts thrown (assuming you always hit the dart board).&lt;br /&gt;
&lt;br /&gt;
; Monte-Carlo Method&lt;br /&gt;
:Here is an outline of a program to calulate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte-Carlo method with the above Stochastic description&lt;br /&gt;
[[Image:MC_PI_fromAreaRatio.jpg]]&lt;br /&gt;
 begin loop&lt;br /&gt;
  x=rnd&lt;br /&gt;
  y=rnd&lt;br /&gt;
  dist=sqrt(x*x+y*y)&lt;br /&gt;
  if dist &amp;lt;= 1.0 then numbCircHits+=1.0&lt;br /&gt;
  numbSquareHist += 1.0&lt;br /&gt;
 end loop&lt;br /&gt;
  print PI = 4*numbCircHits/numbSquareHits&lt;br /&gt;
&lt;br /&gt;
== A Unix Primer ==&lt;br /&gt;
To get our feet wet using the UNIX operating system, we will try to solve example 2 above using a RNG under UNIX&lt;br /&gt;
&lt;br /&gt;
===List of important Commands===&lt;br /&gt;
&lt;br /&gt;
# ls&lt;br /&gt;
# pwd&lt;br /&gt;
# cd&lt;br /&gt;
# df&lt;br /&gt;
# ssh&lt;br /&gt;
# scp&lt;br /&gt;
# mkdir&lt;br /&gt;
# printenv&lt;br /&gt;
# emacs, vi, vim&lt;br /&gt;
# make, gcc&lt;br /&gt;
# man&lt;br /&gt;
# less&lt;br /&gt;
# rm&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Most of the commands executed within a shell under UNIX have command line arguments (switches) which tell the command to print information about using the command to the screen.  The common forms of these switches are &amp;quot;-h&amp;quot;, &amp;quot;--h&amp;quot;, or &amp;quot;--help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ls --help&lt;br /&gt;
 ssh -h&lt;br /&gt;
&lt;br /&gt;
'' the switch deponds on your flavor of UNIX''&lt;br /&gt;
&lt;br /&gt;
if using the switch doesn't help you can try the &amp;quot;man&amp;quot; (sort for manual) pages (if they were installed).  &lt;br /&gt;
Try&lt;br /&gt;
 man -k pwd&lt;br /&gt;
&lt;br /&gt;
the above command will search the manual for the key word &amp;quot;pwd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example 3: using UNIX to compile a RNG===&lt;br /&gt;
&lt;br /&gt;
Step&lt;br /&gt;
# login to thorshammer (ssh username@thorshammer.rdc.isu.edu)&lt;br /&gt;
# mkdir src&lt;br /&gt;
# cd src&lt;br /&gt;
# mkdir PI&lt;br /&gt;
# cd PI&lt;br /&gt;
# copy past program PI.cc from Moodle into editor on thorshammer&lt;br /&gt;
# ls&lt;br /&gt;
# g++ -o PI PI.cc&lt;br /&gt;
#./PI&lt;br /&gt;
&lt;br /&gt;
== A Root Primer ==&lt;br /&gt;
If typing the command &amp;quot;root&amp;quot; in your unix shell does not work then you need to setup your shell environment so it cn find the application&lt;br /&gt;
&lt;br /&gt;
If you are on thorshamer&lt;br /&gt;
&lt;br /&gt;
In bash shell do&lt;br /&gt;
&lt;br /&gt;
 export ROOTSYS=~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
if chsh do &lt;br /&gt;
&lt;br /&gt;
 setenv ROOTSYS ~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
To start the root program type&lt;br /&gt;
&lt;br /&gt;
 $ROOTSYS/bin/root&lt;br /&gt;
&lt;br /&gt;
another method&lt;br /&gt;
&lt;br /&gt;
 source ~foretony/src/ROOT/root/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Create Ntuple  and Draw Histogram===&lt;br /&gt;
&lt;br /&gt;
Look for the program &amp;quot;asci2root.C&amp;quot; in Moodle&lt;br /&gt;
&lt;br /&gt;
copy and paste it into you editor on the machine you would like to run root on.&lt;br /&gt;
&lt;br /&gt;
then try the following&lt;br /&gt;
&lt;br /&gt;
 root&lt;br /&gt;
&lt;br /&gt;
your shell prompt will change to look like thei : root [0]&lt;br /&gt;
&lt;br /&gt;
type&lt;br /&gt;
&lt;br /&gt;
 .x asci2root.C&lt;br /&gt;
&lt;br /&gt;
then exit the root program with &lt;br /&gt;
&lt;br /&gt;
 .q&lt;br /&gt;
&lt;br /&gt;
and restart it with &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
and try the command &lt;br /&gt;
&lt;br /&gt;
 Simm-&amp;gt;Draw(&amp;quot;evt.x&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
== Cross Sections ==&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
;Total cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma \equiv \frac{\# \mbox{ particles scattered}} {\frac{ \# \mbox{ incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Differential cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt; \frac{d \sigma}{d \Omega} \equiv \frac{\frac{\# \mbox{ particles scattered}}{\mbox{solid angle}}} {\frac{ \# \mbox{incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Solid Angle&lt;br /&gt;
:[[Image:SolidAngleDefinition.jpg]]&lt;br /&gt;
: &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;= solid angle of a sphere covered by the detector&lt;br /&gt;
: ie;the detectors area projected onto the surface of a sphere&lt;br /&gt;
:A= surface area of detector&lt;br /&gt;
:r=distance from interaction point to detector&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega = \frac{A}{r^2} sr &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;sr \equiv&amp;lt;/math&amp;gt; steradians&lt;br /&gt;
: &amp;lt;math&amp;gt;A_{\mbox{sphere}} = 4 \pi r^2&amp;lt;/math&amp;gt; if your detector was a hollow ball&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega_{\mbox{max}} = \frac{4 \pi r^2}{r^2} = 4\pi&amp;lt;/math&amp;gt;steradians&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
:Cross-sections have the units of Area&lt;br /&gt;
:1 barn = &amp;lt;math&amp;gt;10^{-28} m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
; [units of &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;] =&amp;lt;math&amp;gt;\frac{\frac{[\mbox{particles}]}{[\mbox{steradian}]}} {\frac{ [ \mbox{particles}]}{[m^2]}} = m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
;Luminosity&lt;br /&gt;
:&amp;lt;math&amp;gt;L = \frac{\mbox{Number of Scatterers}}{\mbox{Area} \cdot \mbox{time}} \sim i_{\mbox{beam}} \rho_{\mbox{target}} l_{\mbox{target}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:FixedTargetScatteringCrossSection.jpg | 500 px]]&lt;br /&gt;
; Fixed target scattering&lt;br /&gt;
: &amp;lt;math&amp;gt;N_{in}&amp;lt;/math&amp;gt;= # of particles in = &amp;lt;math&amp;gt;I \cdot A_{in}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;A_{in}&amp;lt;/math&amp;gt; is the area of the ring of incident particles&lt;br /&gt;
:&amp;lt;math&amp;gt;dN_{in} = I \cdot dA = I (2\pi b) db&amp;lt;/math&amp;gt;= # particles in a ring of radius &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and thickness &amp;lt;math&amp;gt;db&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; if you measure the # of particles detected &amp;lt;math&amp;gt;d N&amp;lt;/math&amp;gt; in a known detector solid angle &amp;lt;math&amp;gt;d \Omega&amp;lt;/math&amp;gt; from a known incident particle Flux (&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;)  as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{\frac{d N}{ d \Omega}}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively if you have a theory which tells you &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; which you want to test experimentally with a beam of flux &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; then you would measure counts (particles)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dN = I \sigma(\theta) d \Omega = I \sigma(\theta)  \frac{d A}{r^2} = I \sigma(\theta) \frac{r^2 \sin(\theta) d \theta d \phi}{r^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
: &amp;lt;math&amp;gt;[d N] = [\frac {\mbox{particles}}{m^2}][m^2] [\mbox{steradian}] &amp;lt;/math&amp;gt; = # of particles&lt;br /&gt;
: or for a count rate divide both sides by time and you get beam current on the RHS&lt;br /&gt;
: integrate and you have the total number of counts&lt;br /&gt;
&lt;br /&gt;
;Classical Scattering&lt;br /&gt;
: In classical scattering you get the same number of particles out that you put in (no capture, conversion,..)&lt;br /&gt;
: &amp;lt;math&amp;gt;d N_{in} = dN&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;d N_{in} = I dA = I (2\pi b) db&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;d N = I \sigma(\theta) d \Omega =   I \sigma(\theta) \sin(\theta) d \theta d \phi = I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;  I (2\pi b) db =  I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;    b  db =   \sigma(\theta) \sin(\theta) d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta) =  \frac{b}{\sin(\theta)}\frac{db}{d \theta}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{db}{d \theta}&amp;lt;/math&amp;gt; tells you how the impact parameter &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; changes with scattering angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 4: Elastic Scattering ===&lt;br /&gt;
This example is an example of classical scattering.&lt;br /&gt;
&lt;br /&gt;
Our goal is to find &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; for an elastic collision of 2 impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.  We need to look for a relationship between the impact parameter &amp;lt;math&amp;gt; b&amp;lt;/math&amp;gt; and the scattering angle &amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.  To find this relationship, let's solve this elastic scattering problem by  describing the collision using the Center of Mass (C.M.) coordinate system in terms of the reduced mass.  As we shall see, the 2-body collision becomes a 1-body problem  when a C.M. coordinate system is used.  Then we will describe the motion of the reduced mass in the C.M. Frame.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_Lab_CM_Frame.jpg | 500 px]]&lt;br /&gt;
[[Media:SPIM_ElasCollis_Lab_CM_Frame.xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
; Variable definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt;= impact parameter ; distance of closest approach&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;= mass of incoming ball&lt;br /&gt;
:&amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;= mass of target ball&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt;= iniital velocity of  incoming ball in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab frame after collision&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;u_2^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_2^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. frame after collision&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Determining the reduced mass:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_2Body-1BodyCoordSystem.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
; vector definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{R}&amp;lt;/math&amp;gt; = a position vector pointing to the center of mass of the two ball system&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r} \equiv \vec{r}_1 - \vec{r}_2&amp;lt;/math&amp;gt; = the magnitude of this vector is the distance between the two masses&lt;br /&gt;
&lt;br /&gt;
In the C.M. reference frame the above vectors have the following relationships&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{R} = 0 = \frac{m_1 \vec{r}_1 + m_2 \vec{r}_2}{m_1 + m_2} \Rightarrow m_1 \vec{r}_1 = -m_2 \vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{r}_1 - \vec{r}_2 = \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving the above equations for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r_2}&amp;lt;/math&amp;gt; and defining the reduced mass &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu = \frac{m_1 \cdot m_2}{m_1 + m_2} \equiv&amp;lt;/math&amp;gt; reduced mass&lt;br /&gt;
&lt;br /&gt;
leads to &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_1 = \frac{\mu}{m_1} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_2 = -\frac{\mu}{m_2} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can use the above reduced mass relationships to construct the Lagrangian in terms of &amp;lt;math&amp;gt;\vec{r}&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \vec{r}_2&amp;lt;/math&amp;gt; thereby reducing the problem from a 2-body problem to a 1-body problem.&lt;br /&gt;
&lt;br /&gt;
; Construct the Lagrangian&lt;br /&gt;
&lt;br /&gt;
The Lagrangian is defined as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T - U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T \equiv&amp;lt;/math&amp;gt; kinetic energy of the system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U \equiv&amp;lt;/math&amp;gt; Potential energy of the system which describes the interaction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} |\vec{\dot{r}}_1|^2 + \frac{1}{2} |\vec{\dot{r}}_2|^2 - U&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} m_1 \left (\frac{m_2}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 + \frac{1}{2} m_2 \left (\frac{m_1}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} \left ( m_2 + m_1 \right ) \left (\frac{m_1m_2}{(m_1+m_2)^2} \right )  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting derivative of the expressions for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: = &amp;lt;math&amp;gt;\frac{1}{2} \mu |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The 2-body problem is now described by a 1-body Lagrangian we need to determine which coordinate system (cartesian, spherical,..) to use to write an expression for (&amp;lt;math&amp;gt;|\vec{\dot{r}}|^2&amp;lt;/math&amp;gt;).  Polar seems best unless there is a dependence in the azimuthal angle.&lt;br /&gt;
&lt;br /&gt;
Lagranges equations of motion are given by&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\partial \mathcal{L}}{\partial q} = \frac{d}{dt} \frac{\partial \mathcal{L}}{\dot{q}}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; represents one of the coordinate (cannonical variables).&lt;br /&gt;
&lt;br /&gt;
To get the classical scattering cross section we are interested in finding an expression for the dependence of the impact parameter on the scattering angle,&amp;lt;math&amp;gt;\frac{d b}{d \theta}&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Now lets redraw the collision in terms of a reference frame fixed on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; (before collision its the Lab Frame but not after collision).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_CMFrame.jpg]] [[Media:SPIM_ElasColls_CMFrame_xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
The C.M. Frame rides along the center of mass, the above coordinate system though has its origin on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   The above drawing identifies &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; for the system at the point of the collision in which the CM frame is a distance &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; (the size of the ball) from the origin of the coordinate system fixed to &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   If &amp;lt;math&amp;gt;b &amp;gt; a&amp;lt;/math&amp;gt; then there is no collision (&amp;lt;math&amp;gt;\theta=0&amp;lt;/math&amp;gt;),  otherwise a collision happens when r=a (the distance between the balls is equal to their diameter).  A head on collision is defined as &amp;lt;math&amp;gt;b=0&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta=\pi&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;Observation&lt;br /&gt;
: as &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; gets smaller, &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{d b}{d \theta} &amp;lt; 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using plane polar coordinates (&amp;lt;math&amp;gt;r, \phi&amp;lt;/math&amp;gt;) we can describe the problem in the lab frame as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v} = \dot{r} \hat{e}_r + r \dot{\phi} \hat{e}_{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U(r) = \left \{  {0 \; r &amp;gt; a \atop \infty \; r \le a} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T -U = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2) - U(r)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Lagranges Equation of Motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial \mathcal {L}}{\partial \phi} = \frac{d}{d t} \frac{\partial \mathcal{L}}{\partial \dot{\phi}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;0 = \frac{d}{d t} [ \mu r^2 \dot{\phi}] \Rightarrow&amp;lt;/math&amp;gt;  there is a constant of motion ( Constant angular momentum)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ell \equiv \mu r^2 \dot{\phi} = \vec{r} \times \vec{p} = \vec{r} \times \mu \vec{v} = r^2 \mu \dot{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substitute &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mathcal{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} ( \mu  \dot{r}^2 + \frac{\ell}{\mu r^2} ) - U(r)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The two equations above are in terms of &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; whereas our goal is to find an expression for &amp;lt;math&amp;gt;\frac{ d b}{ d \theta}&amp;lt;/math&amp;gt;.  Since &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is related to &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is related to&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta = \pi - 2\phi&amp;lt;/math&amp;gt;; see figure above) we should try and find expressions for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;r(b)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Trick&lt;br /&gt;
: &amp;lt;math&amp;gt;\dot{\phi} = \frac{d \phi}{d t} = \frac{d \phi}{d r} \frac{d r}{d t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \ell = \mu r^2 \frac{d \phi}{d r} \dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
:or&lt;br /&gt;
: &amp;lt;math&amp;gt;d \phi = \frac{\ell}{\mu r^2 \dot{r}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We now need an expression for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt; in order to integrate the above equation to determine the functional dependence of &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; and hence&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The potential in the Lagrangian  though is infinite for &amp;lt;math&amp;gt;r \le a&amp;lt;/math&amp;gt; .  Let's use the property of conservation of energy to accommodate this mathematical construct.&lt;br /&gt;
&lt;br /&gt;
Since Energy is conserved (Elastic Scattering), we may define the Hamiltonian as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H = T + U = \frac{1}{2} (\mu \dot{r}^2 + \frac{\ell}{\mu r^2}) + U(r) = constant \equiv E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dot{r} = \pm \sqrt{\frac{2(E-U(r))}{\mu} - \frac{\ell^2}{\mu^2 r^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting the above into the equation for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; and integrating:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int d \phi = \int_{r_{min}}^{r_{max}} \frac{\ell}{\mu r^2 \dot{R}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{min} = a   \; \; \;  r_{max}= \infty   \; \; \;   U(r) = 0 : a \le r \le \infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int_a^{\infty} \frac{\ell} {r^2 \sqrt{2 \mu E - \frac{\ell^2}{r^2}} }dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;a \le r \le \infty&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;E = \frac{1}{2} \mu v^2_{cm} \Rightarrow v_{cm} = \sqrt{\frac{2E}{\mu}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{\ell} = \vec{r} \times \vec{p} \Rightarrow |\vec{\ell}| = |\vec{r}| |\vec{p}| \sin(\phi) = r \mu v_{cm} \sin(\phi) = r \mu \left ( \sqrt{\frac{2E}{\mu}} \right) \sin(\phi) = \sqrt{2 \mu E} r\sin(\phi) =\sqrt{2 \mu E} b&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting this expression for &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into the last expression for &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi =\int_a^{\infty}  \frac{b dr}{r\sqrt{(r^2-b^2)}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Integral Table&lt;br /&gt;
: &amp;lt;math&amp;gt;\int  \frac{dx}{x\sqrt{(\alpha x^2+\beta x+\gamma)}} = \frac{-1}{\sqrt{-\gamma}} \sin^{-1} \left (\frac{\beta x+2\gamma}{|x|\sqrt{\beta^2-4\alpha \gamma}} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let &amp;lt;math&amp;gt;x=r \;\; \alpha=1 \;\; \beta=0 \;\; \gamma=-b^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \left . b \frac{1}{\sqrt{-(-b^2)}} \sin^{-1} \left (\frac{-2b^2}{r\sqrt{0-4(1)(-b^2) } }\right ) \right |_a^{\infty} = \sin^{-1} (0)- \sin^{-1}(-\frac{b}{a})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sin(\phi) = \frac{b}{a} = \sin \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \cos \left ( \frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow b = a \cos \left( \frac{\theta}{2} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Now substitute the above into the expression for &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{b}{\sin(\theta)} \frac{d b}{d \theta} = \frac{a \cos(\theta/2)}{sin(\theta)} a[-\sin(\theta/2)]\frac{1}{2} &lt;br /&gt;
= \frac{a^2}{2} \frac{\cos(\theta/2) \sin(\theta/2)}{\sin(\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
drop the negative sign, sqrt in denominator allows this, and use the trig identity&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin \left (\frac{\theta}{2} + \frac{\theta}{2} \right ) = \cos \left (\frac{\theta}{2} \right) \sin \left (\frac{\theta}{2} \right ) + \cos \left ( \frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin(\theta) = 2 \cos \left (\frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{a^2}{2} \frac{1}{2} = \frac{a^2}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \int \sigma(\theta) d \Omega = \frac{a^2}{2} \frac{1}{2} 4 \pi  = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;compare with result from definition&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; = scattering cross-section &amp;lt;math&amp;gt;\equiv \frac{\# particles\; scattered} {\frac{ \# incident \; particles}{Area}}&amp;lt;/math&amp;gt;&lt;br /&gt;
:number of particles scattered = number of incident particles&lt;br /&gt;
: Area = &amp;lt;math&amp;gt; \pi a^2&amp;lt;/math&amp;gt; = The area profile in which a collision occurs( the ball diameter is &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;) [[Image:ClassicalEffectiveScatteringArea.jpg | 200 px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \frac{{N}}{\frac{ N}{\pi a^2}} = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lab Frame Cross Sections ===&lt;br /&gt;
&lt;br /&gt;
The C.M. frame is often chosen to theoretically calculate cross-sections even though experiments are conducted in the Lab frame.  In such cases you will need to transform cross-sections between two frames.&lt;br /&gt;
&lt;br /&gt;
The total cross-section should be frame independent&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_{C.M.} = \sigma_{Lab}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is in the CM frame and &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; is in the Lab frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;A non-relativistic transformation:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) 2 \pi \sin(\theta) d \theta = \sigma(\psi) 2 \pi \sin (\psi) d \psi&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation is governed by the dependence of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt; \psi&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt; \left( \frac{d \theta}{d \psi} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets return back to our picture of the scattering Process&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
if we superimpose the vectors &amp;lt;math&amp;gt;\vec{v}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{v}_1^{\prime}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame_Velocities.jpg]]&lt;br /&gt;
&lt;br /&gt;
Trig identities (non-relativistic Gallilean transformation) tell us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 \sin(\psi) = v_1^{\prime} \sin(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 cos(\psi) = v_{cm} + v_1^{\prime} \cos(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\psi)}{\cos(\psi)} = \frac{v_1^{\prime} \sin(\theta)/v_1}{\frac{v_{CM}}{v_1} + \frac{v_1^{\prime} \cos(\theta)}{v_1} }&lt;br /&gt;
= \frac{\sin(\theta)}{\cos(\theta) + \frac{v_{CM}}{v_1^{\prime}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an elastic collision only the directions change in the CM Frame: &amp;lt;math&amp;gt;u_1^{\prime}= v_1^{\prime}&amp;lt;/math&amp;gt;  &amp;amp; &amp;lt;math&amp;gt;u_1^{\prime}= v_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;From the definition of the C.M.&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{v}_{CM} = \frac{m_1 \vec{u}_1 + m_2 \vec{u}_2}{m_1+m_2} = \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;conservation of momentum in CM Frame &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1 u_1^{\prime} = - m_2 u_2{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Rightarrow v_1^{\prime} = u_1^{\prime} = \frac{-m_2}{m_1} u_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Gallilean Coordinate transformation:&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{u}_1 = \vec{u}_1^{\prime} + \vec{v}_{CM} = \vec{u}_1^{\prime} + \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow u_1{\prime} = \left [ 1 - \frac{m_1}{m_1 + m_2} \right ] u_1 = \frac{m_2}{m_1+m_2}u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow v_1^{\prime} = u_1^{\prime}  =\frac{m_2}{m_1+m_2} u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; another expression for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using the above gallilean transformation we can do the following&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{v_{CM}}{v_1^{\prime}}= \frac{\frac{m_1}{m_1+m_2} u_1}{\frac{m_2}{m_1+m_2} u_1} = \frac{m_1}{m_2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\theta)}{\cos(\theta) + \frac{m_1}{m_2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after a little trig substitution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{m_1}{m_2} = \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
&lt;br /&gt;
now use the chain rule to find &amp;lt;math&amp;gt;\frac{d \theta}{d \psi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f \equiv  \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
:&amp;lt;math&amp;gt;df = 0 = \frac{ \partial f}{\partial \psi} d \psi  + \frac{ \partial f}{\partial \theta} d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \frac{d \theta}{d \psi} = \frac{-\frac{ \partial f}{\partial \psi} }{\frac{ \partial f}{\partial \theta} }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{ \partial f}{\partial \psi} = \frac{\cos(\theta - \psi)}{\sin(\psi)} + \frac{\sin(\theta - \psi)}{\sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{ \partial f}{\partial \theta }= 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substitution:&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{\sin(\theta)}{\sin(\psi)} \left [ 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)} \right ] \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the above equation to be more useful one would prefer to recast it in terms of only &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; and masses.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\psi) = \frac{\left [ \frac{m_1}{m_2}\cos(\psi) + \sqrt{1-\left ( \frac{m_1 \sin(\psi) }{m_2} \right )^2 }\right ]}{\sqrt{1 - \left ( \frac{m_1 \sin(\psi)}{m_2}\right )^2 }}\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130026</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130026"/>
		<updated>2025-01-18T19:06:13Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* 3.) Histograms using ROOT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it using the PI simulation program&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;asci2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x asci2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;x*4&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;x:y&amp;quot;,&amp;quot;x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(x)&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(x-y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example N02 to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130025</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130025"/>
		<updated>2025-01-18T19:02:28Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* 3.) Histograms using ROOT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it.&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;asci2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x asci2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;x*4&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;x:y&amp;quot;,&amp;quot;x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(x)&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(x-y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example N02 to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130024</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130024"/>
		<updated>2025-01-18T19:01:46Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* 3.) Histograms using ROOT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it.&lt;br /&gt;
&lt;br /&gt;
 ./PI&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;ascii2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
If root is not available you can try to add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
you can run the asci2root program in ROOT with the command&lt;br /&gt;
&lt;br /&gt;
 root [0] .x ascii2root.C &lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;sim.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;Sim&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;x&amp;quot; and &amp;quot;y&amp;quot;.  These should contain the numbers from the file sim.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;x*4&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;x:y&amp;quot;,&amp;quot;x&amp;gt;0.5&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(x)&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(x-y)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example N02 to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130023</id>
		<title>HomeWork Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=HomeWork_Simulations_of_Particle_Interactions_with_Matter&amp;diff=130023"/>
		<updated>2025-01-18T18:58:24Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* 2.) MC calculation of Pi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Homework 1=&lt;br /&gt;
&lt;br /&gt;
==Apply for an account on minerve==&lt;br /&gt;
&lt;br /&gt;
request an account on the minerve cluser using the link below&lt;br /&gt;
&lt;br /&gt;
http://help.cose.isu.edu/services/compute-clusters/request-cluster-access&lt;br /&gt;
&lt;br /&gt;
== 1.) Maxwell Boltzmann==&lt;br /&gt;
Given the Maxwell -Boltzmann Distribution&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;N(v) = 4 \pi \left ( \frac{m}{2\pi kT}\right)^{3/2} v^2 e^{-\frac{mv^2}{2kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===a.) Show &amp;lt;v&amp;gt;===&lt;br /&gt;
Show  that&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;&amp;lt;v&amp;gt; = 4\pi \left ( \frac{m}{2 \pi kT}\right )^{3/2} \left( \frac{2kT}{m}\right)^2 \frac{\Gamma(2)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===b.) Energy Fluctuation (Grad)===&lt;br /&gt;
Show that the energy fluctuation is&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{4} m^2 &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{3}{2} (kT)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note&lt;br /&gt;
: &amp;lt;math&amp;gt;&amp;lt; \left ( v - &amp;lt;v&amp;gt;\right)^2&amp;gt;  = &amp;lt;v^2 - 2v&amp;lt;v&amp;gt; + &amp;lt;v&amp;gt;^2&amp;gt; = &amp;lt;v^2&amp;gt; - (&amp;lt;v&amp;gt;)^2&amp;lt;/math&amp;gt; &lt;br /&gt;
: &amp;lt;math&amp;gt;= \frac{3kT}{m} - \frac{8kT}{m}&amp;lt;/math&amp;gt; = velocity fluctuation&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{m^2}{4} &amp;lt; \left ( v^2 - &amp;lt;v^2&amp;gt;\right)^2&amp;gt; = \frac{m^2}{4}\left ( &amp;lt;v^4&amp;gt; - (&amp;lt;v^2&amp;gt;)^2 \right )&amp;lt;/math&amp;gt; &lt;br /&gt;
:&amp;lt;math&amp;gt;=\frac{1}{4} \left ( 15(kT)^2 - (3kT)^2\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==2.) MC calculation of Pi==&lt;br /&gt;
&lt;br /&gt;
Calculate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte Carlo method described in the [http://wiki.iac.isu.edu/index.php/Simulations_of_Particle_Interactions_with_Matter#Example_2_Calculation_of_.CF.80 Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may use the program I gave you in the lab for this but you must change the program to indicate that you were able to understand its structure and you were able to recompile it.&lt;br /&gt;
&lt;br /&gt;
==3.) Histograms using ROOT==&lt;br /&gt;
Create histograms of the random numbers stored a the ROOT ntuple .&lt;br /&gt;
&lt;br /&gt;
First step is to create a file with the 2 columns of random numbers in it.&lt;br /&gt;
&lt;br /&gt;
 ./PI_MC 1000 &amp;gt; temp.dat&lt;br /&gt;
&lt;br /&gt;
now load the program &amp;quot;ascii2root.C&amp;quot; into ROOT.&lt;br /&gt;
&lt;br /&gt;
Add the program ROOT to your UNIX path with the command below&lt;br /&gt;
&lt;br /&gt;
source ~foretony/src/ROOT/root-6.06.02/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the root program&lt;br /&gt;
&lt;br /&gt;
 root -l&lt;br /&gt;
&lt;br /&gt;
now load the asci2root program into ROOT&lt;br /&gt;
&lt;br /&gt;
 root [0] .L ascii2root.C &lt;br /&gt;
&lt;br /&gt;
now run the program so it reads the data in from the file &amp;quot;temp.dat&amp;quot; created above&lt;br /&gt;
&lt;br /&gt;
 root [1] asci2nt(&amp;quot;temp.dat&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
You now have a ROOT file called &amp;quot;rns.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for simplicity lets quite root and restart it &lt;br /&gt;
&lt;br /&gt;
 root [2] .q&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
now restart it and tell it to load the root file &amp;quot;rns.root&amp;quot; .   &lt;br /&gt;
&lt;br /&gt;
 root -l rns.root&lt;br /&gt;
&lt;br /&gt;
You don't have to do it this way. You could use the browser to load it &amp;quot;new TBrowser()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 root [1] new TBrowser();&lt;br /&gt;
&lt;br /&gt;
Look under the &amp;quot;ROOT Files&amp;quot; menu and you will see and icon labeled &amp;quot;rns.root&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Double click on the icon labeled &amp;quot;rns.root&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You now see a folder icon named &amp;quot;rns&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Double click again.&lt;br /&gt;
&lt;br /&gt;
You now see a leaf icon with the names &amp;quot;rnd1&amp;quot; and &amp;quot;rnd2&amp;quot;.  These should contain the numbers from the file temp.dat.&lt;br /&gt;
&lt;br /&gt;
double click on one of the leaf icons and a histogram will appear.&lt;br /&gt;
&lt;br /&gt;
now try some of the commands below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;rnd1*4&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;rnd1:rnd1&amp;quot;,&amp;quot;rnd1&amp;gt;0.5&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(rnd1)&amp;quot;);&lt;br /&gt;
rns-&amp;gt;Draw(&amp;quot;asin(rnd1-rnd2)&amp;quot;);   Does this look like a Normal/Gaussian Distributi&lt;br /&gt;
on?&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some reference material:&lt;br /&gt;
&lt;br /&gt;
http://physics.isu.edu/~tforest/Classes/NucSim/Day1/RNG/Marsaglia/noviceExample/&lt;br /&gt;
&lt;br /&gt;
=Homework 2=&lt;br /&gt;
&lt;br /&gt;
==1.) Derive Rutherford Formula==&lt;br /&gt;
&lt;br /&gt;
Derive the Rutherford Scattering formula following the approach used in the notes for the elastic scattering of two impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[TF_SPIM_Intro#Example_4:_Elastic_Scattering]]&lt;br /&gt;
&lt;br /&gt;
==2.) Compile and Install your own version of GEANT4==&lt;br /&gt;
&lt;br /&gt;
see&lt;br /&gt;
&lt;br /&gt;
http://geant4.cern.ch/&lt;br /&gt;
&lt;br /&gt;
or step by step instructions at&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==2.) Example B2a in GEANT4 ==&lt;br /&gt;
&lt;br /&gt;
You will learn how to setup your Unix environment to compile B2a from the GEANT4 distribution&lt;br /&gt;
&lt;br /&gt;
===a.) Compile and run the default version of B2a in GEANT4 ===&lt;br /&gt;
You can use a computer screen shot to prove you did this.&lt;br /&gt;
&lt;br /&gt;
===b.) Now make your own copy of it and change the target material===&lt;br /&gt;
&lt;br /&gt;
=Homework 3=&lt;br /&gt;
&lt;br /&gt;
1.) Use GEANT4 to simulate the calculation of energy loss for a charged particle traversing LH2.  In class I showed an example for an incident 10 MeV proton.  You need to pick another particle (pion, kaon, muon ...) and a different energy.  Compare your answer with the Triumf curve[[Image:SPIM_HydrogenStoppingPower.pdf]].&lt;br /&gt;
&lt;br /&gt;
2.)  Show a hand calculation of &amp;lt;math&amp;gt; \frac{dE}{dx}&amp;lt;/math&amp;gt; for the heavy charged particle you chose to simulate in problem 1.  Use the particle's energy at one of the tracking steps and compare to what GEANT4 found.&lt;br /&gt;
&lt;br /&gt;
3.) Graph dE/dX -vs- E  for E between 1 and 10 MeV.&lt;br /&gt;
&lt;br /&gt;
=Homework 4=&lt;br /&gt;
&lt;br /&gt;
1.) Show that the maximum energy transfered to thin absorbers for a relativistic head on collision is &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;W_{max} = \frac{(pc)^2}{\frac{1}{2} \left [  m_e c^2 + \left ( \frac{M^2 c^2}{m_e} \right )  \right ] + \sqrt{(pc)^2 + (Mc^2)^2}}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; = momentum of incident heavy charged ion of mass &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;m_e&amp;lt;/math&amp;gt; = mass of target electron initially at rest&lt;br /&gt;
&lt;br /&gt;
2.) Use GEANT4 to determine the Range of the particle chosen in Homework 3 through liquid hydrogen as a function of at least three of the Energies used in Homework 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:RangeInLH2.pdf]]&lt;br /&gt;
&lt;br /&gt;
= Homework 5 =&lt;br /&gt;
&lt;br /&gt;
1.) You need to lower the beam energy of 600 MeV protons to 400 MeV using a slab of copper.  The density of the copper is 8.962 &amp;lt;math&amp;gt;\frac{g}{cm^3}&amp;lt;/math&amp;gt;.  Determine how thick the copper should be by performing a riemann integral using the stopping power curve:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;x = -\int_{600 MeV}^{400 MeV}\left [\frac{dE}{dx} \right ]^{-1} dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stopping Power of several particles through Copper as a function of energy is shown in this curve. [[Image:StoppingPowerInCopper.pdf]]&lt;br /&gt;
[[File:StoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
[[Image:HiResStoppingPowerInCopper.png | 200 px]]&lt;br /&gt;
&lt;br /&gt;
[http://www.datathief.org/ Data Thief]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Alter GEANT4 example N02 to check your answer for problem 1 above.  I expect you to hand in a screen shot showing GEANT4 tracking the proton from 600 MeV to 400 MeV.&lt;br /&gt;
&lt;br /&gt;
3.) Find &amp;lt;math&amp;gt;\frac{\sigma_R}{R}&amp;lt;/math&amp;gt; using GEANT4 for a 600 MeV proton traveling through a slab of copper.  You will need to make the copper thick enough to stop the proton.  Then output the stopping distance to a file which you can read into ROOT using some of the software we used for Homework 1's RNG problem.&lt;br /&gt;
&lt;br /&gt;
= Homework 6 =&lt;br /&gt;
[[SPIM_Brem_Lab_Instructions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_BremE-Spectrum-Tantalum.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[File:SPIM_LaTex_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
= Homework 7 =&lt;br /&gt;
&lt;br /&gt;
[[SPIM_PhotElectricEffect_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
= Homework 8 =&lt;br /&gt;
[[SPIM_ComptonScattering_Lab]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Homework 9 =&lt;br /&gt;
&lt;br /&gt;
1.) Write a Paragraph (4 - 5 sentences) describing the Simulation you would like to perform as your Project for this class.  You will need to write a title.  You will need to specify the reaction you will be simulating.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the Latex skeleton file below to format your document&lt;br /&gt;
&lt;br /&gt;
[[Media:SPIM_LaTex1_TemplateFile.txt]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
some commands:&lt;br /&gt;
&lt;br /&gt;
 latex filename&lt;br /&gt;
 dvips filename -o temp.ps &lt;br /&gt;
 pdflatex filename&lt;br /&gt;
&lt;br /&gt;
= Homework 10 =&lt;br /&gt;
There are 2 parts to this homework.  First you will compare&lt;br /&gt;
relative rates for the PhotoElectric, Compton, and pair&lt;br /&gt;
production physics processes using the same target you used in&lt;br /&gt;
Homework 10.  Second you will write another section of your&lt;br /&gt;
project which describes the experimental results you are going to&lt;br /&gt;
compare to using GEANT4.&lt;br /&gt;
&lt;br /&gt;
1.)  Compare Photoelectric, Compton and pair production rates relative to eachother using the same target used in the last Homework assignment (#10).&lt;br /&gt;
&lt;br /&gt;
a.) first turn on all three physics processes for a gamma particle in the physics list.&lt;br /&gt;
&lt;br /&gt;
b.) add variables to the output which can be used to identify which physics process is responsible for the event being written to the output file.&lt;br /&gt;
&lt;br /&gt;
c.) Run the simulation so the incident photon energy spans&lt;br /&gt;
energies from 100 eV to 10 GeV.&lt;br /&gt;
&lt;br /&gt;
d.) Use ROOT to plot a 3-D representation of the Process type on&lt;br /&gt;
one axis, the incident photon energy on the other axis and the&lt;br /&gt;
number of counts along the z-axis.&lt;br /&gt;
&lt;br /&gt;
A bad example of such a plot for a 30 cm long Argon gas target is&lt;br /&gt;
given in the file&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_PhotoAbsorb_Argon.gif]]&lt;br /&gt;
&lt;br /&gt;
Yours will have better labels &lt;br /&gt;
&lt;br /&gt;
Hint:&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;ProcesID:Egamma&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-&amp;gt;Draw(&amp;quot;evt.ProcessID:evt.Ebeam &amp;gt;&amp;gt; (20000,0,200,3,0.5,3.5)&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;lego&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.)  Add another section to your project report which describes the experimental measurements you will be using to compare to GEANT4.  I am expecting to see a plot and references.&lt;br /&gt;
&lt;br /&gt;
= Homework 11 =&lt;br /&gt;
&lt;br /&gt;
The objective of this homework is to compare the number of collisions needed to thermalize a neutron in GEANT to the expected number of collisions using the Neutron Slowing Down Theory described in class.&lt;br /&gt;
&lt;br /&gt;
1.) Add neutron physics process to your physics list&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;G4HadronElasticProcess.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElasticData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPElastic.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPThermalScatteringData.hh&amp;quot;&lt;br /&gt;
 #include &amp;quot;G4NeutronHPorLElastic.hh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    } else if (particleName == &amp;quot;neutron&amp;quot;) {&lt;br /&gt;
      //neutron&lt;br /&gt;
      //G4NeutronHPElastic* elasticModel = new G4NeutronHPElastic();&lt;br /&gt;
      G4NeutronHPorLElastic* elasticModel = new G4NeutronHPorLElastic();&lt;br /&gt;
     // define process to handle elastic scattering&lt;br /&gt;
      G4HadronElasticProcess* hadElastProc = new G4HadronElasticProcess();&lt;br /&gt;
     // register the model you are using for eleastic scattering&lt;br /&gt;
      hadElastProc-&amp;gt;RegisterMe(elasticModel);&lt;br /&gt;
    // add the elastic scattering process to the process manager&lt;br /&gt;
      G4ProcessManager* pmanager = G4Neutron::Neutron()-&amp;gt; GetProcessManager();&lt;br /&gt;
      pmanager-&amp;gt;AddDiscreteProcess(hadElastProc);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a Liquid Hydrogen target&lt;br /&gt;
  G4Material* LH2 = &lt;br /&gt;
    new G4Material(&amp;quot;Hydrogen&amp;quot;, z=1., a= 1.01*g/mole, density= 0.07*g/cm3, kStateGas,3*kelvin,1.7e5*pascal);&lt;br /&gt;
&lt;br /&gt;
change the target to be a 60 cm square and 60 cm thick in Z (a 60 cm cube)&lt;br /&gt;
&lt;br /&gt;
  fTargetLength  = 60 * cm;                        // Full length of Target&lt;br /&gt;
&lt;br /&gt;
  solidTarget = new G4Box(&amp;quot;target&amp;quot;,fTargetLength,fTargetLength,targetSize);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]] Back to Notes&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130022</id>
		<title>TF SPIM Intro</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130022"/>
		<updated>2025-01-17T17:47:59Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Example 1: Create Ntuple  and Draw Histogram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction=&lt;br /&gt;
&lt;br /&gt;
Experimentalists use simulations to predict the sources of background which will interfere with the signal they plan on measuring.  An important aspect of this process is to understand how signals are produced in your measurement device.  Devices share the common problem of isolating a signal produced in the device from the noise that is present in the device.  &lt;br /&gt;
&lt;br /&gt;
Below is a description of how signals are produced in bulk materials.&lt;br /&gt;
&lt;br /&gt;
==Particle Detection ==&lt;br /&gt;
A device detects a particle only after the particle transfers energy to the device.&lt;br /&gt;
&lt;br /&gt;
Energy intrinsic to a device depends on the material used in a device&lt;br /&gt;
&lt;br /&gt;
Consider a device made of some material with an average atomic number (&amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;)  at some temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;).  The material's atoms are in constant thermal motion (unless you can manage to have T = zero degrees Klevin).&lt;br /&gt;
&lt;br /&gt;
Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E) = \frac{1}{kT} e^{-\frac{E}{kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E)&amp;lt;/math&amp;gt; represents the probability of any atom in the system having an energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= 1.38 \times 10^{-23} \frac{J}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  You may be more familiar with the Maxwell-Boltzmann distribution in the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;N(\nu) = 4 \pi N \left ( \frac{m}{2\pi k T} \right ) ^{3/2} v^2  e^{-mv^2/2kT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N(v) \Delta v&amp;lt;/math&amp;gt; would represent the molecules in the gas sample with speeds between &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v + \Delta v&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 1: P(E=5 eV) ===&lt;br /&gt;
&lt;br /&gt;
;What is the probability that an atom in a 12.011 gram block of carbon would have an energy of 5 eV? &lt;br /&gt;
&lt;br /&gt;
First lets check that the probability distribution is Normalized; ie: does &amp;lt;math&amp;gt;\int_0^{\infty} P(E) dE =1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Physically, &amp;lt;math&amp;gt;P(E=5eV)&amp;lt;/math&amp;gt; is calculated by integrating P(E) over some energy interval ( ie:&amp;lt;math&amp;gt; N(v) dv&amp;lt;/math&amp;gt;).  I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1 eV/kT} - e^{4.9 eV/kT}]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right )  =  \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right ) \left (6.42 \times 10^{18} \frac{eV}{J} \right )= 8.614 \times 10^{-5} \frac {eV}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
assuming a room temperature of &amp;lt;math&amp;gt;T=300 K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&amp;lt;math&amp;gt;kT = 0.0258 \frac{eV}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in other words the probability may be approximated by just using the distribution function alone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=5eV) = e^{-5/0.0258} \approx 10^{-85}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approximation breaks down as &amp;lt;math&amp;gt;E \rightarrow 0.0258 eV&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt;carbon atoms, we would not expect to see a 5 eV carbon atom in a sample size of &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt; carbon atoms when the probability of observing such an atom is &amp;lt;math&amp;gt;\approx 10^{-85}&amp;lt;/math&amp;gt;.  Note: The mass of the earth is about &amp;lt;math&amp;gt;10^{27}&amp;lt;/math&amp;gt; g &amp;lt;math&amp;gt;\approx 10^{50}&amp;lt;/math&amp;gt; atoms, so a carbon atom with an energy of 5 eV would be difficult to observe  in a detector the size of the earth .&lt;br /&gt;
&lt;br /&gt;
The average energy we expect to see would be calculated by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&amp;lt;E&amp;gt; = \int_{0}^{\infty} E \cdot P(E) dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
;Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.&lt;br /&gt;
&lt;br /&gt;
approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0258} \approx 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
approximately 10 eV of energy is needed to ionize an atom in a gas chamber&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=10 eV) = e^{-10/0.0258} \approx 10^{-169}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
But if you cool the silicon detector to 200 degrees Kelvin (200 K) then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0172} \approx 10^{-26} &amp;lt;&amp;lt; 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.&lt;br /&gt;
&lt;br /&gt;
also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it's quantum efficiency for absorbing energy.&lt;br /&gt;
&lt;br /&gt;
; What does this have to do with Simulations?&lt;br /&gt;
: You just did a SImulation.  Consider the following description of the Monte Carlo Method&lt;br /&gt;
&lt;br /&gt;
== The Monte Carlo method ==&lt;br /&gt;
; Stochastic&lt;br /&gt;
: from the greek word &amp;quot;stachos&amp;quot;&lt;br /&gt;
: a means of, relating to, or characterized by conjecture and randomness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A stochastic process is one whose behavior is non-deterministic in that the next state of the process is partially determined.&lt;br /&gt;
&lt;br /&gt;
The above particle detector was an example of describing a stochastic process using a probability distribution to determine the likely hood of finding an atom with a certain energy.&lt;br /&gt;
&lt;br /&gt;
Physics at the Quantum Mechanics  scale contains some of the clearest examples of such a non-deterministic systems.  The canonical systems in Thermodynamics is another example.&lt;br /&gt;
&lt;br /&gt;
Basically the monte-carlo method uses a random number generator (RNG) to generate a distribution (gaussian, uniform, Poission,...) which is used to solve a stochastic process based on an astochastic description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2 Calculation of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
;Astochastic description:&lt;br /&gt;
: &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; may be measured as the ratio of the area of a circle of radius &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; divided by the area of a square of length &amp;lt;math&amp;gt;2r&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PI_from_AreaRatio.jpg]]&amp;lt;math&amp;gt;\frac{A_{circle}}{A_{square}} = \frac{\pi r^2}{4r^2} = \frac{\pi}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure the value of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; if you physically measure the above ratios.&lt;br /&gt;
&lt;br /&gt;
; Stochastic description:&lt;br /&gt;
: Construct a dart board representing the above geometry, throw several darts at it, and look at a ratio of the number of darts in the circle to the total number of darts thrown (assuming you always hit the dart board).&lt;br /&gt;
&lt;br /&gt;
; Monte-Carlo Method&lt;br /&gt;
:Here is an outline of a program to calulate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte-Carlo method with the above Stochastic description&lt;br /&gt;
[[Image:MC_PI_fromAreaRatio.jpg]]&lt;br /&gt;
 begin loop&lt;br /&gt;
  x=rnd&lt;br /&gt;
  y=rnd&lt;br /&gt;
  dist=sqrt(x*x+y*y)&lt;br /&gt;
  if dist &amp;lt;= 1.0 then numbCircHits+=1.0&lt;br /&gt;
  numbSquareHist += 1.0&lt;br /&gt;
 end loop&lt;br /&gt;
  print PI = 4*numbCircHits/numbSquareHits&lt;br /&gt;
&lt;br /&gt;
== A Unix Primer ==&lt;br /&gt;
To get our feet wet using the UNIX operating system, we will try to solve example 2 above using a RNG under UNIX&lt;br /&gt;
&lt;br /&gt;
===List of important Commands===&lt;br /&gt;
&lt;br /&gt;
# ls&lt;br /&gt;
# pwd&lt;br /&gt;
# cd&lt;br /&gt;
# df&lt;br /&gt;
# ssh&lt;br /&gt;
# scp&lt;br /&gt;
# mkdir&lt;br /&gt;
# printenv&lt;br /&gt;
# emacs, vi, vim&lt;br /&gt;
# make, gcc&lt;br /&gt;
# man&lt;br /&gt;
# less&lt;br /&gt;
# rm&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Most of the commands executed within a shell under UNIX have command line arguments (switches) which tell the command to print information about using the command to the screen.  The common forms of these switches are &amp;quot;-h&amp;quot;, &amp;quot;--h&amp;quot;, or &amp;quot;--help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ls --help&lt;br /&gt;
 ssh -h&lt;br /&gt;
&lt;br /&gt;
'' the switch deponds on your flavor of UNIX''&lt;br /&gt;
&lt;br /&gt;
if using the switch doesn't help you can try the &amp;quot;man&amp;quot; (sort for manual) pages (if they were installed).  &lt;br /&gt;
Try&lt;br /&gt;
 man -k pwd&lt;br /&gt;
&lt;br /&gt;
the above command will search the manual for the key word &amp;quot;pwd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example 3: using UNIX to compile a RNG===&lt;br /&gt;
&lt;br /&gt;
Step&lt;br /&gt;
# login to thorshammer (ssh username@thorshammer.rdc.isu.edu)&lt;br /&gt;
# mkdir src&lt;br /&gt;
# cd src&lt;br /&gt;
# mkdir PI&lt;br /&gt;
# cd PI&lt;br /&gt;
# copy past program PI.cc from Moodle into editor on thorshammer&lt;br /&gt;
# ls&lt;br /&gt;
# g++ -o PI PI.cc&lt;br /&gt;
#./PI&lt;br /&gt;
&lt;br /&gt;
== A Root Primer ==&lt;br /&gt;
If typing the command &amp;quot;root&amp;quot; in your unix shell does not work then you need to setup your shell environment so it cn find the application&lt;br /&gt;
&lt;br /&gt;
If you are on thorshamer&lt;br /&gt;
&lt;br /&gt;
In bash shell do&lt;br /&gt;
&lt;br /&gt;
 export ROOTSYS=~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
if chsh do &lt;br /&gt;
&lt;br /&gt;
 setenv ROOTSYS ~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
To start the root program type&lt;br /&gt;
&lt;br /&gt;
 $ROOTSYS/bin/root&lt;br /&gt;
&lt;br /&gt;
another method&lt;br /&gt;
&lt;br /&gt;
 source ~foretony/src/ROOT/root/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Create Ntuple  and Draw Histogram===&lt;br /&gt;
&lt;br /&gt;
Look for the program &amp;quot;asci2root.C&amp;quot; in Moodle&lt;br /&gt;
&lt;br /&gt;
copy and paste it into you editor on the machine you would like to run root on.&lt;br /&gt;
&lt;br /&gt;
then try the following&lt;br /&gt;
&lt;br /&gt;
 root&lt;br /&gt;
&lt;br /&gt;
your shell prompt will change to look like thei : root [0]&lt;br /&gt;
&lt;br /&gt;
type&lt;br /&gt;
&lt;br /&gt;
 .x asci2root.C&lt;br /&gt;
&lt;br /&gt;
then exit the root program with &lt;br /&gt;
&lt;br /&gt;
 .q&lt;br /&gt;
&lt;br /&gt;
and restart it with &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
and try the command &lt;br /&gt;
&lt;br /&gt;
 Simm-&amp;gt;Draw(&amp;quot;evt.x&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
== Cross Sections ==&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
;Total cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma \equiv \frac{\# \mbox{ particles scattered}} {\frac{ \# \mbox{ incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Differential cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt; \frac{d \sigma}{d \Omega} \equiv \frac{\frac{\# \mbox{ particles scattered}}{\mbox{solid angle}}} {\frac{ \# \mbox{incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Solid Angle&lt;br /&gt;
:[[Image:SolidAngleDefinition.jpg]]&lt;br /&gt;
: &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;= surface area of a sphere covered by the detector&lt;br /&gt;
: ie;the detectors area projected onto the surface of a sphere&lt;br /&gt;
:A= surface area of detector&lt;br /&gt;
:r=distance from interaction point to detector&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega = \frac{A}{r^2} sr &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;sr \equiv&amp;lt;/math&amp;gt; steradians&lt;br /&gt;
: &amp;lt;math&amp;gt;A_{\mbox{sphere}} = 4 \pi r^2&amp;lt;/math&amp;gt; if your detector was a hollow ball&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega_{\mbox{max}} = \frac{4 \pi r^2}{r^2} = 4\pi&amp;lt;/math&amp;gt;steradians&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
:Cross-sections have the units of Area&lt;br /&gt;
:1 barn = &amp;lt;math&amp;gt;10^{-28} m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
; [units of &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;] =&amp;lt;math&amp;gt;\frac{\frac{[\mbox{particles}]}{[\mbox{steradian}]}} {\frac{ [ \mbox{particles}]}{[m^2]}} = m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
;Luminosity&lt;br /&gt;
:&amp;lt;math&amp;gt;L = \frac{\mbox{Number of Scatterers}}{\mbox{Area} \cdot \mbox{time}} \sim i_{\mbox{beam}} \rho_{\mbox{target}} l_{\mbox{target}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:FixedTargetScatteringCrossSection.jpg | 500 px]]&lt;br /&gt;
; Fixed target scattering&lt;br /&gt;
: &amp;lt;math&amp;gt;N_{in}&amp;lt;/math&amp;gt;= # of particles in = &amp;lt;math&amp;gt;I \cdot A_{in}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;A_{in}&amp;lt;/math&amp;gt; is the area of the ring of incident particles&lt;br /&gt;
:&amp;lt;math&amp;gt;dN_{in} = I \cdot dA = I (2\pi b) db&amp;lt;/math&amp;gt;= # particles in a ring of radius &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and thickness &amp;lt;math&amp;gt;db&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; if you measure the # of particles detected &amp;lt;math&amp;gt;d N&amp;lt;/math&amp;gt; in a known detector solid angle &amp;lt;math&amp;gt;d \Omega&amp;lt;/math&amp;gt; from a known incident particle Flux (&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;)  as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{\frac{d N}{ d \Omega}}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively if you have a theory which tells you &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; which you want to test experimentally with a beam of flux &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; then you would measure counts (particles)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dN = I \sigma(\theta) d \Omega = I \sigma(\theta)  \frac{d A}{r^2} = I \sigma(\theta) \frac{r^2 \sin(\theta) d \theta d \phi}{r^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
: &amp;lt;math&amp;gt;[d N] = [\frac {\mbox{particles}}{m^2}][m^2] [\mbox{steradian}] &amp;lt;/math&amp;gt; = # of particles&lt;br /&gt;
: or for a count rate divide both sides by time and you get beam current on the RHS&lt;br /&gt;
: integrate and you have the total number of counts&lt;br /&gt;
&lt;br /&gt;
;Classical Scattering&lt;br /&gt;
: In classical scattering you get the same number of particles out that you put in (no capture, conversion,..)&lt;br /&gt;
: &amp;lt;math&amp;gt;d N_{in} = dN&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;d N_{in} = I dA = I (2\pi b) db&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;d N = I \sigma(\theta) d \Omega =   I \sigma(\theta) \sin(\theta) d \theta d \phi = I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;  I (2\pi b) db =  I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;    b  db =   \sigma(\theta) \sin(\theta) d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta) =  \frac{b}{\sin(\theta)}\frac{db}{d \theta}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{db}{d \theta}&amp;lt;/math&amp;gt; tells you how the impact parameter &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; changes with scattering angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 4: Elastic Scattering ===&lt;br /&gt;
This example is an example of classical scattering.&lt;br /&gt;
&lt;br /&gt;
Our goal is to find &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; for an elastic collision of 2 impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.  We need to look for a relationship between the impact parameter &amp;lt;math&amp;gt; b&amp;lt;/math&amp;gt; and the scattering angle &amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.  To find this relationship, let's solve this elastic scattering problem by  describing the collision using the Center of Mass (C.M.) coordinate system in terms of the reduced mass.  As we shall see, the 2-body collision becomes a 1-body problem  when a C.M. coordinate system is used.  Then we will describe the motion of the reduced mass in the C.M. Frame.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_Lab_CM_Frame.jpg | 500 px]]&lt;br /&gt;
[[Media:SPIM_ElasCollis_Lab_CM_Frame.xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
; Variable definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt;= impact parameter ; distance of closest approach&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;= mass of incoming ball&lt;br /&gt;
:&amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;= mass of target ball&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt;= iniital velocity of  incoming ball in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab frame after collision&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;u_2^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_2^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. frame after collision&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Determining the reduced mass:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_2Body-1BodyCoordSystem.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
; vector definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{R}&amp;lt;/math&amp;gt; = a position vector pointing to the center of mass of the two ball system&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r} \equiv \vec{r}_1 - \vec{r}_2&amp;lt;/math&amp;gt; = the magnitude of this vector is the distance between the two masses&lt;br /&gt;
&lt;br /&gt;
In the C.M. reference frame the above vectors have the following relationships&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{R} = 0 = \frac{m_1 \vec{r}_1 + m_2 \vec{r}_2}{m_1 + m_2} \Rightarrow m_1 \vec{r}_1 = -m_2 \vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{r}_1 - \vec{r}_2 = \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving the above equations for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r_2}&amp;lt;/math&amp;gt; and defining the reduced mass &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu = \frac{m_1 \cdot m_2}{m_1 + m_2} \equiv&amp;lt;/math&amp;gt; reduced mass&lt;br /&gt;
&lt;br /&gt;
leads to &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_1 = \frac{\mu}{m_1} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_2 = -\frac{\mu}{m_2} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can use the above reduced mass relationships to construct the Lagrangian in terms of &amp;lt;math&amp;gt;\vec{r}&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \vec{r}_2&amp;lt;/math&amp;gt; thereby reducing the problem from a 2-body problem to a 1-body problem.&lt;br /&gt;
&lt;br /&gt;
; Construct the Lagrangian&lt;br /&gt;
&lt;br /&gt;
The Lagrangian is defined as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T - U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T \equiv&amp;lt;/math&amp;gt; kinetic energy of the system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U \equiv&amp;lt;/math&amp;gt; Potential energy of the system which describes the interaction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} |\vec{\dot{r}}_1|^2 + \frac{1}{2} |\vec{\dot{r}}_2|^2 - U&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} m_1 \left (\frac{m_2}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 + \frac{1}{2} m_2 \left (\frac{m_1}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} \left ( m_2 + m_1 \right ) \left (\frac{m_1m_2}{(m_1+m_2)^2} \right )  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting derivative of the expressions for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: = &amp;lt;math&amp;gt;\frac{1}{2} \mu |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The 2-body problem is now described by a 1-body Lagrangian we need to determine which coordinate system (cartesian, spherical,..) to use to write an expression for (&amp;lt;math&amp;gt;|\vec{\dot{r}}|^2&amp;lt;/math&amp;gt;).  Polar seems best unless there is a dependence in the azimuthal angle.&lt;br /&gt;
&lt;br /&gt;
Lagranges equations of motion are given by&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\partial \mathcal{L}}{\partial q} = \frac{d}{dt} \frac{\partial \mathcal{L}}{\dot{q}}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; represents one of the coordinate (cannonical variables).&lt;br /&gt;
&lt;br /&gt;
To get the classical scattering cross section we are interested in finding an expression for the dependence of the impact parameter on the scattering angle,&amp;lt;math&amp;gt;\frac{d b}{d \theta}&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Now lets redraw the collision in terms of a reference frame fixed on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; (before collision its the Lab Frame but not after collision).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_CMFrame.jpg]] [[Media:SPIM_ElasColls_CMFrame_xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
The C.M. Frame rides along the center of mass, the above coordinate system though has its origin on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   The above drawing identifies &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; for the system at the point of the collision in which the CM frame is a distance &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; (the size of the ball) from the origin of the coordinate system fixed to &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   If &amp;lt;math&amp;gt;b &amp;gt; a&amp;lt;/math&amp;gt; then there is no collision (&amp;lt;math&amp;gt;\theta=0&amp;lt;/math&amp;gt;),  otherwise a collision happens when r=a (the distance between the balls is equal to their diameter).  A head on collision is defined as &amp;lt;math&amp;gt;b=0&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta=\pi&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;Observation&lt;br /&gt;
: as &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; gets smaller, &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{d b}{d \theta} &amp;lt; 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using plane polar coordinates (&amp;lt;math&amp;gt;r, \phi&amp;lt;/math&amp;gt;) we can describe the problem in the lab frame as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v} = \dot{r} \hat{e}_r + r \dot{\phi} \hat{e}_{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U(r) = \left \{  {0 \; r &amp;gt; a \atop \infty \; r \le a} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T -U = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2) - U(r)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Lagranges Equation of Motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial \mathcal {L}}{\partial \phi} = \frac{d}{d t} \frac{\partial \mathcal{L}}{\partial \dot{\phi}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;0 = \frac{d}{d t} [ \mu r^2 \dot{\phi}] \Rightarrow&amp;lt;/math&amp;gt;  there is a constant of motion ( Constant angular momentum)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ell \equiv \mu r^2 \dot{\phi} = \vec{r} \times \vec{p} = \vec{r} \times \mu \vec{v} = r^2 \mu \dot{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substitute &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mathcal{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} ( \mu  \dot{r}^2 + \frac{\ell}{\mu r^2} ) - U(r)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The two equations above are in terms of &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; whereas our goal is to find an expression for &amp;lt;math&amp;gt;\frac{ d b}{ d \theta}&amp;lt;/math&amp;gt;.  Since &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is related to &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is related to&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta = \pi - 2\phi&amp;lt;/math&amp;gt;; see figure above) we should try and find expressions for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;r(b)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Trick&lt;br /&gt;
: &amp;lt;math&amp;gt;\dot{\phi} = \frac{d \phi}{d t} = \frac{d \phi}{d r} \frac{d r}{d t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \ell = \mu r^2 \frac{d \phi}{d r} \dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
:or&lt;br /&gt;
: &amp;lt;math&amp;gt;d \phi = \frac{\ell}{\mu r^2 \dot{r}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We now need an expression for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt; in order to integrate the above equation to determine the functional dependence of &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; and hence&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The potential in the Lagrangian  though is infinite for &amp;lt;math&amp;gt;r \le a&amp;lt;/math&amp;gt; .  Let's use the property of conservation of energy to accommodate this mathematical construct.&lt;br /&gt;
&lt;br /&gt;
Since Energy is conserved (Elastic Scattering), we may define the Hamiltonian as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H = T + U = \frac{1}{2} (\mu \dot{r}^2 + \frac{\ell}{\mu r^2}) + U(r) = constant \equiv E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dot{r} = \pm \sqrt{\frac{2(E-U(r))}{\mu} - \frac{\ell^2}{\mu^2 r^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting the above into the equation for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; and integrating:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int d \phi = \int_{r_{min}}^{r_{max}} \frac{\ell}{\mu r^2 \dot{R}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{min} = a   \; \; \;  r_{max}= \infty   \; \; \;   U(r) = 0 : a \le r \le \infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int_a^{\infty} \frac{\ell} {r^2 \sqrt{2 \mu E - \frac{\ell^2}{r^2}} }dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;a \le r \le \infty&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;E = \frac{1}{2} \mu v^2_{cm} \Rightarrow v_{cm} = \sqrt{\frac{2E}{\mu}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{\ell} = \vec{r} \times \vec{p} \Rightarrow |\vec{\ell}| = |\vec{r}| |\vec{p}| \sin(\phi) = r \mu v_{cm} \sin(\phi) = r \mu \left ( \sqrt{\frac{2E}{\mu}} \right) \sin(\phi) = \sqrt{2 \mu E} r\sin(\phi) =\sqrt{2 \mu E} b&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting this expression for &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into the last expression for &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi =\int_a^{\infty}  \frac{b dr}{r\sqrt{(r^2-b^2)}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Integral Table&lt;br /&gt;
: &amp;lt;math&amp;gt;\int  \frac{dx}{x\sqrt{(\alpha x^2+\beta x+\gamma)}} = \frac{-1}{\sqrt{-\gamma}} \sin^{-1} \left (\frac{\beta x+2\gamma}{|x|\sqrt{\beta^2-4\alpha \gamma}} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let &amp;lt;math&amp;gt;x=r \;\; \alpha=1 \;\; \beta=0 \;\; \gamma=-b^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \left . b \frac{1}{\sqrt{-(-b^2)}} \sin^{-1} \left (\frac{-2b^2}{r\sqrt{0-4(1)(-b^2) } }\right ) \right |_a^{\infty} = \sin^{-1} (0)- \sin^{-1}(-\frac{b}{a})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sin(\phi) = \frac{b}{a} = \sin \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \cos \left ( \frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow b = a \cos \left( \frac{\theta}{2} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Now substitute the above into the expression for &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{b}{\sin(\theta)} \frac{d b}{d \theta} = \frac{a \cos(\theta/2)}{sin(\theta)} a[-\sin(\theta/2)]\frac{1}{2} &lt;br /&gt;
= \frac{a^2}{2} \frac{\cos(\theta/2) \sin(\theta/2)}{\sin(\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
drop the negative sign, sqrt in denominator allows this, and use the trig identity&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin \left (\frac{\theta}{2} + \frac{\theta}{2} \right ) = \cos \left (\frac{\theta}{2} \right) \sin \left (\frac{\theta}{2} \right ) + \cos \left ( \frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin(\theta) = 2 \cos \left (\frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{a^2}{2} \frac{1}{2} = \frac{a^2}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \int \sigma(\theta) d \Omega = \frac{a^2}{2} \frac{1}{2} 4 \pi  = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;compare with result from definition&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; = scattering cross-section &amp;lt;math&amp;gt;\equiv \frac{\# particles\; scattered} {\frac{ \# incident \; particles}{Area}}&amp;lt;/math&amp;gt;&lt;br /&gt;
:number of particles scattered = number of incident particles&lt;br /&gt;
: Area = &amp;lt;math&amp;gt; \pi a^2&amp;lt;/math&amp;gt; = The area profile in which a collision occurs( the ball diameter is &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;) [[Image:ClassicalEffectiveScatteringArea.jpg | 200 px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \frac{{N}}{\frac{ N}{\pi a^2}} = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lab Frame Cross Sections ===&lt;br /&gt;
&lt;br /&gt;
The C.M. frame is often chosen to theoretically calculate cross-sections even though experiments are conducted in the Lab frame.  In such cases you will need to transform cross-sections between two frames.&lt;br /&gt;
&lt;br /&gt;
The total cross-section should be frame independent&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_{C.M.} = \sigma_{Lab}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is in the CM frame and &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; is in the Lab frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;A non-relativistic transformation:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) 2 \pi \sin(\theta) d \theta = \sigma(\psi) 2 \pi \sin (\psi) d \psi&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation is governed by the dependence of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt; \psi&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt; \left( \frac{d \theta}{d \psi} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets return back to our picture of the scattering Process&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
if we superimpose the vectors &amp;lt;math&amp;gt;\vec{v}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{v}_1^{\prime}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame_Velocities.jpg]]&lt;br /&gt;
&lt;br /&gt;
Trig identities (non-relativistic Gallilean transformation) tell us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 \sin(\psi) = v_1^{\prime} \sin(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 cos(\psi) = v_{cm} + v_1^{\prime} \cos(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\psi)}{\cos(\psi)} = \frac{v_1^{\prime} \sin(\theta)/v_1}{\frac{v_{CM}}{v_1} + \frac{v_1^{\prime} \cos(\theta)}{v_1} }&lt;br /&gt;
= \frac{\sin(\theta)}{\cos(\theta) + \frac{v_{CM}}{v_1^{\prime}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an elastic collision only the directions change in the CM Frame: &amp;lt;math&amp;gt;u_1^{\prime}= v_1^{\prime}&amp;lt;/math&amp;gt;  &amp;amp; &amp;lt;math&amp;gt;u_1^{\prime}= v_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;From the definition of the C.M.&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{v}_{CM} = \frac{m_1 \vec{u}_1 + m_2 \vec{u}_2}{m_1+m_2} = \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;conservation of momentum in CM Frame &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1 u_1^{\prime} = - m_2 u_2{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Rightarrow v_1^{\prime} = u_1^{\prime} = \frac{-m_2}{m_1} u_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Gallilean Coordinate transformation:&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{u}_1 = \vec{u}_1^{\prime} + \vec{v}_{CM} = \vec{u}_1^{\prime} + \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow u_1{\prime} = \left [ 1 - \frac{m_1}{m_1 + m_2} \right ] u_1 = \frac{m_2}{m_1+m_2}u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow v_1^{\prime} = u_1^{\prime}  =\frac{m_2}{m_1+m_2} u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; another expression for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using the above gallilean transformation we can do the following&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{v_{CM}}{v_1^{\prime}}= \frac{\frac{m_1}{m_1+m_2} u_1}{\frac{m_2}{m_1+m_2} u_1} = \frac{m_1}{m_2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\theta)}{\cos(\theta) + \frac{m_1}{m_2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after a little trig substitution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{m_1}{m_2} = \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
&lt;br /&gt;
now use the chain rule to find &amp;lt;math&amp;gt;\frac{d \theta}{d \psi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f \equiv  \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
:&amp;lt;math&amp;gt;df = 0 = \frac{ \partial f}{\partial \psi} d \psi  + \frac{ \partial f}{\partial \theta} d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \frac{d \theta}{d \psi} = \frac{-\frac{ \partial f}{\partial \psi} }{\frac{ \partial f}{\partial \theta} }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{ \partial f}{\partial \psi} = \frac{\cos(\theta - \psi)}{\sin(\psi)} + \frac{\sin(\theta - \psi)}{\sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{ \partial f}{\partial \theta }= 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substitution:&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{\sin(\theta)}{\sin(\psi)} \left [ 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)} \right ] \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the above equation to be more useful one would prefer to recast it in terms of only &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; and masses.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\psi) = \frac{\left [ \frac{m_1}{m_2}\cos(\psi) + \sqrt{1-\left ( \frac{m_1 \sin(\psi) }{m_2} \right )^2 }\right ]}{\sqrt{1 - \left ( \frac{m_1 \sin(\psi)}{m_2}\right )^2 }}\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130021</id>
		<title>TF SPIM Intro</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130021"/>
		<updated>2025-01-17T17:47:30Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Example 1: Create Ntuple  and Draw Histogram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction=&lt;br /&gt;
&lt;br /&gt;
Experimentalists use simulations to predict the sources of background which will interfere with the signal they plan on measuring.  An important aspect of this process is to understand how signals are produced in your measurement device.  Devices share the common problem of isolating a signal produced in the device from the noise that is present in the device.  &lt;br /&gt;
&lt;br /&gt;
Below is a description of how signals are produced in bulk materials.&lt;br /&gt;
&lt;br /&gt;
==Particle Detection ==&lt;br /&gt;
A device detects a particle only after the particle transfers energy to the device.&lt;br /&gt;
&lt;br /&gt;
Energy intrinsic to a device depends on the material used in a device&lt;br /&gt;
&lt;br /&gt;
Consider a device made of some material with an average atomic number (&amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;)  at some temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;).  The material's atoms are in constant thermal motion (unless you can manage to have T = zero degrees Klevin).&lt;br /&gt;
&lt;br /&gt;
Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E) = \frac{1}{kT} e^{-\frac{E}{kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E)&amp;lt;/math&amp;gt; represents the probability of any atom in the system having an energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= 1.38 \times 10^{-23} \frac{J}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  You may be more familiar with the Maxwell-Boltzmann distribution in the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;N(\nu) = 4 \pi N \left ( \frac{m}{2\pi k T} \right ) ^{3/2} v^2  e^{-mv^2/2kT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N(v) \Delta v&amp;lt;/math&amp;gt; would represent the molecules in the gas sample with speeds between &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v + \Delta v&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 1: P(E=5 eV) ===&lt;br /&gt;
&lt;br /&gt;
;What is the probability that an atom in a 12.011 gram block of carbon would have an energy of 5 eV? &lt;br /&gt;
&lt;br /&gt;
First lets check that the probability distribution is Normalized; ie: does &amp;lt;math&amp;gt;\int_0^{\infty} P(E) dE =1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Physically, &amp;lt;math&amp;gt;P(E=5eV)&amp;lt;/math&amp;gt; is calculated by integrating P(E) over some energy interval ( ie:&amp;lt;math&amp;gt; N(v) dv&amp;lt;/math&amp;gt;).  I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1 eV/kT} - e^{4.9 eV/kT}]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right )  =  \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right ) \left (6.42 \times 10^{18} \frac{eV}{J} \right )= 8.614 \times 10^{-5} \frac {eV}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
assuming a room temperature of &amp;lt;math&amp;gt;T=300 K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&amp;lt;math&amp;gt;kT = 0.0258 \frac{eV}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in other words the probability may be approximated by just using the distribution function alone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=5eV) = e^{-5/0.0258} \approx 10^{-85}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approximation breaks down as &amp;lt;math&amp;gt;E \rightarrow 0.0258 eV&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt;carbon atoms, we would not expect to see a 5 eV carbon atom in a sample size of &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt; carbon atoms when the probability of observing such an atom is &amp;lt;math&amp;gt;\approx 10^{-85}&amp;lt;/math&amp;gt;.  Note: The mass of the earth is about &amp;lt;math&amp;gt;10^{27}&amp;lt;/math&amp;gt; g &amp;lt;math&amp;gt;\approx 10^{50}&amp;lt;/math&amp;gt; atoms, so a carbon atom with an energy of 5 eV would be difficult to observe  in a detector the size of the earth .&lt;br /&gt;
&lt;br /&gt;
The average energy we expect to see would be calculated by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&amp;lt;E&amp;gt; = \int_{0}^{\infty} E \cdot P(E) dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
;Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.&lt;br /&gt;
&lt;br /&gt;
approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0258} \approx 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
approximately 10 eV of energy is needed to ionize an atom in a gas chamber&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=10 eV) = e^{-10/0.0258} \approx 10^{-169}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
But if you cool the silicon detector to 200 degrees Kelvin (200 K) then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0172} \approx 10^{-26} &amp;lt;&amp;lt; 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.&lt;br /&gt;
&lt;br /&gt;
also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it's quantum efficiency for absorbing energy.&lt;br /&gt;
&lt;br /&gt;
; What does this have to do with Simulations?&lt;br /&gt;
: You just did a SImulation.  Consider the following description of the Monte Carlo Method&lt;br /&gt;
&lt;br /&gt;
== The Monte Carlo method ==&lt;br /&gt;
; Stochastic&lt;br /&gt;
: from the greek word &amp;quot;stachos&amp;quot;&lt;br /&gt;
: a means of, relating to, or characterized by conjecture and randomness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A stochastic process is one whose behavior is non-deterministic in that the next state of the process is partially determined.&lt;br /&gt;
&lt;br /&gt;
The above particle detector was an example of describing a stochastic process using a probability distribution to determine the likely hood of finding an atom with a certain energy.&lt;br /&gt;
&lt;br /&gt;
Physics at the Quantum Mechanics  scale contains some of the clearest examples of such a non-deterministic systems.  The canonical systems in Thermodynamics is another example.&lt;br /&gt;
&lt;br /&gt;
Basically the monte-carlo method uses a random number generator (RNG) to generate a distribution (gaussian, uniform, Poission,...) which is used to solve a stochastic process based on an astochastic description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2 Calculation of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
;Astochastic description:&lt;br /&gt;
: &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; may be measured as the ratio of the area of a circle of radius &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; divided by the area of a square of length &amp;lt;math&amp;gt;2r&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PI_from_AreaRatio.jpg]]&amp;lt;math&amp;gt;\frac{A_{circle}}{A_{square}} = \frac{\pi r^2}{4r^2} = \frac{\pi}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure the value of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; if you physically measure the above ratios.&lt;br /&gt;
&lt;br /&gt;
; Stochastic description:&lt;br /&gt;
: Construct a dart board representing the above geometry, throw several darts at it, and look at a ratio of the number of darts in the circle to the total number of darts thrown (assuming you always hit the dart board).&lt;br /&gt;
&lt;br /&gt;
; Monte-Carlo Method&lt;br /&gt;
:Here is an outline of a program to calulate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte-Carlo method with the above Stochastic description&lt;br /&gt;
[[Image:MC_PI_fromAreaRatio.jpg]]&lt;br /&gt;
 begin loop&lt;br /&gt;
  x=rnd&lt;br /&gt;
  y=rnd&lt;br /&gt;
  dist=sqrt(x*x+y*y)&lt;br /&gt;
  if dist &amp;lt;= 1.0 then numbCircHits+=1.0&lt;br /&gt;
  numbSquareHist += 1.0&lt;br /&gt;
 end loop&lt;br /&gt;
  print PI = 4*numbCircHits/numbSquareHits&lt;br /&gt;
&lt;br /&gt;
== A Unix Primer ==&lt;br /&gt;
To get our feet wet using the UNIX operating system, we will try to solve example 2 above using a RNG under UNIX&lt;br /&gt;
&lt;br /&gt;
===List of important Commands===&lt;br /&gt;
&lt;br /&gt;
# ls&lt;br /&gt;
# pwd&lt;br /&gt;
# cd&lt;br /&gt;
# df&lt;br /&gt;
# ssh&lt;br /&gt;
# scp&lt;br /&gt;
# mkdir&lt;br /&gt;
# printenv&lt;br /&gt;
# emacs, vi, vim&lt;br /&gt;
# make, gcc&lt;br /&gt;
# man&lt;br /&gt;
# less&lt;br /&gt;
# rm&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Most of the commands executed within a shell under UNIX have command line arguments (switches) which tell the command to print information about using the command to the screen.  The common forms of these switches are &amp;quot;-h&amp;quot;, &amp;quot;--h&amp;quot;, or &amp;quot;--help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ls --help&lt;br /&gt;
 ssh -h&lt;br /&gt;
&lt;br /&gt;
'' the switch deponds on your flavor of UNIX''&lt;br /&gt;
&lt;br /&gt;
if using the switch doesn't help you can try the &amp;quot;man&amp;quot; (sort for manual) pages (if they were installed).  &lt;br /&gt;
Try&lt;br /&gt;
 man -k pwd&lt;br /&gt;
&lt;br /&gt;
the above command will search the manual for the key word &amp;quot;pwd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example 3: using UNIX to compile a RNG===&lt;br /&gt;
&lt;br /&gt;
Step&lt;br /&gt;
# login to thorshammer (ssh username@thorshammer.rdc.isu.edu)&lt;br /&gt;
# mkdir src&lt;br /&gt;
# cd src&lt;br /&gt;
# mkdir PI&lt;br /&gt;
# cd PI&lt;br /&gt;
# copy past program PI.cc from Moodle into editor on thorshammer&lt;br /&gt;
# ls&lt;br /&gt;
# g++ -o PI PI.cc&lt;br /&gt;
#./PI&lt;br /&gt;
&lt;br /&gt;
== A Root Primer ==&lt;br /&gt;
If typing the command &amp;quot;root&amp;quot; in your unix shell does not work then you need to setup your shell environment so it cn find the application&lt;br /&gt;
&lt;br /&gt;
If you are on thorshamer&lt;br /&gt;
&lt;br /&gt;
In bash shell do&lt;br /&gt;
&lt;br /&gt;
 export ROOTSYS=~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
if chsh do &lt;br /&gt;
&lt;br /&gt;
 setenv ROOTSYS ~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
To start the root program type&lt;br /&gt;
&lt;br /&gt;
 $ROOTSYS/bin/root&lt;br /&gt;
&lt;br /&gt;
another method&lt;br /&gt;
&lt;br /&gt;
 source ~foretony/src/ROOT/root/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Create Ntuple  and Draw Histogram===&lt;br /&gt;
&lt;br /&gt;
Look for the program &amp;quot;ascii2root.C&amp;quot; in Moodle&lt;br /&gt;
&lt;br /&gt;
copy and paste it into you editor on the machine you would like to run root on.&lt;br /&gt;
&lt;br /&gt;
then try the following&lt;br /&gt;
&lt;br /&gt;
 root&lt;br /&gt;
&lt;br /&gt;
your shell prompt will change to look like thei : root [0]&lt;br /&gt;
&lt;br /&gt;
type&lt;br /&gt;
&lt;br /&gt;
 .x asci2root.C&lt;br /&gt;
&lt;br /&gt;
then exit the root program with &lt;br /&gt;
&lt;br /&gt;
 .q&lt;br /&gt;
&lt;br /&gt;
and restart it with &lt;br /&gt;
&lt;br /&gt;
 root -l sim.root&lt;br /&gt;
&lt;br /&gt;
and try the command &lt;br /&gt;
&lt;br /&gt;
 Simm-&amp;gt;Draw(&amp;quot;evt.x&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
== Cross Sections ==&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
;Total cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma \equiv \frac{\# \mbox{ particles scattered}} {\frac{ \# \mbox{ incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Differential cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt; \frac{d \sigma}{d \Omega} \equiv \frac{\frac{\# \mbox{ particles scattered}}{\mbox{solid angle}}} {\frac{ \# \mbox{incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Solid Angle&lt;br /&gt;
:[[Image:SolidAngleDefinition.jpg]]&lt;br /&gt;
: &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;= surface area of a sphere covered by the detector&lt;br /&gt;
: ie;the detectors area projected onto the surface of a sphere&lt;br /&gt;
:A= surface area of detector&lt;br /&gt;
:r=distance from interaction point to detector&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega = \frac{A}{r^2} sr &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;sr \equiv&amp;lt;/math&amp;gt; steradians&lt;br /&gt;
: &amp;lt;math&amp;gt;A_{\mbox{sphere}} = 4 \pi r^2&amp;lt;/math&amp;gt; if your detector was a hollow ball&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega_{\mbox{max}} = \frac{4 \pi r^2}{r^2} = 4\pi&amp;lt;/math&amp;gt;steradians&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
:Cross-sections have the units of Area&lt;br /&gt;
:1 barn = &amp;lt;math&amp;gt;10^{-28} m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
; [units of &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;] =&amp;lt;math&amp;gt;\frac{\frac{[\mbox{particles}]}{[\mbox{steradian}]}} {\frac{ [ \mbox{particles}]}{[m^2]}} = m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
;Luminosity&lt;br /&gt;
:&amp;lt;math&amp;gt;L = \frac{\mbox{Number of Scatterers}}{\mbox{Area} \cdot \mbox{time}} \sim i_{\mbox{beam}} \rho_{\mbox{target}} l_{\mbox{target}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:FixedTargetScatteringCrossSection.jpg | 500 px]]&lt;br /&gt;
; Fixed target scattering&lt;br /&gt;
: &amp;lt;math&amp;gt;N_{in}&amp;lt;/math&amp;gt;= # of particles in = &amp;lt;math&amp;gt;I \cdot A_{in}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;A_{in}&amp;lt;/math&amp;gt; is the area of the ring of incident particles&lt;br /&gt;
:&amp;lt;math&amp;gt;dN_{in} = I \cdot dA = I (2\pi b) db&amp;lt;/math&amp;gt;= # particles in a ring of radius &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and thickness &amp;lt;math&amp;gt;db&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; if you measure the # of particles detected &amp;lt;math&amp;gt;d N&amp;lt;/math&amp;gt; in a known detector solid angle &amp;lt;math&amp;gt;d \Omega&amp;lt;/math&amp;gt; from a known incident particle Flux (&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;)  as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{\frac{d N}{ d \Omega}}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively if you have a theory which tells you &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; which you want to test experimentally with a beam of flux &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; then you would measure counts (particles)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dN = I \sigma(\theta) d \Omega = I \sigma(\theta)  \frac{d A}{r^2} = I \sigma(\theta) \frac{r^2 \sin(\theta) d \theta d \phi}{r^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
: &amp;lt;math&amp;gt;[d N] = [\frac {\mbox{particles}}{m^2}][m^2] [\mbox{steradian}] &amp;lt;/math&amp;gt; = # of particles&lt;br /&gt;
: or for a count rate divide both sides by time and you get beam current on the RHS&lt;br /&gt;
: integrate and you have the total number of counts&lt;br /&gt;
&lt;br /&gt;
;Classical Scattering&lt;br /&gt;
: In classical scattering you get the same number of particles out that you put in (no capture, conversion,..)&lt;br /&gt;
: &amp;lt;math&amp;gt;d N_{in} = dN&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;d N_{in} = I dA = I (2\pi b) db&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;d N = I \sigma(\theta) d \Omega =   I \sigma(\theta) \sin(\theta) d \theta d \phi = I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;  I (2\pi b) db =  I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;    b  db =   \sigma(\theta) \sin(\theta) d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta) =  \frac{b}{\sin(\theta)}\frac{db}{d \theta}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{db}{d \theta}&amp;lt;/math&amp;gt; tells you how the impact parameter &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; changes with scattering angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 4: Elastic Scattering ===&lt;br /&gt;
This example is an example of classical scattering.&lt;br /&gt;
&lt;br /&gt;
Our goal is to find &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; for an elastic collision of 2 impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.  We need to look for a relationship between the impact parameter &amp;lt;math&amp;gt; b&amp;lt;/math&amp;gt; and the scattering angle &amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.  To find this relationship, let's solve this elastic scattering problem by  describing the collision using the Center of Mass (C.M.) coordinate system in terms of the reduced mass.  As we shall see, the 2-body collision becomes a 1-body problem  when a C.M. coordinate system is used.  Then we will describe the motion of the reduced mass in the C.M. Frame.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_Lab_CM_Frame.jpg | 500 px]]&lt;br /&gt;
[[Media:SPIM_ElasCollis_Lab_CM_Frame.xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
; Variable definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt;= impact parameter ; distance of closest approach&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;= mass of incoming ball&lt;br /&gt;
:&amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;= mass of target ball&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt;= iniital velocity of  incoming ball in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab frame after collision&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;u_2^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_2^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. frame after collision&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Determining the reduced mass:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_2Body-1BodyCoordSystem.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
; vector definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{R}&amp;lt;/math&amp;gt; = a position vector pointing to the center of mass of the two ball system&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r} \equiv \vec{r}_1 - \vec{r}_2&amp;lt;/math&amp;gt; = the magnitude of this vector is the distance between the two masses&lt;br /&gt;
&lt;br /&gt;
In the C.M. reference frame the above vectors have the following relationships&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{R} = 0 = \frac{m_1 \vec{r}_1 + m_2 \vec{r}_2}{m_1 + m_2} \Rightarrow m_1 \vec{r}_1 = -m_2 \vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{r}_1 - \vec{r}_2 = \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving the above equations for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r_2}&amp;lt;/math&amp;gt; and defining the reduced mass &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu = \frac{m_1 \cdot m_2}{m_1 + m_2} \equiv&amp;lt;/math&amp;gt; reduced mass&lt;br /&gt;
&lt;br /&gt;
leads to &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_1 = \frac{\mu}{m_1} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_2 = -\frac{\mu}{m_2} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can use the above reduced mass relationships to construct the Lagrangian in terms of &amp;lt;math&amp;gt;\vec{r}&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \vec{r}_2&amp;lt;/math&amp;gt; thereby reducing the problem from a 2-body problem to a 1-body problem.&lt;br /&gt;
&lt;br /&gt;
; Construct the Lagrangian&lt;br /&gt;
&lt;br /&gt;
The Lagrangian is defined as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T - U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T \equiv&amp;lt;/math&amp;gt; kinetic energy of the system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U \equiv&amp;lt;/math&amp;gt; Potential energy of the system which describes the interaction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} |\vec{\dot{r}}_1|^2 + \frac{1}{2} |\vec{\dot{r}}_2|^2 - U&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} m_1 \left (\frac{m_2}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 + \frac{1}{2} m_2 \left (\frac{m_1}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} \left ( m_2 + m_1 \right ) \left (\frac{m_1m_2}{(m_1+m_2)^2} \right )  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting derivative of the expressions for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: = &amp;lt;math&amp;gt;\frac{1}{2} \mu |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The 2-body problem is now described by a 1-body Lagrangian we need to determine which coordinate system (cartesian, spherical,..) to use to write an expression for (&amp;lt;math&amp;gt;|\vec{\dot{r}}|^2&amp;lt;/math&amp;gt;).  Polar seems best unless there is a dependence in the azimuthal angle.&lt;br /&gt;
&lt;br /&gt;
Lagranges equations of motion are given by&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\partial \mathcal{L}}{\partial q} = \frac{d}{dt} \frac{\partial \mathcal{L}}{\dot{q}}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; represents one of the coordinate (cannonical variables).&lt;br /&gt;
&lt;br /&gt;
To get the classical scattering cross section we are interested in finding an expression for the dependence of the impact parameter on the scattering angle,&amp;lt;math&amp;gt;\frac{d b}{d \theta}&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Now lets redraw the collision in terms of a reference frame fixed on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; (before collision its the Lab Frame but not after collision).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_CMFrame.jpg]] [[Media:SPIM_ElasColls_CMFrame_xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
The C.M. Frame rides along the center of mass, the above coordinate system though has its origin on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   The above drawing identifies &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; for the system at the point of the collision in which the CM frame is a distance &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; (the size of the ball) from the origin of the coordinate system fixed to &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   If &amp;lt;math&amp;gt;b &amp;gt; a&amp;lt;/math&amp;gt; then there is no collision (&amp;lt;math&amp;gt;\theta=0&amp;lt;/math&amp;gt;),  otherwise a collision happens when r=a (the distance between the balls is equal to their diameter).  A head on collision is defined as &amp;lt;math&amp;gt;b=0&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta=\pi&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;Observation&lt;br /&gt;
: as &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; gets smaller, &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{d b}{d \theta} &amp;lt; 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using plane polar coordinates (&amp;lt;math&amp;gt;r, \phi&amp;lt;/math&amp;gt;) we can describe the problem in the lab frame as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v} = \dot{r} \hat{e}_r + r \dot{\phi} \hat{e}_{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U(r) = \left \{  {0 \; r &amp;gt; a \atop \infty \; r \le a} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T -U = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2) - U(r)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Lagranges Equation of Motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial \mathcal {L}}{\partial \phi} = \frac{d}{d t} \frac{\partial \mathcal{L}}{\partial \dot{\phi}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;0 = \frac{d}{d t} [ \mu r^2 \dot{\phi}] \Rightarrow&amp;lt;/math&amp;gt;  there is a constant of motion ( Constant angular momentum)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ell \equiv \mu r^2 \dot{\phi} = \vec{r} \times \vec{p} = \vec{r} \times \mu \vec{v} = r^2 \mu \dot{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substitute &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mathcal{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} ( \mu  \dot{r}^2 + \frac{\ell}{\mu r^2} ) - U(r)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The two equations above are in terms of &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; whereas our goal is to find an expression for &amp;lt;math&amp;gt;\frac{ d b}{ d \theta}&amp;lt;/math&amp;gt;.  Since &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is related to &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is related to&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta = \pi - 2\phi&amp;lt;/math&amp;gt;; see figure above) we should try and find expressions for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;r(b)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Trick&lt;br /&gt;
: &amp;lt;math&amp;gt;\dot{\phi} = \frac{d \phi}{d t} = \frac{d \phi}{d r} \frac{d r}{d t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \ell = \mu r^2 \frac{d \phi}{d r} \dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
:or&lt;br /&gt;
: &amp;lt;math&amp;gt;d \phi = \frac{\ell}{\mu r^2 \dot{r}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We now need an expression for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt; in order to integrate the above equation to determine the functional dependence of &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; and hence&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The potential in the Lagrangian  though is infinite for &amp;lt;math&amp;gt;r \le a&amp;lt;/math&amp;gt; .  Let's use the property of conservation of energy to accommodate this mathematical construct.&lt;br /&gt;
&lt;br /&gt;
Since Energy is conserved (Elastic Scattering), we may define the Hamiltonian as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H = T + U = \frac{1}{2} (\mu \dot{r}^2 + \frac{\ell}{\mu r^2}) + U(r) = constant \equiv E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dot{r} = \pm \sqrt{\frac{2(E-U(r))}{\mu} - \frac{\ell^2}{\mu^2 r^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting the above into the equation for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; and integrating:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int d \phi = \int_{r_{min}}^{r_{max}} \frac{\ell}{\mu r^2 \dot{R}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{min} = a   \; \; \;  r_{max}= \infty   \; \; \;   U(r) = 0 : a \le r \le \infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int_a^{\infty} \frac{\ell} {r^2 \sqrt{2 \mu E - \frac{\ell^2}{r^2}} }dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;a \le r \le \infty&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;E = \frac{1}{2} \mu v^2_{cm} \Rightarrow v_{cm} = \sqrt{\frac{2E}{\mu}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{\ell} = \vec{r} \times \vec{p} \Rightarrow |\vec{\ell}| = |\vec{r}| |\vec{p}| \sin(\phi) = r \mu v_{cm} \sin(\phi) = r \mu \left ( \sqrt{\frac{2E}{\mu}} \right) \sin(\phi) = \sqrt{2 \mu E} r\sin(\phi) =\sqrt{2 \mu E} b&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting this expression for &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into the last expression for &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi =\int_a^{\infty}  \frac{b dr}{r\sqrt{(r^2-b^2)}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Integral Table&lt;br /&gt;
: &amp;lt;math&amp;gt;\int  \frac{dx}{x\sqrt{(\alpha x^2+\beta x+\gamma)}} = \frac{-1}{\sqrt{-\gamma}} \sin^{-1} \left (\frac{\beta x+2\gamma}{|x|\sqrt{\beta^2-4\alpha \gamma}} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let &amp;lt;math&amp;gt;x=r \;\; \alpha=1 \;\; \beta=0 \;\; \gamma=-b^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \left . b \frac{1}{\sqrt{-(-b^2)}} \sin^{-1} \left (\frac{-2b^2}{r\sqrt{0-4(1)(-b^2) } }\right ) \right |_a^{\infty} = \sin^{-1} (0)- \sin^{-1}(-\frac{b}{a})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sin(\phi) = \frac{b}{a} = \sin \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \cos \left ( \frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow b = a \cos \left( \frac{\theta}{2} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Now substitute the above into the expression for &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{b}{\sin(\theta)} \frac{d b}{d \theta} = \frac{a \cos(\theta/2)}{sin(\theta)} a[-\sin(\theta/2)]\frac{1}{2} &lt;br /&gt;
= \frac{a^2}{2} \frac{\cos(\theta/2) \sin(\theta/2)}{\sin(\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
drop the negative sign, sqrt in denominator allows this, and use the trig identity&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin \left (\frac{\theta}{2} + \frac{\theta}{2} \right ) = \cos \left (\frac{\theta}{2} \right) \sin \left (\frac{\theta}{2} \right ) + \cos \left ( \frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin(\theta) = 2 \cos \left (\frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{a^2}{2} \frac{1}{2} = \frac{a^2}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \int \sigma(\theta) d \Omega = \frac{a^2}{2} \frac{1}{2} 4 \pi  = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;compare with result from definition&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; = scattering cross-section &amp;lt;math&amp;gt;\equiv \frac{\# particles\; scattered} {\frac{ \# incident \; particles}{Area}}&amp;lt;/math&amp;gt;&lt;br /&gt;
:number of particles scattered = number of incident particles&lt;br /&gt;
: Area = &amp;lt;math&amp;gt; \pi a^2&amp;lt;/math&amp;gt; = The area profile in which a collision occurs( the ball diameter is &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;) [[Image:ClassicalEffectiveScatteringArea.jpg | 200 px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \frac{{N}}{\frac{ N}{\pi a^2}} = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lab Frame Cross Sections ===&lt;br /&gt;
&lt;br /&gt;
The C.M. frame is often chosen to theoretically calculate cross-sections even though experiments are conducted in the Lab frame.  In such cases you will need to transform cross-sections between two frames.&lt;br /&gt;
&lt;br /&gt;
The total cross-section should be frame independent&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_{C.M.} = \sigma_{Lab}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is in the CM frame and &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; is in the Lab frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;A non-relativistic transformation:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) 2 \pi \sin(\theta) d \theta = \sigma(\psi) 2 \pi \sin (\psi) d \psi&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation is governed by the dependence of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt; \psi&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt; \left( \frac{d \theta}{d \psi} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets return back to our picture of the scattering Process&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
if we superimpose the vectors &amp;lt;math&amp;gt;\vec{v}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{v}_1^{\prime}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame_Velocities.jpg]]&lt;br /&gt;
&lt;br /&gt;
Trig identities (non-relativistic Gallilean transformation) tell us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 \sin(\psi) = v_1^{\prime} \sin(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 cos(\psi) = v_{cm} + v_1^{\prime} \cos(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\psi)}{\cos(\psi)} = \frac{v_1^{\prime} \sin(\theta)/v_1}{\frac{v_{CM}}{v_1} + \frac{v_1^{\prime} \cos(\theta)}{v_1} }&lt;br /&gt;
= \frac{\sin(\theta)}{\cos(\theta) + \frac{v_{CM}}{v_1^{\prime}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an elastic collision only the directions change in the CM Frame: &amp;lt;math&amp;gt;u_1^{\prime}= v_1^{\prime}&amp;lt;/math&amp;gt;  &amp;amp; &amp;lt;math&amp;gt;u_1^{\prime}= v_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;From the definition of the C.M.&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{v}_{CM} = \frac{m_1 \vec{u}_1 + m_2 \vec{u}_2}{m_1+m_2} = \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;conservation of momentum in CM Frame &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1 u_1^{\prime} = - m_2 u_2{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Rightarrow v_1^{\prime} = u_1^{\prime} = \frac{-m_2}{m_1} u_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Gallilean Coordinate transformation:&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{u}_1 = \vec{u}_1^{\prime} + \vec{v}_{CM} = \vec{u}_1^{\prime} + \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow u_1{\prime} = \left [ 1 - \frac{m_1}{m_1 + m_2} \right ] u_1 = \frac{m_2}{m_1+m_2}u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow v_1^{\prime} = u_1^{\prime}  =\frac{m_2}{m_1+m_2} u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; another expression for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using the above gallilean transformation we can do the following&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{v_{CM}}{v_1^{\prime}}= \frac{\frac{m_1}{m_1+m_2} u_1}{\frac{m_2}{m_1+m_2} u_1} = \frac{m_1}{m_2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\theta)}{\cos(\theta) + \frac{m_1}{m_2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after a little trig substitution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{m_1}{m_2} = \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
&lt;br /&gt;
now use the chain rule to find &amp;lt;math&amp;gt;\frac{d \theta}{d \psi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f \equiv  \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
:&amp;lt;math&amp;gt;df = 0 = \frac{ \partial f}{\partial \psi} d \psi  + \frac{ \partial f}{\partial \theta} d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \frac{d \theta}{d \psi} = \frac{-\frac{ \partial f}{\partial \psi} }{\frac{ \partial f}{\partial \theta} }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{ \partial f}{\partial \psi} = \frac{\cos(\theta - \psi)}{\sin(\psi)} + \frac{\sin(\theta - \psi)}{\sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{ \partial f}{\partial \theta }= 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substitution:&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{\sin(\theta)}{\sin(\psi)} \left [ 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)} \right ] \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the above equation to be more useful one would prefer to recast it in terms of only &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; and masses.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\psi) = \frac{\left [ \frac{m_1}{m_2}\cos(\psi) + \sqrt{1-\left ( \frac{m_1 \sin(\psi) }{m_2} \right )^2 }\right ]}{\sqrt{1 - \left ( \frac{m_1 \sin(\psi)}{m_2}\right )^2 }}\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130020</id>
		<title>TF SPIM Intro</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130020"/>
		<updated>2025-01-17T17:47:01Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Example 1: Create Ntuple  and Draw Histogram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction=&lt;br /&gt;
&lt;br /&gt;
Experimentalists use simulations to predict the sources of background which will interfere with the signal they plan on measuring.  An important aspect of this process is to understand how signals are produced in your measurement device.  Devices share the common problem of isolating a signal produced in the device from the noise that is present in the device.  &lt;br /&gt;
&lt;br /&gt;
Below is a description of how signals are produced in bulk materials.&lt;br /&gt;
&lt;br /&gt;
==Particle Detection ==&lt;br /&gt;
A device detects a particle only after the particle transfers energy to the device.&lt;br /&gt;
&lt;br /&gt;
Energy intrinsic to a device depends on the material used in a device&lt;br /&gt;
&lt;br /&gt;
Consider a device made of some material with an average atomic number (&amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;)  at some temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;).  The material's atoms are in constant thermal motion (unless you can manage to have T = zero degrees Klevin).&lt;br /&gt;
&lt;br /&gt;
Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E) = \frac{1}{kT} e^{-\frac{E}{kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E)&amp;lt;/math&amp;gt; represents the probability of any atom in the system having an energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= 1.38 \times 10^{-23} \frac{J}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  You may be more familiar with the Maxwell-Boltzmann distribution in the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;N(\nu) = 4 \pi N \left ( \frac{m}{2\pi k T} \right ) ^{3/2} v^2  e^{-mv^2/2kT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N(v) \Delta v&amp;lt;/math&amp;gt; would represent the molecules in the gas sample with speeds between &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v + \Delta v&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 1: P(E=5 eV) ===&lt;br /&gt;
&lt;br /&gt;
;What is the probability that an atom in a 12.011 gram block of carbon would have an energy of 5 eV? &lt;br /&gt;
&lt;br /&gt;
First lets check that the probability distribution is Normalized; ie: does &amp;lt;math&amp;gt;\int_0^{\infty} P(E) dE =1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Physically, &amp;lt;math&amp;gt;P(E=5eV)&amp;lt;/math&amp;gt; is calculated by integrating P(E) over some energy interval ( ie:&amp;lt;math&amp;gt; N(v) dv&amp;lt;/math&amp;gt;).  I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1 eV/kT} - e^{4.9 eV/kT}]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right )  =  \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right ) \left (6.42 \times 10^{18} \frac{eV}{J} \right )= 8.614 \times 10^{-5} \frac {eV}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
assuming a room temperature of &amp;lt;math&amp;gt;T=300 K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&amp;lt;math&amp;gt;kT = 0.0258 \frac{eV}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in other words the probability may be approximated by just using the distribution function alone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=5eV) = e^{-5/0.0258} \approx 10^{-85}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approximation breaks down as &amp;lt;math&amp;gt;E \rightarrow 0.0258 eV&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt;carbon atoms, we would not expect to see a 5 eV carbon atom in a sample size of &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt; carbon atoms when the probability of observing such an atom is &amp;lt;math&amp;gt;\approx 10^{-85}&amp;lt;/math&amp;gt;.  Note: The mass of the earth is about &amp;lt;math&amp;gt;10^{27}&amp;lt;/math&amp;gt; g &amp;lt;math&amp;gt;\approx 10^{50}&amp;lt;/math&amp;gt; atoms, so a carbon atom with an energy of 5 eV would be difficult to observe  in a detector the size of the earth .&lt;br /&gt;
&lt;br /&gt;
The average energy we expect to see would be calculated by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&amp;lt;E&amp;gt; = \int_{0}^{\infty} E \cdot P(E) dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
;Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.&lt;br /&gt;
&lt;br /&gt;
approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0258} \approx 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
approximately 10 eV of energy is needed to ionize an atom in a gas chamber&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=10 eV) = e^{-10/0.0258} \approx 10^{-169}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
But if you cool the silicon detector to 200 degrees Kelvin (200 K) then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0172} \approx 10^{-26} &amp;lt;&amp;lt; 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.&lt;br /&gt;
&lt;br /&gt;
also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it's quantum efficiency for absorbing energy.&lt;br /&gt;
&lt;br /&gt;
; What does this have to do with Simulations?&lt;br /&gt;
: You just did a SImulation.  Consider the following description of the Monte Carlo Method&lt;br /&gt;
&lt;br /&gt;
== The Monte Carlo method ==&lt;br /&gt;
; Stochastic&lt;br /&gt;
: from the greek word &amp;quot;stachos&amp;quot;&lt;br /&gt;
: a means of, relating to, or characterized by conjecture and randomness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A stochastic process is one whose behavior is non-deterministic in that the next state of the process is partially determined.&lt;br /&gt;
&lt;br /&gt;
The above particle detector was an example of describing a stochastic process using a probability distribution to determine the likely hood of finding an atom with a certain energy.&lt;br /&gt;
&lt;br /&gt;
Physics at the Quantum Mechanics  scale contains some of the clearest examples of such a non-deterministic systems.  The canonical systems in Thermodynamics is another example.&lt;br /&gt;
&lt;br /&gt;
Basically the monte-carlo method uses a random number generator (RNG) to generate a distribution (gaussian, uniform, Poission,...) which is used to solve a stochastic process based on an astochastic description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2 Calculation of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
;Astochastic description:&lt;br /&gt;
: &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; may be measured as the ratio of the area of a circle of radius &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; divided by the area of a square of length &amp;lt;math&amp;gt;2r&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PI_from_AreaRatio.jpg]]&amp;lt;math&amp;gt;\frac{A_{circle}}{A_{square}} = \frac{\pi r^2}{4r^2} = \frac{\pi}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure the value of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; if you physically measure the above ratios.&lt;br /&gt;
&lt;br /&gt;
; Stochastic description:&lt;br /&gt;
: Construct a dart board representing the above geometry, throw several darts at it, and look at a ratio of the number of darts in the circle to the total number of darts thrown (assuming you always hit the dart board).&lt;br /&gt;
&lt;br /&gt;
; Monte-Carlo Method&lt;br /&gt;
:Here is an outline of a program to calulate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte-Carlo method with the above Stochastic description&lt;br /&gt;
[[Image:MC_PI_fromAreaRatio.jpg]]&lt;br /&gt;
 begin loop&lt;br /&gt;
  x=rnd&lt;br /&gt;
  y=rnd&lt;br /&gt;
  dist=sqrt(x*x+y*y)&lt;br /&gt;
  if dist &amp;lt;= 1.0 then numbCircHits+=1.0&lt;br /&gt;
  numbSquareHist += 1.0&lt;br /&gt;
 end loop&lt;br /&gt;
  print PI = 4*numbCircHits/numbSquareHits&lt;br /&gt;
&lt;br /&gt;
== A Unix Primer ==&lt;br /&gt;
To get our feet wet using the UNIX operating system, we will try to solve example 2 above using a RNG under UNIX&lt;br /&gt;
&lt;br /&gt;
===List of important Commands===&lt;br /&gt;
&lt;br /&gt;
# ls&lt;br /&gt;
# pwd&lt;br /&gt;
# cd&lt;br /&gt;
# df&lt;br /&gt;
# ssh&lt;br /&gt;
# scp&lt;br /&gt;
# mkdir&lt;br /&gt;
# printenv&lt;br /&gt;
# emacs, vi, vim&lt;br /&gt;
# make, gcc&lt;br /&gt;
# man&lt;br /&gt;
# less&lt;br /&gt;
# rm&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Most of the commands executed within a shell under UNIX have command line arguments (switches) which tell the command to print information about using the command to the screen.  The common forms of these switches are &amp;quot;-h&amp;quot;, &amp;quot;--h&amp;quot;, or &amp;quot;--help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ls --help&lt;br /&gt;
 ssh -h&lt;br /&gt;
&lt;br /&gt;
'' the switch deponds on your flavor of UNIX''&lt;br /&gt;
&lt;br /&gt;
if using the switch doesn't help you can try the &amp;quot;man&amp;quot; (sort for manual) pages (if they were installed).  &lt;br /&gt;
Try&lt;br /&gt;
 man -k pwd&lt;br /&gt;
&lt;br /&gt;
the above command will search the manual for the key word &amp;quot;pwd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example 3: using UNIX to compile a RNG===&lt;br /&gt;
&lt;br /&gt;
Step&lt;br /&gt;
# login to thorshammer (ssh username@thorshammer.rdc.isu.edu)&lt;br /&gt;
# mkdir src&lt;br /&gt;
# cd src&lt;br /&gt;
# mkdir PI&lt;br /&gt;
# cd PI&lt;br /&gt;
# copy past program PI.cc from Moodle into editor on thorshammer&lt;br /&gt;
# ls&lt;br /&gt;
# g++ -o PI PI.cc&lt;br /&gt;
#./PI&lt;br /&gt;
&lt;br /&gt;
== A Root Primer ==&lt;br /&gt;
If typing the command &amp;quot;root&amp;quot; in your unix shell does not work then you need to setup your shell environment so it cn find the application&lt;br /&gt;
&lt;br /&gt;
If you are on thorshamer&lt;br /&gt;
&lt;br /&gt;
In bash shell do&lt;br /&gt;
&lt;br /&gt;
 export ROOTSYS=~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
if chsh do &lt;br /&gt;
&lt;br /&gt;
 setenv ROOTSYS ~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
To start the root program type&lt;br /&gt;
&lt;br /&gt;
 $ROOTSYS/bin/root&lt;br /&gt;
&lt;br /&gt;
another method&lt;br /&gt;
&lt;br /&gt;
 source ~foretony/src/ROOT/root/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Create Ntuple  and Draw Histogram===&lt;br /&gt;
&lt;br /&gt;
Look for the program &amp;quot;ascii2root.C&amp;quot; in Moodle&lt;br /&gt;
&lt;br /&gt;
copy and paste it into you editor on the machine you would like to run root on.&lt;br /&gt;
&lt;br /&gt;
then try the following&lt;br /&gt;
&lt;br /&gt;
#root&lt;br /&gt;
your shell promt will change to look like thei : root [0]&lt;br /&gt;
&lt;br /&gt;
type&lt;br /&gt;
&lt;br /&gt;
#.x asci2root.C&lt;br /&gt;
&lt;br /&gt;
then exit the root program with &lt;br /&gt;
&lt;br /&gt;
#.q&lt;br /&gt;
&lt;br /&gt;
and restart it with &lt;br /&gt;
&lt;br /&gt;
#root -l sim.root&lt;br /&gt;
&lt;br /&gt;
and try the command &lt;br /&gt;
&lt;br /&gt;
Simm-&amp;gt;Draw(&amp;quot;evt.x&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
== Cross Sections ==&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
;Total cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma \equiv \frac{\# \mbox{ particles scattered}} {\frac{ \# \mbox{ incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Differential cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt; \frac{d \sigma}{d \Omega} \equiv \frac{\frac{\# \mbox{ particles scattered}}{\mbox{solid angle}}} {\frac{ \# \mbox{incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Solid Angle&lt;br /&gt;
:[[Image:SolidAngleDefinition.jpg]]&lt;br /&gt;
: &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;= surface area of a sphere covered by the detector&lt;br /&gt;
: ie;the detectors area projected onto the surface of a sphere&lt;br /&gt;
:A= surface area of detector&lt;br /&gt;
:r=distance from interaction point to detector&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega = \frac{A}{r^2} sr &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;sr \equiv&amp;lt;/math&amp;gt; steradians&lt;br /&gt;
: &amp;lt;math&amp;gt;A_{\mbox{sphere}} = 4 \pi r^2&amp;lt;/math&amp;gt; if your detector was a hollow ball&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega_{\mbox{max}} = \frac{4 \pi r^2}{r^2} = 4\pi&amp;lt;/math&amp;gt;steradians&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
:Cross-sections have the units of Area&lt;br /&gt;
:1 barn = &amp;lt;math&amp;gt;10^{-28} m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
; [units of &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;] =&amp;lt;math&amp;gt;\frac{\frac{[\mbox{particles}]}{[\mbox{steradian}]}} {\frac{ [ \mbox{particles}]}{[m^2]}} = m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
;Luminosity&lt;br /&gt;
:&amp;lt;math&amp;gt;L = \frac{\mbox{Number of Scatterers}}{\mbox{Area} \cdot \mbox{time}} \sim i_{\mbox{beam}} \rho_{\mbox{target}} l_{\mbox{target}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:FixedTargetScatteringCrossSection.jpg | 500 px]]&lt;br /&gt;
; Fixed target scattering&lt;br /&gt;
: &amp;lt;math&amp;gt;N_{in}&amp;lt;/math&amp;gt;= # of particles in = &amp;lt;math&amp;gt;I \cdot A_{in}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;A_{in}&amp;lt;/math&amp;gt; is the area of the ring of incident particles&lt;br /&gt;
:&amp;lt;math&amp;gt;dN_{in} = I \cdot dA = I (2\pi b) db&amp;lt;/math&amp;gt;= # particles in a ring of radius &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and thickness &amp;lt;math&amp;gt;db&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; if you measure the # of particles detected &amp;lt;math&amp;gt;d N&amp;lt;/math&amp;gt; in a known detector solid angle &amp;lt;math&amp;gt;d \Omega&amp;lt;/math&amp;gt; from a known incident particle Flux (&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;)  as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{\frac{d N}{ d \Omega}}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively if you have a theory which tells you &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; which you want to test experimentally with a beam of flux &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; then you would measure counts (particles)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dN = I \sigma(\theta) d \Omega = I \sigma(\theta)  \frac{d A}{r^2} = I \sigma(\theta) \frac{r^2 \sin(\theta) d \theta d \phi}{r^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
: &amp;lt;math&amp;gt;[d N] = [\frac {\mbox{particles}}{m^2}][m^2] [\mbox{steradian}] &amp;lt;/math&amp;gt; = # of particles&lt;br /&gt;
: or for a count rate divide both sides by time and you get beam current on the RHS&lt;br /&gt;
: integrate and you have the total number of counts&lt;br /&gt;
&lt;br /&gt;
;Classical Scattering&lt;br /&gt;
: In classical scattering you get the same number of particles out that you put in (no capture, conversion,..)&lt;br /&gt;
: &amp;lt;math&amp;gt;d N_{in} = dN&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;d N_{in} = I dA = I (2\pi b) db&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;d N = I \sigma(\theta) d \Omega =   I \sigma(\theta) \sin(\theta) d \theta d \phi = I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;  I (2\pi b) db =  I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;    b  db =   \sigma(\theta) \sin(\theta) d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta) =  \frac{b}{\sin(\theta)}\frac{db}{d \theta}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{db}{d \theta}&amp;lt;/math&amp;gt; tells you how the impact parameter &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; changes with scattering angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 4: Elastic Scattering ===&lt;br /&gt;
This example is an example of classical scattering.&lt;br /&gt;
&lt;br /&gt;
Our goal is to find &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; for an elastic collision of 2 impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.  We need to look for a relationship between the impact parameter &amp;lt;math&amp;gt; b&amp;lt;/math&amp;gt; and the scattering angle &amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.  To find this relationship, let's solve this elastic scattering problem by  describing the collision using the Center of Mass (C.M.) coordinate system in terms of the reduced mass.  As we shall see, the 2-body collision becomes a 1-body problem  when a C.M. coordinate system is used.  Then we will describe the motion of the reduced mass in the C.M. Frame.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_Lab_CM_Frame.jpg | 500 px]]&lt;br /&gt;
[[Media:SPIM_ElasCollis_Lab_CM_Frame.xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
; Variable definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt;= impact parameter ; distance of closest approach&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;= mass of incoming ball&lt;br /&gt;
:&amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;= mass of target ball&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt;= iniital velocity of  incoming ball in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab frame after collision&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;u_2^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_2^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. frame after collision&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Determining the reduced mass:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_2Body-1BodyCoordSystem.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
; vector definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{R}&amp;lt;/math&amp;gt; = a position vector pointing to the center of mass of the two ball system&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r} \equiv \vec{r}_1 - \vec{r}_2&amp;lt;/math&amp;gt; = the magnitude of this vector is the distance between the two masses&lt;br /&gt;
&lt;br /&gt;
In the C.M. reference frame the above vectors have the following relationships&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{R} = 0 = \frac{m_1 \vec{r}_1 + m_2 \vec{r}_2}{m_1 + m_2} \Rightarrow m_1 \vec{r}_1 = -m_2 \vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{r}_1 - \vec{r}_2 = \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving the above equations for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r_2}&amp;lt;/math&amp;gt; and defining the reduced mass &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu = \frac{m_1 \cdot m_2}{m_1 + m_2} \equiv&amp;lt;/math&amp;gt; reduced mass&lt;br /&gt;
&lt;br /&gt;
leads to &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_1 = \frac{\mu}{m_1} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_2 = -\frac{\mu}{m_2} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can use the above reduced mass relationships to construct the Lagrangian in terms of &amp;lt;math&amp;gt;\vec{r}&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \vec{r}_2&amp;lt;/math&amp;gt; thereby reducing the problem from a 2-body problem to a 1-body problem.&lt;br /&gt;
&lt;br /&gt;
; Construct the Lagrangian&lt;br /&gt;
&lt;br /&gt;
The Lagrangian is defined as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T - U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T \equiv&amp;lt;/math&amp;gt; kinetic energy of the system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U \equiv&amp;lt;/math&amp;gt; Potential energy of the system which describes the interaction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} |\vec{\dot{r}}_1|^2 + \frac{1}{2} |\vec{\dot{r}}_2|^2 - U&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} m_1 \left (\frac{m_2}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 + \frac{1}{2} m_2 \left (\frac{m_1}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} \left ( m_2 + m_1 \right ) \left (\frac{m_1m_2}{(m_1+m_2)^2} \right )  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting derivative of the expressions for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: = &amp;lt;math&amp;gt;\frac{1}{2} \mu |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The 2-body problem is now described by a 1-body Lagrangian we need to determine which coordinate system (cartesian, spherical,..) to use to write an expression for (&amp;lt;math&amp;gt;|\vec{\dot{r}}|^2&amp;lt;/math&amp;gt;).  Polar seems best unless there is a dependence in the azimuthal angle.&lt;br /&gt;
&lt;br /&gt;
Lagranges equations of motion are given by&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\partial \mathcal{L}}{\partial q} = \frac{d}{dt} \frac{\partial \mathcal{L}}{\dot{q}}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; represents one of the coordinate (cannonical variables).&lt;br /&gt;
&lt;br /&gt;
To get the classical scattering cross section we are interested in finding an expression for the dependence of the impact parameter on the scattering angle,&amp;lt;math&amp;gt;\frac{d b}{d \theta}&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Now lets redraw the collision in terms of a reference frame fixed on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; (before collision its the Lab Frame but not after collision).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_CMFrame.jpg]] [[Media:SPIM_ElasColls_CMFrame_xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
The C.M. Frame rides along the center of mass, the above coordinate system though has its origin on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   The above drawing identifies &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; for the system at the point of the collision in which the CM frame is a distance &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; (the size of the ball) from the origin of the coordinate system fixed to &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   If &amp;lt;math&amp;gt;b &amp;gt; a&amp;lt;/math&amp;gt; then there is no collision (&amp;lt;math&amp;gt;\theta=0&amp;lt;/math&amp;gt;),  otherwise a collision happens when r=a (the distance between the balls is equal to their diameter).  A head on collision is defined as &amp;lt;math&amp;gt;b=0&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta=\pi&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;Observation&lt;br /&gt;
: as &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; gets smaller, &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{d b}{d \theta} &amp;lt; 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using plane polar coordinates (&amp;lt;math&amp;gt;r, \phi&amp;lt;/math&amp;gt;) we can describe the problem in the lab frame as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v} = \dot{r} \hat{e}_r + r \dot{\phi} \hat{e}_{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U(r) = \left \{  {0 \; r &amp;gt; a \atop \infty \; r \le a} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T -U = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2) - U(r)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Lagranges Equation of Motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial \mathcal {L}}{\partial \phi} = \frac{d}{d t} \frac{\partial \mathcal{L}}{\partial \dot{\phi}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;0 = \frac{d}{d t} [ \mu r^2 \dot{\phi}] \Rightarrow&amp;lt;/math&amp;gt;  there is a constant of motion ( Constant angular momentum)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ell \equiv \mu r^2 \dot{\phi} = \vec{r} \times \vec{p} = \vec{r} \times \mu \vec{v} = r^2 \mu \dot{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substitute &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mathcal{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} ( \mu  \dot{r}^2 + \frac{\ell}{\mu r^2} ) - U(r)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The two equations above are in terms of &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; whereas our goal is to find an expression for &amp;lt;math&amp;gt;\frac{ d b}{ d \theta}&amp;lt;/math&amp;gt;.  Since &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is related to &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is related to&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta = \pi - 2\phi&amp;lt;/math&amp;gt;; see figure above) we should try and find expressions for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;r(b)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Trick&lt;br /&gt;
: &amp;lt;math&amp;gt;\dot{\phi} = \frac{d \phi}{d t} = \frac{d \phi}{d r} \frac{d r}{d t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \ell = \mu r^2 \frac{d \phi}{d r} \dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
:or&lt;br /&gt;
: &amp;lt;math&amp;gt;d \phi = \frac{\ell}{\mu r^2 \dot{r}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We now need an expression for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt; in order to integrate the above equation to determine the functional dependence of &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; and hence&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The potential in the Lagrangian  though is infinite for &amp;lt;math&amp;gt;r \le a&amp;lt;/math&amp;gt; .  Let's use the property of conservation of energy to accommodate this mathematical construct.&lt;br /&gt;
&lt;br /&gt;
Since Energy is conserved (Elastic Scattering), we may define the Hamiltonian as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H = T + U = \frac{1}{2} (\mu \dot{r}^2 + \frac{\ell}{\mu r^2}) + U(r) = constant \equiv E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dot{r} = \pm \sqrt{\frac{2(E-U(r))}{\mu} - \frac{\ell^2}{\mu^2 r^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting the above into the equation for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; and integrating:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int d \phi = \int_{r_{min}}^{r_{max}} \frac{\ell}{\mu r^2 \dot{R}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{min} = a   \; \; \;  r_{max}= \infty   \; \; \;   U(r) = 0 : a \le r \le \infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int_a^{\infty} \frac{\ell} {r^2 \sqrt{2 \mu E - \frac{\ell^2}{r^2}} }dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;a \le r \le \infty&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;E = \frac{1}{2} \mu v^2_{cm} \Rightarrow v_{cm} = \sqrt{\frac{2E}{\mu}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{\ell} = \vec{r} \times \vec{p} \Rightarrow |\vec{\ell}| = |\vec{r}| |\vec{p}| \sin(\phi) = r \mu v_{cm} \sin(\phi) = r \mu \left ( \sqrt{\frac{2E}{\mu}} \right) \sin(\phi) = \sqrt{2 \mu E} r\sin(\phi) =\sqrt{2 \mu E} b&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting this expression for &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into the last expression for &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi =\int_a^{\infty}  \frac{b dr}{r\sqrt{(r^2-b^2)}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Integral Table&lt;br /&gt;
: &amp;lt;math&amp;gt;\int  \frac{dx}{x\sqrt{(\alpha x^2+\beta x+\gamma)}} = \frac{-1}{\sqrt{-\gamma}} \sin^{-1} \left (\frac{\beta x+2\gamma}{|x|\sqrt{\beta^2-4\alpha \gamma}} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let &amp;lt;math&amp;gt;x=r \;\; \alpha=1 \;\; \beta=0 \;\; \gamma=-b^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \left . b \frac{1}{\sqrt{-(-b^2)}} \sin^{-1} \left (\frac{-2b^2}{r\sqrt{0-4(1)(-b^2) } }\right ) \right |_a^{\infty} = \sin^{-1} (0)- \sin^{-1}(-\frac{b}{a})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sin(\phi) = \frac{b}{a} = \sin \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \cos \left ( \frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow b = a \cos \left( \frac{\theta}{2} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Now substitute the above into the expression for &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{b}{\sin(\theta)} \frac{d b}{d \theta} = \frac{a \cos(\theta/2)}{sin(\theta)} a[-\sin(\theta/2)]\frac{1}{2} &lt;br /&gt;
= \frac{a^2}{2} \frac{\cos(\theta/2) \sin(\theta/2)}{\sin(\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
drop the negative sign, sqrt in denominator allows this, and use the trig identity&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin \left (\frac{\theta}{2} + \frac{\theta}{2} \right ) = \cos \left (\frac{\theta}{2} \right) \sin \left (\frac{\theta}{2} \right ) + \cos \left ( \frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin(\theta) = 2 \cos \left (\frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{a^2}{2} \frac{1}{2} = \frac{a^2}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \int \sigma(\theta) d \Omega = \frac{a^2}{2} \frac{1}{2} 4 \pi  = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;compare with result from definition&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; = scattering cross-section &amp;lt;math&amp;gt;\equiv \frac{\# particles\; scattered} {\frac{ \# incident \; particles}{Area}}&amp;lt;/math&amp;gt;&lt;br /&gt;
:number of particles scattered = number of incident particles&lt;br /&gt;
: Area = &amp;lt;math&amp;gt; \pi a^2&amp;lt;/math&amp;gt; = The area profile in which a collision occurs( the ball diameter is &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;) [[Image:ClassicalEffectiveScatteringArea.jpg | 200 px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \frac{{N}}{\frac{ N}{\pi a^2}} = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lab Frame Cross Sections ===&lt;br /&gt;
&lt;br /&gt;
The C.M. frame is often chosen to theoretically calculate cross-sections even though experiments are conducted in the Lab frame.  In such cases you will need to transform cross-sections between two frames.&lt;br /&gt;
&lt;br /&gt;
The total cross-section should be frame independent&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_{C.M.} = \sigma_{Lab}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is in the CM frame and &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; is in the Lab frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;A non-relativistic transformation:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) 2 \pi \sin(\theta) d \theta = \sigma(\psi) 2 \pi \sin (\psi) d \psi&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation is governed by the dependence of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt; \psi&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt; \left( \frac{d \theta}{d \psi} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets return back to our picture of the scattering Process&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
if we superimpose the vectors &amp;lt;math&amp;gt;\vec{v}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{v}_1^{\prime}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame_Velocities.jpg]]&lt;br /&gt;
&lt;br /&gt;
Trig identities (non-relativistic Gallilean transformation) tell us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 \sin(\psi) = v_1^{\prime} \sin(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 cos(\psi) = v_{cm} + v_1^{\prime} \cos(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\psi)}{\cos(\psi)} = \frac{v_1^{\prime} \sin(\theta)/v_1}{\frac{v_{CM}}{v_1} + \frac{v_1^{\prime} \cos(\theta)}{v_1} }&lt;br /&gt;
= \frac{\sin(\theta)}{\cos(\theta) + \frac{v_{CM}}{v_1^{\prime}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an elastic collision only the directions change in the CM Frame: &amp;lt;math&amp;gt;u_1^{\prime}= v_1^{\prime}&amp;lt;/math&amp;gt;  &amp;amp; &amp;lt;math&amp;gt;u_1^{\prime}= v_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;From the definition of the C.M.&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{v}_{CM} = \frac{m_1 \vec{u}_1 + m_2 \vec{u}_2}{m_1+m_2} = \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;conservation of momentum in CM Frame &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1 u_1^{\prime} = - m_2 u_2{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Rightarrow v_1^{\prime} = u_1^{\prime} = \frac{-m_2}{m_1} u_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Gallilean Coordinate transformation:&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{u}_1 = \vec{u}_1^{\prime} + \vec{v}_{CM} = \vec{u}_1^{\prime} + \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow u_1{\prime} = \left [ 1 - \frac{m_1}{m_1 + m_2} \right ] u_1 = \frac{m_2}{m_1+m_2}u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow v_1^{\prime} = u_1^{\prime}  =\frac{m_2}{m_1+m_2} u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; another expression for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using the above gallilean transformation we can do the following&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{v_{CM}}{v_1^{\prime}}= \frac{\frac{m_1}{m_1+m_2} u_1}{\frac{m_2}{m_1+m_2} u_1} = \frac{m_1}{m_2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\theta)}{\cos(\theta) + \frac{m_1}{m_2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after a little trig substitution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{m_1}{m_2} = \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
&lt;br /&gt;
now use the chain rule to find &amp;lt;math&amp;gt;\frac{d \theta}{d \psi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f \equiv  \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
:&amp;lt;math&amp;gt;df = 0 = \frac{ \partial f}{\partial \psi} d \psi  + \frac{ \partial f}{\partial \theta} d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \frac{d \theta}{d \psi} = \frac{-\frac{ \partial f}{\partial \psi} }{\frac{ \partial f}{\partial \theta} }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{ \partial f}{\partial \psi} = \frac{\cos(\theta - \psi)}{\sin(\psi)} + \frac{\sin(\theta - \psi)}{\sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{ \partial f}{\partial \theta }= 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substitution:&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{\sin(\theta)}{\sin(\psi)} \left [ 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)} \right ] \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the above equation to be more useful one would prefer to recast it in terms of only &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; and masses.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\psi) = \frac{\left [ \frac{m_1}{m_2}\cos(\psi) + \sqrt{1-\left ( \frac{m_1 \sin(\psi) }{m_2} \right )^2 }\right ]}{\sqrt{1 - \left ( \frac{m_1 \sin(\psi)}{m_2}\right )^2 }}\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130019</id>
		<title>TF SPIM Intro</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130019"/>
		<updated>2025-01-17T17:43:04Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* A Root Primer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction=&lt;br /&gt;
&lt;br /&gt;
Experimentalists use simulations to predict the sources of background which will interfere with the signal they plan on measuring.  An important aspect of this process is to understand how signals are produced in your measurement device.  Devices share the common problem of isolating a signal produced in the device from the noise that is present in the device.  &lt;br /&gt;
&lt;br /&gt;
Below is a description of how signals are produced in bulk materials.&lt;br /&gt;
&lt;br /&gt;
==Particle Detection ==&lt;br /&gt;
A device detects a particle only after the particle transfers energy to the device.&lt;br /&gt;
&lt;br /&gt;
Energy intrinsic to a device depends on the material used in a device&lt;br /&gt;
&lt;br /&gt;
Consider a device made of some material with an average atomic number (&amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;)  at some temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;).  The material's atoms are in constant thermal motion (unless you can manage to have T = zero degrees Klevin).&lt;br /&gt;
&lt;br /&gt;
Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E) = \frac{1}{kT} e^{-\frac{E}{kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E)&amp;lt;/math&amp;gt; represents the probability of any atom in the system having an energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= 1.38 \times 10^{-23} \frac{J}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  You may be more familiar with the Maxwell-Boltzmann distribution in the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;N(\nu) = 4 \pi N \left ( \frac{m}{2\pi k T} \right ) ^{3/2} v^2  e^{-mv^2/2kT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N(v) \Delta v&amp;lt;/math&amp;gt; would represent the molecules in the gas sample with speeds between &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v + \Delta v&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 1: P(E=5 eV) ===&lt;br /&gt;
&lt;br /&gt;
;What is the probability that an atom in a 12.011 gram block of carbon would have an energy of 5 eV? &lt;br /&gt;
&lt;br /&gt;
First lets check that the probability distribution is Normalized; ie: does &amp;lt;math&amp;gt;\int_0^{\infty} P(E) dE =1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Physically, &amp;lt;math&amp;gt;P(E=5eV)&amp;lt;/math&amp;gt; is calculated by integrating P(E) over some energy interval ( ie:&amp;lt;math&amp;gt; N(v) dv&amp;lt;/math&amp;gt;).  I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1 eV/kT} - e^{4.9 eV/kT}]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right )  =  \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right ) \left (6.42 \times 10^{18} \frac{eV}{J} \right )= 8.614 \times 10^{-5} \frac {eV}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
assuming a room temperature of &amp;lt;math&amp;gt;T=300 K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&amp;lt;math&amp;gt;kT = 0.0258 \frac{eV}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in other words the probability may be approximated by just using the distribution function alone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=5eV) = e^{-5/0.0258} \approx 10^{-85}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approximation breaks down as &amp;lt;math&amp;gt;E \rightarrow 0.0258 eV&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt;carbon atoms, we would not expect to see a 5 eV carbon atom in a sample size of &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt; carbon atoms when the probability of observing such an atom is &amp;lt;math&amp;gt;\approx 10^{-85}&amp;lt;/math&amp;gt;.  Note: The mass of the earth is about &amp;lt;math&amp;gt;10^{27}&amp;lt;/math&amp;gt; g &amp;lt;math&amp;gt;\approx 10^{50}&amp;lt;/math&amp;gt; atoms, so a carbon atom with an energy of 5 eV would be difficult to observe  in a detector the size of the earth .&lt;br /&gt;
&lt;br /&gt;
The average energy we expect to see would be calculated by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&amp;lt;E&amp;gt; = \int_{0}^{\infty} E \cdot P(E) dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
;Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.&lt;br /&gt;
&lt;br /&gt;
approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0258} \approx 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
approximately 10 eV of energy is needed to ionize an atom in a gas chamber&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=10 eV) = e^{-10/0.0258} \approx 10^{-169}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
But if you cool the silicon detector to 200 degrees Kelvin (200 K) then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0172} \approx 10^{-26} &amp;lt;&amp;lt; 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.&lt;br /&gt;
&lt;br /&gt;
also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it's quantum efficiency for absorbing energy.&lt;br /&gt;
&lt;br /&gt;
; What does this have to do with Simulations?&lt;br /&gt;
: You just did a SImulation.  Consider the following description of the Monte Carlo Method&lt;br /&gt;
&lt;br /&gt;
== The Monte Carlo method ==&lt;br /&gt;
; Stochastic&lt;br /&gt;
: from the greek word &amp;quot;stachos&amp;quot;&lt;br /&gt;
: a means of, relating to, or characterized by conjecture and randomness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A stochastic process is one whose behavior is non-deterministic in that the next state of the process is partially determined.&lt;br /&gt;
&lt;br /&gt;
The above particle detector was an example of describing a stochastic process using a probability distribution to determine the likely hood of finding an atom with a certain energy.&lt;br /&gt;
&lt;br /&gt;
Physics at the Quantum Mechanics  scale contains some of the clearest examples of such a non-deterministic systems.  The canonical systems in Thermodynamics is another example.&lt;br /&gt;
&lt;br /&gt;
Basically the monte-carlo method uses a random number generator (RNG) to generate a distribution (gaussian, uniform, Poission,...) which is used to solve a stochastic process based on an astochastic description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2 Calculation of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
;Astochastic description:&lt;br /&gt;
: &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; may be measured as the ratio of the area of a circle of radius &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; divided by the area of a square of length &amp;lt;math&amp;gt;2r&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PI_from_AreaRatio.jpg]]&amp;lt;math&amp;gt;\frac{A_{circle}}{A_{square}} = \frac{\pi r^2}{4r^2} = \frac{\pi}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure the value of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; if you physically measure the above ratios.&lt;br /&gt;
&lt;br /&gt;
; Stochastic description:&lt;br /&gt;
: Construct a dart board representing the above geometry, throw several darts at it, and look at a ratio of the number of darts in the circle to the total number of darts thrown (assuming you always hit the dart board).&lt;br /&gt;
&lt;br /&gt;
; Monte-Carlo Method&lt;br /&gt;
:Here is an outline of a program to calulate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte-Carlo method with the above Stochastic description&lt;br /&gt;
[[Image:MC_PI_fromAreaRatio.jpg]]&lt;br /&gt;
 begin loop&lt;br /&gt;
  x=rnd&lt;br /&gt;
  y=rnd&lt;br /&gt;
  dist=sqrt(x*x+y*y)&lt;br /&gt;
  if dist &amp;lt;= 1.0 then numbCircHits+=1.0&lt;br /&gt;
  numbSquareHist += 1.0&lt;br /&gt;
 end loop&lt;br /&gt;
  print PI = 4*numbCircHits/numbSquareHits&lt;br /&gt;
&lt;br /&gt;
== A Unix Primer ==&lt;br /&gt;
To get our feet wet using the UNIX operating system, we will try to solve example 2 above using a RNG under UNIX&lt;br /&gt;
&lt;br /&gt;
===List of important Commands===&lt;br /&gt;
&lt;br /&gt;
# ls&lt;br /&gt;
# pwd&lt;br /&gt;
# cd&lt;br /&gt;
# df&lt;br /&gt;
# ssh&lt;br /&gt;
# scp&lt;br /&gt;
# mkdir&lt;br /&gt;
# printenv&lt;br /&gt;
# emacs, vi, vim&lt;br /&gt;
# make, gcc&lt;br /&gt;
# man&lt;br /&gt;
# less&lt;br /&gt;
# rm&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Most of the commands executed within a shell under UNIX have command line arguments (switches) which tell the command to print information about using the command to the screen.  The common forms of these switches are &amp;quot;-h&amp;quot;, &amp;quot;--h&amp;quot;, or &amp;quot;--help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ls --help&lt;br /&gt;
 ssh -h&lt;br /&gt;
&lt;br /&gt;
'' the switch deponds on your flavor of UNIX''&lt;br /&gt;
&lt;br /&gt;
if using the switch doesn't help you can try the &amp;quot;man&amp;quot; (sort for manual) pages (if they were installed).  &lt;br /&gt;
Try&lt;br /&gt;
 man -k pwd&lt;br /&gt;
&lt;br /&gt;
the above command will search the manual for the key word &amp;quot;pwd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example 3: using UNIX to compile a RNG===&lt;br /&gt;
&lt;br /&gt;
Step&lt;br /&gt;
# login to thorshammer (ssh username@thorshammer.rdc.isu.edu)&lt;br /&gt;
# mkdir src&lt;br /&gt;
# cd src&lt;br /&gt;
# mkdir PI&lt;br /&gt;
# cd PI&lt;br /&gt;
# copy past program PI.cc from Moodle into editor on thorshammer&lt;br /&gt;
# ls&lt;br /&gt;
# g++ -o PI PI.cc&lt;br /&gt;
#./PI&lt;br /&gt;
&lt;br /&gt;
== A Root Primer ==&lt;br /&gt;
If typing the command &amp;quot;root&amp;quot; in your unix shell does not work then you need to setup your shell environment so it cn find the application&lt;br /&gt;
&lt;br /&gt;
If you are on thorshamer&lt;br /&gt;
&lt;br /&gt;
In bash shell do&lt;br /&gt;
&lt;br /&gt;
 export ROOTSYS=~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
if chsh do &lt;br /&gt;
&lt;br /&gt;
 setenv ROOTSYS ~foretony/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
To start the root program type&lt;br /&gt;
&lt;br /&gt;
 $ROOTSYS/bin/root&lt;br /&gt;
&lt;br /&gt;
another method&lt;br /&gt;
&lt;br /&gt;
 source ~foretony/src/ROOT/root/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Create Ntuple  and Draw Histogram===&lt;br /&gt;
&lt;br /&gt;
== Cross Sections ==&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
;Total cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma \equiv \frac{\# \mbox{ particles scattered}} {\frac{ \# \mbox{ incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Differential cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt; \frac{d \sigma}{d \Omega} \equiv \frac{\frac{\# \mbox{ particles scattered}}{\mbox{solid angle}}} {\frac{ \# \mbox{incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Solid Angle&lt;br /&gt;
:[[Image:SolidAngleDefinition.jpg]]&lt;br /&gt;
: &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;= surface area of a sphere covered by the detector&lt;br /&gt;
: ie;the detectors area projected onto the surface of a sphere&lt;br /&gt;
:A= surface area of detector&lt;br /&gt;
:r=distance from interaction point to detector&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega = \frac{A}{r^2} sr &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;sr \equiv&amp;lt;/math&amp;gt; steradians&lt;br /&gt;
: &amp;lt;math&amp;gt;A_{\mbox{sphere}} = 4 \pi r^2&amp;lt;/math&amp;gt; if your detector was a hollow ball&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega_{\mbox{max}} = \frac{4 \pi r^2}{r^2} = 4\pi&amp;lt;/math&amp;gt;steradians&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
:Cross-sections have the units of Area&lt;br /&gt;
:1 barn = &amp;lt;math&amp;gt;10^{-28} m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
; [units of &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;] =&amp;lt;math&amp;gt;\frac{\frac{[\mbox{particles}]}{[\mbox{steradian}]}} {\frac{ [ \mbox{particles}]}{[m^2]}} = m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
;Luminosity&lt;br /&gt;
:&amp;lt;math&amp;gt;L = \frac{\mbox{Number of Scatterers}}{\mbox{Area} \cdot \mbox{time}} \sim i_{\mbox{beam}} \rho_{\mbox{target}} l_{\mbox{target}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:FixedTargetScatteringCrossSection.jpg | 500 px]]&lt;br /&gt;
; Fixed target scattering&lt;br /&gt;
: &amp;lt;math&amp;gt;N_{in}&amp;lt;/math&amp;gt;= # of particles in = &amp;lt;math&amp;gt;I \cdot A_{in}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;A_{in}&amp;lt;/math&amp;gt; is the area of the ring of incident particles&lt;br /&gt;
:&amp;lt;math&amp;gt;dN_{in} = I \cdot dA = I (2\pi b) db&amp;lt;/math&amp;gt;= # particles in a ring of radius &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and thickness &amp;lt;math&amp;gt;db&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; if you measure the # of particles detected &amp;lt;math&amp;gt;d N&amp;lt;/math&amp;gt; in a known detector solid angle &amp;lt;math&amp;gt;d \Omega&amp;lt;/math&amp;gt; from a known incident particle Flux (&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;)  as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{\frac{d N}{ d \Omega}}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively if you have a theory which tells you &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; which you want to test experimentally with a beam of flux &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; then you would measure counts (particles)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dN = I \sigma(\theta) d \Omega = I \sigma(\theta)  \frac{d A}{r^2} = I \sigma(\theta) \frac{r^2 \sin(\theta) d \theta d \phi}{r^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
: &amp;lt;math&amp;gt;[d N] = [\frac {\mbox{particles}}{m^2}][m^2] [\mbox{steradian}] &amp;lt;/math&amp;gt; = # of particles&lt;br /&gt;
: or for a count rate divide both sides by time and you get beam current on the RHS&lt;br /&gt;
: integrate and you have the total number of counts&lt;br /&gt;
&lt;br /&gt;
;Classical Scattering&lt;br /&gt;
: In classical scattering you get the same number of particles out that you put in (no capture, conversion,..)&lt;br /&gt;
: &amp;lt;math&amp;gt;d N_{in} = dN&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;d N_{in} = I dA = I (2\pi b) db&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;d N = I \sigma(\theta) d \Omega =   I \sigma(\theta) \sin(\theta) d \theta d \phi = I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;  I (2\pi b) db =  I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;    b  db =   \sigma(\theta) \sin(\theta) d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta) =  \frac{b}{\sin(\theta)}\frac{db}{d \theta}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{db}{d \theta}&amp;lt;/math&amp;gt; tells you how the impact parameter &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; changes with scattering angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 4: Elastic Scattering ===&lt;br /&gt;
This example is an example of classical scattering.&lt;br /&gt;
&lt;br /&gt;
Our goal is to find &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; for an elastic collision of 2 impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.  We need to look for a relationship between the impact parameter &amp;lt;math&amp;gt; b&amp;lt;/math&amp;gt; and the scattering angle &amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.  To find this relationship, let's solve this elastic scattering problem by  describing the collision using the Center of Mass (C.M.) coordinate system in terms of the reduced mass.  As we shall see, the 2-body collision becomes a 1-body problem  when a C.M. coordinate system is used.  Then we will describe the motion of the reduced mass in the C.M. Frame.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_Lab_CM_Frame.jpg | 500 px]]&lt;br /&gt;
[[Media:SPIM_ElasCollis_Lab_CM_Frame.xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
; Variable definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt;= impact parameter ; distance of closest approach&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;= mass of incoming ball&lt;br /&gt;
:&amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;= mass of target ball&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt;= iniital velocity of  incoming ball in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab frame after collision&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;u_2^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_2^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. frame after collision&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Determining the reduced mass:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_2Body-1BodyCoordSystem.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
; vector definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{R}&amp;lt;/math&amp;gt; = a position vector pointing to the center of mass of the two ball system&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r} \equiv \vec{r}_1 - \vec{r}_2&amp;lt;/math&amp;gt; = the magnitude of this vector is the distance between the two masses&lt;br /&gt;
&lt;br /&gt;
In the C.M. reference frame the above vectors have the following relationships&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{R} = 0 = \frac{m_1 \vec{r}_1 + m_2 \vec{r}_2}{m_1 + m_2} \Rightarrow m_1 \vec{r}_1 = -m_2 \vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{r}_1 - \vec{r}_2 = \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving the above equations for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r_2}&amp;lt;/math&amp;gt; and defining the reduced mass &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu = \frac{m_1 \cdot m_2}{m_1 + m_2} \equiv&amp;lt;/math&amp;gt; reduced mass&lt;br /&gt;
&lt;br /&gt;
leads to &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_1 = \frac{\mu}{m_1} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_2 = -\frac{\mu}{m_2} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can use the above reduced mass relationships to construct the Lagrangian in terms of &amp;lt;math&amp;gt;\vec{r}&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \vec{r}_2&amp;lt;/math&amp;gt; thereby reducing the problem from a 2-body problem to a 1-body problem.&lt;br /&gt;
&lt;br /&gt;
; Construct the Lagrangian&lt;br /&gt;
&lt;br /&gt;
The Lagrangian is defined as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T - U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T \equiv&amp;lt;/math&amp;gt; kinetic energy of the system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U \equiv&amp;lt;/math&amp;gt; Potential energy of the system which describes the interaction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} |\vec{\dot{r}}_1|^2 + \frac{1}{2} |\vec{\dot{r}}_2|^2 - U&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} m_1 \left (\frac{m_2}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 + \frac{1}{2} m_2 \left (\frac{m_1}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} \left ( m_2 + m_1 \right ) \left (\frac{m_1m_2}{(m_1+m_2)^2} \right )  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting derivative of the expressions for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: = &amp;lt;math&amp;gt;\frac{1}{2} \mu |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The 2-body problem is now described by a 1-body Lagrangian we need to determine which coordinate system (cartesian, spherical,..) to use to write an expression for (&amp;lt;math&amp;gt;|\vec{\dot{r}}|^2&amp;lt;/math&amp;gt;).  Polar seems best unless there is a dependence in the azimuthal angle.&lt;br /&gt;
&lt;br /&gt;
Lagranges equations of motion are given by&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\partial \mathcal{L}}{\partial q} = \frac{d}{dt} \frac{\partial \mathcal{L}}{\dot{q}}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; represents one of the coordinate (cannonical variables).&lt;br /&gt;
&lt;br /&gt;
To get the classical scattering cross section we are interested in finding an expression for the dependence of the impact parameter on the scattering angle,&amp;lt;math&amp;gt;\frac{d b}{d \theta}&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Now lets redraw the collision in terms of a reference frame fixed on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; (before collision its the Lab Frame but not after collision).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_CMFrame.jpg]] [[Media:SPIM_ElasColls_CMFrame_xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
The C.M. Frame rides along the center of mass, the above coordinate system though has its origin on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   The above drawing identifies &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; for the system at the point of the collision in which the CM frame is a distance &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; (the size of the ball) from the origin of the coordinate system fixed to &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   If &amp;lt;math&amp;gt;b &amp;gt; a&amp;lt;/math&amp;gt; then there is no collision (&amp;lt;math&amp;gt;\theta=0&amp;lt;/math&amp;gt;),  otherwise a collision happens when r=a (the distance between the balls is equal to their diameter).  A head on collision is defined as &amp;lt;math&amp;gt;b=0&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta=\pi&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;Observation&lt;br /&gt;
: as &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; gets smaller, &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{d b}{d \theta} &amp;lt; 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using plane polar coordinates (&amp;lt;math&amp;gt;r, \phi&amp;lt;/math&amp;gt;) we can describe the problem in the lab frame as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v} = \dot{r} \hat{e}_r + r \dot{\phi} \hat{e}_{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U(r) = \left \{  {0 \; r &amp;gt; a \atop \infty \; r \le a} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T -U = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2) - U(r)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Lagranges Equation of Motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial \mathcal {L}}{\partial \phi} = \frac{d}{d t} \frac{\partial \mathcal{L}}{\partial \dot{\phi}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;0 = \frac{d}{d t} [ \mu r^2 \dot{\phi}] \Rightarrow&amp;lt;/math&amp;gt;  there is a constant of motion ( Constant angular momentum)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ell \equiv \mu r^2 \dot{\phi} = \vec{r} \times \vec{p} = \vec{r} \times \mu \vec{v} = r^2 \mu \dot{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substitute &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mathcal{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} ( \mu  \dot{r}^2 + \frac{\ell}{\mu r^2} ) - U(r)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The two equations above are in terms of &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; whereas our goal is to find an expression for &amp;lt;math&amp;gt;\frac{ d b}{ d \theta}&amp;lt;/math&amp;gt;.  Since &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is related to &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is related to&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta = \pi - 2\phi&amp;lt;/math&amp;gt;; see figure above) we should try and find expressions for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;r(b)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Trick&lt;br /&gt;
: &amp;lt;math&amp;gt;\dot{\phi} = \frac{d \phi}{d t} = \frac{d \phi}{d r} \frac{d r}{d t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \ell = \mu r^2 \frac{d \phi}{d r} \dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
:or&lt;br /&gt;
: &amp;lt;math&amp;gt;d \phi = \frac{\ell}{\mu r^2 \dot{r}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We now need an expression for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt; in order to integrate the above equation to determine the functional dependence of &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; and hence&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The potential in the Lagrangian  though is infinite for &amp;lt;math&amp;gt;r \le a&amp;lt;/math&amp;gt; .  Let's use the property of conservation of energy to accommodate this mathematical construct.&lt;br /&gt;
&lt;br /&gt;
Since Energy is conserved (Elastic Scattering), we may define the Hamiltonian as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H = T + U = \frac{1}{2} (\mu \dot{r}^2 + \frac{\ell}{\mu r^2}) + U(r) = constant \equiv E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dot{r} = \pm \sqrt{\frac{2(E-U(r))}{\mu} - \frac{\ell^2}{\mu^2 r^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting the above into the equation for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; and integrating:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int d \phi = \int_{r_{min}}^{r_{max}} \frac{\ell}{\mu r^2 \dot{R}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{min} = a   \; \; \;  r_{max}= \infty   \; \; \;   U(r) = 0 : a \le r \le \infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int_a^{\infty} \frac{\ell} {r^2 \sqrt{2 \mu E - \frac{\ell^2}{r^2}} }dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;a \le r \le \infty&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;E = \frac{1}{2} \mu v^2_{cm} \Rightarrow v_{cm} = \sqrt{\frac{2E}{\mu}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{\ell} = \vec{r} \times \vec{p} \Rightarrow |\vec{\ell}| = |\vec{r}| |\vec{p}| \sin(\phi) = r \mu v_{cm} \sin(\phi) = r \mu \left ( \sqrt{\frac{2E}{\mu}} \right) \sin(\phi) = \sqrt{2 \mu E} r\sin(\phi) =\sqrt{2 \mu E} b&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting this expression for &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into the last expression for &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi =\int_a^{\infty}  \frac{b dr}{r\sqrt{(r^2-b^2)}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Integral Table&lt;br /&gt;
: &amp;lt;math&amp;gt;\int  \frac{dx}{x\sqrt{(\alpha x^2+\beta x+\gamma)}} = \frac{-1}{\sqrt{-\gamma}} \sin^{-1} \left (\frac{\beta x+2\gamma}{|x|\sqrt{\beta^2-4\alpha \gamma}} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let &amp;lt;math&amp;gt;x=r \;\; \alpha=1 \;\; \beta=0 \;\; \gamma=-b^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \left . b \frac{1}{\sqrt{-(-b^2)}} \sin^{-1} \left (\frac{-2b^2}{r\sqrt{0-4(1)(-b^2) } }\right ) \right |_a^{\infty} = \sin^{-1} (0)- \sin^{-1}(-\frac{b}{a})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sin(\phi) = \frac{b}{a} = \sin \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \cos \left ( \frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow b = a \cos \left( \frac{\theta}{2} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Now substitute the above into the expression for &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{b}{\sin(\theta)} \frac{d b}{d \theta} = \frac{a \cos(\theta/2)}{sin(\theta)} a[-\sin(\theta/2)]\frac{1}{2} &lt;br /&gt;
= \frac{a^2}{2} \frac{\cos(\theta/2) \sin(\theta/2)}{\sin(\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
drop the negative sign, sqrt in denominator allows this, and use the trig identity&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin \left (\frac{\theta}{2} + \frac{\theta}{2} \right ) = \cos \left (\frac{\theta}{2} \right) \sin \left (\frac{\theta}{2} \right ) + \cos \left ( \frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin(\theta) = 2 \cos \left (\frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{a^2}{2} \frac{1}{2} = \frac{a^2}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \int \sigma(\theta) d \Omega = \frac{a^2}{2} \frac{1}{2} 4 \pi  = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;compare with result from definition&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; = scattering cross-section &amp;lt;math&amp;gt;\equiv \frac{\# particles\; scattered} {\frac{ \# incident \; particles}{Area}}&amp;lt;/math&amp;gt;&lt;br /&gt;
:number of particles scattered = number of incident particles&lt;br /&gt;
: Area = &amp;lt;math&amp;gt; \pi a^2&amp;lt;/math&amp;gt; = The area profile in which a collision occurs( the ball diameter is &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;) [[Image:ClassicalEffectiveScatteringArea.jpg | 200 px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \frac{{N}}{\frac{ N}{\pi a^2}} = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lab Frame Cross Sections ===&lt;br /&gt;
&lt;br /&gt;
The C.M. frame is often chosen to theoretically calculate cross-sections even though experiments are conducted in the Lab frame.  In such cases you will need to transform cross-sections between two frames.&lt;br /&gt;
&lt;br /&gt;
The total cross-section should be frame independent&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_{C.M.} = \sigma_{Lab}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is in the CM frame and &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; is in the Lab frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;A non-relativistic transformation:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) 2 \pi \sin(\theta) d \theta = \sigma(\psi) 2 \pi \sin (\psi) d \psi&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation is governed by the dependence of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt; \psi&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt; \left( \frac{d \theta}{d \psi} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets return back to our picture of the scattering Process&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
if we superimpose the vectors &amp;lt;math&amp;gt;\vec{v}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{v}_1^{\prime}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame_Velocities.jpg]]&lt;br /&gt;
&lt;br /&gt;
Trig identities (non-relativistic Gallilean transformation) tell us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 \sin(\psi) = v_1^{\prime} \sin(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 cos(\psi) = v_{cm} + v_1^{\prime} \cos(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\psi)}{\cos(\psi)} = \frac{v_1^{\prime} \sin(\theta)/v_1}{\frac{v_{CM}}{v_1} + \frac{v_1^{\prime} \cos(\theta)}{v_1} }&lt;br /&gt;
= \frac{\sin(\theta)}{\cos(\theta) + \frac{v_{CM}}{v_1^{\prime}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an elastic collision only the directions change in the CM Frame: &amp;lt;math&amp;gt;u_1^{\prime}= v_1^{\prime}&amp;lt;/math&amp;gt;  &amp;amp; &amp;lt;math&amp;gt;u_1^{\prime}= v_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;From the definition of the C.M.&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{v}_{CM} = \frac{m_1 \vec{u}_1 + m_2 \vec{u}_2}{m_1+m_2} = \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;conservation of momentum in CM Frame &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1 u_1^{\prime} = - m_2 u_2{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Rightarrow v_1^{\prime} = u_1^{\prime} = \frac{-m_2}{m_1} u_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Gallilean Coordinate transformation:&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{u}_1 = \vec{u}_1^{\prime} + \vec{v}_{CM} = \vec{u}_1^{\prime} + \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow u_1{\prime} = \left [ 1 - \frac{m_1}{m_1 + m_2} \right ] u_1 = \frac{m_2}{m_1+m_2}u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow v_1^{\prime} = u_1^{\prime}  =\frac{m_2}{m_1+m_2} u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; another expression for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using the above gallilean transformation we can do the following&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{v_{CM}}{v_1^{\prime}}= \frac{\frac{m_1}{m_1+m_2} u_1}{\frac{m_2}{m_1+m_2} u_1} = \frac{m_1}{m_2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\theta)}{\cos(\theta) + \frac{m_1}{m_2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after a little trig substitution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{m_1}{m_2} = \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
&lt;br /&gt;
now use the chain rule to find &amp;lt;math&amp;gt;\frac{d \theta}{d \psi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f \equiv  \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
:&amp;lt;math&amp;gt;df = 0 = \frac{ \partial f}{\partial \psi} d \psi  + \frac{ \partial f}{\partial \theta} d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \frac{d \theta}{d \psi} = \frac{-\frac{ \partial f}{\partial \psi} }{\frac{ \partial f}{\partial \theta} }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{ \partial f}{\partial \psi} = \frac{\cos(\theta - \psi)}{\sin(\psi)} + \frac{\sin(\theta - \psi)}{\sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{ \partial f}{\partial \theta }= 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substitution:&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{\sin(\theta)}{\sin(\psi)} \left [ 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)} \right ] \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the above equation to be more useful one would prefer to recast it in terms of only &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; and masses.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\psi) = \frac{\left [ \frac{m_1}{m_2}\cos(\psi) + \sqrt{1-\left ( \frac{m_1 \sin(\psi) }{m_2} \right )^2 }\right ]}{\sqrt{1 - \left ( \frac{m_1 \sin(\psi)}{m_2}\right )^2 }}\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130018</id>
		<title>TF SPIM Intro</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=TF_SPIM_Intro&amp;diff=130018"/>
		<updated>2025-01-17T17:38:42Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Example 3: using UNIX to compile a RNG */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction=&lt;br /&gt;
&lt;br /&gt;
Experimentalists use simulations to predict the sources of background which will interfere with the signal they plan on measuring.  An important aspect of this process is to understand how signals are produced in your measurement device.  Devices share the common problem of isolating a signal produced in the device from the noise that is present in the device.  &lt;br /&gt;
&lt;br /&gt;
Below is a description of how signals are produced in bulk materials.&lt;br /&gt;
&lt;br /&gt;
==Particle Detection ==&lt;br /&gt;
A device detects a particle only after the particle transfers energy to the device.&lt;br /&gt;
&lt;br /&gt;
Energy intrinsic to a device depends on the material used in a device&lt;br /&gt;
&lt;br /&gt;
Consider a device made of some material with an average atomic number (&amp;lt;math&amp;gt;Z&amp;lt;/math&amp;gt;)  at some temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;).  The material's atoms are in constant thermal motion (unless you can manage to have T = zero degrees Klevin).&lt;br /&gt;
&lt;br /&gt;
Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E) = \frac{1}{kT} e^{-\frac{E}{kT}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E)&amp;lt;/math&amp;gt; represents the probability of any atom in the system having an energy &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= 1.38 \times 10^{-23} \frac{J}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  You may be more familiar with the Maxwell-Boltzmann distribution in the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;N(\nu) = 4 \pi N \left ( \frac{m}{2\pi k T} \right ) ^{3/2} v^2  e^{-mv^2/2kT}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;N(v) \Delta v&amp;lt;/math&amp;gt; would represent the molecules in the gas sample with speeds between &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v + \Delta v&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 1: P(E=5 eV) ===&lt;br /&gt;
&lt;br /&gt;
;What is the probability that an atom in a 12.011 gram block of carbon would have an energy of 5 eV? &lt;br /&gt;
&lt;br /&gt;
First lets check that the probability distribution is Normalized; ie: does &amp;lt;math&amp;gt;\int_0^{\infty} P(E) dE =1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Physically, &amp;lt;math&amp;gt;P(E=5eV)&amp;lt;/math&amp;gt; is calculated by integrating P(E) over some energy interval ( ie:&amp;lt;math&amp;gt; N(v) dv&amp;lt;/math&amp;gt;).  I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{4.9 eV}^{5.1 eV} P(E) dE =  - [e^{-5.1 eV/kT} - e^{4.9 eV/kT}]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k= \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right )  =  \left (1.38 \times 10^{-23} \frac{J}{mole \cdot K} \right ) \left (6.42 \times 10^{18} \frac{eV}{J} \right )= 8.614 \times 10^{-5} \frac {eV}{mole \cdot K}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
assuming a room temperature of &amp;lt;math&amp;gt;T=300 K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&amp;lt;math&amp;gt;kT = 0.0258 \frac{eV}{mole}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\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}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in other words the probability may be approximated by just using the distribution function alone&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=5eV) = e^{-5/0.0258} \approx 10^{-85}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approximation breaks down as &amp;lt;math&amp;gt;E \rightarrow 0.0258 eV&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt;carbon atoms, we would not expect to see a 5 eV carbon atom in a sample size of &amp;lt;math&amp;gt;6 \times 10^{23} &amp;lt;/math&amp;gt; carbon atoms when the probability of observing such an atom is &amp;lt;math&amp;gt;\approx 10^{-85}&amp;lt;/math&amp;gt;.  Note: The mass of the earth is about &amp;lt;math&amp;gt;10^{27}&amp;lt;/math&amp;gt; g &amp;lt;math&amp;gt;\approx 10^{50}&amp;lt;/math&amp;gt; atoms, so a carbon atom with an energy of 5 eV would be difficult to observe  in a detector the size of the earth .&lt;br /&gt;
&lt;br /&gt;
The average energy we expect to see would be calculated by&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&amp;lt;E&amp;gt; = \int_{0}^{\infty} E \cdot P(E) dE&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
;Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.&lt;br /&gt;
&lt;br /&gt;
approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0258} \approx 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
approximately 10 eV of energy is needed to ionize an atom in a gas chamber&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=10 eV) = e^{-10/0.0258} \approx 10^{-169}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
But if you cool the silicon detector to 200 degrees Kelvin (200 K) then &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(E=1 eV) = e^{-1/0.0172} \approx 10^{-26} &amp;lt;&amp;lt; 10^{-17}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.&lt;br /&gt;
&lt;br /&gt;
also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it's quantum efficiency for absorbing energy.&lt;br /&gt;
&lt;br /&gt;
; What does this have to do with Simulations?&lt;br /&gt;
: You just did a SImulation.  Consider the following description of the Monte Carlo Method&lt;br /&gt;
&lt;br /&gt;
== The Monte Carlo method ==&lt;br /&gt;
; Stochastic&lt;br /&gt;
: from the greek word &amp;quot;stachos&amp;quot;&lt;br /&gt;
: a means of, relating to, or characterized by conjecture and randomness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A stochastic process is one whose behavior is non-deterministic in that the next state of the process is partially determined.&lt;br /&gt;
&lt;br /&gt;
The above particle detector was an example of describing a stochastic process using a probability distribution to determine the likely hood of finding an atom with a certain energy.&lt;br /&gt;
&lt;br /&gt;
Physics at the Quantum Mechanics  scale contains some of the clearest examples of such a non-deterministic systems.  The canonical systems in Thermodynamics is another example.&lt;br /&gt;
&lt;br /&gt;
Basically the monte-carlo method uses a random number generator (RNG) to generate a distribution (gaussian, uniform, Poission,...) which is used to solve a stochastic process based on an astochastic description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 2 Calculation of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
;Astochastic description:&lt;br /&gt;
: &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; may be measured as the ratio of the area of a circle of radius &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; divided by the area of a square of length &amp;lt;math&amp;gt;2r&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PI_from_AreaRatio.jpg]]&amp;lt;math&amp;gt;\frac{A_{circle}}{A_{square}} = \frac{\pi r^2}{4r^2} = \frac{\pi}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure the value of &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; if you physically measure the above ratios.&lt;br /&gt;
&lt;br /&gt;
; Stochastic description:&lt;br /&gt;
: Construct a dart board representing the above geometry, throw several darts at it, and look at a ratio of the number of darts in the circle to the total number of darts thrown (assuming you always hit the dart board).&lt;br /&gt;
&lt;br /&gt;
; Monte-Carlo Method&lt;br /&gt;
:Here is an outline of a program to calulate &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; using the Monte-Carlo method with the above Stochastic description&lt;br /&gt;
[[Image:MC_PI_fromAreaRatio.jpg]]&lt;br /&gt;
 begin loop&lt;br /&gt;
  x=rnd&lt;br /&gt;
  y=rnd&lt;br /&gt;
  dist=sqrt(x*x+y*y)&lt;br /&gt;
  if dist &amp;lt;= 1.0 then numbCircHits+=1.0&lt;br /&gt;
  numbSquareHist += 1.0&lt;br /&gt;
 end loop&lt;br /&gt;
  print PI = 4*numbCircHits/numbSquareHits&lt;br /&gt;
&lt;br /&gt;
== A Unix Primer ==&lt;br /&gt;
To get our feet wet using the UNIX operating system, we will try to solve example 2 above using a RNG under UNIX&lt;br /&gt;
&lt;br /&gt;
===List of important Commands===&lt;br /&gt;
&lt;br /&gt;
# ls&lt;br /&gt;
# pwd&lt;br /&gt;
# cd&lt;br /&gt;
# df&lt;br /&gt;
# ssh&lt;br /&gt;
# scp&lt;br /&gt;
# mkdir&lt;br /&gt;
# printenv&lt;br /&gt;
# emacs, vi, vim&lt;br /&gt;
# make, gcc&lt;br /&gt;
# man&lt;br /&gt;
# less&lt;br /&gt;
# rm&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Most of the commands executed within a shell under UNIX have command line arguments (switches) which tell the command to print information about using the command to the screen.  The common forms of these switches are &amp;quot;-h&amp;quot;, &amp;quot;--h&amp;quot;, or &amp;quot;--help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ls --help&lt;br /&gt;
 ssh -h&lt;br /&gt;
&lt;br /&gt;
'' the switch deponds on your flavor of UNIX''&lt;br /&gt;
&lt;br /&gt;
if using the switch doesn't help you can try the &amp;quot;man&amp;quot; (sort for manual) pages (if they were installed).  &lt;br /&gt;
Try&lt;br /&gt;
 man -k pwd&lt;br /&gt;
&lt;br /&gt;
the above command will search the manual for the key word &amp;quot;pwd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example 3: using UNIX to compile a RNG===&lt;br /&gt;
&lt;br /&gt;
Step&lt;br /&gt;
# login to thorshammer (ssh username@thorshammer.rdc.isu.edu)&lt;br /&gt;
# mkdir src&lt;br /&gt;
# cd src&lt;br /&gt;
# mkdir PI&lt;br /&gt;
# cd PI&lt;br /&gt;
# copy past program PI.cc from Moodle into editor on thorshammer&lt;br /&gt;
# ls&lt;br /&gt;
# g++ -o PI PI.cc&lt;br /&gt;
#./PI&lt;br /&gt;
&lt;br /&gt;
== A Root Primer ==&lt;br /&gt;
In bash shell do&lt;br /&gt;
&lt;br /&gt;
 export ROOTSYS=~tforest/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
if chsh do &lt;br /&gt;
&lt;br /&gt;
 setenv ROOTSYS ~tforest/src/ROOT/root&lt;br /&gt;
&lt;br /&gt;
To start the root program type&lt;br /&gt;
&lt;br /&gt;
 $ROOTSYS/bin/root&lt;br /&gt;
&lt;br /&gt;
another method&lt;br /&gt;
&lt;br /&gt;
 source ~foretony/src/ROOT/root/bin/thisroot.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Create Ntuple  and Draw Histogram===&lt;br /&gt;
&lt;br /&gt;
== Cross Sections ==&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
;Total cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma \equiv \frac{\# \mbox{ particles scattered}} {\frac{ \# \mbox{ incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Differential cross section&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; = &amp;lt;math&amp;gt; \frac{d \sigma}{d \Omega} \equiv \frac{\frac{\# \mbox{ particles scattered}}{\mbox{solid angle}}} {\frac{ \# \mbox{incident particles}}{\mbox{Area}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Solid Angle&lt;br /&gt;
:[[Image:SolidAngleDefinition.jpg]]&lt;br /&gt;
: &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt;= surface area of a sphere covered by the detector&lt;br /&gt;
: ie;the detectors area projected onto the surface of a sphere&lt;br /&gt;
:A= surface area of detector&lt;br /&gt;
:r=distance from interaction point to detector&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega = \frac{A}{r^2} sr &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;sr \equiv&amp;lt;/math&amp;gt; steradians&lt;br /&gt;
: &amp;lt;math&amp;gt;A_{\mbox{sphere}} = 4 \pi r^2&amp;lt;/math&amp;gt; if your detector was a hollow ball&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega_{\mbox{max}} = \frac{4 \pi r^2}{r^2} = 4\pi&amp;lt;/math&amp;gt;steradians&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
:Cross-sections have the units of Area&lt;br /&gt;
:1 barn = &amp;lt;math&amp;gt;10^{-28} m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
; [units of &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;] =&amp;lt;math&amp;gt;\frac{\frac{[\mbox{particles}]}{[\mbox{steradian}]}} {\frac{ [ \mbox{particles}]}{[m^2]}} = m^2&amp;lt;/math&amp;gt;&lt;br /&gt;
;Luminosity&lt;br /&gt;
:&amp;lt;math&amp;gt;L = \frac{\mbox{Number of Scatterers}}{\mbox{Area} \cdot \mbox{time}} \sim i_{\mbox{beam}} \rho_{\mbox{target}} l_{\mbox{target}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:FixedTargetScatteringCrossSection.jpg | 500 px]]&lt;br /&gt;
; Fixed target scattering&lt;br /&gt;
: &amp;lt;math&amp;gt;N_{in}&amp;lt;/math&amp;gt;= # of particles in = &amp;lt;math&amp;gt;I \cdot A_{in}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;A_{in}&amp;lt;/math&amp;gt; is the area of the ring of incident particles&lt;br /&gt;
:&amp;lt;math&amp;gt;dN_{in} = I \cdot dA = I (2\pi b) db&amp;lt;/math&amp;gt;= # particles in a ring of radius &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and thickness &amp;lt;math&amp;gt;db&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can measure &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; if you measure the # of particles detected &amp;lt;math&amp;gt;d N&amp;lt;/math&amp;gt; in a known detector solid angle &amp;lt;math&amp;gt;d \Omega&amp;lt;/math&amp;gt; from a known incident particle Flux (&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;)  as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{\frac{d N}{ d \Omega}}{I}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively if you have a theory which tells you &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; which you want to test experimentally with a beam of flux &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; then you would measure counts (particles)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;dN = I \sigma(\theta) d \Omega = I \sigma(\theta)  \frac{d A}{r^2} = I \sigma(\theta) \frac{r^2 \sin(\theta) d \theta d \phi}{r^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Units&lt;br /&gt;
: &amp;lt;math&amp;gt;[d N] = [\frac {\mbox{particles}}{m^2}][m^2] [\mbox{steradian}] &amp;lt;/math&amp;gt; = # of particles&lt;br /&gt;
: or for a count rate divide both sides by time and you get beam current on the RHS&lt;br /&gt;
: integrate and you have the total number of counts&lt;br /&gt;
&lt;br /&gt;
;Classical Scattering&lt;br /&gt;
: In classical scattering you get the same number of particles out that you put in (no capture, conversion,..)&lt;br /&gt;
: &amp;lt;math&amp;gt;d N_{in} = dN&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;d N_{in} = I dA = I (2\pi b) db&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;d N = I \sigma(\theta) d \Omega =   I \sigma(\theta) \sin(\theta) d \theta d \phi = I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;  I (2\pi b) db =  I \sigma(\theta) \sin(\theta) d \theta (2 \pi )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;    b  db =   \sigma(\theta) \sin(\theta) d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\theta) =  \frac{b}{\sin(\theta)}\frac{db}{d \theta}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{db}{d \theta}&amp;lt;/math&amp;gt; tells you how the impact parameter &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; changes with scattering angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 4: Elastic Scattering ===&lt;br /&gt;
This example is an example of classical scattering.&lt;br /&gt;
&lt;br /&gt;
Our goal is to find &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt; for an elastic collision of 2 impenetrable spheres of diameter &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;.  We need to look for a relationship between the impact parameter &amp;lt;math&amp;gt; b&amp;lt;/math&amp;gt; and the scattering angle &amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.  To find this relationship, let's solve this elastic scattering problem by  describing the collision using the Center of Mass (C.M.) coordinate system in terms of the reduced mass.  As we shall see, the 2-body collision becomes a 1-body problem  when a C.M. coordinate system is used.  Then we will describe the motion of the reduced mass in the C.M. Frame.&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_Lab_CM_Frame.jpg | 500 px]]&lt;br /&gt;
[[Media:SPIM_ElasCollis_Lab_CM_Frame.xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
; Variable definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt;= impact parameter ; distance of closest approach&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;= mass of incoming ball&lt;br /&gt;
:&amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;= mass of target ball&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1&amp;lt;/math&amp;gt;= iniital velocity of  incoming ball in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in Lab frame after collision&lt;br /&gt;
:&amp;lt;math&amp;gt;u_1^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_1^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;u_2^{\prime}&amp;lt;/math&amp;gt;= iniital velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M.  Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;v_2^{\prime}&amp;lt;/math&amp;gt;= final velocity of  &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; in C.M. Frame&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;= scattering angle of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; in C.M. frame after collision&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Determining the reduced mass:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_2Body-1BodyCoordSystem.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
; vector definitions&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt; = a position vector pointing to the location of &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{R}&amp;lt;/math&amp;gt; = a position vector pointing to the center of mass of the two ball system&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec{r} \equiv \vec{r}_1 - \vec{r}_2&amp;lt;/math&amp;gt; = the magnitude of this vector is the distance between the two masses&lt;br /&gt;
&lt;br /&gt;
In the C.M. reference frame the above vectors have the following relationships&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{R} = 0 = \frac{m_1 \vec{r}_1 + m_2 \vec{r}_2}{m_1 + m_2} \Rightarrow m_1 \vec{r}_1 = -m_2 \vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
# &amp;lt;math&amp;gt;\vec{r}_1 - \vec{r}_2 = \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving the above equations for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r_2}&amp;lt;/math&amp;gt; and defining the reduced mass &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu = \frac{m_1 \cdot m_2}{m_1 + m_2} \equiv&amp;lt;/math&amp;gt; reduced mass&lt;br /&gt;
&lt;br /&gt;
leads to &lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_1 = \frac{\mu}{m_1} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\vec{r}_2 = -\frac{\mu}{m_2} \vec{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can use the above reduced mass relationships to construct the Lagrangian in terms of &amp;lt;math&amp;gt;\vec{r}&amp;lt;/math&amp;gt; instead of &amp;lt;math&amp;gt;\vec{r}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \vec{r}_2&amp;lt;/math&amp;gt; thereby reducing the problem from a 2-body problem to a 1-body problem.&lt;br /&gt;
&lt;br /&gt;
; Construct the Lagrangian&lt;br /&gt;
&lt;br /&gt;
The Lagrangian is defined as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T - U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T \equiv&amp;lt;/math&amp;gt; kinetic energy of the system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U \equiv&amp;lt;/math&amp;gt; Potential energy of the system which describes the interaction&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} |\vec{\dot{r}}_1|^2 + \frac{1}{2} |\vec{\dot{r}}_2|^2 - U&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} m_1 \left (\frac{m_2}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 + \frac{1}{2} m_2 \left (\frac{m_1}{m_1+m_2} \right )^2  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
:= &amp;lt;math&amp;gt;\frac{1}{2} \left ( m_2 + m_1 \right ) \left (\frac{m_1m_2}{(m_1+m_2)^2} \right )  |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substituting derivative of the expressions for &amp;lt;math&amp;gt;\vec{r_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{r}_2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: = &amp;lt;math&amp;gt;\frac{1}{2} \mu |\vec{\dot{r}}|^2 -U(\vec{r})&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The 2-body problem is now described by a 1-body Lagrangian we need to determine which coordinate system (cartesian, spherical,..) to use to write an expression for (&amp;lt;math&amp;gt;|\vec{\dot{r}}|^2&amp;lt;/math&amp;gt;).  Polar seems best unless there is a dependence in the azimuthal angle.&lt;br /&gt;
&lt;br /&gt;
Lagranges equations of motion are given by&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{\partial \mathcal{L}}{\partial q} = \frac{d}{dt} \frac{\partial \mathcal{L}}{\dot{q}}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; represents one of the coordinate (cannonical variables).&lt;br /&gt;
&lt;br /&gt;
To get the classical scattering cross section we are interested in finding an expression for the dependence of the impact parameter on the scattering angle,&amp;lt;math&amp;gt;\frac{d b}{d \theta}&amp;lt;/math&amp;gt;.  &lt;br /&gt;
&lt;br /&gt;
Now lets redraw the collision in terms of a reference frame fixed on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt; (before collision its the Lab Frame but not after collision).&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM_ElasCollis_CMFrame.jpg]] [[Media:SPIM_ElasColls_CMFrame_xfig.txt]]&lt;br /&gt;
&lt;br /&gt;
The C.M. Frame rides along the center of mass, the above coordinate system though has its origin on &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   The above drawing identifies &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; for the system at the point of the collision in which the CM frame is a distance &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; (the size of the ball) from the origin of the coordinate system fixed to &amp;lt;math&amp;gt;m_2&amp;lt;/math&amp;gt;.   If &amp;lt;math&amp;gt;b &amp;gt; a&amp;lt;/math&amp;gt; then there is no collision (&amp;lt;math&amp;gt;\theta=0&amp;lt;/math&amp;gt;),  otherwise a collision happens when r=a (the distance between the balls is equal to their diameter).  A head on collision is defined as &amp;lt;math&amp;gt;b=0&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta=\pi&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;Observation&lt;br /&gt;
: as &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; gets smaller, &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; gets bigger&lt;br /&gt;
: &amp;lt;math&amp;gt;\frac{d b}{d \theta} &amp;lt; 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using plane polar coordinates (&amp;lt;math&amp;gt;r, \phi&amp;lt;/math&amp;gt;) we can describe the problem in the lab frame as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{v} = \dot{r} \hat{e}_r + r \dot{\phi} \hat{e}_{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;T = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;U(r) = \left \{  {0 \; r &amp;gt; a \atop \infty \; r \le a} \right .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = T -U = \frac{1}{2} \mu ( \dot{r}^2 + r^2 \dot{\phi}^2) - U(r)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Lagranges Equation of Motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial \mathcal {L}}{\partial \phi} = \frac{d}{d t} \frac{\partial \mathcal{L}}{\partial \dot{\phi}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;0 = \frac{d}{d t} [ \mu r^2 \dot{\phi}] \Rightarrow&amp;lt;/math&amp;gt;  there is a constant of motion ( Constant angular momentum)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ell \equiv \mu r^2 \dot{\phi} = \vec{r} \times \vec{p} = \vec{r} \times \mu \vec{v} = r^2 \mu \dot{\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substitute &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mathcal{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mathcal{L} = \frac{1}{2} ( \mu  \dot{r}^2 + \frac{\ell}{\mu r^2} ) - U(r)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The two equations above are in terms of &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; whereas our goal is to find an expression for &amp;lt;math&amp;gt;\frac{ d b}{ d \theta}&amp;lt;/math&amp;gt;.  Since &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; is related to &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is related to&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt; (&amp;lt;math&amp;gt;\theta = \pi - 2\phi&amp;lt;/math&amp;gt;; see figure above) we should try and find expressions for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;r(b)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Trick&lt;br /&gt;
: &amp;lt;math&amp;gt;\dot{\phi} = \frac{d \phi}{d t} = \frac{d \phi}{d r} \frac{d r}{d t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow \ell = \mu r^2 \frac{d \phi}{d r} \dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
:or&lt;br /&gt;
: &amp;lt;math&amp;gt;d \phi = \frac{\ell}{\mu r^2 \dot{r}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We now need an expression for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt; in order to integrate the above equation to determine the functional dependence of &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; and hence&amp;lt;math&amp;gt; \theta&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The potential in the Lagrangian  though is infinite for &amp;lt;math&amp;gt;r \le a&amp;lt;/math&amp;gt; .  Let's use the property of conservation of energy to accommodate this mathematical construct.&lt;br /&gt;
&lt;br /&gt;
Since Energy is conserved (Elastic Scattering), we may define the Hamiltonian as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H = T + U = \frac{1}{2} (\mu \dot{r}^2 + \frac{\ell}{\mu r^2}) + U(r) = constant \equiv E&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\dot{r}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dot{r} = \pm \sqrt{\frac{2(E-U(r))}{\mu} - \frac{\ell^2}{\mu^2 r^2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting the above into the equation for &amp;lt;math&amp;gt;d \phi&amp;lt;/math&amp;gt; and integrating:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int d \phi = \int_{r_{min}}^{r_{max}} \frac{\ell}{\mu r^2 \dot{R}} dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{min} = a   \; \; \;  r_{max}= \infty   \; \; \;   U(r) = 0 : a \le r \le \infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \int_a^{\infty} \frac{\ell} {r^2 \sqrt{2 \mu E - \frac{\ell^2}{r^2}} }dr&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;a \le r \le \infty&amp;lt;/math&amp;gt; : &amp;lt;math&amp;gt;E = \frac{1}{2} \mu v^2_{cm} \Rightarrow v_{cm} = \sqrt{\frac{2E}{\mu}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{\ell} = \vec{r} \times \vec{p} \Rightarrow |\vec{\ell}| = |\vec{r}| |\vec{p}| \sin(\phi) = r \mu v_{cm} \sin(\phi) = r \mu \left ( \sqrt{\frac{2E}{\mu}} \right) \sin(\phi) = \sqrt{2 \mu E} r\sin(\phi) =\sqrt{2 \mu E} b&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting this expression for &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; into the last expression for &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi =\int_a^{\infty}  \frac{b dr}{r\sqrt{(r^2-b^2)}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Integral Table&lt;br /&gt;
: &amp;lt;math&amp;gt;\int  \frac{dx}{x\sqrt{(\alpha x^2+\beta x+\gamma)}} = \frac{-1}{\sqrt{-\gamma}} \sin^{-1} \left (\frac{\beta x+2\gamma}{|x|\sqrt{\beta^2-4\alpha \gamma}} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let &amp;lt;math&amp;gt;x=r \;\; \alpha=1 \;\; \beta=0 \;\; \gamma=-b^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi = \left . b \frac{1}{\sqrt{-(-b^2)}} \sin^{-1} \left (\frac{-2b^2}{r\sqrt{0-4(1)(-b^2) } }\right ) \right |_a^{\infty} = \sin^{-1} (0)- \sin^{-1}(-\frac{b}{a})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sin(\phi) = \frac{b}{a} = \sin \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \cos \left ( \frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow b = a \cos \left( \frac{\theta}{2} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Now substitute the above into the expression for &amp;lt;math&amp;gt;\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{b}{\sin(\theta)} \frac{d b}{d \theta} = \frac{a \cos(\theta/2)}{sin(\theta)} a[-\sin(\theta/2)]\frac{1}{2} &lt;br /&gt;
= \frac{a^2}{2} \frac{\cos(\theta/2) \sin(\theta/2)}{\sin(\theta)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
drop the negative sign, sqrt in denominator allows this, and use the trig identity&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin \left (\frac{\theta}{2} + \frac{\theta}{2} \right ) = \cos \left (\frac{\theta}{2} \right) \sin \left (\frac{\theta}{2} \right ) + \cos \left ( \frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sin(\theta) = 2 \cos \left (\frac{\theta}{2} \right ) \sin \left (\frac{\theta}{2} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma(\theta) = \frac{a^2}{2} \frac{1}{2} = \frac{a^2}{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \int \sigma(\theta) d \Omega = \frac{a^2}{2} \frac{1}{2} 4 \pi  = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;compare with result from definition&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; = scattering cross-section &amp;lt;math&amp;gt;\equiv \frac{\# particles\; scattered} {\frac{ \# incident \; particles}{Area}}&amp;lt;/math&amp;gt;&lt;br /&gt;
:number of particles scattered = number of incident particles&lt;br /&gt;
: Area = &amp;lt;math&amp;gt; \pi a^2&amp;lt;/math&amp;gt; = The area profile in which a collision occurs( the ball diameter is &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt;) [[Image:ClassicalEffectiveScatteringArea.jpg | 200 px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma = \frac{{N}}{\frac{ N}{\pi a^2}} = \pi a^2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lab Frame Cross Sections ===&lt;br /&gt;
&lt;br /&gt;
The C.M. frame is often chosen to theoretically calculate cross-sections even though experiments are conducted in the Lab frame.  In such cases you will need to transform cross-sections between two frames.&lt;br /&gt;
&lt;br /&gt;
The total cross-section should be frame independent&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma_{C.M.} = \sigma_{Lab}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is in the CM frame and &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; is in the Lab frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;A non-relativistic transformation:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) d \Omega = \sigma(\psi) d \Omega^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\theta) 2 \pi \sin(\theta) d \theta = \sigma(\psi) 2 \pi \sin (\psi) d \psi&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The transformation is governed by the dependence of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt; \psi&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt; \left( \frac{d \theta}{d \psi} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lets return back to our picture of the scattering Process&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame.jpg | 500 px]]&lt;br /&gt;
&lt;br /&gt;
if we superimpose the vectors &amp;lt;math&amp;gt;\vec{v}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\vec{v}_1^{\prime}&amp;lt;/math&amp;gt; we have&lt;br /&gt;
&lt;br /&gt;
[[Image:SPIM ElasCollis Lab CM Frame_Velocities.jpg]]&lt;br /&gt;
&lt;br /&gt;
Trig identities (non-relativistic Gallilean transformation) tell us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 \sin(\psi) = v_1^{\prime} \sin(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v_1 cos(\psi) = v_{cm} + v_1^{\prime} \cos(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
solving for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\psi)}{\cos(\psi)} = \frac{v_1^{\prime} \sin(\theta)/v_1}{\frac{v_{CM}}{v_1} + \frac{v_1^{\prime} \cos(\theta)}{v_1} }&lt;br /&gt;
= \frac{\sin(\theta)}{\cos(\theta) + \frac{v_{CM}}{v_1^{\prime}}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an elastic collision only the directions change in the CM Frame: &amp;lt;math&amp;gt;u_1^{\prime}= v_1^{\prime}&amp;lt;/math&amp;gt;  &amp;amp; &amp;lt;math&amp;gt;u_1^{\prime}= v_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;From the definition of the C.M.&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{v}_{CM} = \frac{m_1 \vec{u}_1 + m_2 \vec{u}_2}{m_1+m_2} = \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;conservation of momentum in CM Frame &amp;lt;math&amp;gt;\Rightarrow&amp;lt;/math&amp;gt; :&lt;br /&gt;
:&amp;lt;math&amp;gt;m_1 u_1^{\prime} = - m_2 u_2{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \Rightarrow v_1^{\prime} = u_1^{\prime} = \frac{-m_2}{m_1} u_2^{\prime}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Gallilean Coordinate transformation:&lt;br /&gt;
;&amp;lt;math&amp;gt;\vec{u}_1 = \vec{u}_1^{\prime} + \vec{v}_{CM} = \vec{u}_1^{\prime} + \frac{m_1}{m_1+m_2} \vec{u}_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow u_1{\prime} = \left [ 1 - \frac{m_1}{m_1 + m_2} \right ] u_1 = \frac{m_2}{m_1+m_2}u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\Rightarrow v_1^{\prime} = u_1^{\prime}  =\frac{m_2}{m_1+m_2} u_1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; another expression for &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using the above gallilean transformation we can do the following&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{v_{CM}}{v_1^{\prime}}= \frac{\frac{m_1}{m_1+m_2} u_1}{\frac{m_2}{m_1+m_2} u_1} = \frac{m_1}{m_2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\tan(\psi) = \frac{\sin(\theta)}{\cos(\theta) + \frac{m_1}{m_2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after a little trig substitution&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\Rightarrow \frac{m_1}{m_2} = \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
&lt;br /&gt;
now use the chain rule to find &amp;lt;math&amp;gt;\frac{d \theta}{d \psi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;f \equiv  \frac{sin(\theta - \psi)}{\sin(\psi)} =&amp;lt;/math&amp;gt; constant&lt;br /&gt;
:&amp;lt;math&amp;gt;df = 0 = \frac{ \partial f}{\partial \psi} d \psi  + \frac{ \partial f}{\partial \theta} d \theta &amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;\Rightarrow \frac{d \theta}{d \psi} = \frac{-\frac{ \partial f}{\partial \psi} }{\frac{ \partial f}{\partial \theta} }&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;-\frac{ \partial f}{\partial \psi} = \frac{\cos(\theta - \psi)}{\sin(\psi)} + \frac{\sin(\theta - \psi)}{\sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{ \partial f}{\partial \theta }= 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after substitution:&lt;br /&gt;
: &amp;lt;math&amp;gt;\sigma(\psi) = \frac{\sin(\theta)}{\sin(\psi)} \frac{d \theta}{d \psi} \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
: &amp;lt;math&amp;gt;=\frac{\sin(\theta)}{\sin(\psi)} \left [ 1 + \frac{\sin(\theta - \psi) \cos(\psi)}{\cos(\theta - \psi) \sin(\psi)} \right ] \sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the above equation to be more useful one would prefer to recast it in terms of only &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; and masses.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sigma(\psi) = \frac{\left [ \frac{m_1}{m_2}\cos(\psi) + \sqrt{1-\left ( \frac{m_1 \sin(\psi) }{m_2} \right )^2 }\right ]}{\sqrt{1 - \left ( \frac{m_1 \sin(\psi)}{m_2}\right )^2 }}\sigma(\theta)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Simulations_of_Particle_Interactions_with_Matter]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130017</id>
		<title>Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130017"/>
		<updated>2025-01-15T19:23:59Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Interactions of Electrons and Photons with Matter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Class Admin==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_ClassAdmin]]&lt;br /&gt;
&lt;br /&gt;
== Homework Problems==&lt;br /&gt;
[[HomeWork_Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_Intro]]&lt;br /&gt;
&lt;br /&gt;
= Energy Loss =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_StoppingPower]]&lt;br /&gt;
&lt;br /&gt;
Ann. Phys. vol. 5, 325, (1930)&lt;br /&gt;
&lt;br /&gt;
=Interactions of Electrons and Photons with Matter=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_e-gamma]]&lt;br /&gt;
&lt;br /&gt;
Physics lists&lt;br /&gt;
https://geant4.web.cern.ch/documentation/dev/plg_html/PhysicsListGuide/physicslistguide.html&lt;br /&gt;
&lt;br /&gt;
Livermore is the default model &lt;br /&gt;
&lt;br /&gt;
https://www.epj-conferences.org/articles/epjconf/pdf/2019/19/epjconf_chep2018_02046.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
https://opengate.readthedocs.io/en/latest/introduction.html&lt;br /&gt;
&lt;br /&gt;
= Hadronic Interactions =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_HadronicInteractions]]&lt;br /&gt;
&lt;br /&gt;
= Final Project=&lt;br /&gt;
&lt;br /&gt;
A final project will be submitted that will be graded with the following metrics:&lt;br /&gt;
&lt;br /&gt;
1.) The document must be less than 15 pages.&lt;br /&gt;
&lt;br /&gt;
2.) The document must contain references in a bibliography (5 points) .&lt;br /&gt;
&lt;br /&gt;
3.) A comparison must be made between GEANT4's prediction and either the prediction of someone else or an experimental result(30 points).&lt;br /&gt;
&lt;br /&gt;
4.) The graphs must be of publication quality with font sizes similar or larger than the 12 point font (10 points).&lt;br /&gt;
&lt;br /&gt;
5.) The document must be grammatically correct (5 points).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
&lt;br /&gt;
[http://geant4.web.cern.ch/geant4/  GEANT4 Home Page]&lt;br /&gt;
&lt;br /&gt;
[http://root.cern.ch ROOT Home page]&lt;br /&gt;
&lt;br /&gt;
[http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/  Fermi Lab Example]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html NIST Range Tables]&lt;br /&gt;
&lt;br /&gt;
[http://ie.lbl.gov/xray/  X-ray specturm]&lt;br /&gt;
&lt;br /&gt;
[[Installing_GEANT4.9.3_Fsim]]&lt;br /&gt;
&lt;br /&gt;
== Saving/restoring Random number seed==&lt;br /&gt;
&lt;br /&gt;
You save the current state of the random number generator with the command&lt;br /&gt;
&lt;br /&gt;
/random/setSavingFlag 1&lt;br /&gt;
&lt;br /&gt;
/run/beamOn 100&lt;br /&gt;
&lt;br /&gt;
/random/saveThisRun&lt;br /&gt;
&lt;br /&gt;
A file is created called &lt;br /&gt;
&lt;br /&gt;
currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
/control/shell mv currentEvent.rndm currentEvent10.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can restore the random number generator and begin generating random number from the last save time&lt;br /&gt;
&lt;br /&gt;
/random/resetEngineFrom currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating Template==&lt;br /&gt;
&lt;br /&gt;
[[TForest_G4_Template]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.11==&lt;br /&gt;
&lt;br /&gt;
===4.11.2===&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.10==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===4.10.02===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.2]]&lt;br /&gt;
===4.10.01===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.1]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.6==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.6]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.5==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.5]]&lt;br /&gt;
&lt;br /&gt;
An old version of Installation notes for versions prior to 9.5&lt;br /&gt;
&lt;br /&gt;
[http://brems.iac.isu.edu/~tforest/NucSim/Day3/ Old Install Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visualization Libraries:&lt;br /&gt;
&lt;br /&gt;
[http://www.opengl.org/ OpenGL]&lt;br /&gt;
&lt;br /&gt;
[http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html  DAWN]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://doc.coin3d.org/Coin/  Coin3D]&lt;br /&gt;
&lt;br /&gt;
==Compiling G4 with ROOT==&lt;br /&gt;
&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
[[G4CompileWRootforTracks]]&lt;br /&gt;
&lt;br /&gt;
==Using SLURM==&lt;br /&gt;
&lt;br /&gt;
http://slurm.schedmd.com/quickstart.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/&lt;br /&gt;
&lt;br /&gt;
===simple batch script for one process job===&lt;br /&gt;
&lt;br /&gt;
create the file submit.sbatch below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#SBATCH --time=1&lt;br /&gt;
cd src/PI&lt;br /&gt;
./PI_MC 100000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the execute&lt;br /&gt;
&lt;br /&gt;
:sbatch submit.sbatch&lt;br /&gt;
&lt;br /&gt;
check if its running with &lt;br /&gt;
&lt;br /&gt;
:squeue&lt;br /&gt;
&lt;br /&gt;
to kill a batch job &lt;br /&gt;
&lt;br /&gt;
:scancel JOBID&lt;br /&gt;
&lt;br /&gt;
===On minerve===&lt;br /&gt;
&lt;br /&gt;
Sample script to submit 10 batch jobs.&lt;br /&gt;
&lt;br /&gt;
the filename is minervesubmit and you run like &lt;br /&gt;
 source minervesubmit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch&lt;br /&gt;
qsub submit10mil&lt;br /&gt;
qsub submit20mil&lt;br /&gt;
qsub submit30mil&lt;br /&gt;
qsub submit40mil&lt;br /&gt;
qsub submit50mil&lt;br /&gt;
qsub submit60mil&lt;br /&gt;
qsub submit70mil&lt;br /&gt;
qsub submit80mil&lt;br /&gt;
qsub submit90mil&lt;br /&gt;
qsub submit100mil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file submit10mil looks like this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#PBS -l nodes=1&lt;br /&gt;
#PBS -A FIAC&lt;br /&gt;
#PBS -M foretony@isu.edu&lt;br /&gt;
#PBS -m abe&lt;br /&gt;
#&lt;br /&gt;
source /home/foretony/src/GEANT4/geant4.9.5/geant4.9.6-install/bin/geant4.sh&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch/10mil&lt;br /&gt;
../../exampleN02 run1.mac &amp;gt; /dev/null &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qstat&lt;br /&gt;
&lt;br /&gt;
to check that the process is still running&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qdel jobID#&lt;br /&gt;
&lt;br /&gt;
if you want to kill the batch job, the jobID number shows up when you do stat.&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
Job id                    Name             User            Time Use S Queue&lt;br /&gt;
------------------------- ---------------- --------------- -------- - -----&lt;br /&gt;
27033.minerve             submit           foretony        00:41:55 R default        &lt;br /&gt;
[foretony@minerve HW10]$ qdel 27033&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Definitions of Materials==&lt;br /&gt;
&lt;br /&gt;
[[File:MCNP_Compendium_of_Material_Composition.pdf]]&lt;br /&gt;
&lt;br /&gt;
==Minerve2 GEANT 4.10.1 Xterm error==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On OS X El Capitan V 10.11.4 using XQuartz&lt;br /&gt;
&lt;br /&gt;
~/src/GEANT4/geant4.10.1/Simulations/B2/B2a/exsmpleB2a&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Use this open statement to create an OpenGL view:&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
/vis/sceneHandler/create OGL&lt;br /&gt;
/vis/viewer/create ! ! 600x600-0+0&lt;br /&gt;
libGL error: failed to load driver: swrast&lt;br /&gt;
X Error of failed request:  BadValue (integer parameter out of range for operation)&lt;br /&gt;
  Major opcode of failed request:  150 (GLX)&lt;br /&gt;
  Minor opcode of failed request:  3 (X_GLXCreateContext)&lt;br /&gt;
  Value in failed request:  0x0&lt;br /&gt;
  Serial number of failed request:  25&lt;br /&gt;
  Current serial number in output stream:  26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_OLD]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130016</id>
		<title>Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130016"/>
		<updated>2025-01-15T19:21:11Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Interactions of Electrons and Photons with Matter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Class Admin==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_ClassAdmin]]&lt;br /&gt;
&lt;br /&gt;
== Homework Problems==&lt;br /&gt;
[[HomeWork_Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_Intro]]&lt;br /&gt;
&lt;br /&gt;
= Energy Loss =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_StoppingPower]]&lt;br /&gt;
&lt;br /&gt;
Ann. Phys. vol. 5, 325, (1930)&lt;br /&gt;
&lt;br /&gt;
=Interactions of Electrons and Photons with Matter=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_e-gamma]]&lt;br /&gt;
&lt;br /&gt;
Livermore is the default model &lt;br /&gt;
&lt;br /&gt;
https://www.epj-conferences.org/articles/epjconf/pdf/2019/19/epjconf_chep2018_02046.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
https://opengate.readthedocs.io/en/latest/introduction.html&lt;br /&gt;
&lt;br /&gt;
= Hadronic Interactions =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_HadronicInteractions]]&lt;br /&gt;
&lt;br /&gt;
= Final Project=&lt;br /&gt;
&lt;br /&gt;
A final project will be submitted that will be graded with the following metrics:&lt;br /&gt;
&lt;br /&gt;
1.) The document must be less than 15 pages.&lt;br /&gt;
&lt;br /&gt;
2.) The document must contain references in a bibliography (5 points) .&lt;br /&gt;
&lt;br /&gt;
3.) A comparison must be made between GEANT4's prediction and either the prediction of someone else or an experimental result(30 points).&lt;br /&gt;
&lt;br /&gt;
4.) The graphs must be of publication quality with font sizes similar or larger than the 12 point font (10 points).&lt;br /&gt;
&lt;br /&gt;
5.) The document must be grammatically correct (5 points).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
&lt;br /&gt;
[http://geant4.web.cern.ch/geant4/  GEANT4 Home Page]&lt;br /&gt;
&lt;br /&gt;
[http://root.cern.ch ROOT Home page]&lt;br /&gt;
&lt;br /&gt;
[http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/  Fermi Lab Example]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html NIST Range Tables]&lt;br /&gt;
&lt;br /&gt;
[http://ie.lbl.gov/xray/  X-ray specturm]&lt;br /&gt;
&lt;br /&gt;
[[Installing_GEANT4.9.3_Fsim]]&lt;br /&gt;
&lt;br /&gt;
== Saving/restoring Random number seed==&lt;br /&gt;
&lt;br /&gt;
You save the current state of the random number generator with the command&lt;br /&gt;
&lt;br /&gt;
/random/setSavingFlag 1&lt;br /&gt;
&lt;br /&gt;
/run/beamOn 100&lt;br /&gt;
&lt;br /&gt;
/random/saveThisRun&lt;br /&gt;
&lt;br /&gt;
A file is created called &lt;br /&gt;
&lt;br /&gt;
currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
/control/shell mv currentEvent.rndm currentEvent10.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can restore the random number generator and begin generating random number from the last save time&lt;br /&gt;
&lt;br /&gt;
/random/resetEngineFrom currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating Template==&lt;br /&gt;
&lt;br /&gt;
[[TForest_G4_Template]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.11==&lt;br /&gt;
&lt;br /&gt;
===4.11.2===&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.10==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===4.10.02===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.2]]&lt;br /&gt;
===4.10.01===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.1]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.6==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.6]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.5==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.5]]&lt;br /&gt;
&lt;br /&gt;
An old version of Installation notes for versions prior to 9.5&lt;br /&gt;
&lt;br /&gt;
[http://brems.iac.isu.edu/~tforest/NucSim/Day3/ Old Install Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visualization Libraries:&lt;br /&gt;
&lt;br /&gt;
[http://www.opengl.org/ OpenGL]&lt;br /&gt;
&lt;br /&gt;
[http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html  DAWN]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://doc.coin3d.org/Coin/  Coin3D]&lt;br /&gt;
&lt;br /&gt;
==Compiling G4 with ROOT==&lt;br /&gt;
&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
[[G4CompileWRootforTracks]]&lt;br /&gt;
&lt;br /&gt;
==Using SLURM==&lt;br /&gt;
&lt;br /&gt;
http://slurm.schedmd.com/quickstart.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/&lt;br /&gt;
&lt;br /&gt;
===simple batch script for one process job===&lt;br /&gt;
&lt;br /&gt;
create the file submit.sbatch below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#SBATCH --time=1&lt;br /&gt;
cd src/PI&lt;br /&gt;
./PI_MC 100000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the execute&lt;br /&gt;
&lt;br /&gt;
:sbatch submit.sbatch&lt;br /&gt;
&lt;br /&gt;
check if its running with &lt;br /&gt;
&lt;br /&gt;
:squeue&lt;br /&gt;
&lt;br /&gt;
to kill a batch job &lt;br /&gt;
&lt;br /&gt;
:scancel JOBID&lt;br /&gt;
&lt;br /&gt;
===On minerve===&lt;br /&gt;
&lt;br /&gt;
Sample script to submit 10 batch jobs.&lt;br /&gt;
&lt;br /&gt;
the filename is minervesubmit and you run like &lt;br /&gt;
 source minervesubmit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch&lt;br /&gt;
qsub submit10mil&lt;br /&gt;
qsub submit20mil&lt;br /&gt;
qsub submit30mil&lt;br /&gt;
qsub submit40mil&lt;br /&gt;
qsub submit50mil&lt;br /&gt;
qsub submit60mil&lt;br /&gt;
qsub submit70mil&lt;br /&gt;
qsub submit80mil&lt;br /&gt;
qsub submit90mil&lt;br /&gt;
qsub submit100mil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file submit10mil looks like this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#PBS -l nodes=1&lt;br /&gt;
#PBS -A FIAC&lt;br /&gt;
#PBS -M foretony@isu.edu&lt;br /&gt;
#PBS -m abe&lt;br /&gt;
#&lt;br /&gt;
source /home/foretony/src/GEANT4/geant4.9.5/geant4.9.6-install/bin/geant4.sh&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch/10mil&lt;br /&gt;
../../exampleN02 run1.mac &amp;gt; /dev/null &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qstat&lt;br /&gt;
&lt;br /&gt;
to check that the process is still running&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qdel jobID#&lt;br /&gt;
&lt;br /&gt;
if you want to kill the batch job, the jobID number shows up when you do stat.&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
Job id                    Name             User            Time Use S Queue&lt;br /&gt;
------------------------- ---------------- --------------- -------- - -----&lt;br /&gt;
27033.minerve             submit           foretony        00:41:55 R default        &lt;br /&gt;
[foretony@minerve HW10]$ qdel 27033&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Definitions of Materials==&lt;br /&gt;
&lt;br /&gt;
[[File:MCNP_Compendium_of_Material_Composition.pdf]]&lt;br /&gt;
&lt;br /&gt;
==Minerve2 GEANT 4.10.1 Xterm error==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On OS X El Capitan V 10.11.4 using XQuartz&lt;br /&gt;
&lt;br /&gt;
~/src/GEANT4/geant4.10.1/Simulations/B2/B2a/exsmpleB2a&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Use this open statement to create an OpenGL view:&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
/vis/sceneHandler/create OGL&lt;br /&gt;
/vis/viewer/create ! ! 600x600-0+0&lt;br /&gt;
libGL error: failed to load driver: swrast&lt;br /&gt;
X Error of failed request:  BadValue (integer parameter out of range for operation)&lt;br /&gt;
  Major opcode of failed request:  150 (GLX)&lt;br /&gt;
  Minor opcode of failed request:  3 (X_GLXCreateContext)&lt;br /&gt;
  Value in failed request:  0x0&lt;br /&gt;
  Serial number of failed request:  25&lt;br /&gt;
  Current serial number in output stream:  26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_OLD]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
	<entry>
		<id>https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130015</id>
		<title>Simulations of Particle Interactions with Matter</title>
		<link rel="alternate" type="text/html" href="https://wiki.iac.isu.edu/index.php?title=Simulations_of_Particle_Interactions_with_Matter&amp;diff=130015"/>
		<updated>2025-01-15T19:18:24Z</updated>

		<summary type="html">&lt;p&gt;Foretony: /* Interactions of Electrons and Photons with Matter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Class Admin==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_ClassAdmin]]&lt;br /&gt;
&lt;br /&gt;
== Homework Problems==&lt;br /&gt;
[[HomeWork_Simulations_of_Particle_Interactions_with_Matter]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_Intro]]&lt;br /&gt;
&lt;br /&gt;
= Energy Loss =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_StoppingPower]]&lt;br /&gt;
&lt;br /&gt;
Ann. Phys. vol. 5, 325, (1930)&lt;br /&gt;
&lt;br /&gt;
=Interactions of Electrons and Photons with Matter=&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_e-gamma]]&lt;br /&gt;
&lt;br /&gt;
New PW models&lt;br /&gt;
&lt;br /&gt;
https://indico.cern.ch/event/629841/contributions/2712690/attachments/1518832/2371867/PE_models_G4GV.pdf&lt;br /&gt;
&lt;br /&gt;
https://geant4-userdoc.web.cern.ch/UsersGuides/PhysicsReferenceManual/html/index.html&lt;br /&gt;
&lt;br /&gt;
https://opengate.readthedocs.io/en/latest/introduction.html&lt;br /&gt;
&lt;br /&gt;
= Hadronic Interactions =&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_HadronicInteractions]]&lt;br /&gt;
&lt;br /&gt;
= Final Project=&lt;br /&gt;
&lt;br /&gt;
A final project will be submitted that will be graded with the following metrics:&lt;br /&gt;
&lt;br /&gt;
1.) The document must be less than 15 pages.&lt;br /&gt;
&lt;br /&gt;
2.) The document must contain references in a bibliography (5 points) .&lt;br /&gt;
&lt;br /&gt;
3.) A comparison must be made between GEANT4's prediction and either the prediction of someone else or an experimental result(30 points).&lt;br /&gt;
&lt;br /&gt;
4.) The graphs must be of publication quality with font sizes similar or larger than the 12 point font (10 points).&lt;br /&gt;
&lt;br /&gt;
5.) The document must be grammatically correct (5 points).&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
&lt;br /&gt;
[http://geant4.web.cern.ch/geant4/  GEANT4 Home Page]&lt;br /&gt;
&lt;br /&gt;
[http://root.cern.ch ROOT Home page]&lt;br /&gt;
&lt;br /&gt;
[http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/  Fermi Lab Example]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html NIST Range Tables]&lt;br /&gt;
&lt;br /&gt;
[http://ie.lbl.gov/xray/  X-ray specturm]&lt;br /&gt;
&lt;br /&gt;
[[Installing_GEANT4.9.3_Fsim]]&lt;br /&gt;
&lt;br /&gt;
== Saving/restoring Random number seed==&lt;br /&gt;
&lt;br /&gt;
You save the current state of the random number generator with the command&lt;br /&gt;
&lt;br /&gt;
/random/setSavingFlag 1&lt;br /&gt;
&lt;br /&gt;
/run/beamOn 100&lt;br /&gt;
&lt;br /&gt;
/random/saveThisRun&lt;br /&gt;
&lt;br /&gt;
A file is created called &lt;br /&gt;
&lt;br /&gt;
currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
/control/shell mv currentEvent.rndm currentEvent10.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can restore the random number generator and begin generating random number from the last save time&lt;br /&gt;
&lt;br /&gt;
/random/resetEngineFrom currentEvent.rndm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating Template==&lt;br /&gt;
&lt;br /&gt;
[[TForest_G4_Template]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.11==&lt;br /&gt;
&lt;br /&gt;
===4.11.2===&lt;br /&gt;
[[TF_GEANT4.11]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.10==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===4.10.02===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.2]]&lt;br /&gt;
===4.10.01===&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.10.1]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.6==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.6]]&lt;br /&gt;
&lt;br /&gt;
==Building GEANT4.9.5==&lt;br /&gt;
&lt;br /&gt;
[[TF_GEANT4.9.5]]&lt;br /&gt;
&lt;br /&gt;
An old version of Installation notes for versions prior to 9.5&lt;br /&gt;
&lt;br /&gt;
[http://brems.iac.isu.edu/~tforest/NucSim/Day3/ Old Install Notes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visualization Libraries:&lt;br /&gt;
&lt;br /&gt;
[http://www.opengl.org/ OpenGL]&lt;br /&gt;
&lt;br /&gt;
[http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html  DAWN]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://doc.coin3d.org/Coin/  Coin3D]&lt;br /&gt;
&lt;br /&gt;
==Compiling G4 with ROOT==&lt;br /&gt;
&lt;br /&gt;
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)&lt;br /&gt;
&lt;br /&gt;
[[G4CompileWRootforTracks]]&lt;br /&gt;
&lt;br /&gt;
==Using SLURM==&lt;br /&gt;
&lt;br /&gt;
http://slurm.schedmd.com/quickstart.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/&lt;br /&gt;
&lt;br /&gt;
===simple batch script for one process job===&lt;br /&gt;
&lt;br /&gt;
create the file submit.sbatch below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#SBATCH --time=1&lt;br /&gt;
cd src/PI&lt;br /&gt;
./PI_MC 100000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the execute&lt;br /&gt;
&lt;br /&gt;
:sbatch submit.sbatch&lt;br /&gt;
&lt;br /&gt;
check if its running with &lt;br /&gt;
&lt;br /&gt;
:squeue&lt;br /&gt;
&lt;br /&gt;
to kill a batch job &lt;br /&gt;
&lt;br /&gt;
:scancel JOBID&lt;br /&gt;
&lt;br /&gt;
===On minerve===&lt;br /&gt;
&lt;br /&gt;
Sample script to submit 10 batch jobs.&lt;br /&gt;
&lt;br /&gt;
the filename is minervesubmit and you run like &lt;br /&gt;
 source minervesubmit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch&lt;br /&gt;
qsub submit10mil&lt;br /&gt;
qsub submit20mil&lt;br /&gt;
qsub submit30mil&lt;br /&gt;
qsub submit40mil&lt;br /&gt;
qsub submit50mil&lt;br /&gt;
qsub submit60mil&lt;br /&gt;
qsub submit70mil&lt;br /&gt;
qsub submit80mil&lt;br /&gt;
qsub submit90mil&lt;br /&gt;
qsub submit100mil&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file submit10mil looks like this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#PBS -l nodes=1&lt;br /&gt;
#PBS -A FIAC&lt;br /&gt;
#PBS -M foretony@isu.edu&lt;br /&gt;
#PBS -m abe&lt;br /&gt;
#&lt;br /&gt;
source /home/foretony/src/GEANT4/geant4.9.5/geant4.9.6-install/bin/geant4.sh&lt;br /&gt;
cd /home/foretony/src/GEANT4/geant4.9.5/Simulations/N02wROOT/batch/10mil&lt;br /&gt;
../../exampleN02 run1.mac &amp;gt; /dev/null &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qstat&lt;br /&gt;
&lt;br /&gt;
to check that the process is still running&lt;br /&gt;
&lt;br /&gt;
use&lt;br /&gt;
&lt;br /&gt;
 qdel jobID#&lt;br /&gt;
&lt;br /&gt;
if you want to kill the batch job, the jobID number shows up when you do stat.&lt;br /&gt;
&lt;br /&gt;
for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
Job id                    Name             User            Time Use S Queue&lt;br /&gt;
------------------------- ---------------- --------------- -------- - -----&lt;br /&gt;
27033.minerve             submit           foretony        00:41:55 R default        &lt;br /&gt;
[foretony@minerve HW10]$ qdel 27033&lt;br /&gt;
[foretony@minerve HW10]$ qstat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Definitions of Materials==&lt;br /&gt;
&lt;br /&gt;
[[File:MCNP_Compendium_of_Material_Composition.pdf]]&lt;br /&gt;
&lt;br /&gt;
==Minerve2 GEANT 4.10.1 Xterm error==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On OS X El Capitan V 10.11.4 using XQuartz&lt;br /&gt;
&lt;br /&gt;
~/src/GEANT4/geant4.10.1/Simulations/B2/B2a/exsmpleB2a&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Use this open statement to create an OpenGL view:&lt;br /&gt;
/vis/open OGL 600x600-0+0&lt;br /&gt;
/vis/sceneHandler/create OGL&lt;br /&gt;
/vis/viewer/create ! ! 600x600-0+0&lt;br /&gt;
libGL error: failed to load driver: swrast&lt;br /&gt;
X Error of failed request:  BadValue (integer parameter out of range for operation)&lt;br /&gt;
  Major opcode of failed request:  150 (GLX)&lt;br /&gt;
  Minor opcode of failed request:  3 (X_GLXCreateContext)&lt;br /&gt;
  Value in failed request:  0x0&lt;br /&gt;
  Serial number of failed request:  25&lt;br /&gt;
  Current serial number in output stream:  26&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[TF_SPIM_OLD]]&lt;/div&gt;</summary>
		<author><name>Foretony</name></author>
	</entry>
</feed>