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

Last change on this file since 921 was 921, checked in by garnier, 15 years ago

en test de gl2ps. Problemes de libraries

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