[904] | 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 |
---|
[921] | 27 | as a part of initialisation procedure cross section tables are prepared. |
---|
| 28 | Energy loss processes calculate cross section and/or energy loss values for |
---|
[904] | 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 |
---|
[921] | 32 | processes and gamma processes do not depend on the production cut. |
---|
[904] | 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 |
---|
[921] | 40 | traveling in a material. By default the linear interpolation is used, alternatively |
---|
| 41 | spline may be used if the flag |
---|
| 42 | of spline is activated by <emphasis>SetSpline</emphasis> method of the |
---|
| 43 | <emphasis>G4PhysicsVector</emphasis> |
---|
[904] | 44 | </para> |
---|
| 45 | |
---|
| 46 | </sect2> |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 50 | <sect2 id="sect.PhysTab.MateCoup"> |
---|
| 51 | <title> |
---|
| 52 | Material-Cuts Couple |
---|
| 53 | </title> |
---|
| 54 | |
---|
| 55 | <para> |
---|
| 56 | Users can assign different production cuts to different regions |
---|
| 57 | (see <xref linkend="sect.CutReg" />). |
---|
| 58 | This means that if the same material is used in regions with different |
---|
| 59 | cut values, the processes need to prepare several different cross |
---|
| 60 | sections for that material. |
---|
| 61 | </para> |
---|
| 62 | |
---|
| 63 | <para> |
---|
| 64 | The <emphasis>G4ProductionCutsTable</emphasis> has |
---|
| 65 | <emphasis>G4MaterialCutsCouple</emphasis> |
---|
| 66 | objects, each of which consists of a material paired with a cut |
---|
| 67 | value. These <emphasis>G4MaterialCutsCouple</emphasis>s are numbered with an |
---|
| 68 | index which is the same as the index of a <emphasis>G4PhysicsVector</emphasis> |
---|
| 69 | for the corresponding <emphasis>G4MaterialCutsCouple</emphasis>in the |
---|
| 70 | <emphasis>G4PhysicsTable</emphasis>. The list of |
---|
| 71 | <emphasis>MaterialCutsCouple</emphasis>s used |
---|
| 72 | in the current geometry setup is updated before starting the event |
---|
| 73 | loop in each run. |
---|
| 74 | </para> |
---|
| 75 | |
---|
| 76 | </sect2> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 80 | <sect2 id="sect.PhysTab.Fio"> |
---|
| 81 | <title> |
---|
| 82 | File I/O for the Physics Table |
---|
| 83 | </title> |
---|
| 84 | |
---|
| 85 | <para> |
---|
[921] | 86 | Calculated physics tables for electromagnetic processes |
---|
[904] | 87 | can be stored in files. The user may thus eliminate the time |
---|
| 88 | required for the calculation of physics tables by retrieving them |
---|
| 89 | from the files. |
---|
| 90 | </para> |
---|
| 91 | |
---|
| 92 | <para> |
---|
| 93 | Using the built-in user command "<emphasis |
---|
| 94 | role="bold">storePhysicsTable</emphasis>" |
---|
| 95 | (see <xref linkend="sect.BuiltinCom" />), |
---|
| 96 | stores physics tables in files. Information on materials and |
---|
| 97 | cuts defined in the current geometry setup are stored together with |
---|
| 98 | physics tables because calculated values in the physics tables |
---|
| 99 | depend on <emphasis>MaterialCutsCouple</emphasis>. Note that physics tables are |
---|
| 100 | calculated before the event loop, not in the initialization phase. |
---|
| 101 | So, at least one event must be executed before using the |
---|
| 102 | "<emphasis role="bold">storePhysicsTable</emphasis>" command. |
---|
| 103 | </para> |
---|
| 104 | |
---|
| 105 | <para> |
---|
| 106 | Calculated physics tables can be retrieved from files by using |
---|
| 107 | the "<emphasis role="bold">retrievePhysicsTable</emphasis>" command. Materials |
---|
| 108 | and cuts from files are compared with those defined in the current geometry |
---|
| 109 | setup, and only physics vectors corresponding to the |
---|
| 110 | <emphasis>MaterialCutsCouple</emphasis>s used in the current setup are restored. |
---|
| 111 | Note that nothing happens just after the |
---|
| 112 | "<emphasis role="bold">retrievePhysicsTable</emphasis>" command is issued. |
---|
| 113 | Restoration of physics tables will be executed in parallel with the calculation |
---|
| 114 | of physics tables. |
---|
| 115 | </para> |
---|
| 116 | |
---|
| 117 | </sect2> |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 121 | <sect2 id="sect.PhysTab.Build"> |
---|
| 122 | <title> |
---|
| 123 | Building the Physics Table |
---|
| 124 | </title> |
---|
| 125 | |
---|
| 126 | <para> |
---|
| 127 | In the <literal>G4RunManagerKernel::RunInitialization()</literal> method, |
---|
| 128 | after the list of <emphasis>MaterialCutsCouple</emphasis>s is updated, the |
---|
| 129 | <literal>G4VUserPhysicsList::BuildPhysicsTable()</literal> method is invoked |
---|
| 130 | to build physics tables for all processes. |
---|
| 131 | </para> |
---|
| 132 | |
---|
| 133 | <para> |
---|
| 134 | Initially, the <literal>G4VProcess::PreparePhysicsTable()</literal> method |
---|
| 135 | is invoked. Each process creates <emphasis>G4PhysicsTable</emphasis> objects as |
---|
| 136 | necessary. It then checks whether the <emphasis>MaterialCutsCouple</emphasis>s |
---|
| 137 | have been modified after a run to determine if the corresponding |
---|
| 138 | physics vectors can be used in the next run or need to be |
---|
| 139 | re-calculated. |
---|
| 140 | </para> |
---|
| 141 | |
---|
| 142 | <para> |
---|
| 143 | Next, the <literal>G4VProcess::RetrievePhysicsTable()</literal> method is |
---|
| 144 | invoked if the <literal>G4VUserPhysicsList::fRetrievePhysicsTable</literal> |
---|
| 145 | flag is asserted. After checking materials and cuts in files, |
---|
| 146 | physics vectors corresponding to the <emphasis>MaterialCutsCouple</emphasis>s |
---|
| 147 | used in the current setup are restored. |
---|
| 148 | </para> |
---|
| 149 | |
---|
| 150 | <para> |
---|
| 151 | Finally, the <literal>G4VProcess::BuildPhysicsTable()</literal> method is |
---|
| 152 | invoked and only physics vectors which need to be re-calculated are |
---|
| 153 | built. |
---|
| 154 | </para> |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | </sect2> |
---|
[921] | 158 | </sect1> |
---|