| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.6. Physics Table</title><link rel="stylesheet" href="../xml/XSLCustomizationLayer/G4HTMLStylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" href="index.html" title="Geant4 User's Guide for Application Developers"><link rel="up" href="ch05.html" title="Chapter 5. Tracking and Physics"><link rel="prev" href="ch05s05.html" title="5.5. Cuts per Region"><link rel="next" href="ch05s07.html" title="5.7. User Limits"><script language="JavaScript">
|
|---|
| 2 | function remote_win(fName)
|
|---|
| 3 | {
|
|---|
| 4 | var url = "AllResources/Detector/geometry.src/" + fName;
|
|---|
| 5 | RemoteWin=window.open(url,"","resizable=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,width=520,height=520")
|
|---|
| 6 | RemoteWin.creator=self
|
|---|
| 7 | }
|
|---|
| 8 | </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">5.6.
|
|---|
| 9 | Physics Table
|
|---|
| 10 | </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch05s05.html"><img src="AllResources/IconsGIF/prev.gif" alt="Prev"></a> </td><th width="60%" align="center">Chapter 5.
|
|---|
| 11 | Tracking and Physics
|
|---|
| 12 | </th><td width="20%" align="right"> <a accesskey="n" href="ch05s07.html"><img src="AllResources/IconsGIF/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sect.PhysTab"></a>5.6.
|
|---|
| 13 | Physics Table
|
|---|
| 14 | </h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.PhysTab.Gene"></a>5.6.1.
|
|---|
| 15 | General Concepts
|
|---|
| 16 | </h3></div></div></div><p>
|
|---|
| 17 | In Geant4, physics processes use many tables of cross sections,
|
|---|
| 18 | energy losses and other physics values. Before the execution of an
|
|---|
| 19 | event loop, the <code class="literal">BuildPhysicsTable()</code> method of
|
|---|
| 20 | <span class="emphasis"><em>G4VProcess</em></span> is invoked for all processes and
|
|---|
| 21 | cross section tables are prepared. "Standard" electromagnetic
|
|---|
| 22 | processes calculate cross section and/or energy loss values for
|
|---|
| 23 | each material and for each production cut value assigned to each
|
|---|
| 24 | material. A change in production cut values therefore require these
|
|---|
| 25 | cross sections to be re-calculated. Cross sections for hadronic
|
|---|
| 26 | processes do not depend on the production cut.
|
|---|
| 27 | </p><p>
|
|---|
| 28 | The <span class="emphasis"><em>G4PhysicsTable</em></span> class is used to handle cross section
|
|---|
| 29 | tables. <span class="emphasis"><em>G4PhysicsTable</em></span> is a collection of instances of
|
|---|
| 30 | <span class="emphasis"><em>G4PhysicsVector</em></span> (and derived classes), each of which has
|
|---|
| 31 | cross section values for a particle within a given energy range
|
|---|
| 32 | traveling in a material.
|
|---|
| 33 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.PhysTab.MateCoup"></a>5.6.2.
|
|---|
| 34 | Material-Cuts Couple
|
|---|
| 35 | </h3></div></div></div><p>
|
|---|
| 36 | Users can assign different production cuts to different regions
|
|---|
| 37 | (see <a href="ch05s05.html" title="5.5.
|
|---|
| 38 | Cuts per Region
|
|---|
| 39 | ">Section 5.5</a>).
|
|---|
| 40 | This means that if the same material is used in regions with different
|
|---|
| 41 | cut values, the processes need to prepare several different cross
|
|---|
| 42 | sections for that material.
|
|---|
| 43 | </p><p>
|
|---|
| 44 | The <span class="emphasis"><em>G4ProductionCutsTable</em></span> has
|
|---|
| 45 | <span class="emphasis"><em>G4MaterialCutsCouple</em></span>
|
|---|
| 46 | objects, each of which consists of a material paired with a cut
|
|---|
| 47 | value. These <span class="emphasis"><em>G4MaterialCutsCouple</em></span>s are numbered with an
|
|---|
| 48 | index which is the same as the index of a <span class="emphasis"><em>G4PhysicsVector</em></span>
|
|---|
| 49 | for the corresponding <span class="emphasis"><em>G4MaterialCutsCouple</em></span>in the
|
|---|
| 50 | <span class="emphasis"><em>G4PhysicsTable</em></span>. The list of
|
|---|
| 51 | <span class="emphasis"><em>MaterialCutsCouple</em></span>s used
|
|---|
| 52 | in the current geometry setup is updated before starting the event
|
|---|
| 53 | loop in each run.
|
|---|
| 54 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.PhysTab.Fio"></a>5.6.3.
|
|---|
| 55 | File I/O for the Physics Table
|
|---|
| 56 | </h3></div></div></div><p>
|
|---|
| 57 | Calculated physics tables for "Standard" electromagnetic processes
|
|---|
| 58 | can be stored in files. The user may thus eliminate the time
|
|---|
| 59 | required for the calculation of physics tables by retrieving them
|
|---|
| 60 | from the files.
|
|---|
| 61 | </p><p>
|
|---|
| 62 | Using the built-in user command "<span class="bold"><strong>storePhysicsTable</strong></span>"
|
|---|
| 63 | (see <a href="ch07.html#sect.BuiltinCom" title="7.1.
|
|---|
| 64 | Built-in Commands
|
|---|
| 65 | ">Section 7.1</a>),
|
|---|
| 66 | stores physics tables in files. Information on materials and
|
|---|
| 67 | cuts defined in the current geometry setup are stored together with
|
|---|
| 68 | physics tables because calculated values in the physics tables
|
|---|
| 69 | depend on <span class="emphasis"><em>MaterialCutsCouple</em></span>. Note that physics tables are
|
|---|
| 70 | calculated before the event loop, not in the initialization phase.
|
|---|
| 71 | So, at least one event must be executed before using the
|
|---|
| 72 | "<span class="bold"><strong>storePhysicsTable</strong></span>" command.
|
|---|
| 73 | </p><p>
|
|---|
| 74 | Calculated physics tables can be retrieved from files by using
|
|---|
| 75 | the "<span class="bold"><strong>retrievePhysicsTable</strong></span>" command. Materials
|
|---|
| 76 | and cuts from files are compared with those defined in the current geometry
|
|---|
| 77 | setup, and only physics vectors corresponding to the
|
|---|
| 78 | <span class="emphasis"><em>MaterialCutsCouple</em></span>s used in the current setup are restored.
|
|---|
| 79 | Note that nothing happens just after the
|
|---|
| 80 | "<span class="bold"><strong>retrievePhysicsTable</strong></span>" command is issued.
|
|---|
| 81 | Restoration of physics tables will be executed in parallel with the calculation
|
|---|
| 82 | of physics tables.
|
|---|
| 83 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.PhysTab.Build"></a>5.6.4.
|
|---|
| 84 | Building the Physics Table
|
|---|
| 85 | </h3></div></div></div><p>
|
|---|
| 86 | In the <code class="literal">G4RunManagerKernel::RunInitialization()</code> method,
|
|---|
| 87 | after the list of <span class="emphasis"><em>MaterialCutsCouple</em></span>s is updated, the
|
|---|
| 88 | <code class="literal">G4VUserPhysicsList::BuildPhysicsTable()</code> method is invoked
|
|---|
| 89 | to build physics tables for all processes.
|
|---|
| 90 | </p><p>
|
|---|
| 91 | Initially, the <code class="literal">G4VProcess::PreparePhysicsTable()</code> method
|
|---|
| 92 | is invoked. Each process creates <span class="emphasis"><em>G4PhysicsTable</em></span> objects as
|
|---|
| 93 | necessary. It then checks whether the <span class="emphasis"><em>MaterialCutsCouple</em></span>s
|
|---|
| 94 | have been modified after a run to determine if the corresponding
|
|---|
| 95 | physics vectors can be used in the next run or need to be
|
|---|
| 96 | re-calculated.
|
|---|
| 97 | </p><p>
|
|---|
| 98 | Next, the <code class="literal">G4VProcess::RetrievePhysicsTable()</code> method is
|
|---|
| 99 | invoked if the <code class="literal">G4VUserPhysicsList::fRetrievePhysicsTable</code>
|
|---|
| 100 | flag is asserted. After checking materials and cuts in files,
|
|---|
| 101 | physics vectors corresponding to the <span class="emphasis"><em>MaterialCutsCouple</em></span>s
|
|---|
| 102 | used in the current setup are restored.
|
|---|
| 103 | </p><p>
|
|---|
| 104 | Finally, the <code class="literal">G4VProcess::BuildPhysicsTable()</code> method is
|
|---|
| 105 | invoked and only physics vectors which need to be re-calculated are
|
|---|
| 106 | built.
|
|---|
| 107 | </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch05s05.html"><img src="AllResources/IconsGIF/prev.gif" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="ch05.html"><img src="AllResources/IconsGIF/up.gif" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch05s07.html"><img src="AllResources/IconsGIF/next.gif" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">5.5.
|
|---|
| 108 | Cuts per Region
|
|---|
| 109 | </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="AllResources/IconsGIF/home.gif" alt="Home"></a></td><td width="40%" align="right" valign="top"> 5.7.
|
|---|
| 110 | User Limits
|
|---|
| 111 | </td></tr></table></div></body></html>
|
|---|