Detector Description Materials http geant 4 cern ch

  • Slides: 20
Download presentation
Detector Description - Materials http: //geant 4. cern. ch

Detector Description - Materials http: //geant 4. cern. ch

PART I Geant 4 system of units

PART I Geant 4 system of units

System of Units (1) n Geant 4 has no default unit. To give a

System of Units (1) n Geant 4 has no default unit. To give a number, unit must be “multiplied” to the number. n for example: G 4 double width = 12. 5*m; G 4 double density = 2. 7*g/cm 3; n n n If no unit is specified, the internal G 4 unit will be used, but this is discouraged! Almost all commonly used units are available. The user can define new units. Refer to CLHEP: System. Of. Units. h Divide a variable by a unit you want to get: G 4 cout << d. E/Me. V << “ (Me. V)” << G 4 endl; 3

System of Units (2) n System of units are defined in CLHEP, based on:

System of Units (2) n System of units are defined in CLHEP, based on: n n n millimetre (mm), nanosecond (ns), Mega-e. V (Me. V), positron charge (eplus) degree Kelvin (kelvin), the amount of substance (mole), luminous intensity (candela), radian (radian), steradian (steradian) All other units are computed from the basic ones In output, Geant 4 can choose the most appropriate unit to use. Just specify the category for the data (Length, Time, Energy, etc…): G 4 cout << G 4 Best. Unit(Step. Size, “Length”); Step. Size will be printed in km, m, mm or … fermi, depending on its value 4

System of Units (3) n New units can be defined directly as constants, or

System of Units (3) n New units can be defined directly as constants, or (suggested way) via G 4 Unit. Definition n n Example (mass thickness): n n n G 4 Unit. Definition ( name, symbol, category, value ) G 4 Unit. Definition (“grammpercm 2”, “g/cm 2”, “Mass. Thickness”, g/cm 2); The new category “Mass. Thickness” will be registered in the kernel in G 4 Units. Table To print the list of units: n n From the code G 4 Unit. Definition: : Print. Units. Table(); At run-time, as UI command: Idle> /units/list 5

PART II Definition of materials and compounds

PART II Definition of materials and compounds

Definition of Materials n Different kinds of materials can be defined: n n n

Definition of Materials n Different kinds of materials can be defined: n n n isotopes elements molecules compounds <> G 4 Isotope <> G 4 Element <> G 4 Material and mixtures <> G 4 Material Attributes associated to materials: n density (mandatory), temperature, pressure, state (liquid, gas, etc. ) 7

Isotopes, Elements and Materials n G 4 Isotope and G 4 Element describe the

Isotopes, Elements and Materials n G 4 Isotope and G 4 Element describe the properties of the nuclei and atoms: n n Atomic number, number of nucleons, mass of a mole, shell energies, etc. . . Cross-sections per atoms, etc… Elements are possibly built up by isotopes G 4 Material describes the macroscopic properties of the matter: n n n temperature, pressure, state, density Radiation length, absorption length, etc… Materials are built up by elements 8

G 4 Elements (1) n Isotopes can be assembled into elements G 4 Isotope

G 4 Elements (1) n Isotopes can be assembled into elements G 4 Isotope (const G 4 String& G 4 int G 4 double n name, z, // number of atoms n, // number of nucleons a ); // mass of mole … building elements as follows: G 4 Element (const G 4 String& name, const G 4 String& symbol, // element symbol G 4 int n. Iso ); // # of isotopes G 4 Element: : Add. Isotope(G 4 Isotope* iso, // isotope G 4 double rel. Abund); // relative abundance 9

G 4 Elements (2) n Alternatively, if the element under consideration has the natural

G 4 Elements (2) n Alternatively, if the element under consideration has the natural isotopic abundance, it can be defined using: G 4 Element(const G 4 String& name, //its name const G 4 String& symbol, //its symbol G 4 double Zeff, //atomic number G 4 double Aeff); //mass of mole n For instance: G 4 Element* el. Oxygen = new G 4 Element("Oxygen", symbol="O", z=8. , a=16*g/mole); 10

G 4 Elements (3) n Elements can also be defined using the internal Geant

G 4 Elements (3) n Elements can also be defined using the internal Geant 4 database: #include "G 4 Nist. Manager. hh" [. . . ] G 4 Nist. Manager* man = G 4 Nist. Manager: : Instance(); // define elements G 4 Element* el. Carbon = man->Find. Or. Build. Element("C"); n To print information on a costituent element: G 4 cout << el. Carbon << G 4 endl; 11

Material: single element n Single-element materials can be defined in a quick way as

Material: single element n Single-element materials can be defined in a quick way as follows: G 4 double density = 1. 390*g/cm 3; G 4 double a = 39. 95*g/mole; G 4 Material* l. Ar = new G 4 Material("liquid. Argon", z=18. , a, density); n n Materials composed by many elements (molecules or compounds) have to be defined through their constituent elements Prefer low-density material to vacuum 12

Material: molecule define elements n A Molecule is made of several elements (composition by

Material: molecule define elements n A Molecule is made of several elements (composition by number of atoms): a = 1. 01*g/mole; G 4 Element* el. H = new G 4 Element("Hydrogen", symbol="H", z=1. , a); a = 16. 00*g/mole; G 4 Element* el. O = new G 4 Element("Oxygen", symbol="O", z=8. , a); density = 1. 000*g/cm 3; G 4 Material* H 2 O = new G 4 Material("Water", density, ncomp=2); H 2 O->Add. Element(el. H, natoms=2); H 2 O->Add. Element(el. O, natoms=1); number of components 13

Material: compound define elements n Compound, made by several elements: composition by fraction of

Material: compound define elements n Compound, made by several elements: composition by fraction of mass a = 14. 01*g/mole; G 4 Element* el. N = new G 4 Element(name="Nitrogen", symbol="N", z= 7. , a); a = 16. 00*g/mole; G 4 Element* el. O = new G 4 Element(name="Oxygen", symbol="O", z= 8. , a); density = 1. 290*mg/cm 3; G 4 Material* Air = new G 4 Material(name="Air", density, ncomponents=2); Air->Add. Element(el. N, 70. 0*per. Cent); Air->Add. Element(el. O, 30. 0*per. Cent); number of components 14

Material: mixture n Composition of compound materials G 4 Element* el. C = …;

Material: mixture n Composition of compound materials G 4 Element* el. C = …; G 4 Material* Si. O 2 = …; G 4 Material* H 2 O = …; // define “carbon” element // define “quartz” material // define “water” material density = 0. 200*g/cm 3; G 4 Material* Aerog = new G 4 Material("Aerogel", density, ncomponents=3); Aerog->Add. Material(Si. O 2, fractionmass=62. 5*per. Cent); Aerog->Add. Material(H 2 O , fractionmass=37. 4*per. Cent); Aerog->Add. Element(el. C , fractionmass= 0. 1*per. Cent); n Mixtures could also be defined using their elemental mass composition (as described in the previous slide) 15

Material: NIST database n Materials can also be defined using the internal Geant 4

Material: NIST database n Materials can also be defined using the internal Geant 4 database, based on NIST. #include "G 4 Nist. Manager. hh" G 4 Nist. Manager* man = G 4 Nist. Manager: : Instance(); // define pure NIST materials G 4 Material* Cu = man->Find. Or. Build. Material("G 4_Cu"); // define NIST materials G 4 Material* H 2 O = man->Find. Or. Build. Material("G 4_WATER"); n The list of available material names is extended permanently. It can be accessed at run-time: Idle> /material/nist/list. Materials all or from the code G 4 Nist. Manager: : Instance()->List. Materials(“all”); 16

PART III A few examples and information

PART III A few examples and information

Example: define a gas n It may be necessary to specify temperature and pressure

Example: define a gas n It may be necessary to specify temperature and pressure (d. E/dx computation affected). For density <10 mg/cm 3 the material is automatically considered a gas (k. State. Gas) G 4 double density = 27. *mg/cm 3; G 4 double temperature = 325. *kelvin; G 4 double pressure = 50. *atmosphere; G 4 Material* CO 2 = new G 4 Material(“Carbonic. Gas", density, ncomponents=2 k. State. Gas, temperature, pressure); CO 2 ->Add. Element(C, natoms = 1); CO 2 ->Add. Element(O, natoms = 2); 18

Example: define “vacuum” n Absolute vacuum does not exist. It is a gas at

Example: define “vacuum” n Absolute vacuum does not exist. It is a gas at very low density (e. g. transparent to particles being tracked) Cannot define materials with r = 0 G 4 double atomic. Number = 1. ; G 4 double mass. Of. Mole = 1. 008*g/mole; G 4 double density = 1. e-25*g/cm 3; G 4 double temperature = 2. 73*kelvin; G 4 double pressure = 3. e-18*pascal; G 4 Material* Vacuum = new G 4 Material(“inter. Galactic", atomic. Number, mass. Of. Mole, density, k. State. Gas, temperature, pressure); 19

Print material information n To print information on a given user-defined G 4 Material:

Print material information n To print information on a given user-defined G 4 Material: G 4 cout << Air << G 4 endl; or at run-time via the UI command Idle> /material/g 4/print. Material material. Name n To print the full list of user-defined materials: G 4 cout << *(G 4 Material: : Get. Material. Table()) << G 4 endl; 20