| 1 | <!-- ******************************************************** -->
|
|---|
| 2 | <!-- -->
|
|---|
| 3 | <!-- [History] -->
|
|---|
| 4 | <!-- Created by: Hisaya Kurashige, 2-Dec-2004 -->
|
|---|
| 5 | <!-- Converted to DocBook: Katsuya Amako, Aug-2006 -->
|
|---|
| 6 | <!-- -->
|
|---|
| 7 | <!-- ******************************************************** -->
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 | <!-- ******************* Section (Level#1) ****************** -->
|
|---|
| 11 | <sect1 id="sect.PhysTab">
|
|---|
| 12 | <title>
|
|---|
| 13 | Physics Table
|
|---|
| 14 | </title>
|
|---|
| 15 |
|
|---|
| 16 | <!-- ******************* Section (Level#2) ****************** -->
|
|---|
| 17 | <sect2 id="sect.PhysTab.Gene">
|
|---|
| 18 | <title>
|
|---|
| 19 | General Concepts
|
|---|
| 20 | </title>
|
|---|
| 21 |
|
|---|
| 22 | <para>
|
|---|
| 23 | In Geant4, physics processes use many tables of cross sections,
|
|---|
| 24 | energy losses and other physics values. Before the execution of an
|
|---|
| 25 | event loop, the <literal>BuildPhysicsTable()</literal> method of
|
|---|
| 26 | <emphasis>G4VProcess</emphasis> is invoked for all processes and
|
|---|
| 27 | cross section tables are prepared. "Standard" electromagnetic
|
|---|
| 28 | processes calculate cross section and/or energy loss values for
|
|---|
| 29 | each material and for each production cut value assigned to each
|
|---|
| 30 | material. A change in production cut values therefore require these
|
|---|
| 31 | cross sections to be re-calculated. Cross sections for hadronic
|
|---|
| 32 | processes do not depend on the production cut.
|
|---|
| 33 | </para>
|
|---|
| 34 |
|
|---|
| 35 | <para>
|
|---|
| 36 | The <emphasis>G4PhysicsTable</emphasis> class is used to handle cross section
|
|---|
| 37 | tables. <emphasis>G4PhysicsTable</emphasis> is a collection of instances of
|
|---|
| 38 | <emphasis>G4PhysicsVector</emphasis> (and derived classes), each of which has
|
|---|
| 39 | cross section values for a particle within a given energy range
|
|---|
| 40 | traveling in a material.
|
|---|
| 41 | </para>
|
|---|
| 42 |
|
|---|
| 43 | </sect2>
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 | <!-- ******************* Section (Level#2) ****************** -->
|
|---|
| 47 | <sect2 id="sect.PhysTab.MateCoup">
|
|---|
| 48 | <title>
|
|---|
| 49 | Material-Cuts Couple
|
|---|
| 50 | </title>
|
|---|
| 51 |
|
|---|
| 52 | <para>
|
|---|
| 53 | Users can assign different production cuts to different regions
|
|---|
| 54 | (see <xref linkend="sect.CutReg" />).
|
|---|
| 55 | This means that if the same material is used in regions with different
|
|---|
| 56 | cut values, the processes need to prepare several different cross
|
|---|
| 57 | sections for that material.
|
|---|
| 58 | </para>
|
|---|
| 59 |
|
|---|
| 60 | <para>
|
|---|
| 61 | The <emphasis>G4ProductionCutsTable</emphasis> has
|
|---|
| 62 | <emphasis>G4MaterialCutsCouple</emphasis>
|
|---|
| 63 | objects, each of which consists of a material paired with a cut
|
|---|
| 64 | value. These <emphasis>G4MaterialCutsCouple</emphasis>s are numbered with an
|
|---|
| 65 | index which is the same as the index of a <emphasis>G4PhysicsVector</emphasis>
|
|---|
| 66 | for the corresponding <emphasis>G4MaterialCutsCouple</emphasis>in the
|
|---|
| 67 | <emphasis>G4PhysicsTable</emphasis>. The list of
|
|---|
| 68 | <emphasis>MaterialCutsCouple</emphasis>s used
|
|---|
| 69 | in the current geometry setup is updated before starting the event
|
|---|
| 70 | loop in each run.
|
|---|
| 71 | </para>
|
|---|
| 72 |
|
|---|
| 73 | </sect2>
|
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 | <!-- ******************* Section (Level#2) ****************** -->
|
|---|
| 77 | <sect2 id="sect.PhysTab.Fio">
|
|---|
| 78 | <title>
|
|---|
| 79 | File I/O for the Physics Table
|
|---|
| 80 | </title>
|
|---|
| 81 |
|
|---|
| 82 | <para>
|
|---|
| 83 | Calculated physics tables for "Standard" electromagnetic processes
|
|---|
| 84 | can be stored in files. The user may thus eliminate the time
|
|---|
| 85 | required for the calculation of physics tables by retrieving them
|
|---|
| 86 | from the files.
|
|---|
| 87 | </para>
|
|---|
| 88 |
|
|---|
| 89 | <para>
|
|---|
| 90 | Using the built-in user command "<emphasis
|
|---|
| 91 | role="bold">storePhysicsTable</emphasis>"
|
|---|
| 92 | (see <xref linkend="sect.BuiltinCom" />),
|
|---|
| 93 | stores physics tables in files. Information on materials and
|
|---|
| 94 | cuts defined in the current geometry setup are stored together with
|
|---|
| 95 | physics tables because calculated values in the physics tables
|
|---|
| 96 | depend on <emphasis>MaterialCutsCouple</emphasis>. Note that physics tables are
|
|---|
| 97 | calculated before the event loop, not in the initialization phase.
|
|---|
| 98 | So, at least one event must be executed before using the
|
|---|
| 99 | "<emphasis role="bold">storePhysicsTable</emphasis>" command.
|
|---|
| 100 | </para>
|
|---|
| 101 |
|
|---|
| 102 | <para>
|
|---|
| 103 | Calculated physics tables can be retrieved from files by using
|
|---|
| 104 | the "<emphasis role="bold">retrievePhysicsTable</emphasis>" command. Materials
|
|---|
| 105 | and cuts from files are compared with those defined in the current geometry
|
|---|
| 106 | setup, and only physics vectors corresponding to the
|
|---|
| 107 | <emphasis>MaterialCutsCouple</emphasis>s used in the current setup are restored.
|
|---|
| 108 | Note that nothing happens just after the
|
|---|
| 109 | "<emphasis role="bold">retrievePhysicsTable</emphasis>" command is issued.
|
|---|
| 110 | Restoration of physics tables will be executed in parallel with the calculation
|
|---|
| 111 | of physics tables.
|
|---|
| 112 | </para>
|
|---|
| 113 |
|
|---|
| 114 | </sect2>
|
|---|
| 115 |
|
|---|
| 116 |
|
|---|
| 117 | <!-- ******************* Section (Level#2) ****************** -->
|
|---|
| 118 | <sect2 id="sect.PhysTab.Build">
|
|---|
| 119 | <title>
|
|---|
| 120 | Building the Physics Table
|
|---|
| 121 | </title>
|
|---|
| 122 |
|
|---|
| 123 | <para>
|
|---|
| 124 | In the <literal>G4RunManagerKernel::RunInitialization()</literal> method,
|
|---|
| 125 | after the list of <emphasis>MaterialCutsCouple</emphasis>s is updated, the
|
|---|
| 126 | <literal>G4VUserPhysicsList::BuildPhysicsTable()</literal> method is invoked
|
|---|
| 127 | to build physics tables for all processes.
|
|---|
| 128 | </para>
|
|---|
| 129 |
|
|---|
| 130 | <para>
|
|---|
| 131 | Initially, the <literal>G4VProcess::PreparePhysicsTable()</literal> method
|
|---|
| 132 | is invoked. Each process creates <emphasis>G4PhysicsTable</emphasis> objects as
|
|---|
| 133 | necessary. It then checks whether the <emphasis>MaterialCutsCouple</emphasis>s
|
|---|
| 134 | have been modified after a run to determine if the corresponding
|
|---|
| 135 | physics vectors can be used in the next run or need to be
|
|---|
| 136 | re-calculated.
|
|---|
| 137 | </para>
|
|---|
| 138 |
|
|---|
| 139 | <para>
|
|---|
| 140 | Next, the <literal>G4VProcess::RetrievePhysicsTable()</literal> method is
|
|---|
| 141 | invoked if the <literal>G4VUserPhysicsList::fRetrievePhysicsTable</literal>
|
|---|
| 142 | flag is asserted. After checking materials and cuts in files,
|
|---|
| 143 | physics vectors corresponding to the <emphasis>MaterialCutsCouple</emphasis>s
|
|---|
| 144 | used in the current setup are restored.
|
|---|
| 145 | </para>
|
|---|
| 146 |
|
|---|
| 147 | <para>
|
|---|
| 148 | Finally, the <literal>G4VProcess::BuildPhysicsTable()</literal> method is
|
|---|
| 149 | invoked and only physics vectors which need to be re-calculated are
|
|---|
| 150 | built.
|
|---|
| 151 | </para>
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 | </sect2>
|
|---|
| 155 | </sect1> |
|---|