source: trunk/documents/UserDoc/UsersGuides/ForApplicationDeveloper/html/TrackingAndPhysics/physicsTable.html @ 1358

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

CVS update

File size: 5.3 KB
Line 
1<HTML>
2<HEAD>
3<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
4<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; AIX 4.1) [Netscape]">
5</HEAD>
6
7<BODY>
8<!-- Created by: Hisaya Kurashige,       2-Dec-2004 -->
9
10<BR>
11
12<TABLE WIDTH="100%" >
13<TR>
14<TD>
15
16</A>
17<A HREF="index.html">
18<IMG SRC="../../../../resources/html/IconsGIF/Contents.gif" ALT="Contents" HEIGHT=16 WIDTH=59></A>
19<A HREF="cutsPerRegion.html">
20<IMG SRC="../../../../resources/html/IconsGIF/Previous.gif" ALT="Previous" HEIGHT=16 WIDTH=59></A>
21<A HREF="userLimits.html">
22<IMG SRC="../../../../resources/html/IconsGIF/NextGR.gif" ALT="Next" HEIGHT=16 WIDTH=59></A>
23</TD>
24<P>
25
26<TD ALIGN=RIGHT><FONT COLOR="#238E23"><FONT SIZE=-1>
27<B>Geant4 User's Guide</B></FONT></FONT>
28<BR><FONT COLOR="#238E23"><FONT SIZE=-1>
29<B>For Application Developers</B></FONT></FONT>
30<BR><FONT COLOR="#238E23"><FONT SIZE=-1>
31<B>Tracking and Physics</B></FONT></FONT></TD>
32</TR>
33</TABLE>
34<P><BR>
35
36<CENTER><FONT COLOR="#238E23"><FONT SIZE=+3>
37<B>5.6 Physics Table</B></FONT></FONT>
38</CENTER>
39<P><BR>
40
41<HR ALIGN="Center" SIZE="7%">
42<P>
43
44<a name="5.6.1">
45<H2>5.6.1 General Concepts</H2></a>
46In Geant4, physics processes use many tables of cross sections, energy losses
47and other physics values.  Before the execution of an event loop, the
48<tt>BuildPhysicsTable()</tt> method of <i>G4VProcess</i> is invoked for all
49processes and cross section tables are prepared. "Standard" electromagnetic
50processes calculate cross section and/or energy loss values for each material
51and for each production cut value assigned to each material.  A change in
52production cut values therefore require these cross sections to be
53re-calculated.
54
55Cross sections for hadronic processes do not depend on the production cut.
56<p>
57The <i>G4PhysicsTable</i> class is used to handle cross section tables.
58<i>G4PhysicsTable</i> is a collection of instances of <i>G4PhysicsVector</i> 
59 (and derived classes), each of which has cross section values for a particle
60 within a given energy range traveling in a material.
61<P>
62
63<HR>
64<a name="5.6.2">
65<H2>5.6.2 Material-Cuts Couple</H2></a>
66Users can assign different production cuts to different regions
67(see <a href="cutsPerRegion.html">Section 5.5</a> ).  This means that if
68the same material is used in regions with different cut values, the
69processes need to prepare several different cross sections for that material.
70<p>
71The <i>G4ProductionCutsTable</i> has <i>G4MaterialCutsCouple</i> objects,
72each of which consists of a material paired with a cut value.
73These <i>G4MaterialCutsCouple</i>s are numbered with an index which is
74the same as the index of a <i>G4PhysicsVector</i> for the corresponding
75<i>G4MaterialCutsCouple</i>in the <i>G4PhysicsTable</i>.  The list of
76<i>MaterialCutsCouple</i>s used in the current geometry setup is updated
77before starting the event loop in each run.
78<P>
79
80<HR>
81<a name="5.6.3">
82<H2>5.6.3 File I/O for the Physics Table</H2></a>
83Calculated physics tables for "Standard" electromagnetic processes can be
84stored in files. The user may thus eliminate the time required for the
85calculation of physics tables by retrieving them from the files.
86<p>
87Using the built-in user command "<b>storePhysicsTable</b>"
88(see <a href="../Control/UIcommands/_run_particle_.html">Section 7.1</a> ),
89stores physics tables in files. Information on materials and cuts defined
90in the current geometry setup are stored together with physics tables
91because calculated values in the physics tables depend on
92<i>MaterialCutsCouple</i>. Note that physics tables are calculated before
93the event loop, not in the initialization phase. So, at least one event must
94be executed before using the "<b>storePhysicsTable</b>" command.
95 <p>
96Calculated physics tables can be retrieved from files by using the
97"<b>retrievePhysicsTable</b>" command. Materials and cuts from files are
98compared with those defined in the current geometry setup, and only physics
99vectors corresponding to the <i>MaterialCutsCouple</i>s used in the current
100setup are restored. Note that nothing happens just after the
101"<b>retrievePhysicsTable</b>" command is issued. Restoration of physics
102tables will be executed in parallel with the calculation of physics tables.
103<P>
104<HR>
105<a name="5.6.4">
106<H2>5.6.4 Building the Physics Table</H2></a>
107In the <tt>G4RunManagerKernel::RunInitialization()</tt> method, after the
108list of <i>MaterialCutsCouple</i>s is updated, the
109<tt>G4VUserPhysicsList::BuildPhysicsTable()</tt> method is invoked to build
110physics tables for all processes.
111<p>
112Initially, the <tt>G4VProcess::PreparePhysicsTable()</tt> method is invoked.
113Each process creates <i>G4PhysicsTable</i> objects as necessary. It then
114checks whether the <i>MaterialCutsCouple</i>s have been modified after a
115run to determine if the corresponding physics vectors can be used
116in the next run or need to be re-calculated.
117<p>
118Next, the <tt>G4VProcess::RetrievePhysicsTable()</tt> method is invoked
119if the <tt>G4VUserPhysicsList::fRetrievePhysicsTable</tt> flag is asserted.
120After checking materials and cuts in files, physics vectors corresponding
121to the <i>MaterialCutsCouple</i>s used in the current setup are restored.
122<p>
123Finally, the <tt>G4VProcess::BuildPhysicsTable()</tt> method is invoked and
124only physics vectors which need to be re-calculated are built.
125<p>
126
127<BR><BR>
128<HR><A HREF="../../../../Authors/html/subjectsToAuthors.html">
129<I>About the authors</A></I>
130</BODY>
131</HTML>
Note: See TracBrowser for help on using the repository browser.