source: trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/TrackingAndPhysics/physicsTable.xml @ 904

Last change on this file since 904 was 904, checked in by garnier, 16 years ago

ajout de la doc

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