CrossSections

Revision as of 04:20, 31 Jul 2006
222.239.177.185 (Talk | contribs)
http://www.la-ringtones.com
← Go to previous diff
Revision as of 07:15, 3 Aug 2006
213.131.7.83 (Talk | contribs)

Go to next diff →
Line 1: Line 1:
-<u style="display: none;">... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... no changes ... <a href='http://www.la-ringtones.com'>mp3 ringtones</a> : [http://www.la-ringtones.com real ringtones] - [HTTP://www.la-ringtones.com real ringtones] : [motorola ringtones|http://www.la-ringtones.com] - [motorola ringtones|HTTP://www.la-ringtones.com] : http://www.la-ringtones.com/tones/ : [[http://www.la-ringtones.com tracfone ringtones]] : [[http://www.la-ringtones.com | qwest ringtones]] : "nextel ringtones" http://www.la-ringtones.com : [http://www.la-ringtones.com|funny ringtones] </u>==Как построить графики сечений, используемых Geant'ом==+==Как построить графики сечений, используемых Geant'ом==
Этот вопрос, судя по форумам g4 на сайте ЦЕРН, будоражит многие умы. К сожалению, универсального метода извлечения сечений для конкретных процессов по всей видимости не существует (можно, конечно, смоделировать маленький опыт Резерфорда, но это не очень идеальный вариант). Однако, если вас интересуют сечения стандартных электромагнитных взаимодействий, то есть обнадеживающее обстоятельство. Классы этих процессов содержат статический метод <code>ComputeCrossSectionPerAtom</code>, который и даст необходимые сечения. Этот вопрос, судя по форумам g4 на сайте ЦЕРН, будоражит многие умы. К сожалению, универсального метода извлечения сечений для конкретных процессов по всей видимости не существует (можно, конечно, смоделировать маленький опыт Резерфорда, но это не очень идеальный вариант). Однако, если вас интересуют сечения стандартных электромагнитных взаимодействий, то есть обнадеживающее обстоятельство. Классы этих процессов содержат статический метод <code>ComputeCrossSectionPerAtom</code>, который и даст необходимые сечения.

Revision as of 07:15, 3 Aug 2006

Как построить графики сечений, используемых Geant'ом

Этот вопрос, судя по форумам g4 на сайте ЦЕРН, будоражит многие умы. К сожалению, универсального метода извлечения сечений для конкретных процессов по всей видимости не существует (можно, конечно, смоделировать маленький опыт Резерфорда, но это не очень идеальный вариант). Однако, если вас интересуют сечения стандартных электромагнитных взаимодействий, то есть обнадеживающее обстоятельство. Классы этих процессов содержат статический метод ComputeCrossSectionPerAtom, который и даст необходимые сечения.

Вот код программы, которая создает 100 файлов, в которых содержатся сечения в барнах для энергий 0—10 MeV.

#include "G4Material.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"

#include "globals.hh"
#include "G4UnitsTable.hh"
#include <string.h>
#include <fstream>
#include "main.hh"
using namespace std;

struct material {
	int z;
	G4Material *g4mat;
};
const double dm3=1000*cm3;
int doall() {
 
	G4UnitDefinition::BuildUnitsTable(); 

	material mats[100];
	mats[0].z=1;mats[0].g4mat=new G4Material
			    ("Hydrogen", 1, 1.00794*g/mole, 0.08988*g/dm3);
	mats[1].z=2; mats[1].g4mat=new G4Material
			     ("Helium", 2, 4.002602*g/mole, 0.1785*g/dm3);
	mats[2].z=3; mats[2].g4mat=new G4Material
			     ("Lithium", 3, 6.941*g/mole, 0.534*g/cm3);
	mats[3].z=4; mats[3].g4mat=new G4Material
			     ("Beryllium", 4, 9.012182*g/mole, 1.848*g/cm3);
	mats[4].z=5; mats[4].g4mat=new G4Material
			     ("Boron", 5, 10.811*g/mole, 2.37*g/cm3);
	mats[5].z=6; mats[5].g4mat=new G4Material
			     ("Carbon", 6, 12.01115*g/mole, 1.8*g/cm3);
	mats[6].z=7; mats[6].g4mat=new G4Material
			     ("Nitrogen", 7, 14.00674*g/mole, 0.8081*g/cm3);
	mats[7].z=8; mats[7].g4mat=new G4Material
			     ("Oxygen", 8, 15.9994*g/mole, 1.429*g/dm3);
	mats[8].z=9; mats[8].g4mat=new G4Material
			     ("Flourine", 9, 18.9984032*g/mole, 1.69*g/dm3);
	mats[9].z=10; mats[9].g4mat=new G4Material
			      ("Neon", 10, 20.1797*g/mole, 0.899*g/dm3);
	mats[10].z=11; mats[10].g4mat=new G4Material
			       ("Sodium", 11, 22.989768*g/mole, 0.971*g/cm3);
	mats[11].z=12; mats[11].g4mat=new G4Material
			       ("Magnesium", 12, 24.3050*g/mole, 1.783*g/cm3);
	mats[12].z=13; mats[12].g4mat=new G4Material
			       ("Aluminium", 13, 26.981539*g/mole, 2.6989*g/cm3);
	mats[13].z=14; mats[13].g4mat=new G4Material
			       ("Silicon", 14, 28.0855*g/mole, 2.33*g/cm3);
	mats[14].z=15; mats[14].g4mat=new G4Material
			       ("Phosphorus", 15, 30.973762*g/mole, 1.82*g/cm3);
	mats[15].z=16; mats[15].g4mat=new G4Material
			       ("Sulphur", 16, 32.066*g/mole, 1.957*g/cm3);
	mats[16].z=17; mats[16].g4mat=new G4Material
			       ("Chlorine", 17, 35.4527*g/mole, 3.214*g/dm3);
	mats[17].z=18; mats[17].g4mat=new G4Material
			       ("Argon", 18, 39.948*g/mole, 1.783*g/dm3);
	mats[18].z=19; mats[18].g4mat=new G4Material
			       ("Potassium", 19, 39.0983*g/mole, 0.862*g/cm3);
	mats[19].z=20; mats[19].g4mat=new G4Material
			       ("Calcium", 20, 40.078*g/mole, 1.55*g/cm3);
	mats[20].z=21; mats[20].g4mat=new G4Material
			       ("Scandium", 21, 44.955910*g/mole, 2.989*g/cm3);
	mats[21].z=22; mats[21].g4mat=new G4Material
			       ("Titanium", 22, 47.88*g/mole, 4.54*g/cm3);
	mats[22].z=23; mats[22].g4mat=new G4Material
			       ("Vanadium", 23, 50.9415*g/mole, 6.11*g/cm3);
	mats[23].z=24; mats[23].g4mat=new G4Material
			       ("Chromium", 24, 51.9961*g/mole, 7.14*g/cm3);
	mats[24].z=25; mats[24].g4mat=new G4Material
			       ("Manganese", 25, 54.93805*g/mole, 7.44*g/cm3);
	mats[25].z=26; mats[25].g4mat=new G4Material
			       ("Iron", 26, 55.847*g/mole, 7.874*g/cm3);
	mats[26].z=27; mats[26].g4mat=new G4Material
			       ("Cobalt", 27, 58.93320*g/mole, 8.9*g/cm3);
	mats[27].z=28; mats[27].g4mat=new G4Material
			       ("Nickel", 28, 58.6934*g/mole, 8.902*g/cm3);
	mats[28].z=29; mats[28].g4mat=new G4Material
			       ("Copper", 29, 63.546*g/mole, 8.96*g/cm3);
	mats[29].z=30; mats[29].g4mat=new G4Material
			       ("Zinc", 30, 65.39*g/mole, 7.133*g/cm3);
	mats[30].z=31; mats[30].g4mat=new G4Material
			       ("Gallium", 31, 69.723*g/mole, 6.095*g/cm3);
	mats[31].z=32; mats[31].g4mat=new G4Material
			       ("Germanium", 32, 72.61*g/mole, 5.323*g/cm3);
	mats[32].z=33; mats[32].g4mat=new G4Material
			       ("Arsenic", 33, 74.92159*g/mole, 5.727*g/cm3);
	mats[33].z=34; mats[33].g4mat=new G4Material
			       ("Selenium", 34, 78.96*g/mole, 4.28*g/cm3);
	mats[34].z=35; mats[34].g4mat=new G4Material
			       ("Bromine", 35, 79.904*g/mole, 3.119*g/cm3);
	mats[35].z=36; mats[35].g4mat=new G4Material
			       ("Krypton", 36, 83.80*g/mole, 3.73*g/dm3);
	mats[36].z=37; mats[36].g4mat=new G4Material
			       ("Rubidium", 37, 85.4678*g/mole, 1.532*g/cm3);
	mats[37].z=38; mats[37].g4mat=new G4Material
			       ("Strontium", 38, 87.62*g/mole, 2.54*g/cm3);
	mats[38].z=39; mats[38].g4mat=new G4Material
			       ("Yttrium", 39, 88.90585*g/mole, 4.469*g/cm3);
	mats[39].z=40; mats[39].g4mat=new G4Material
			       ("Zirconium", 40, 91.224*g/mole, 6.506*g/cm3);
	mats[40].z=41; mats[40].g4mat=new G4Material
			       ("Niobium", 41, 92.90638*g/mole, 8.57*g/cm3);
	mats[41].z=42; mats[41].g4mat=new G4Material
			       ("Molybdenum", 42, 95.94*g/mole, 10.22*g/cm3);
	mats[42].z=43; mats[42].g4mat=new G4Material
			       ("Technetium", 43,
				(98.9063)*g/mole,
				(11.50)*g/cm3);
	mats[43].z=44; mats[43].g4mat=new G4Material
			       ("Ruthenium", 44, 101.07*g/mole, 12.41*g/cm3);
	mats[44].z=45; mats[44].g4mat=new G4Material
			       ("Rhodium", 45, 102.90550*g/mole, 12.41*g/cm3);
	mats[45].z=46; mats[45].g4mat=new G4Material
			       ("Palladium", 46, 106.42*g/mole, 12.02*g/cm3);
	mats[46].z=47; mats[46].g4mat=new G4Material
			       ("Silver", 47, 107.8682*g/mole, 10.49*g/cm3);
	mats[47].z=48; mats[47].g4mat=new G4Material
			       ("Cadmium", 48, 112.411*g/mole, 8.642*g/cm3);
	mats[48].z=49; mats[48].g4mat=new G4Material
			       ("Indium", 49, 114.818*g/mole, 7.31*g/cm3);
	mats[49].z=50; mats[49].g4mat=new G4Material
			       ("Tin", 50, 118.710*g/mole, 7.31*g/cm3);
	mats[50].z=51; mats[50].g4mat=new G4Material
			       ("Antimony", 51, 121.757*g/mole, 6.697*g/cm3);
	mats[51].z=52; mats[51].g4mat=new G4Material
			       ("Tellurium", 52, 127.60*g/mole, 6.24*g/cm3);
	mats[52].z=53; mats[52].g4mat=new G4Material
			       ("Iodine", 53, 126.90447*g/mole, 4.93*g/cm3);
	mats[53].z=54; mats[53].g4mat=new G4Material
			       ("Xenon", 54, 131.29*g/mole, 5.887*g/dm3);
	mats[54].z=55; mats[54].g4mat=new G4Material
			       ("Caesium", 55, 132.90543*g/mole, 1.873*g/cm3);
	mats[55].z=56; mats[55].g4mat=new G4Material
			       ("Barium", 56, 137.327*g/mole, 3.51*g/cm3);
	mats[56].z=57; mats[56].g4mat=new G4Material
			       ("Lanthanum", 57, 138.9055*g/mole, 6.145*g/cm3);
	mats[57].z=72; mats[57].g4mat=new G4Material
			       ("Hafnium", 72, 178.49*g/mole, 13.28*g/cm3);
	mats[58].z=73; mats[58].g4mat=new G4Material
			       ("Tantalum", 73, 180.9479*g/mole, 16.654*g/cm3);
	mats[59].z=74; mats[59].g4mat=new G4Material
			       ("Tungsten", 74, 183.84*g/mole, 19.35*g/cm3);
	mats[60].z=75; mats[60].g4mat=new G4Material
			       ("Rhenium", 75, 186.207*g/mole, 21.02*g/cm3);
	mats[61].z=76; mats[61].g4mat=new G4Material
			       ("Osmium", 76, 190.23*g/mole, 22.57*g/cm3);
	mats[62].z=77; mats[62].g4mat=new G4Material
			       ("Iridium", 77, 192.22*g/mole, 22.421*g/cm3);
	mats[63].z=78; mats[63].g4mat=new G4Material
			       ("Platinum", 78, 195.08*g/mole, 21.45*g/cm3);
	mats[64].z=79; mats[64].g4mat=new G4Material
			       ("Gold", 79, 196.96654*g/mole, 19.3*g/cm3);
	mats[65].z=80; mats[65].g4mat=new G4Material
			       ("Mercury", 80, 200.59*g/mole, 13.546*g/cm3);
	mats[66].z=81; mats[66].g4mat=new G4Material
			       ("Thallium", 81, 204.3833*g/mole, 11.85*g/cm3);
	mats[67].z=82; mats[67].g4mat=new G4Material
			       ("Lead", 82, 207.2*g/mole, 11.3437*g/cm3);
	mats[68].z=83; mats[68].g4mat=new G4Material
			       ("Bismuth", 83, 208.98037*g/mole, 9.747*g/cm3);
	mats[69].z=84; mats[69].g4mat=new G4Material
			       ("Polonium", 84,
				(209.9828)*g/mole, 9.32*g/cm3);
	mats[70].z=86; mats[70].g4mat=new G4Material
			       ("Radon", 86,
				(222.0176)*g/mole, 9.73*g/dm3);
	mats[71].z=87; mats[71].g4mat=new G4Material
			       ("Francium", 87,
				(223.0197)*g/mole, 1.87*g/cm3);
	mats[72].z=88; mats[72].g4mat=new G4Material
			       ("Radium", 88,
				(226.0254)*g/mole, 5.5*g/cm3);
	mats[73].z=89; mats[73].g4mat=new G4Material
			       ("Actinium", 89,
				(227.0278)*g/mole, 10.07*g/cm3);
	mats[74].z=58; mats[74].g4mat=new G4Material
			       ("Cerium", 58, 140.115*g/mole, 6.773*g/cm3);
	mats[75].z=59; mats[75].g4mat=new G4Material
			       ("Praseodymium", 59, 140.90765*g/mole, 6.773*g/cm3);
	mats[76].z=60; mats[76].g4mat=new G4Material
			       ("Neodymium", 60, 144.24*g/mole, 7.008*g/cm3);
	mats[77].z=61; mats[77].g4mat=new G4Material
			       ("Promethium", 61,
				(144.9127)*g/mole, 7.26*g/cm3);
	mats[78].z=62; mats[78].g4mat=new G4Material
			       ("Samarium", 62, 150.36*g/mole, 7.520*g/cm3);
	mats[79].z=63; mats[79].g4mat=new G4Material
			       ("Europium", 63, 151.965*g/mole, 5.244*g/cm3);
	mats[80].z=64; mats[80].g4mat=new G4Material
			       ("Gadolinium", 64, 157.25*g/mole, 7.901*g/cm3);
	mats[81].z=65; mats[81].g4mat=new G4Material
			       ("Terbium", 65, 158.92534*g/mole, 8.230*g/cm3);
	mats[82].z=66; mats[82].g4mat=new G4Material
			       ("Dysprosium", 66, 162.50*g/mole, 8.551*g/cm3);
	mats[83].z=67; mats[83].g4mat=new G4Material
			       ("Holmium", 67, 164.93032*g/mole, 8.795*g/cm3);
	mats[84].z=68; mats[84].g4mat=new G4Material
			       ("Erbium", 68, 167.26*g/mole, 9.066*g/cm3);
	mats[85].z=69; mats[85].g4mat=new G4Material
			       ("Thulium", 69, 168.93421*g/mole, 9.321*g/cm3);
	mats[86].z=70; mats[86].g4mat=new G4Material
			       ("Ytterbium", 70, 173.04*g/mole, 6.966*g/cm3);
	mats[87].z=71; mats[87].g4mat=new G4Material
			       ("Lutetium", 71, 174.967*g/mole, 9.841*g/cm3);
	mats[88].z=90; mats[88].g4mat=new G4Material
			       ("Thorium", 90, 232.0381*g/mole, 11.72*g/cm3);
	mats[89].z=91; mats[89].g4mat=new G4Material
			       ("Protactinium", 91,
				(231.03588)*g/mole, 15.37*g/cm3);
	mats[90].z=92; mats[90].g4mat=new G4Material
			       ("Uranium", 92, 238.0508*g/mole, 18.05*g/cm3);
	mats[91].z=93; mats[91].g4mat=new G4Material
			       ("Neptunium", 93,
				(237.0482)*g/mole, 20.25*g/cm3);
	mats[92].z=94; mats[92].g4mat=new G4Material
			       ("Plutonium", 94,
				(244.0642)*g/mole, 19.84*g/cm3);
	mats[93].z=95; mats[93].g4mat=new G4Material
			       ("Americium", 95,
				(243.0614)*g/mole, 13.67*g/cm3);
	mats[94].z=96; mats[94].g4mat=new G4Material
			       ("Curium", 96,
				(247.0703)*g/mole, 13.51*g/cm3);
	mats[95].z=97; mats[95].g4mat=new G4Material
			       ("Berkelium", 97, (247.0703)*g/mole, 14*g/cm3);
		
	// initialise processes
	//
	G4PhotoElectricEffect* phot = new G4PhotoElectricEffect();
	G4ComptonScattering*   comp = new G4ComptonScattering();
	G4GammaConversion*     conv = new G4GammaConversion(); 

	// print cross section per atom
	//
	G4double Emin = 5*keV, Emax = 10*MeV, dE = 10*keV;
	material *iter = mats;
	double Z;
	for(int i=0; i<96; i++) {
		char buf[100];
		sprintf(buf, "%02d.txt", mats[i].z);
		Z = mats[i].z;
		ofstream file(buf);
		for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
			file << Energy/MeV << " " <<
				comp->ComputeCrossSectionPerAtom(Energy,Z)/barn +
	 			phot->ComputeCrossSectionPerAtom(Energy,Z)/barn + 
				conv->ComputeCrossSectionPerAtom(Energy,Z)/barn
			     << endl;
		}
	} 

	return EXIT_SUCCESS;
}

Для работы потребовалось определить все элементы, задействованные в вычислениях, т. к. это необходимо для работы G4PhotoElectricProcess.

Edit page