3 # ================================================================== 6 # Calculation of photon cross section and stopping power for 10 # ================================================================== 17 __all__ = [
'CalculatePhotonCrossSection',
'CalculateDEDX' ]
23 plist=["compt", "", "phot", "conv"]):
25 Calculate photon cross section for a given material and 26 a list of energy, returing a list of cross sections for 27 the components of "Copmton scattering", "rayleigh scattering", 28 "photoelectric effect", "pair creation" and total one. 33 verbose: verbose level [0] 34 plist: list of process name 35 (compton/rayleigh/photoelectic/conversion) [StandardEM set] 38 "compt": Compton Scattering 39 "rayleigh": Rayleigh Scattering 40 "phot" : photoelectric effect 41 "conv" : pair Creation 45 xsec_list= CalculatePhotonCrossSection(...) 46 value= xsec_list[energy_index]["compt"] 49 print "-------------------------------------------------------------------" 50 print " Photon Cross Section (", mat,
")" 51 print "Energy Compton Raleigh Photo- Pair Total" 52 print " Scattering Scattering electric Creation" 53 print "(MeV) (cm2/g) (cm2/g) (cm2/g) (cm2/g) (cm2/g)" 54 print "-------------------------------------------------------------------" 60 = gEmCalculator.ComputeCrossSectionPerVolume(ekin,
"gamma", plist[0],
63 = gEmCalculator.ComputeCrossSectionPerVolume(ekin,
"gamma", plist[1],
67 = gEmCalculator.ComputeCrossSectionPerVolume(ekin,
"gamma", plist[2],
70 = gEmCalculator.ComputeCrossSectionPerVolume(ekin,
"gamma", plist[3],
73 xsec[
"tot"]= xsec[
"compt"] + xsec[
"rayleigh"] + xsec[
"phot"] + xsec[
"conv"]
75 xsection_list.append((ekin, xsec))
78 print " %8.3e %8.3e %8.3e %8.3e %8.3e %8.3e" \
79 % (ekin/MeV, xsec[
"compt"]/(cm2/g), xsec[
"rayleigh"]/(cm2/g),
80 xsec[
"phot"]/(cm2/g), xsec[
"conv"]/(cm2/g), xsec[
"tot"]/(cm2/g))
89 plist=["eIoni", "eBrem", "muIoni", "muBrems", "hIoni"]):
91 Calculate stopping powers for a give particle, material and 92 a list of energy, returing stopping power for the components of 93 "Ionization", "Radiation" and total one. 99 verbose: verbose level [0] 100 plist: list of process name 101 (electron ionization/electron brems/ 102 muon ionization/muon brems/hadron ionization) [StandardEM set] 106 "brems": Bremsstrahlung 110 dedx_list= CalculateDEDX(...) 111 value= dedx_list[energy_index]["ioni"] 114 print "------------------------------------------------------" 115 print " Stopping Power (", part,
",", mat,
")" 116 print " Energy Ionization Radiation Total" 117 print " (MeV) (MeVcm2/g) (MeVcm2/g) (MeVcm2/g)" 118 print "------------------------------------------------------" 122 if ( part==
"e+" or part==
"e-" ):
123 procname_ioni= plist[0]
124 procname_brems= plist[1]
125 elif ( part==
"mu+" or part==
"mu-"):
126 procname_ioni= plist[2]
127 procname_brems= plist[3]
129 procname_ioni= plist[4]
136 = gEmCalculator.ComputeDEDX(ekin, part, procname_ioni, mat) * MeV*cm2/g
138 = gEmCalculator.ComputeDEDX(ekin, part, procname_brems, mat) * MeV*cm2/g
139 dedx[
"tot"]= dedx[
"ioni"]+ dedx[
"brems"]
142 print " %8.3e %8.3e %8.3e %8.3e" \
143 % (ekin/MeV, dedx[
"ioni"]/(MeV*cm2/g),
144 dedx[
"brems"]/(MeV*cm2/g), dedx[
"tot"]/(MeV*cm2/g) )
147 dedx_list.append((ekin, dedx))
def CalculatePhotonCrossSection(mat, elist, verbose=0, plist=["compt", phot, conv)
def CalculateDEDX(part, mat, elist, verbose=0, plist=["eIoni", eBrem, muIoni, muBrems, hIoni)