Import Geant4 8.1.0 source tree
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# $Id: GNUmakefile,v 1.3 2006/06/29 01:39:00 kmura Exp $
|
||||
# $Name: geant4-08-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
include ../../config/config.gmk
|
||||
|
||||
include $(G4PY_INSTALL)/config/g4py.gmk
|
||||
include $(G4PY_INSTALL)/config/sys/$(Q_SYSTEM).gmk
|
||||
|
||||
G4PY_LIBDIR := $(Q_LIBDIR)/Geant4
|
||||
|
||||
pys := $(wildcard *.py)
|
||||
pycs := $(patsubst %.py, %.pyc, $(pys))
|
||||
pyos := $(patsubst %.py, %.pyo, $(pys))
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
all: $(pycs) $(pyos)
|
||||
|
||||
install: $(pycs) $(pyos)
|
||||
@echo ... intall "*.py" into $(G4PY_LIBDIR)
|
||||
@if [ ! -d $(G4PY_LIBDIR) ]; then install -d $(G4PY_LIBDIR); fi
|
||||
@install -m 644 $(pys) $(pycs) $(pyos) $(G4PY_LIBDIR)
|
||||
|
||||
clean:
|
||||
@-\rm -f $(pycs) $(pyos)
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
#$Id: HEPUnit.py,v 1.2 2006/04/25 08:09:45 kmura Exp $
|
||||
"""
|
||||
# ==================================================================
|
||||
# Python module
|
||||
#
|
||||
# This module defines physical units and constants used in HEP,
|
||||
# which are imported from CLHEP library.
|
||||
#
|
||||
# Q, 2005
|
||||
# ==================================================================
|
||||
"""
|
||||
|
||||
# ==================================================================
|
||||
# imported from "SystemOfUnits.h"
|
||||
# ==================================================================
|
||||
millimeter = 1.
|
||||
millimeter2 = millimeter*millimeter
|
||||
millimeter3 = millimeter*millimeter*millimeter
|
||||
|
||||
centimeter = 10.*millimeter
|
||||
centimeter2 = centimeter*centimeter
|
||||
centimeter3 = centimeter*centimeter*centimeter
|
||||
|
||||
meter = 1000.*millimeter
|
||||
meter2 = meter*meter
|
||||
meter3 = meter*meter*meter
|
||||
|
||||
kilometer = 1000.*meter
|
||||
kilometer2 = kilometer*kilometer
|
||||
kilometer3 = kilometer*kilometer*kilometer
|
||||
|
||||
parsec = 3.0856775807e+16*meter
|
||||
|
||||
micrometer = 1.e-6 *meter
|
||||
nanometer = 1.e-9 *meter
|
||||
angstrom = 1.e-10*meter
|
||||
fermi = 1.e-15*meter
|
||||
|
||||
barn = 1.e-28*meter2
|
||||
millibarn = 1.e-3 *barn
|
||||
microbarn = 1.e-6 *barn
|
||||
nanobarn = 1.e-9 *barn
|
||||
picobarn = 1.e-12*barn
|
||||
|
||||
# symbols
|
||||
mm = millimeter
|
||||
mm2 = millimeter2
|
||||
mm3 = millimeter3
|
||||
|
||||
cm = centimeter
|
||||
cm2 = centimeter2
|
||||
cm3 = centimeter3
|
||||
|
||||
m = meter
|
||||
m2 = meter2
|
||||
m3 = meter3
|
||||
|
||||
km = kilometer
|
||||
km2 = kilometer2
|
||||
km3 = kilometer3
|
||||
|
||||
pc = parsec
|
||||
|
||||
#
|
||||
# Angle
|
||||
#
|
||||
radian = 1.
|
||||
milliradian = 1.e-3*radian
|
||||
degree = (3.14159265358979323846/180.0)*radian
|
||||
|
||||
steradian = 1.
|
||||
|
||||
# symbols
|
||||
rad = radian
|
||||
mrad = milliradian
|
||||
sr = steradian
|
||||
deg = degree
|
||||
|
||||
#
|
||||
# Time [T]
|
||||
#
|
||||
nanosecond = 1.
|
||||
second = 1.e+9 *nanosecond
|
||||
millisecond = 1.e-3 *second
|
||||
microsecond = 1.e-6 *second
|
||||
picosecond = 1.e-12*second
|
||||
|
||||
hertz = 1./second
|
||||
kilohertz = 1.e+3*hertz
|
||||
megahertz = 1.e+6*hertz
|
||||
|
||||
# symbols
|
||||
ns = nanosecond
|
||||
s = second
|
||||
ms = millisecond
|
||||
|
||||
#
|
||||
# Electric charge [Q]
|
||||
#
|
||||
eplus = 1. # positron charge
|
||||
e_SI = 1.60217733e-19 # positron charge in coulomb
|
||||
coulomb = eplus/e_SI # coulomb = 6.24150 e+18 * eplus
|
||||
|
||||
#
|
||||
# Energy [E]
|
||||
#
|
||||
megaelectronvolt = 1.
|
||||
electronvolt = 1.e-6*megaelectronvolt
|
||||
kiloelectronvolt = 1.e-3*megaelectronvolt
|
||||
gigaelectronvolt = 1.e+3*megaelectronvolt
|
||||
teraelectronvolt = 1.e+6*megaelectronvolt
|
||||
petaelectronvolt = 1.e+9*megaelectronvolt
|
||||
|
||||
joule = electronvolt/e_SI # joule = 6.24150 e+12 * MeV
|
||||
|
||||
# symbols
|
||||
MeV = megaelectronvolt
|
||||
eV = electronvolt
|
||||
keV = kiloelectronvolt
|
||||
GeV = gigaelectronvolt
|
||||
TeV = teraelectronvolt
|
||||
PeV = petaelectronvolt
|
||||
|
||||
#
|
||||
# Mass [E][T^2][L^-2]
|
||||
#
|
||||
kilogram = joule*second*second/(meter*meter)
|
||||
gram = 1.e-3*kilogram
|
||||
milligram = 1.e-3*gram
|
||||
|
||||
# symbols
|
||||
kg = kilogram
|
||||
g = gram
|
||||
mg = milligram
|
||||
|
||||
#
|
||||
# Power [E][T^-1]
|
||||
#
|
||||
watt = joule/second # watt = 6.24150 e+3 * MeV/ns
|
||||
|
||||
#
|
||||
# Force [E][L^-1]
|
||||
#
|
||||
newton = joule/meter # newton = 6.24150 e+9 * MeV/mm
|
||||
|
||||
#
|
||||
# Pressure [E][L^-3]
|
||||
#
|
||||
pascal = newton/m2 # pascal = 6.24150 e+3 * MeV/mm3
|
||||
bar = 100000*pascal # bar = 6.24150 e+8 * MeV/mm3
|
||||
atmosphere = 101325*pascal # atm = 6.32420 e+8 * MeV/mm3
|
||||
|
||||
#
|
||||
# Electric current [Q][T^-1]
|
||||
#
|
||||
ampere = coulomb/second # ampere = 6.24150 e+9 * eplus/ns
|
||||
milliampere = 1.e-3*ampere
|
||||
microampere = 1.e-6*ampere
|
||||
nanoampere = 1.e-9*ampere
|
||||
|
||||
#
|
||||
# Electric potential [E][Q^-1]
|
||||
#
|
||||
megavolt = megaelectronvolt/eplus
|
||||
kilovolt = 1.e-3*megavolt
|
||||
volt = 1.e-6*megavolt
|
||||
|
||||
#
|
||||
# Electric resistance [E][T][Q^-2]
|
||||
#
|
||||
ohm = volt/ampere # ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)
|
||||
|
||||
#
|
||||
# Electric capacitance [Q^2][E^-1]
|
||||
#
|
||||
farad = coulomb/volt # farad = 6.24150e+24 * eplus/Megavolt
|
||||
millifarad = 1.e-3*farad
|
||||
microfarad = 1.e-6*farad
|
||||
nanofarad = 1.e-9*farad
|
||||
picofarad = 1.e-12*farad
|
||||
|
||||
#
|
||||
# Magnetic Flux [T][E][Q^-1]
|
||||
#
|
||||
weber = volt*second # weber = 1000*megavolt*ns
|
||||
|
||||
#
|
||||
# Magnetic Field [T][E][Q^-1][L^-2]
|
||||
#
|
||||
tesla = volt*second/meter2 # tesla =0.001*megavolt*ns/mm2
|
||||
|
||||
gauss = 1.e-4*tesla
|
||||
kilogauss = 1.e-1*tesla
|
||||
|
||||
#
|
||||
# Inductance [T^2][E][Q^-2]
|
||||
#
|
||||
henry = weber/ampere # henry = 1.60217e-7*MeV*(ns/eplus)**2
|
||||
|
||||
#
|
||||
# Temperature
|
||||
#
|
||||
kelvin = 1.
|
||||
|
||||
#
|
||||
# Amount of substance
|
||||
#
|
||||
mole = 1.
|
||||
|
||||
#
|
||||
# Activity [T^-1]
|
||||
#
|
||||
becquerel = 1./second
|
||||
curie = 3.7e+10 * becquerel
|
||||
|
||||
#
|
||||
# Absorbed dose [L^2][T^-2]
|
||||
#
|
||||
gray = joule/kilogram
|
||||
|
||||
#
|
||||
# Luminous intensity [I]
|
||||
#
|
||||
candela = 1.
|
||||
|
||||
#
|
||||
# Luminous flux [I]
|
||||
#
|
||||
lumen = candela*steradian
|
||||
|
||||
#
|
||||
# Illuminance [I][L^-2]
|
||||
#
|
||||
lux = lumen/meter2
|
||||
|
||||
#
|
||||
# Miscellaneous
|
||||
#
|
||||
perCent = 0.01
|
||||
perThousand = 0.001
|
||||
perMillion = 0.000001
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# imported from "PhysicalConstants.h"
|
||||
# ==================================================================
|
||||
pi = 3.14159265358979323846
|
||||
twopi = 2.*pi
|
||||
halfpi = pi/2.
|
||||
pi2 = pi*pi
|
||||
|
||||
#
|
||||
Avogadro = 6.0221367e+23/mole
|
||||
|
||||
# c = 299.792458 mm/ns
|
||||
# c^2 = 898.7404 (mm/ns)^2
|
||||
c_light = 2.99792458e+8 * m/s
|
||||
c_squared = c_light * c_light
|
||||
|
||||
# h = 4.13566e-12 MeV*ns
|
||||
# hbar = 6.58212e-13 MeV*ns
|
||||
# hbarc = 197.32705e-12 MeV*mm
|
||||
h_Planck = 6.6260755e-34 * joule*s
|
||||
hbar_Planck = h_Planck/twopi
|
||||
hbarc = hbar_Planck * c_light
|
||||
hbarc_squared = hbarc * hbarc
|
||||
|
||||
#
|
||||
electron_charge = - eplus # see SystemOfUnits.h
|
||||
e_squared = eplus * eplus
|
||||
|
||||
# amu_c2 - atomic equivalent mass unit
|
||||
# amu - atomic mass unit
|
||||
electron_mass_c2 = 0.51099906 * MeV
|
||||
proton_mass_c2 = 938.27231 * MeV
|
||||
neutron_mass_c2 = 939.56563 * MeV
|
||||
amu_c2 = 931.49432 * MeV
|
||||
amu = amu_c2/c_squared
|
||||
|
||||
# permeability of free space mu0 = 2.01334e-16 Mev*(ns*eplus)^2/mm
|
||||
# permittivity of free space epsil0 = 5.52636e+10 eplus^2/(MeV*mm)
|
||||
mu0 = 4*pi*1.e-7 * henry/m
|
||||
epsilon0 = 1./(c_squared*mu0)
|
||||
|
||||
# electromagnetic coupling = 1.43996e-12 MeV*mm/(eplus^2)
|
||||
elm_coupling = e_squared/(4*pi*epsilon0)
|
||||
fine_structure_const = elm_coupling/hbarc
|
||||
classic_electr_radius = elm_coupling/electron_mass_c2
|
||||
electron_Compton_length = hbarc/electron_mass_c2
|
||||
Bohr_radius = electron_Compton_length/fine_structure_const
|
||||
|
||||
alpha_rcl2 = fine_structure_const * classic_electr_radius \
|
||||
* classic_electr_radius
|
||||
twopi_mc2_rcl2 = twopi * electron_mass_c2 \
|
||||
* classic_electr_radius \
|
||||
* classic_electr_radius
|
||||
|
||||
#
|
||||
k_Boltzmann = 8.617385e-11 * MeV/kelvin
|
||||
|
||||
#
|
||||
STP_Temperature = 273.15*kelvin
|
||||
STP_Pressure = 1.*atmosphere
|
||||
kGasThreshold = 10.*mg/cm3
|
||||
|
||||
#
|
||||
universe_mean_density = 1.e-25*g/cm3
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
# $Id: __init__.py,v 1.4 2006/06/23 17:05:42 kmura Exp $
|
||||
"""
|
||||
# ==================================================================
|
||||
# [Geant4] module package
|
||||
#
|
||||
# Welcome to Geant4Py.
|
||||
#
|
||||
# This package contains a set of Python interface with Geant4.
|
||||
# Hava A Fun!
|
||||
# ==================================================================
|
||||
"""
|
||||
|
||||
# ==================================================================
|
||||
# docs
|
||||
# ==================================================================
|
||||
__version__ = '1.0.0'
|
||||
__date__ = '24/June/2006'
|
||||
__author__ = 'K.Murakami (Koichi.Murakami@kek.jp)'
|
||||
__url__ = 'http://www-geant4.kek.jp/projects/Geant4Py/'
|
||||
|
||||
def PrintVersion():
|
||||
print """=============================================================
|
||||
Welcome to Geant4Py (A Geant4-Python Bridge)
|
||||
|
||||
Version : %s
|
||||
Date : %s
|
||||
Contact : %s
|
||||
WWW : %s
|
||||
=============================================================
|
||||
""" % ( __version__, __date__, __author__, __url__)
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# import submodules
|
||||
# ==================================================================
|
||||
from G4interface import *
|
||||
from G4global import *
|
||||
from G4run import *
|
||||
from G4event import *
|
||||
from G4tracking import *
|
||||
from G4track import *
|
||||
from G4particles import *
|
||||
from G4processes import *
|
||||
from G4geometry import *
|
||||
from G4materials import *
|
||||
from G4digits_hits import *
|
||||
from G4visualization import *
|
||||
from G4graphics_reps import *
|
||||
from HEPUnit import *
|
||||
from colortable import *
|
||||
|
||||
# ==================================================================
|
||||
# globals, which start with "g"
|
||||
# ==================================================================
|
||||
# ------------------------------------------------------------------
|
||||
# gRunManager
|
||||
# ------------------------------------------------------------------
|
||||
if(G4RunManager.GetRunManager() == None):
|
||||
gRunManager= G4RunManager()
|
||||
else:
|
||||
gRunManager= G4RunManager.GetRunManager()
|
||||
gRunManagerKernel= G4RunManagerKernel.GetRunManagerKernel()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gEventManager
|
||||
# ------------------------------------------------------------------
|
||||
gEventManager= G4EventManager.GetEventManager()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gStackManager
|
||||
# ------------------------------------------------------------------
|
||||
gStackManager= gEventManager.GetStackManager()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gTrackingManager
|
||||
# ------------------------------------------------------------------
|
||||
gTrackingManager= gEventManager.GetTrackingManager()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gStateManager
|
||||
# ------------------------------------------------------------------
|
||||
gStateManager= G4StateManager.GetStateManager()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gTransportationManager
|
||||
# ------------------------------------------------------------------
|
||||
gTransportationManager= G4TransportationManager.GetTransportationManager()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gParticleTable
|
||||
# ------------------------------------------------------------------
|
||||
gParticleTable= G4ParticleTable.GetParticleTable()
|
||||
gParticleIterator= PyG4ParticleList()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gProcessTable
|
||||
# ------------------------------------------------------------------
|
||||
gProcessTable= G4ProcessTable.GetProcessTable()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gEmCalculator
|
||||
# ------------------------------------------------------------------
|
||||
gEmCalculator= G4EmCalculator()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gNistManager (since 7.1)
|
||||
# ------------------------------------------------------------------
|
||||
material_class_list= dir(G4materials)
|
||||
qfind= (material_class_list.count("G4NistManager") >0)
|
||||
if(qfind) :
|
||||
gNistManager= G4NistManager.Instance()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# gVisManager
|
||||
# ------------------------------------------------------------------
|
||||
#global gVisManager
|
||||
#global opengl_ix, opengl_sx, opengl_ixm, opengl_sxm, vrml1, vrml2, dawn, \
|
||||
# heprep_xml, heprep_file, atree, raytracer, raytracer_x
|
||||
|
||||
visdriver_list = dir(G4visualization)
|
||||
q_opengl_ix = (visdriver_list.count("G4OpenGLImmediateX") > 0)
|
||||
q_opengl_sx = (visdriver_list.count("G4OpenGLStoredX") >0)
|
||||
q_opengl_ixm = (visdriver_list.count("G4OpenGLImmediateXm") > 0)
|
||||
q_opengl_sxm = (visdriver_list.count("G4OpenGLStoredXm") >0)
|
||||
q_raytracer_x = (visdriver_list.count("G4RayTracerX") >0)
|
||||
|
||||
if(G4VisManager.GetConcreteInstance() == None):
|
||||
gVisManager= G4VisManager()
|
||||
if(q_opengl_ix):
|
||||
opengl_ix= G4OpenGLImmediateX()
|
||||
if(q_opengl_sx):
|
||||
opengl_sx= G4OpenGLStoredX()
|
||||
if(q_opengl_ixm):
|
||||
opengl_ixm= G4OpenGLImmediateXm()
|
||||
if(q_opengl_sxm):
|
||||
opengl_sxm= G4OpenGLStoredXm()
|
||||
if(q_raytracer_x):
|
||||
raytracer_x= G4RayTracerX()
|
||||
|
||||
vrml1= G4VRML1File()
|
||||
vrml2= G4VRML2File()
|
||||
dawn= G4DAWNFILE()
|
||||
heprep_xml= G4HepRep()
|
||||
heprep_file= G4HepRepFile()
|
||||
atree= G4ASCIITree()
|
||||
raytracer= G4RayTracer()
|
||||
|
||||
if(q_opengl_ix):
|
||||
gVisManager.RegisterGraphicsSystem(opengl_ix)
|
||||
if(q_opengl_sx):
|
||||
gVisManager.RegisterGraphicsSystem(opengl_sx)
|
||||
if(q_opengl_ixm):
|
||||
gVisManager.RegisterGraphicsSystem(opengl_ixm)
|
||||
if(q_opengl_sxm):
|
||||
gVisManager.RegisterGraphicsSystem(opengl_sxm)
|
||||
if(q_raytracer_x):
|
||||
gVisManager.RegisterGraphicsSystem(raytracer_x)
|
||||
|
||||
gVisManager.RegisterGraphicsSystem(vrml1)
|
||||
gVisManager.RegisterGraphicsSystem(vrml2)
|
||||
gVisManager.RegisterGraphicsSystem(dawn)
|
||||
gVisManager.RegisterGraphicsSystem(heprep_xml)
|
||||
gVisManager.RegisterGraphicsSystem(heprep_file)
|
||||
gVisManager.RegisterGraphicsSystem(atree)
|
||||
gVisManager.RegisterGraphicsSystem(raytracer)
|
||||
|
||||
gVisManager.Initialize()
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# functions
|
||||
# ------------------------------------------------------------------
|
||||
gApplyUICommand= G4interface.ApplyUICommand
|
||||
gGetCurrentValues= G4interface.GetCurrentValues
|
||||
gStartUISession= G4interface.StartUISession
|
||||
|
||||
# EmCalculator
|
||||
from emcalculator import *
|
||||
gCalculatePhotonCrossSection= CalculatePhotonCrossSection
|
||||
gCalculateDEDX= CalculateDEDX
|
||||
|
||||
# ==================================================================
|
||||
# extentions
|
||||
# ==================================================================
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# generate one event
|
||||
# ------------------------------------------------------------------
|
||||
def OneEvent(self):
|
||||
"generate one event."
|
||||
self.BeamOn(1)
|
||||
|
||||
G4RunManager.OneEvent = OneEvent
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# list material information
|
||||
# ------------------------------------------------------------------
|
||||
#global gMaterialTable
|
||||
gMaterialTable= G4Material.GetMaterialTable()
|
||||
|
||||
global gElementTable
|
||||
gElementTable= G4Element.GetElementTable()
|
||||
|
||||
def ListMaterial(self):
|
||||
"list materials."
|
||||
n_materials= len(gMaterialTable)
|
||||
print " +------------------------------------------------------------------"
|
||||
print " | Table of G4Material-s (%d materails defined)" % (n_materials)
|
||||
for i in range(0, n_materials) :
|
||||
material= gMaterialTable[i]
|
||||
print " |--------------------------------------------------------"\
|
||||
"----------"
|
||||
print " | %s: %s" % (material.GetName(),
|
||||
G4BestUnit(material.GetDensity(),"Volumic Mass"))
|
||||
|
||||
elementVec= material.GetElementVector()
|
||||
fractionVec= material.GetFractionVector()
|
||||
abundanceVec= material.GetVecNbOfAtomsPerVolume()
|
||||
totNAtoms= material.GetTotNbOfAtomsPerVolume()
|
||||
|
||||
n_elements= len(elementVec)
|
||||
for j in range(0, n_elements):
|
||||
print " | + (%1d) %s(%s): A=%4.1f, N=%5.1f, " \
|
||||
"Frac.=(%4.1f%%m,%4.1f%%a)" % \
|
||||
(j+1, elementVec[j].GetName(), elementVec[j].GetSymbol(),
|
||||
elementVec[j].GetZ(),
|
||||
elementVec[j].GetN(),
|
||||
fractionVec[j]/HEPUnit.perCent,
|
||||
abundanceVec[j]/totNAtoms/HEPUnit.perCent)
|
||||
|
||||
print " +------------------------------------------------------------------"
|
||||
|
||||
G4MaterialTable.ListMaterial = ListMaterial
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# execute G4 macro
|
||||
# ------------------------------------------------------------------
|
||||
def gControlExecute(g4mac):
|
||||
ui_command= "/control/execute " + g4mac
|
||||
gApplyUICommand(ui_command)
|
||||
|
||||
@@ -0,0 +1,776 @@
|
||||
#$Id: colortable.py,v 1.2 2006/04/25 08:09:45 kmura Exp $
|
||||
"""
|
||||
# ==================================================================
|
||||
# Python module
|
||||
#
|
||||
# color table
|
||||
#
|
||||
# Q, 2005
|
||||
# ==================================================================
|
||||
"""
|
||||
|
||||
def intRGB(name):
|
||||
return colortable[name]
|
||||
|
||||
def floatRGB(name):
|
||||
rgb= colortable[name]
|
||||
return (rgb[0]/255., rgb[1]/255., rgb[2]/255.)
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# RGB color table (/usr/lib/X11/rgb.txt)
|
||||
# ==================================================================
|
||||
colortable = { }
|
||||
colortable["snow"]= (255, 250, 250)
|
||||
colortable["ghost"]= (248, 248, 255)
|
||||
colortable["GhostWhite"]= (248, 248, 255)
|
||||
colortable["white"]= (245, 245, 245)
|
||||
colortable["WhiteSmoke"]= (245, 245, 245)
|
||||
colortable["gainsboro"]= (220, 220, 220)
|
||||
colortable["floral"]= (255, 250, 240)
|
||||
colortable["FloralWhite"]= (255, 250, 240)
|
||||
colortable["old"]= (253, 245, 230)
|
||||
colortable["OldLace"]= (253, 245, 230)
|
||||
colortable["linen"]= (250, 240, 230)
|
||||
colortable["antique"]= (250, 235, 215)
|
||||
colortable["AntiqueWhite"]= (250, 235, 215)
|
||||
colortable["papaya"]= (255, 239, 213)
|
||||
colortable["PapayaWhip"]= (255, 239, 213)
|
||||
colortable["blanched"]= (255, 235, 205)
|
||||
colortable["BlanchedAlmond"]= (255, 235, 205)
|
||||
colortable["bisque"]= (255, 228, 196)
|
||||
colortable["peach"]= (255, 218, 185)
|
||||
colortable["PeachPuff"]= (255, 218, 185)
|
||||
colortable["navajo"]= (255, 222, 173)
|
||||
colortable["NavajoWhite"]= (255, 222, 173)
|
||||
colortable["moccasin"]= (255, 228, 181)
|
||||
colortable["cornsilk"]= (255, 248, 220)
|
||||
colortable["ivory"]= (255, 255, 240)
|
||||
colortable["lemon"]= (255, 250, 205)
|
||||
colortable["LemonChiffon"]= (255, 250, 205)
|
||||
colortable["seashell"]= (255, 245, 238)
|
||||
colortable["honeydew"]= (240, 255, 240)
|
||||
colortable["mint"]= (245, 255, 250)
|
||||
colortable["MintCream"]= (245, 255, 250)
|
||||
colortable["azure"]= (240, 255, 255)
|
||||
colortable["alice"]= (240, 248, 255)
|
||||
colortable["AliceBlue"]= (240, 248, 255)
|
||||
colortable["lavender"]= (230, 230, 250)
|
||||
colortable["lavender"]= (255, 240, 245)
|
||||
colortable["LavenderBlush"]= (255, 240, 245)
|
||||
colortable["misty"]= (255, 228, 225)
|
||||
colortable["MistyRose"]= (255, 228, 225)
|
||||
colortable["white"]= (255, 255, 255)
|
||||
colortable["black"]= (0, 0, 0)
|
||||
colortable["dark"]= (47, 79, 79)
|
||||
colortable["DarkSlateGray"]= (47, 79, 79)
|
||||
colortable["dark"]= (47, 79, 79)
|
||||
colortable["DarkSlateGrey"]= (47, 79, 79)
|
||||
colortable["dim"]= (105, 105, 105)
|
||||
colortable["DimGray"]= (105, 105, 105)
|
||||
colortable["dim"]= (105, 105, 105)
|
||||
colortable["DimGrey"]= (105, 105, 105)
|
||||
colortable["slate"]= (112, 128, 144)
|
||||
colortable["SlateGray"]= (112, 128, 144)
|
||||
colortable["slate"]= (112, 128, 144)
|
||||
colortable["SlateGrey"]= (112, 128, 144)
|
||||
colortable["light"]= (119, 136, 153)
|
||||
colortable["LightSlateGray"]= (119, 136, 153)
|
||||
colortable["light"]= (119, 136, 153)
|
||||
colortable["LightSlateGrey"]= (119, 136, 153)
|
||||
colortable["gray"]= (190, 190, 190)
|
||||
colortable["grey"]= (190, 190, 190)
|
||||
colortable["light"]= (211, 211, 211)
|
||||
colortable["LightGrey"]= (211, 211, 211)
|
||||
colortable["light"]= (211, 211, 211)
|
||||
colortable["LightGray"]= (211, 211, 211)
|
||||
colortable["midnight"]= (25, 25, 112)
|
||||
colortable["MidnightBlue"]= (25, 25, 112)
|
||||
colortable["navy"]= (0, 0, 128)
|
||||
colortable["navy"]= (0, 0, 128)
|
||||
colortable["NavyBlue"]= (0, 0, 128)
|
||||
colortable["cornflower"]= (100, 149, 237)
|
||||
colortable["CornflowerBlue"]= (100, 149, 237)
|
||||
colortable["dark"]= (72, 61, 139)
|
||||
colortable["DarkSlateBlue"]= (72, 61, 139)
|
||||
colortable["slate"]= (106, 90, 205)
|
||||
colortable["SlateBlue"]= (106, 90, 205)
|
||||
colortable["medium"]= (123, 104, 238)
|
||||
colortable["MediumSlateBlue"]= (123, 104, 238)
|
||||
colortable["light"]= (132, 112, 255)
|
||||
colortable["LightSlateBlue"]= (132, 112, 255)
|
||||
colortable["medium"]= (0, 0, 205)
|
||||
colortable["MediumBlue"]= (0, 0, 205)
|
||||
colortable["royal"]= (65, 105, 225)
|
||||
colortable["RoyalBlue"]= (65, 105, 225)
|
||||
colortable["blue"]= (0, 0, 255)
|
||||
colortable["dodger"]= (30, 144, 255)
|
||||
colortable["DodgerBlue"]= (30, 144, 255)
|
||||
colortable["deep"]= (0, 191, 255)
|
||||
colortable["DeepSkyBlue"]= (0, 191, 255)
|
||||
colortable["sky"]= (135, 206, 235)
|
||||
colortable["SkyBlue"]= (135, 206, 235)
|
||||
colortable["light"]= (135, 206, 250)
|
||||
colortable["LightSkyBlue"]= (135, 206, 250)
|
||||
colortable["steel"]= (70, 130, 180)
|
||||
colortable["SteelBlue"]= (70, 130, 180)
|
||||
colortable["light"]= (176, 196, 222)
|
||||
colortable["LightSteelBlue"]= (176, 196, 222)
|
||||
colortable["light"]= (173, 216, 230)
|
||||
colortable["LightBlue"]= (173, 216, 230)
|
||||
colortable["powder"]= (176, 224, 230)
|
||||
colortable["PowderBlue"]= (176, 224, 230)
|
||||
colortable["pale"]= (175, 238, 238)
|
||||
colortable["PaleTurquoise"]= (175, 238, 238)
|
||||
colortable["dark"]= (0, 206, 209)
|
||||
colortable["DarkTurquoise"]= (0, 206, 209)
|
||||
colortable["medium"]= (72, 209, 204)
|
||||
colortable["MediumTurquoise"]= (72, 209, 204)
|
||||
colortable["turquoise"]= (64, 224, 208)
|
||||
colortable["cyan"]= (0, 255, 255)
|
||||
colortable["light"]= (224, 255, 255)
|
||||
colortable["LightCyan"]= (224, 255, 255)
|
||||
colortable["cadet"]= (95, 158, 160)
|
||||
colortable["CadetBlue"]= (95, 158, 160)
|
||||
colortable["medium"]= (102, 205, 170)
|
||||
colortable["MediumAquamarine"]= (102, 205, 170)
|
||||
colortable["aquamarine"]= (127, 255, 212)
|
||||
colortable["dark"]= (0, 100, 0)
|
||||
colortable["DarkGreen"]= (0, 100, 0)
|
||||
colortable["dark"]= (85, 107, 47)
|
||||
colortable["DarkOliveGreen"]= (85, 107, 47)
|
||||
colortable["dark"]= (143, 188, 143)
|
||||
colortable["DarkSeaGreen"]= (143, 188, 143)
|
||||
colortable["sea"]= (46, 139, 87)
|
||||
colortable["SeaGreen"]= (46, 139, 87)
|
||||
colortable["medium"]= (60, 179, 113)
|
||||
colortable["MediumSeaGreen"]= (60, 179, 113)
|
||||
colortable["light"]= (32, 178, 170)
|
||||
colortable["LightSeaGreen"]= (32, 178, 170)
|
||||
colortable["pale"]= (152, 251, 152)
|
||||
colortable["PaleGreen"]= (152, 251, 152)
|
||||
colortable["spring"]= (0, 255, 127)
|
||||
colortable["SpringGreen"]= (0, 255, 127)
|
||||
colortable["lawn"]= (124, 252, 0)
|
||||
colortable["LawnGreen"]= (124, 252, 0)
|
||||
colortable["green"]= (0, 255, 0)
|
||||
colortable["chartreuse"]= (127, 255, 0)
|
||||
colortable["medium"]= (0, 250, 154)
|
||||
colortable["MediumSpringGreen"]= (0, 250, 154)
|
||||
colortable["green"]= (173, 255, 47)
|
||||
colortable["GreenYellow"]= (173, 255, 47)
|
||||
colortable["lime"]= (50, 205, 50)
|
||||
colortable["LimeGreen"]= (50, 205, 50)
|
||||
colortable["yellow"]= (154, 205, 50)
|
||||
colortable["YellowGreen"]= (154, 205, 50)
|
||||
colortable["forest"]= (34, 139, 34)
|
||||
colortable["ForestGreen"]= (34, 139, 34)
|
||||
colortable["olive"]= (107, 142, 35)
|
||||
colortable["OliveDrab"]= (107, 142, 35)
|
||||
colortable["dark"]= (189, 183, 107)
|
||||
colortable["DarkKhaki"]= (189, 183, 107)
|
||||
colortable["khaki"]= (240, 230, 140)
|
||||
colortable["pale"]= (238, 232, 170)
|
||||
colortable["PaleGoldenrod"]= (238, 232, 170)
|
||||
colortable["light"]= (250, 250, 210)
|
||||
colortable["LightGoldenrodYellow"]= (250, 250, 210)
|
||||
colortable["light"]= (255, 255, 224)
|
||||
colortable["LightYellow"]= (255, 255, 224)
|
||||
colortable["yellow"]= (255, 255, 0)
|
||||
colortable["gold"]= (255, 215, 0)
|
||||
colortable["light"]= (238, 221, 130)
|
||||
colortable["LightGoldenrod"]= (238, 221, 130)
|
||||
colortable["goldenrod"]= (218, 165, 32)
|
||||
colortable["dark"]= (184, 134, 11)
|
||||
colortable["DarkGoldenrod"]= (184, 134, 11)
|
||||
colortable["rosy"]= (188, 143, 143)
|
||||
colortable["RosyBrown"]= (188, 143, 143)
|
||||
colortable["indian"]= (205, 92, 92)
|
||||
colortable["IndianRed"]= (205, 92, 92)
|
||||
colortable["saddle"]= (139, 69, 19)
|
||||
colortable["SaddleBrown"]= (139, 69, 19)
|
||||
colortable["sienna"]= (160, 82, 45)
|
||||
colortable["peru"]= (205, 133, 63)
|
||||
colortable["burlywood"]= (222, 184, 135)
|
||||
colortable["beige"]= (245, 245, 220)
|
||||
colortable["wheat"]= (245, 222, 179)
|
||||
colortable["sandy"]= (244, 164, 96)
|
||||
colortable["SandyBrown"]= (244, 164, 96)
|
||||
colortable["tan"]= (210, 180, 140)
|
||||
colortable["chocolate"]= (210, 105, 30)
|
||||
colortable["firebrick"]= (178, 34, 34)
|
||||
colortable["brown"]= (165, 42, 42)
|
||||
colortable["dark"]= (233, 150, 122)
|
||||
colortable["DarkSalmon"]= (233, 150, 122)
|
||||
colortable["salmon"]= (250, 128, 114)
|
||||
colortable["light"]= (255, 160, 122)
|
||||
colortable["LightSalmon"]= (255, 160, 122)
|
||||
colortable["orange"]= (255, 165, 0)
|
||||
colortable["dark"]= (255, 140, 0)
|
||||
colortable["DarkOrange"]= (255, 140, 0)
|
||||
colortable["coral"]= (255, 127, 80)
|
||||
colortable["light"]= (240, 128, 128)
|
||||
colortable["LightCoral"]= (240, 128, 128)
|
||||
colortable["tomato"]= (255, 99, 71)
|
||||
colortable["orange"]= (255, 69, 0)
|
||||
colortable["OrangeRed"]= (255, 69, 0)
|
||||
colortable["red"]= (255, 0, 0)
|
||||
colortable["hot"]= (255, 105, 180)
|
||||
colortable["HotPink"]= (255, 105, 180)
|
||||
colortable["deep"]= (255, 20, 147)
|
||||
colortable["DeepPink"]= (255, 20, 147)
|
||||
colortable["pink"]= (255, 192, 203)
|
||||
colortable["light"]= (255, 182, 193)
|
||||
colortable["LightPink"]= (255, 182, 193)
|
||||
colortable["pale"]= (219, 112, 147)
|
||||
colortable["PaleVioletRed"]= (219, 112, 147)
|
||||
colortable["maroon"]= (176, 48, 96)
|
||||
colortable["medium"]= (199, 21, 133)
|
||||
colortable["MediumVioletRed"]= (199, 21, 133)
|
||||
colortable["violet"]= (208, 32, 144)
|
||||
colortable["VioletRed"]= (208, 32, 144)
|
||||
colortable["magenta"]= (255, 0, 255)
|
||||
colortable["violet"]= (238, 130, 238)
|
||||
colortable["plum"]= (221, 160, 221)
|
||||
colortable["orchid"]= (218, 112, 214)
|
||||
colortable["medium"]= (186, 85, 211)
|
||||
colortable["MediumOrchid"]= (186, 85, 211)
|
||||
colortable["dark"]= (153, 50, 204)
|
||||
colortable["DarkOrchid"]= (153, 50, 204)
|
||||
colortable["dark"]= (148, 0, 211)
|
||||
colortable["DarkViolet"]= (148, 0, 211)
|
||||
colortable["blue"]= (138, 43, 226)
|
||||
colortable["BlueViolet"]= (138, 43, 226)
|
||||
colortable["purple"]= (160, 32, 240)
|
||||
colortable["medium"]= (147, 112, 219)
|
||||
colortable["MediumPurple"]= (147, 112, 219)
|
||||
colortable["thistle"]= (216, 191, 216)
|
||||
colortable["snow1"]= (255, 250, 250)
|
||||
colortable["snow2"]= (238, 233, 233)
|
||||
colortable["snow3"]= (205, 201, 201)
|
||||
colortable["snow4"]= (139, 137, 137)
|
||||
colortable["seashell1"]= (255, 245, 238)
|
||||
colortable["seashell2"]= (238, 229, 222)
|
||||
colortable["seashell3"]= (205, 197, 191)
|
||||
colortable["seashell4"]= (139, 134, 130)
|
||||
colortable["AntiqueWhite1"]= (255, 239, 219)
|
||||
colortable["AntiqueWhite2"]= (238, 223, 204)
|
||||
colortable["AntiqueWhite3"]= (205, 192, 176)
|
||||
colortable["AntiqueWhite4"]= (139, 131, 120)
|
||||
colortable["bisque1"]= (255, 228, 196)
|
||||
colortable["bisque2"]= (238, 213, 183)
|
||||
colortable["bisque3"]= (205, 183, 158)
|
||||
colortable["bisque4"]= (139, 125, 107)
|
||||
colortable["PeachPuff1"]= (255, 218, 185)
|
||||
colortable["PeachPuff2"]= (238, 203, 173)
|
||||
colortable["PeachPuff3"]= (205, 175, 149)
|
||||
colortable["PeachPuff4"]= (139, 119, 101)
|
||||
colortable["NavajoWhite1"]= (255, 222, 173)
|
||||
colortable["NavajoWhite2"]= (238, 207, 161)
|
||||
colortable["NavajoWhite3"]= (205, 179, 139)
|
||||
colortable["NavajoWhite4"]= (139, 121, 94)
|
||||
colortable["LemonChiffon1"]= (255, 250, 205)
|
||||
colortable["LemonChiffon2"]= (238, 233, 191)
|
||||
colortable["LemonChiffon3"]= (205, 201, 165)
|
||||
colortable["LemonChiffon4"]= (139, 137, 112)
|
||||
colortable["cornsilk1"]= (255, 248, 220)
|
||||
colortable["cornsilk2"]= (238, 232, 205)
|
||||
colortable["cornsilk3"]= (205, 200, 177)
|
||||
colortable["cornsilk4"]= (139, 136, 120)
|
||||
colortable["ivory1"]= (255, 255, 240)
|
||||
colortable["ivory2"]= (238, 238, 224)
|
||||
colortable["ivory3"]= (205, 205, 193)
|
||||
colortable["ivory4"]= (139, 139, 131)
|
||||
colortable["honeydew1"]= (240, 255, 240)
|
||||
colortable["honeydew2"]= (224, 238, 224)
|
||||
colortable["honeydew3"]= (193, 205, 193)
|
||||
colortable["honeydew4"]= (131, 139, 131)
|
||||
colortable["LavenderBlush1"]= (255, 240, 245)
|
||||
colortable["LavenderBlush2"]= (238, 224, 229)
|
||||
colortable["LavenderBlush3"]= (205, 193, 197)
|
||||
colortable["LavenderBlush4"]= (139, 131, 134)
|
||||
colortable["MistyRose1"]= (255, 228, 225)
|
||||
colortable["MistyRose2"]= (238, 213, 210)
|
||||
colortable["MistyRose3"]= (205, 183, 181)
|
||||
colortable["MistyRose4"]= (139, 125, 123)
|
||||
colortable["azure1"]= (240, 255, 255)
|
||||
colortable["azure2"]= (224, 238, 238)
|
||||
colortable["azure3"]= (193, 205, 205)
|
||||
colortable["azure4"]= (131, 139, 139)
|
||||
colortable["SlateBlue1"]= (131, 111, 255)
|
||||
colortable["SlateBlue2"]= (122, 103, 238)
|
||||
colortable["SlateBlue3"]= (105, 89, 205)
|
||||
colortable["SlateBlue4"]= (71, 60, 139)
|
||||
colortable["RoyalBlue1"]= (72, 118, 255)
|
||||
colortable["RoyalBlue2"]= (67, 110, 238)
|
||||
colortable["RoyalBlue3"]= (58, 95, 205)
|
||||
colortable["RoyalBlue4"]= (39, 64, 139)
|
||||
colortable["blue1"]= (0, 0, 255)
|
||||
colortable["blue2"]= (0, 0, 238)
|
||||
colortable["blue3"]= (0, 0, 205)
|
||||
colortable["blue4"]= (0, 0, 139)
|
||||
colortable["DodgerBlue1"]= (30, 144, 255)
|
||||
colortable["DodgerBlue2"]= (28, 134, 238)
|
||||
colortable["DodgerBlue3"]= (24, 116, 205)
|
||||
colortable["DodgerBlue4"]= (16, 78, 139)
|
||||
colortable["SteelBlue1"]= (99, 184, 255)
|
||||
colortable["SteelBlue2"]= (92, 172, 238)
|
||||
colortable["SteelBlue3"]= (79, 148, 205)
|
||||
colortable["SteelBlue4"]= (54, 100, 139)
|
||||
colortable["DeepSkyBlue1"]= (0, 191, 255)
|
||||
colortable["DeepSkyBlue2"]= (0, 178, 238)
|
||||
colortable["DeepSkyBlue3"]= (0, 154, 205)
|
||||
colortable["DeepSkyBlue4"]= (0, 104, 139)
|
||||
colortable["SkyBlue1"]= (135, 206, 255)
|
||||
colortable["SkyBlue2"]= (126, 192, 238)
|
||||
colortable["SkyBlue3"]= (108, 166, 205)
|
||||
colortable["SkyBlue4"]= (74, 112, 139)
|
||||
colortable["LightSkyBlue1"]= (176, 226, 255)
|
||||
colortable["LightSkyBlue2"]= (164, 211, 238)
|
||||
colortable["LightSkyBlue3"]= (141, 182, 205)
|
||||
colortable["LightSkyBlue4"]= (96, 123, 139)
|
||||
colortable["SlateGray1"]= (198, 226, 255)
|
||||
colortable["SlateGray2"]= (185, 211, 238)
|
||||
colortable["SlateGray3"]= (159, 182, 205)
|
||||
colortable["SlateGray4"]= (108, 123, 139)
|
||||
colortable["LightSteelBlue1"]= (202, 225, 255)
|
||||
colortable["LightSteelBlue2"]= (188, 210, 238)
|
||||
colortable["LightSteelBlue3"]= (162, 181, 205)
|
||||
colortable["LightSteelBlue4"]= (110, 123, 139)
|
||||
colortable["LightBlue1"]= (191, 239, 255)
|
||||
colortable["LightBlue2"]= (178, 223, 238)
|
||||
colortable["LightBlue3"]= (154, 192, 205)
|
||||
colortable["LightBlue4"]= (104, 131, 139)
|
||||
colortable["LightCyan1"]= (224, 255, 255)
|
||||
colortable["LightCyan2"]= (209, 238, 238)
|
||||
colortable["LightCyan3"]= (180, 205, 205)
|
||||
colortable["LightCyan4"]= (122, 139, 139)
|
||||
colortable["PaleTurquoise1"]= (187, 255, 255)
|
||||
colortable["PaleTurquoise2"]= (174, 238, 238)
|
||||
colortable["PaleTurquoise3"]= (150, 205, 205)
|
||||
colortable["PaleTurquoise4"]= (102, 139, 139)
|
||||
colortable["CadetBlue1"]= (152, 245, 255)
|
||||
colortable["CadetBlue2"]= (142, 229, 238)
|
||||
colortable["CadetBlue3"]= (122, 197, 205)
|
||||
colortable["CadetBlue4"]= (83, 134, 139)
|
||||
colortable["turquoise1"]= (0, 245, 255)
|
||||
colortable["turquoise2"]= (0, 229, 238)
|
||||
colortable["turquoise3"]= (0, 197, 205)
|
||||
colortable["turquoise4"]= (0, 134, 139)
|
||||
colortable["cyan1"]= (0, 255, 255)
|
||||
colortable["cyan2"]= (0, 238, 238)
|
||||
colortable["cyan3"]= (0, 205, 205)
|
||||
colortable["cyan4"]= (0, 139, 139)
|
||||
colortable["DarkSlateGray1"]= (151, 255, 255)
|
||||
colortable["DarkSlateGray2"]= (141, 238, 238)
|
||||
colortable["DarkSlateGray3"]= (121, 205, 205)
|
||||
colortable["DarkSlateGray4"]= (82, 139, 139)
|
||||
colortable["aquamarine1"]= (127, 255, 212)
|
||||
colortable["aquamarine2"]= (118, 238, 198)
|
||||
colortable["aquamarine3"]= (102, 205, 170)
|
||||
colortable["aquamarine4"]= (69, 139, 116)
|
||||
colortable["DarkSeaGreen1"]= (193, 255, 193)
|
||||
colortable["DarkSeaGreen2"]= (180, 238, 180)
|
||||
colortable["DarkSeaGreen3"]= (155, 205, 155)
|
||||
colortable["DarkSeaGreen4"]= (105, 139, 105)
|
||||
colortable["SeaGreen1"]= (84, 255, 159)
|
||||
colortable["SeaGreen2"]= (78, 238, 148)
|
||||
colortable["SeaGreen3"]= (67, 205, 128)
|
||||
colortable["SeaGreen4"]= (46, 139, 87)
|
||||
colortable["PaleGreen1"]= (154, 255, 154)
|
||||
colortable["PaleGreen2"]= (144, 238, 144)
|
||||
colortable["PaleGreen3"]= (124, 205, 124)
|
||||
colortable["PaleGreen4"]= (84, 139, 84)
|
||||
colortable["SpringGreen1"]= (0, 255, 127)
|
||||
colortable["SpringGreen2"]= (0, 238, 118)
|
||||
colortable["SpringGreen3"]= (0, 205, 102)
|
||||
colortable["SpringGreen4"]= (0, 139, 69)
|
||||
colortable["green1"]= (0, 255, 0)
|
||||
colortable["green2"]= (0, 238, 0)
|
||||
colortable["green3"]= (0, 205, 0)
|
||||
colortable["green4"]= (0, 139, 0)
|
||||
colortable["chartreuse1"]= (127, 255, 0)
|
||||
colortable["chartreuse2"]= (118, 238, 0)
|
||||
colortable["chartreuse3"]= (102, 205, 0)
|
||||
colortable["chartreuse4"]= (69, 139, 0)
|
||||
colortable["OliveDrab1"]= (192, 255, 62)
|
||||
colortable["OliveDrab2"]= (179, 238, 58)
|
||||
colortable["OliveDrab3"]= (154, 205, 50)
|
||||
colortable["OliveDrab4"]= (105, 139, 34)
|
||||
colortable["DarkOliveGreen1"]= (202, 255, 112)
|
||||
colortable["DarkOliveGreen2"]= (188, 238, 104)
|
||||
colortable["DarkOliveGreen3"]= (162, 205, 90)
|
||||
colortable["DarkOliveGreen4"]= (110, 139, 61)
|
||||
colortable["khaki1"]= (255, 246, 143)
|
||||
colortable["khaki2"]= (238, 230, 133)
|
||||
colortable["khaki3"]= (205, 198, 115)
|
||||
colortable["khaki4"]= (139, 134, 78)
|
||||
colortable["LightGoldenrod1"]= (255, 236, 139)
|
||||
colortable["LightGoldenrod2"]= (238, 220, 130)
|
||||
colortable["LightGoldenrod3"]= (205, 190, 112)
|
||||
colortable["LightGoldenrod4"]= (139, 129, 76)
|
||||
colortable["LightYellow1"]= (255, 255, 224)
|
||||
colortable["LightYellow2"]= (238, 238, 209)
|
||||
colortable["LightYellow3"]= (205, 205, 180)
|
||||
colortable["LightYellow4"]= (139, 139, 122)
|
||||
colortable["yellow1"]= (255, 255, 0)
|
||||
colortable["yellow2"]= (238, 238, 0)
|
||||
colortable["yellow3"]= (205, 205, 0)
|
||||
colortable["yellow4"]= (139, 139, 0)
|
||||
colortable["gold1"]= (255, 215, 0)
|
||||
colortable["gold2"]= (238, 201, 0)
|
||||
colortable["gold3"]= (205, 173, 0)
|
||||
colortable["gold4"]= (139, 117, 0)
|
||||
colortable["goldenrod1"]= (255, 193, 37)
|
||||
colortable["goldenrod2"]= (238, 180, 34)
|
||||
colortable["goldenrod3"]= (205, 155, 29)
|
||||
colortable["goldenrod4"]= (139, 105, 20)
|
||||
colortable["DarkGoldenrod1"]= (255, 185, 15)
|
||||
colortable["DarkGoldenrod2"]= (238, 173, 14)
|
||||
colortable["DarkGoldenrod3"]= (205, 149, 12)
|
||||
colortable["DarkGoldenrod4"]= (139, 101, 8)
|
||||
colortable["RosyBrown1"]= (255, 193, 193)
|
||||
colortable["RosyBrown2"]= (238, 180, 180)
|
||||
colortable["RosyBrown3"]= (205, 155, 155)
|
||||
colortable["RosyBrown4"]= (139, 105, 105)
|
||||
colortable["IndianRed1"]= (255, 106, 106)
|
||||
colortable["IndianRed2"]= (238, 99, 99)
|
||||
colortable["IndianRed3"]= (205, 85, 85)
|
||||
colortable["IndianRed4"]= (139, 58, 58)
|
||||
colortable["sienna1"]= (255, 130, 71)
|
||||
colortable["sienna2"]= (238, 121, 66)
|
||||
colortable["sienna3"]= (205, 104, 57)
|
||||
colortable["sienna4"]= (139, 71, 38)
|
||||
colortable["burlywood1"]= (255, 211, 155)
|
||||
colortable["burlywood2"]= (238, 197, 145)
|
||||
colortable["burlywood3"]= (205, 170, 125)
|
||||
colortable["burlywood4"]= (139, 115, 85)
|
||||
colortable["wheat1"]= (255, 231, 186)
|
||||
colortable["wheat2"]= (238, 216, 174)
|
||||
colortable["wheat3"]= (205, 186, 150)
|
||||
colortable["wheat4"]= (139, 126, 102)
|
||||
colortable["tan1"]= (255, 165, 79)
|
||||
colortable["tan2"]= (238, 154, 73)
|
||||
colortable["tan3"]= (205, 133, 63)
|
||||
colortable["tan4"]= (139, 90, 43)
|
||||
colortable["chocolate1"]= (255, 127, 36)
|
||||
colortable["chocolate2"]= (238, 118, 33)
|
||||
colortable["chocolate3"]= (205, 102, 29)
|
||||
colortable["chocolate4"]= (139, 69, 19)
|
||||
colortable["firebrick1"]= (255, 48, 48)
|
||||
colortable["firebrick2"]= (238, 44, 44)
|
||||
colortable["firebrick3"]= (205, 38, 38)
|
||||
colortable["firebrick4"]= (139, 26, 26)
|
||||
colortable["brown1"]= (255, 64, 64)
|
||||
colortable["brown2"]= (238, 59, 59)
|
||||
colortable["brown3"]= (205, 51, 51)
|
||||
colortable["brown4"]= (139, 35, 35)
|
||||
colortable["salmon1"]= (255, 140, 105)
|
||||
colortable["salmon2"]= (238, 130, 98)
|
||||
colortable["salmon3"]= (205, 112, 84)
|
||||
colortable["salmon4"]= (139, 76, 57)
|
||||
colortable["LightSalmon1"]= (255, 160, 122)
|
||||
colortable["LightSalmon2"]= (238, 149, 114)
|
||||
colortable["LightSalmon3"]= (205, 129, 98)
|
||||
colortable["LightSalmon4"]= (139, 87, 66)
|
||||
colortable["orange1"]= (255, 165, 0)
|
||||
colortable["orange2"]= (238, 154, 0)
|
||||
colortable["orange3"]= (205, 133, 0)
|
||||
colortable["orange4"]= (139, 90, 0)
|
||||
colortable["DarkOrange1"]= (255, 127, 0)
|
||||
colortable["DarkOrange2"]= (238, 118, 0)
|
||||
colortable["DarkOrange3"]= (205, 102, 0)
|
||||
colortable["DarkOrange4"]= (139, 69, 0)
|
||||
colortable["coral1"]= (255, 114, 86)
|
||||
colortable["coral2"]= (238, 106, 80)
|
||||
colortable["coral3"]= (205, 91, 69)
|
||||
colortable["coral4"]= (139, 62, 47)
|
||||
colortable["tomato1"]= (255, 99, 71)
|
||||
colortable["tomato2"]= (238, 92, 66)
|
||||
colortable["tomato3"]= (205, 79, 57)
|
||||
colortable["tomato4"]= (139, 54, 38)
|
||||
colortable["OrangeRed1"]= (255, 69, 0)
|
||||
colortable["OrangeRed2"]= (238, 64, 0)
|
||||
colortable["OrangeRed3"]= (205, 55, 0)
|
||||
colortable["OrangeRed4"]= (139, 37, 0)
|
||||
colortable["red1"]= (255, 0, 0)
|
||||
colortable["red2"]= (238, 0, 0)
|
||||
colortable["red3"]= (205, 0, 0)
|
||||
colortable["red4"]= (139, 0, 0)
|
||||
colortable["DeepPink1"]= (255, 20, 147)
|
||||
colortable["DeepPink2"]= (238, 18, 137)
|
||||
colortable["DeepPink3"]= (205, 16, 118)
|
||||
colortable["DeepPink4"]= (139, 10, 80)
|
||||
colortable["HotPink1"]= (255, 110, 180)
|
||||
colortable["HotPink2"]= (238, 106, 167)
|
||||
colortable["HotPink3"]= (205, 96, 144)
|
||||
colortable["HotPink4"]= (139, 58, 98)
|
||||
colortable["pink1"]= (255, 181, 197)
|
||||
colortable["pink2"]= (238, 169, 184)
|
||||
colortable["pink3"]= (205, 145, 158)
|
||||
colortable["pink4"]= (139, 99, 108)
|
||||
colortable["LightPink1"]= (255, 174, 185)
|
||||
colortable["LightPink2"]= (238, 162, 173)
|
||||
colortable["LightPink3"]= (205, 140, 149)
|
||||
colortable["LightPink4"]= (139, 95, 101)
|
||||
colortable["PaleVioletRed1"]= (255, 130, 171)
|
||||
colortable["PaleVioletRed2"]= (238, 121, 159)
|
||||
colortable["PaleVioletRed3"]= (205, 104, 137)
|
||||
colortable["PaleVioletRed4"]= (139, 71, 93)
|
||||
colortable["maroon1"]= (255, 52, 179)
|
||||
colortable["maroon2"]= (238, 48, 167)
|
||||
colortable["maroon3"]= (205, 41, 144)
|
||||
colortable["maroon4"]= (139, 28, 98)
|
||||
colortable["VioletRed1"]= (255, 62, 150)
|
||||
colortable["VioletRed2"]= (238, 58, 140)
|
||||
colortable["VioletRed3"]= (205, 50, 120)
|
||||
colortable["VioletRed4"]= (139, 34, 82)
|
||||
colortable["magenta1"]= (255, 0, 255)
|
||||
colortable["magenta2"]= (238, 0, 238)
|
||||
colortable["magenta3"]= (205, 0, 205)
|
||||
colortable["magenta4"]= (139, 0, 139)
|
||||
colortable["orchid1"]= (255, 131, 250)
|
||||
colortable["orchid2"]= (238, 122, 233)
|
||||
colortable["orchid3"]= (205, 105, 201)
|
||||
colortable["orchid4"]= (139, 71, 137)
|
||||
colortable["plum1"]= (255, 187, 255)
|
||||
colortable["plum2"]= (238, 174, 238)
|
||||
colortable["plum3"]= (205, 150, 205)
|
||||
colortable["plum4"]= (139, 102, 139)
|
||||
colortable["MediumOrchid1"]= (224, 102, 255)
|
||||
colortable["MediumOrchid2"]= (209, 95, 238)
|
||||
colortable["MediumOrchid3"]= (180, 82, 205)
|
||||
colortable["MediumOrchid4"]= (122, 55, 139)
|
||||
colortable["DarkOrchid1"]= (191, 62, 255)
|
||||
colortable["DarkOrchid2"]= (178, 58, 238)
|
||||
colortable["DarkOrchid3"]= (154, 50, 205)
|
||||
colortable["DarkOrchid4"]= (104, 34, 139)
|
||||
colortable["purple1"]= (155, 48, 255)
|
||||
colortable["purple2"]= (145, 44, 238)
|
||||
colortable["purple3"]= (125, 38, 205)
|
||||
colortable["purple4"]= (85, 26, 139)
|
||||
colortable["MediumPurple1"]= (171, 130, 255)
|
||||
colortable["MediumPurple2"]= (159, 121, 238)
|
||||
colortable["MediumPurple3"]= (137, 104, 205)
|
||||
colortable["MediumPurple4"]= (93, 71, 139)
|
||||
colortable["thistle1"]= (255, 225, 255)
|
||||
colortable["thistle2"]= (238, 210, 238)
|
||||
colortable["thistle3"]= (205, 181, 205)
|
||||
colortable["thistle4"]= (139, 123, 139)
|
||||
colortable["gray0"]= (0, 0, 0)
|
||||
colortable["grey0"]= (0, 0, 0)
|
||||
colortable["gray1"]= (3, 3, 3)
|
||||
colortable["grey1"]= (3, 3, 3)
|
||||
colortable["gray2"]= (5, 5, 5)
|
||||
colortable["grey2"]= (5, 5, 5)
|
||||
colortable["gray3"]= (8, 8, 8)
|
||||
colortable["grey3"]= (8, 8, 8)
|
||||
colortable["gray4"]= (10, 10, 10)
|
||||
colortable["grey4"]= (10, 10, 10)
|
||||
colortable["gray5"]= (13, 13, 13)
|
||||
colortable["grey5"]= (13, 13, 13)
|
||||
colortable["gray6"]= (15, 15, 15)
|
||||
colortable["grey6"]= (15, 15, 15)
|
||||
colortable["gray7"]= (18, 18, 18)
|
||||
colortable["grey7"]= (18, 18, 18)
|
||||
colortable["gray8"]= (20, 20, 20)
|
||||
colortable["grey8"]= (20, 20, 20)
|
||||
colortable["gray9"]= (23, 23, 23)
|
||||
colortable["grey9"]= (23, 23, 23)
|
||||
colortable["gray10"]= (26, 26, 26)
|
||||
colortable["grey10"]= (26, 26, 26)
|
||||
colortable["gray11"]= (28, 28, 28)
|
||||
colortable["grey11"]= (28, 28, 28)
|
||||
colortable["gray12"]= (31, 31, 31)
|
||||
colortable["grey12"]= (31, 31, 31)
|
||||
colortable["gray13"]= (33, 33, 33)
|
||||
colortable["grey13"]= (33, 33, 33)
|
||||
colortable["gray14"]= (36, 36, 36)
|
||||
colortable["grey14"]= (36, 36, 36)
|
||||
colortable["gray15"]= (38, 38, 38)
|
||||
colortable["grey15"]= (38, 38, 38)
|
||||
colortable["gray16"]= (41, 41, 41)
|
||||
colortable["grey16"]= (41, 41, 41)
|
||||
colortable["gray17"]= (43, 43, 43)
|
||||
colortable["grey17"]= (43, 43, 43)
|
||||
colortable["gray18"]= (46, 46, 46)
|
||||
colortable["grey18"]= (46, 46, 46)
|
||||
colortable["gray19"]= (48, 48, 48)
|
||||
colortable["grey19"]= (48, 48, 48)
|
||||
colortable["gray20"]= (51, 51, 51)
|
||||
colortable["grey20"]= (51, 51, 51)
|
||||
colortable["gray21"]= (54, 54, 54)
|
||||
colortable["grey21"]= (54, 54, 54)
|
||||
colortable["gray22"]= (56, 56, 56)
|
||||
colortable["grey22"]= (56, 56, 56)
|
||||
colortable["gray23"]= (59, 59, 59)
|
||||
colortable["grey23"]= (59, 59, 59)
|
||||
colortable["gray24"]= (61, 61, 61)
|
||||
colortable["grey24"]= (61, 61, 61)
|
||||
colortable["gray25"]= (64, 64, 64)
|
||||
colortable["grey25"]= (64, 64, 64)
|
||||
colortable["gray26"]= (66, 66, 66)
|
||||
colortable["grey26"]= (66, 66, 66)
|
||||
colortable["gray27"]= (69, 69, 69)
|
||||
colortable["grey27"]= (69, 69, 69)
|
||||
colortable["gray28"]= (71, 71, 71)
|
||||
colortable["grey28"]= (71, 71, 71)
|
||||
colortable["gray29"]= (74, 74, 74)
|
||||
colortable["grey29"]= (74, 74, 74)
|
||||
colortable["gray30"]= (77, 77, 77)
|
||||
colortable["grey30"]= (77, 77, 77)
|
||||
colortable["gray31"]= (79, 79, 79)
|
||||
colortable["grey31"]= (79, 79, 79)
|
||||
colortable["gray32"]= (82, 82, 82)
|
||||
colortable["grey32"]= (82, 82, 82)
|
||||
colortable["gray33"]= (84, 84, 84)
|
||||
colortable["grey33"]= (84, 84, 84)
|
||||
colortable["gray34"]= (87, 87, 87)
|
||||
colortable["grey34"]= (87, 87, 87)
|
||||
colortable["gray35"]= (89, 89, 89)
|
||||
colortable["grey35"]= (89, 89, 89)
|
||||
colortable["gray36"]= (92, 92, 92)
|
||||
colortable["grey36"]= (92, 92, 92)
|
||||
colortable["gray37"]= (94, 94, 94)
|
||||
colortable["grey37"]= (94, 94, 94)
|
||||
colortable["gray38"]= (97, 97, 97)
|
||||
colortable["grey38"]= (97, 97, 97)
|
||||
colortable["gray39"]= (99, 99, 99)
|
||||
colortable["grey39"]= (99, 99, 99)
|
||||
colortable["gray40"]= (102, 102, 102)
|
||||
colortable["grey40"]= (102, 102, 102)
|
||||
colortable["gray41"]= (105, 105, 105)
|
||||
colortable["grey41"]= (105, 105, 105)
|
||||
colortable["gray42"]= (107, 107, 107)
|
||||
colortable["grey42"]= (107, 107, 107)
|
||||
colortable["gray43"]= (110, 110, 110)
|
||||
colortable["grey43"]= (110, 110, 110)
|
||||
colortable["gray44"]= (112, 112, 112)
|
||||
colortable["grey44"]= (112, 112, 112)
|
||||
colortable["gray45"]= (115, 115, 115)
|
||||
colortable["grey45"]= (115, 115, 115)
|
||||
colortable["gray46"]= (117, 117, 117)
|
||||
colortable["grey46"]= (117, 117, 117)
|
||||
colortable["gray47"]= (120, 120, 120)
|
||||
colortable["grey47"]= (120, 120, 120)
|
||||
colortable["gray48"]= (122, 122, 122)
|
||||
colortable["grey48"]= (122, 122, 122)
|
||||
colortable["gray49"]= (125, 125, 125)
|
||||
colortable["grey49"]= (125, 125, 125)
|
||||
colortable["gray50"]= (127, 127, 127)
|
||||
colortable["grey50"]= (127, 127, 127)
|
||||
colortable["gray51"]= (130, 130, 130)
|
||||
colortable["grey51"]= (130, 130, 130)
|
||||
colortable["gray52"]= (133, 133, 133)
|
||||
colortable["grey52"]= (133, 133, 133)
|
||||
colortable["gray53"]= (135, 135, 135)
|
||||
colortable["grey53"]= (135, 135, 135)
|
||||
colortable["gray54"]= (138, 138, 138)
|
||||
colortable["grey54"]= (138, 138, 138)
|
||||
colortable["gray55"]= (140, 140, 140)
|
||||
colortable["grey55"]= (140, 140, 140)
|
||||
colortable["gray56"]= (143, 143, 143)
|
||||
colortable["grey56"]= (143, 143, 143)
|
||||
colortable["gray57"]= (145, 145, 145)
|
||||
colortable["grey57"]= (145, 145, 145)
|
||||
colortable["gray58"]= (148, 148, 148)
|
||||
colortable["grey58"]= (148, 148, 148)
|
||||
colortable["gray59"]= (150, 150, 150)
|
||||
colortable["grey59"]= (150, 150, 150)
|
||||
colortable["gray60"]= (153, 153, 153)
|
||||
colortable["grey60"]= (153, 153, 153)
|
||||
colortable["gray61"]= (156, 156, 156)
|
||||
colortable["grey61"]= (156, 156, 156)
|
||||
colortable["gray62"]= (158, 158, 158)
|
||||
colortable["grey62"]= (158, 158, 158)
|
||||
colortable["gray63"]= (161, 161, 161)
|
||||
colortable["grey63"]= (161, 161, 161)
|
||||
colortable["gray64"]= (163, 163, 163)
|
||||
colortable["grey64"]= (163, 163, 163)
|
||||
colortable["gray65"]= (166, 166, 166)
|
||||
colortable["grey65"]= (166, 166, 166)
|
||||
colortable["gray66"]= (168, 168, 168)
|
||||
colortable["grey66"]= (168, 168, 168)
|
||||
colortable["gray67"]= (171, 171, 171)
|
||||
colortable["grey67"]= (171, 171, 171)
|
||||
colortable["gray68"]= (173, 173, 173)
|
||||
colortable["grey68"]= (173, 173, 173)
|
||||
colortable["gray69"]= (176, 176, 176)
|
||||
colortable["grey69"]= (176, 176, 176)
|
||||
colortable["gray70"]= (179, 179, 179)
|
||||
colortable["grey70"]= (179, 179, 179)
|
||||
colortable["gray71"]= (181, 181, 181)
|
||||
colortable["grey71"]= (181, 181, 181)
|
||||
colortable["gray72"]= (184, 184, 184)
|
||||
colortable["grey72"]= (184, 184, 184)
|
||||
colortable["gray73"]= (186, 186, 186)
|
||||
colortable["grey73"]= (186, 186, 186)
|
||||
colortable["gray74"]= (189, 189, 189)
|
||||
colortable["grey74"]= (189, 189, 189)
|
||||
colortable["gray75"]= (191, 191, 191)
|
||||
colortable["grey75"]= (191, 191, 191)
|
||||
colortable["gray76"]= (194, 194, 194)
|
||||
colortable["grey76"]= (194, 194, 194)
|
||||
colortable["gray77"]= (196, 196, 196)
|
||||
colortable["grey77"]= (196, 196, 196)
|
||||
colortable["gray78"]= (199, 199, 199)
|
||||
colortable["grey78"]= (199, 199, 199)
|
||||
colortable["gray79"]= (201, 201, 201)
|
||||
colortable["grey79"]= (201, 201, 201)
|
||||
colortable["gray80"]= (204, 204, 204)
|
||||
colortable["grey80"]= (204, 204, 204)
|
||||
colortable["gray81"]= (207, 207, 207)
|
||||
colortable["grey81"]= (207, 207, 207)
|
||||
colortable["gray82"]= (209, 209, 209)
|
||||
colortable["grey82"]= (209, 209, 209)
|
||||
colortable["gray83"]= (212, 212, 212)
|
||||
colortable["grey83"]= (212, 212, 212)
|
||||
colortable["gray84"]= (214, 214, 214)
|
||||
colortable["grey84"]= (214, 214, 214)
|
||||
colortable["gray85"]= (217, 217, 217)
|
||||
colortable["grey85"]= (217, 217, 217)
|
||||
colortable["gray86"]= (219, 219, 219)
|
||||
colortable["grey86"]= (219, 219, 219)
|
||||
colortable["gray87"]= (222, 222, 222)
|
||||
colortable["grey87"]= (222, 222, 222)
|
||||
colortable["gray88"]= (224, 224, 224)
|
||||
colortable["grey88"]= (224, 224, 224)
|
||||
colortable["gray89"]= (227, 227, 227)
|
||||
colortable["grey89"]= (227, 227, 227)
|
||||
colortable["gray90"]= (229, 229, 229)
|
||||
colortable["grey90"]= (229, 229, 229)
|
||||
colortable["gray91"]= (232, 232, 232)
|
||||
colortable["grey91"]= (232, 232, 232)
|
||||
colortable["gray92"]= (235, 235, 235)
|
||||
colortable["grey92"]= (235, 235, 235)
|
||||
colortable["gray93"]= (237, 237, 237)
|
||||
colortable["grey93"]= (237, 237, 237)
|
||||
colortable["gray94"]= (240, 240, 240)
|
||||
colortable["grey94"]= (240, 240, 240)
|
||||
colortable["gray95"]= (242, 242, 242)
|
||||
colortable["grey95"]= (242, 242, 242)
|
||||
colortable["gray96"]= (245, 245, 245)
|
||||
colortable["grey96"]= (245, 245, 245)
|
||||
colortable["gray97"]= (247, 247, 247)
|
||||
colortable["grey97"]= (247, 247, 247)
|
||||
colortable["gray98"]= (250, 250, 250)
|
||||
colortable["grey98"]= (250, 250, 250)
|
||||
colortable["gray99"]= (252, 252, 252)
|
||||
colortable["grey99"]= (252, 252, 252)
|
||||
colortable["gray100"]= (255, 255, 255)
|
||||
colortable["grey100"]= (255, 255, 255)
|
||||
colortable["dark"]= (169, 169, 169)
|
||||
colortable["DarkGrey"]= (169, 169, 169)
|
||||
colortable["dark"]= (169, 169, 169)
|
||||
colortable["DarkGray"]= (169, 169, 169)
|
||||
colortable["dark"]= (0, 0, 139)
|
||||
colortable["DarkBlue"]= (0, 0, 139)
|
||||
colortable["dark"]= (0, 139, 139)
|
||||
colortable["DarkCyan"]= (0, 139, 139)
|
||||
colortable["dark"]= (139, 0, 139)
|
||||
colortable["DarkMagenta"]= (139, 0, 139)
|
||||
colortable["dark"]= (139, 0, 0)
|
||||
colortable["DarkRed"]= (139, 0, 0)
|
||||
colortable["light"]= (144, 238, 144)
|
||||
colortable["LightGreen"]= (144, 238, 144)
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
#$Id: emcalculator.py,v 1.2 2006/05/16 04:34:07 kmura Exp $
|
||||
"""
|
||||
# ==================================================================
|
||||
# Python module
|
||||
#
|
||||
# Calculation of photon cross section and stopping power for
|
||||
# chared particles
|
||||
#
|
||||
# Q, 2005
|
||||
# ==================================================================
|
||||
"""
|
||||
from Geant4 import *
|
||||
|
||||
# ==================================================================
|
||||
# Photon Cross Section
|
||||
# ==================================================================
|
||||
def CalculatePhotonCrossSection(mat, elist, verbose=0,
|
||||
plist=["compt", "", "phot", "conv"]):
|
||||
"""
|
||||
Calculate photon cross section for a given material and
|
||||
a list of energy, returing a list of cross sections for
|
||||
the components of "Copmton scattering", "rayleigh scattering",
|
||||
"photoelectric effect", "pair creation" and total one.
|
||||
|
||||
Arguments:
|
||||
mat: material name
|
||||
elist: list of energy
|
||||
verbose: verbose level [0]
|
||||
plist: list of process name
|
||||
(compton/rayleigh/photoelectic/conversion) [StandardEM set]
|
||||
|
||||
Keys of index:
|
||||
"compt": Compton Scattering
|
||||
"rayleigh": Rayleigh Scattering
|
||||
"phot" : photoelectric effect
|
||||
"conv" : pair Creation
|
||||
"tot" : total
|
||||
|
||||
Example:
|
||||
xsec_list= CalculatePhotonCrossSection(...)
|
||||
value= xsec_list[energy_index]["compt"]
|
||||
"""
|
||||
if(verbose>0):
|
||||
print "-------------------------------------------------------------------"
|
||||
print " Photon Cross Section (", mat, ")"
|
||||
print "Energy Compton Raleigh Photo- Pair Total"
|
||||
print " Scattering Scattering electric Creation"
|
||||
print "(MeV) (cm2/g) (cm2/g) (cm2/g) (cm2/g) (cm2/g)"
|
||||
print "-------------------------------------------------------------------"
|
||||
|
||||
xsection_list= []
|
||||
for ekin in elist:
|
||||
xsec= {}
|
||||
xsec["compt"] \
|
||||
= gEmCalculator.ComputeCrossSectionPerVolume(ekin, "gamma", plist[0],
|
||||
mat) * cm2/g
|
||||
xsec["rayleigh"] \
|
||||
= gEmCalculator.ComputeCrossSectionPerVolume(ekin, "gamma", plist[1],
|
||||
mat) * cm2/g
|
||||
|
||||
xsec["phot"] \
|
||||
= gEmCalculator.ComputeCrossSectionPerVolume(ekin, "gamma", plist[2],
|
||||
mat) * cm2/g
|
||||
xsec["conv"] \
|
||||
= gEmCalculator.ComputeCrossSectionPerVolume(ekin, "gamma", plist[3],
|
||||
mat) * cm2/g
|
||||
|
||||
xsec["tot"]= xsec["compt"] + xsec["rayleigh"] + xsec["phot"] + xsec["conv"]
|
||||
|
||||
xsection_list.append((ekin, xsec))
|
||||
|
||||
if(verbose>0):
|
||||
print " %8.3e %8.3e %8.3e %8.3e %8.3e %8.3e" \
|
||||
% (ekin/MeV, xsec["compt"]/(cm2/g), xsec["rayleigh"]/(cm2/g),
|
||||
xsec["phot"]/(cm2/g), xsec["conv"]/(cm2/g), xsec["tot"]/(cm2/g))
|
||||
|
||||
return xsection_list
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# Stopping Power
|
||||
# ==================================================================
|
||||
def CalculateDEDX(part, mat, elist, verbose=0,
|
||||
plist=["eIoni", "eBrem", "muIoni", "muBrems", "hIoni"]):
|
||||
"""
|
||||
Calculate stopping powers for a give particle, material and
|
||||
a list of energy, returing stopping power for the components of
|
||||
"Ionization", "Radiation" and total one.
|
||||
|
||||
Arguments:
|
||||
part: particle name
|
||||
mat: material name
|
||||
elist: list of energy
|
||||
verbose: verbose level [0]
|
||||
plist: list of process name
|
||||
(electron ionization/electron brems/
|
||||
muon ionization/muon brems/hadron ionization) [StandardEM set]
|
||||
|
||||
Keys of index:
|
||||
"ioni": ionization
|
||||
"brems": Bremsstrahlung
|
||||
"tot": total
|
||||
|
||||
Example:
|
||||
dedx_list= CalculateDEDX(...)
|
||||
value= dedx_list[energy_index]["ioni"]
|
||||
"""
|
||||
if(verbose>0):
|
||||
print "------------------------------------------------------"
|
||||
print " Stopping Power (", part, ",", mat, ")"
|
||||
print " Energy Ionization Radiation Total"
|
||||
print " (MeV) (MeVcm2/g) (MeVcm2/g) (MeVcm2/g)"
|
||||
print "------------------------------------------------------"
|
||||
|
||||
procname_brems= ""
|
||||
procname_ioni= ""
|
||||
if ( part=="e+" or part=="e-" ):
|
||||
procname_ioni= plist[0]
|
||||
procname_brems= plist[1]
|
||||
elif ( part=="mu+" or part=="mu-"):
|
||||
procname_ioni= plist[2]
|
||||
procname_brems= plist[3]
|
||||
else:
|
||||
procname_ioni= plist[4]
|
||||
procname_brems= ""
|
||||
|
||||
dedx_list= []
|
||||
for ekin in elist:
|
||||
dedx= {}
|
||||
dedx["ioni"] \
|
||||
= gEmCalculator.ComputeDEDX(ekin, part, procname_ioni, mat) * MeV*cm2/g
|
||||
dedx["brems"] \
|
||||
= gEmCalculator.ComputeDEDX(ekin, part, procname_brems, mat) * MeV*cm2/g
|
||||
dedx["tot"]= dedx["ioni"]+ dedx["brems"]
|
||||
|
||||
if(verbose>0):
|
||||
print " %8.3e %8.3e %8.3e %8.3e" \
|
||||
% (ekin/MeV, dedx["ioni"]/(MeV*cm2/g),
|
||||
dedx["brems"]/(MeV*cm2/g), dedx["tot"]/(MeV*cm2/g) )
|
||||
|
||||
|
||||
dedx_list.append((ekin, dedx))
|
||||
|
||||
return dedx_list
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#$Id: g4thread.py,v 1.2 2006/04/25 08:09:45 kmura Exp $
|
||||
"""
|
||||
# ==================================================================
|
||||
# Python module
|
||||
#
|
||||
# Geant4 threading module
|
||||
#
|
||||
# Q, 2005
|
||||
# ==================================================================
|
||||
"""
|
||||
import thread
|
||||
from G4run import *
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# BeamOn in a new thread
|
||||
# ------------------------------------------------------------------
|
||||
def TBeamOn(self, nevent):
|
||||
"generate events in a thread"
|
||||
args= (nevent,)
|
||||
thread.start_new_thread(self.BeamOn, args)
|
||||
|
||||
G4RunManager.TBeamOn= TBeamOn
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#$Id: g4viscp.py,v 1.2 2006/04/25 08:09:45 kmura Exp $
|
||||
"""
|
||||
# ==================================================================
|
||||
# Python module
|
||||
#
|
||||
# Visualization Control Panel
|
||||
#
|
||||
# Q, 2005
|
||||
# ==================================================================
|
||||
"""
|
||||
from G4interface import *
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Scene
|
||||
# ------------------------------------------------------------------
|
||||
class G4Scene :
|
||||
"Scene"
|
||||
def __init__(self, aname, vol= "world", acopyno=0,
|
||||
amode=0, bmode=1):
|
||||
self.name= aname
|
||||
self.volume= vol
|
||||
self.copyno= acopyno
|
||||
self.mode_eventaction= amode # 0: accumulate / 1: refresh
|
||||
self.mode_runaction= bmode # 0: accumulate / 1: refresh
|
||||
self.mode= ("accumulate", "refresh")
|
||||
|
||||
def create_scene(self):
|
||||
ApplyUICommand("/vis/scene/create " + self.name)
|
||||
ApplyUICommand("/vis/scene/add/volume %s %d" %
|
||||
(self.volume, self.copyno))
|
||||
ApplyUICommand("/vis/scene/add/trajectories")
|
||||
self.update_scene()
|
||||
|
||||
def update_scene(self):
|
||||
ApplyUICommand("/vis/scene/select " + self.name)
|
||||
ApplyUICommand("/vis/sceneHandler/attach")
|
||||
ApplyUICommand("/vis/scene/endOfEventAction %s" %
|
||||
(self.mode[self.mode_eventaction]) )
|
||||
ApplyUICommand("/vis/scene/endOfRunAction %s" %
|
||||
(self.mode[self.mode_runaction]) )
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Visualization Control Panel
|
||||
# ------------------------------------------------------------------
|
||||
class G4VisCP :
|
||||
"G4 Visualization Control Panel"
|
||||
|
||||
def __init__(self, gsys="OGLIX"):
|
||||
self.gsystem= gsys
|
||||
self.scenelist= [G4Scene("default")]
|
||||
self.viewpoint= [270., 90.]
|
||||
|
||||
rc= ApplyUICommand("/vis/open " + gsys)
|
||||
if (rc != 0):
|
||||
return
|
||||
|
||||
self.scenelist[0].create_scene()
|
||||
ApplyUICommand("/vis/viewer/set/viewpointThetaPhi %f %f"
|
||||
% (self.viewpoint[0], self.viewpoint[1]) )
|
||||
ApplyUICommand("/tracking/storeTrajectory 1")
|
||||
|
||||
def add_scene(self, ascene):
|
||||
self.scenelist.append(ascene)
|
||||
|
||||
def select_scene(self, iscene):
|
||||
self.scenelist[iscene].update_scene()
|
||||
ApplyUICommand("/vis/viewer/set/viewpointThetaPhi %f %f"
|
||||
% (self.viewpoint[0], self.viewpoint[1]) )
|
||||
|
||||
Reference in New Issue
Block a user