Difference between revisions of "SPIM PhotElectricEffect Lab"

From New IAC Wiki
Jump to navigation Jump to search
 
(14 intermediate revisions by 2 users not shown)
Line 15: Line 15:
 
the table below which has at least 4 energy levels.
 
the table below which has at least 4 energy levels.
  
http://www.iac.isu.edu/mediawiki/index.php/Simulations_of_Particle_Interactions_with_Matter#Moseley.27s_Law
+
https://wiki.iac.isu.edu/index.php/TF_SPIM_e-gamma#Moseley.27s_Law
  
  
 
Then you will use GEANT to create histograms of the photon energy
 
Then you will use GEANT to create histograms of the photon energy
lost as simulated by 2 different implementations of the
+
lost as predicted by GEANT4's
Photoelectric effect.  This is done in the PhysicsList.  The two
+
Photoelectric effect.  Your Physics list should only have the G4PhotoElectricEffecr physics process.
processes are added in the physics list for gammas such that you
 
have either
 
 
 
    pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
 
 
 
or
 
 
 
      pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
 
 
 
you can't have both at the same time.
 
 
 
Be sure to have the include files in the PhysicList
 
 
 
#include "G4PhotoElectricEffect.hh"
 
#include "G4LowEnergyPhotoElectric.hh"
 
 
 
 
 
Our goal will be to see which one of the above is a more
 
realistic implementation of the Photoelectric effect.
 
  
 +
you should comment out all other physics processes for a gamma particle.
  
  
Line 58: Line 40:
 
and I made my target length long
 
and I made my target length long
  
fTargetLength  = 15. * cm;
+
fTargetLength  = 15. * cm;
 
 
2.)  Now I make sure the two processes are in my Physicslists
 
 
 
be sure the following header files are included in the
 
PhysicsList process definition.
 
 
 
  
#include "G4PhotoElectricEffect.hh"
+
2.) Then make sure that only one process is in the PhysicsList for the gamma particle
#include "G4LowEnergyPhotoElectric.hh"
 
  
and have at least one physics process "un-commented" out.
+
<pre>
  
 
     if (particleName == "gamma") {
 
     if (particleName == "gamma") {
 
       // gamma         
 
       // gamma         
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
+
      ph->RegisterProcess(new G4PhotoElectricEffect, particle);
       //pmanager->AddDiscreteProcess(new G4LowEnergyPhotoElectric);
+
      //ph->RegisterProcess(new G4ComptonScattering,  particle);
 +
       //ph->RegisterProcess(new G4GammaConversion,    particle);
 
        
 
        
    } else if (particleName == "e-") {
+
</pre>
  
 
+
3.)  Now you need to alter the SteppingVerbose code so it writes
 
 
 
 
3.)  Now you need to alter the SteppingVerbose code so it spits
 
 
out the photon KE lost.  Mine looked like this
 
out the photon KE lost.  Mine looked like this
  
  
     if( fTrack->GetDefinition()->GetPDGEncoding()==22 && fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() ==  "phot" && fTrack->GetVolume()->GetName() =="Target")<br>
+
     if( fTrack->GetDefinition()->GetPDGEncoding()==22 &&  
//    if( fTrack->GetDefinition()->GetPDGEncoding()==22 && fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() == "LowEnPhotoElec" && fTrack->GetVolume()->GetName() =="Target")<br>
+
                fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() ==  "phot"  
     {<br>
+
              && fTrack->GetVolume()->GetName() =="Target")
       //      G4cout  << "  Photon "  ; <br>
+
     {
       //G4cout  << <br>
+
       //      G4cout  << "  Photon "  ;  
       outfile <<   <br>
+
       //G4cout  <<  
// fTrack->GetKineticEnergy() << "    "<br>
+
       outfile <<  
fStep->GetTotalEnergyDeposit()<< "    "<br>
+
          //   fTrack->GetKineticEnergy() << "    "
      << fTrack->GetPosition().x()<< "    "<br>
+
            fStep->GetTotalEnergyDeposit()<< "    "
      << fTrack->GetPosition().y()<< "    "<br>
+
              << fTrack->GetPosition().x()<< "    "
      << fTrack->GetPosition().z()<< "    "<br>
+
              << fTrack->GetPosition().y()<< "    "
      << fTrack->GetMomentum().x() << "    "<br>
+
            << fTrack->GetPosition().z()<< "    "  
      << fTrack->GetMomentum().y() << "    "<br>
+
            << fTrack->GetMomentum().x() << "    "
      << fTrack->GetMomentum().z() << "    "<br>
+
            << fTrack->GetMomentum().y() << "    "
      << G4endl;<br>
+
            << fTrack->GetMomentum().z() << "    "
     }<br>
+
            << G4endl;<br>
 +
     }
  
  
Note there are 2 if statements above , one is
 
commented out, which need to change according to your entry in
 
the physics list.
 
  
 
I used G4out and set /tracking/versose 2 to check that I was
 
I used G4out and set /tracking/versose 2 to check that I was
 
printing out the right thing for each simulation event (above it
 
printing out the right thing for each simulation event (above it
is commented out).  If you comment our the line with "oufile" and
+
is commented out).  If you comment out the line with "oufile" and
 
un-comment out the two lines with G4cout then what was printing
 
un-comment out the two lines with G4cout then what was printing
 
to a file will print to the terminal window.
 
to a file will print to the terminal window.
Line 115: Line 86:
 
4.) You now have the infrastructure to start your investigation.
 
4.) You now have the infrastructure to start your investigation.
  
ie: use /gun/energy to change the energy of the incident photon to
+
ie: use /gun/energy to change the energy of the incident photon and
 
cover the range of electron binding energies in the atom you
 
cover the range of electron binding energies in the atom you
 
selected.
 
selected.
Line 139: Line 110:
 
of Sodium(Na) or above.
 
of Sodium(Na) or above.
  
8 points/10 if you supply a pdf file with ionization spectrum for
+
8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.
the two different physics list entries
 
  
 
9 points /10 if you insert a reference and tabulated values for
 
9 points /10 if you insert a reference and tabulated values for
 
the binding energy of your atom (along with uncertainty in that
 
the binding energy of your atom (along with uncertainty in that
binding energy)
+
binding energy) and compare that value with the GEANT4 prediction.
 +
 
 +
10 points /10 if you are able to implement the  G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.
 +
 
 +
 
 +
 
 +
Adding the Penelope model
 +
<pre>
 +
 
 +
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
 +
 
  
10 points /10 if you show via a referenced paper that the sampled
+
      G4PenelopePhotoElectricModel* thePEPenelopeModel = new G4PenelopePhotoElectricModel();
binding energies have been cross-section weighted.
+
      thePEPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
 +
      thePhotoElectricEffect->AddEmModel(0,thePEPenelopeModel);
 +
      ph->RegisterProcess(thePhotoElectricEffect, particle);
 +
</pre>

Latest revision as of 21:51, 22 February 2019

The objective of this lab is to evaluate the implementation of the Photoelectric effect in GEANT4.

The photoelectric effect is a discrete process by which a photon ejects electrons from the surface of a metal.

Here the process is generalized to mean the ejection of an electron due to a collision with an incident photon ( a direct ionization process). The incident photon is absorbed in the process and the ejected electron carries away the excess energy. This differs from Compton scattering where the photon is not absorbed but rather scatters from the electron.

To accomplish the above objective you will choose an element from the table below which has at least 4 energy levels.

https://wiki.iac.isu.edu/index.php/TF_SPIM_e-gamma#Moseley.27s_Law


Then you will use GEANT to create histograms of the photon energy lost as predicted by GEANT4's Photoelectric effect. Your Physics list should only have the G4PhotoElectricEffecr physics process.

you should comment out all other physics processes for a gamma particle.


1.) Step 1 is to create a target made from one of the elements above which is long enough to almost guarantee a photoelectric event for each incident photon.

I chose Argon. You will choose something else.

I edited the Detector Construction code to have the following

  //Argon gas
 G4Material* ArgonGas = 
   new G4Material("ArgonGas", z=18., a=39.948*g/mole, density= 1.784*mg/cm3);

and I made my target length long

fTargetLength  = 15. * cm;

2.) Then make sure that only one process is in the PhysicsList for the gamma particle


    if (particleName == "gamma") {
      // gamma         
      ph->RegisterProcess(new G4PhotoElectricEffect, particle);
      //ph->RegisterProcess(new G4ComptonScattering,   particle);
      //ph->RegisterProcess(new G4GammaConversion,     particle);
      

3.) Now you need to alter the SteppingVerbose code so it writes out the photon KE lost. Mine looked like this


    if( fTrack->GetDefinition()->GetPDGEncoding()==22 && 
               fStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() ==  "phot" 
             && fTrack->GetVolume()->GetName() =="Target")
   {
     //      G4cout  << "  Photon "  ; 
     //G4cout  << 
     outfile <<   
          //   fTrack->GetKineticEnergy() << "    "
           fStep->GetTotalEnergyDeposit()<< "    "
             << fTrack->GetPosition().x()<< "    "
             << fTrack->GetPosition().y()<< "    "
            << fTrack->GetPosition().z()<< "    " 
            << fTrack->GetMomentum().x() << "    "
            << fTrack->GetMomentum().y() << "    "
            << fTrack->GetMomentum().z() << "    "
           << G4endl;
}


I used G4out and set /tracking/versose 2 to check that I was printing out the right thing for each simulation event (above it is commented out). If you comment out the line with "oufile" and un-comment out the two lines with G4cout then what was printing to a file will print to the terminal window.

4.) You now have the infrastructure to start your investigation.

ie: use /gun/energy to change the energy of the incident photon and cover the range of electron binding energies in the atom you selected.

you can create root trees containing the photon kinetic energy lost in the target and compare those with the electron binding energies of your chosen atom.

Is there a distribution of photon energies lost or is just one specific photon energy lost?


5.) As in the previous lab you will write your results up in TeX, include all neccessary figures, and reach a conclusion describing which entry to use in your physicslist and what are the limitations for its use.

 Note: My grading scheme is as follows

0 points /10 if you use a target atom with less than 3 energy levels (ie H, He, Li ...). This means all atoms should have "A" of Sodium(Na) or above.

8 points/10 if you supply a pdf file with the GEANT4 binding energies observed.

9 points /10 if you insert a reference and tabulated values for the binding energy of your atom (along with uncertainty in that binding energy) and compare that value with the GEANT4 prediction.

10 points /10 if you are able to implement the G4PenelopePhotoElectricModel() and describe what happens to the ejected electron in this model.


Adding the Penelope model


G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();


      G4PenelopePhotoElectricModel* thePEPenelopeModel = new G4PenelopePhotoElectricModel();
      thePEPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
      thePhotoElectricEffect->AddEmModel(0,thePEPenelopeModel);
      ph->RegisterProcess(thePhotoElectricEffect, particle);