#include "ReactorConstants.hh"
#include <math.h>
#include <iostream.h>
#include <string>
Go to the source code of this file.
Functions | |
double | U235flux (double) |
double | RMPflux (double) |
double | InverseBeta (double, double, int order=1) |
void | PositronRange (double, double &, double &) |
double | GammaComptonRange (std::string, double) |
Returns the mean free path of photons through a given material. More... | |
void | GammaCompton (double *) |
void | MyGdDecayModel (double, int &, double *) |
void | NeutronPropagator (double R0, double R2, double &ke, double &A, double &pass, double *pn, double *rn, double &tn, double Temperature, double *a, double *z, double *nn) |
The individual functions are implimented in their respective cpp files.
Author: Tim Bolton
Definition in file ReactorXC.hh.
|
Returns the mean free path of photons through a given material. The function GammaComptonRange is implimented in GammaComptonRange.cpp. The first input is a string defining the material through which the photon propogates. The supported materials are "scintillator" and "oil" which are defined by ReactorConstants.hh. The second input is the energy of the photon entering the material. The function returns a double equal to the mean free path calculated with the Klein-Nishina cross section. Definition at line 13 of file GammaComptonRange.cpp.
00013 { 00014 00015 //cout << "gamma propogating through " << material << endl; 00016 // 00017 // Compute the mean free path for Compton scattering. 00018 // 00019 static double m = MELECTRON; 00020 static double alpha = 1/ALPHAINV; 00021 static double Units = XcMeVtoCmsqrd; 00022 // 00023 // Overall cross section scale 00024 // 00025 static double Thomson = 8*PI*alpha*alpha/3/m/m*Units; 00026 double w = egamma/m; 00027 // 00028 // Klein-Nishina cross section 00029 // 00030 double XC = 3*Thomson/4* 00031 ((1+w)/w/w/w*(2*w*(1+w)/(1+2*w)-log(1+2*w)) 00032 +log(1+2*w)/2/w-(1+3*w)/(1+2*w)/(1+2*w)); 00033 // 00034 // Need electron density to get mfp. Get H and C contributions. 00035 // 00036 static double Na = NAVOGADRO; 00037 static double A[2] = {A0,A1}; 00038 static double Z[2] = {Z0,Z1}; 00039 static double f[2]; 00040 if(material == "scintillator"){ 00041 f[0] = f0; 00042 f[1] = f1; 00043 } 00044 else if(material == "oil"){ 00045 f[0] = f4; 00046 f[1] = f5; 00047 } 00048 else{ 00049 cout << "GammaComptonRange: " << material 00050 << " is an unknown material! Assuming scintillator." << endl; 00051 f[0] = f0; 00052 f[1] = f1; 00053 } 00054 //for(int i=0;i<2;i++) cout << "f["<<i<<"] " << f[i] << endl; 00055 static double nel[2]; 00056 static bool first = 1; 00057 for(int i=0;i<2;i++){ 00058 nel[i]=Na*density*f[i]*Z[i]/A[i]; 00059 first = 0; 00060 } 00061 // 00062 // Compute mean free path. 00063 // 00064 return 1/((nel[0]+nel[1])*XC); 00065 } |