| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.7. User Limits</title><link rel="stylesheet" href="../xml/XSLCustomizationLayer/G4HTMLStylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" href="index.html" title="Geant4 User's Guide for Application Developers"><link rel="up" href="ch05.html" title="Chapter 5. Tracking and Physics"><link rel="prev" href="ch05s06.html" title="5.6. Physics Table"><link rel="next" href="ch05s08.html" title="5.8. Track Error Propagation"><script language="JavaScript">
|
|---|
| 2 | function remote_win(fName)
|
|---|
| 3 | {
|
|---|
| 4 | var url = "AllResources/Detector/geometry.src/" + fName;
|
|---|
| 5 | RemoteWin=window.open(url,"","resizable=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,width=520,height=520")
|
|---|
| 6 | RemoteWin.creator=self
|
|---|
| 7 | }
|
|---|
| 8 | </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">5.7.
|
|---|
| 9 | User Limits
|
|---|
| 10 | </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch05s06.html"><img src="AllResources/IconsGIF/prev.gif" alt="Prev"></a> </td><th width="60%" align="center">Chapter 5.
|
|---|
| 11 | Tracking and Physics
|
|---|
| 12 | </th><td width="20%" align="right"> <a accesskey="n" href="ch05s08.html"><img src="AllResources/IconsGIF/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sect.Ulim"></a>5.7.
|
|---|
| 13 | User Limits
|
|---|
| 14 | </h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.Ulim.Gene"></a>5.7.1.
|
|---|
| 15 | General Concepts
|
|---|
| 16 | </h3></div></div></div><p>
|
|---|
| 17 | The user can define artificial limits affecting to the Geant4
|
|---|
| 18 | tracking.
|
|---|
| 19 |
|
|---|
| 20 | </p><div class="informalexample"><pre class="programlisting">
|
|---|
| 21 | G4UserLimits(G4double uStepMax = DBL_MAX,
|
|---|
| 22 | G4double uTrakMax = DBL_MAX,
|
|---|
| 23 | G4double uTimeMax = DBL_MAX,
|
|---|
| 24 | G4double uEkinMin = 0.,
|
|---|
| 25 | G4double uRangMin = 0. );
|
|---|
| 26 | </pre></div><p>
|
|---|
| 27 |
|
|---|
| 28 | </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>
|
|---|
| 29 | <code class="literal">uStepMax</code>
|
|---|
| 30 | </td><td>
|
|---|
| 31 | Maximum step length
|
|---|
| 32 | </td></tr><tr><td>
|
|---|
| 33 | <code class="literal">uTrakMax</code>
|
|---|
| 34 | </td><td>
|
|---|
| 35 | Maximum total track length
|
|---|
| 36 | </td></tr><tr><td>
|
|---|
| 37 | <code class="literal">uTimeMax</code>
|
|---|
| 38 | </td><td>
|
|---|
| 39 | Maximum global time for a track
|
|---|
| 40 | </td></tr><tr><td>
|
|---|
| 41 | <code class="literal">uEkinMin</code>
|
|---|
| 42 | </td><td>
|
|---|
| 43 | Minimum remaining kinetic energy for a track
|
|---|
| 44 | </td></tr><tr><td>
|
|---|
| 45 | <code class="literal">uRangMin</code>
|
|---|
| 46 | </td><td>
|
|---|
| 47 | Minimum remaining range for a track
|
|---|
| 48 | </td></tr></tbody></table></div><p>
|
|---|
| 49 |
|
|---|
| 50 | Note that <code class="literal">uStepMax</code> is affecting to each step, while all
|
|---|
| 51 | other limits are affecting to a track.
|
|---|
| 52 | </p><p>
|
|---|
| 53 | The user can set <code class="literal">G4UserLimits</code> to logical volume and/or
|
|---|
| 54 | to a region. User limits assigned to logical volume do not
|
|---|
| 55 | propagate to daughter volumes, while User limits assigned to region
|
|---|
| 56 | propagate to daughter volumes unless daughters belong to another
|
|---|
| 57 | region. If both logical volume and associated region have user
|
|---|
| 58 | limits, those of logical volume win.
|
|---|
| 59 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.Ulim.Proc"></a>5.7.2.
|
|---|
| 60 | Processes co-working with G4UserLimits
|
|---|
| 61 | </h3></div></div></div><p>
|
|---|
| 62 | In addition to instantiating <code class="literal">G4UserLimits</code> and setting it
|
|---|
| 63 | to logical volume or region, the user has to assign the following
|
|---|
| 64 | process(es) to particle types he/she wants to affect. If none of
|
|---|
| 65 | these processes is assigned, that kind of particle is not affected
|
|---|
| 66 | by <code class="literal">G4UserLimits</code>.
|
|---|
| 67 |
|
|---|
| 68 | </p><div class="variablelist"><dl><dt><span class="term">
|
|---|
| 69 | Limitation to step (<code class="literal">uStepMax</code>)
|
|---|
| 70 | </span></dt><dd><p>
|
|---|
| 71 | <code class="literal">G4StepLimiter</code> process must be defined to affected
|
|---|
| 72 | particle types. This process limits a step, but it does not kill a
|
|---|
| 73 | track.
|
|---|
| 74 | </p></dd><dt><span class="term">
|
|---|
| 75 | Limitations to track (<code class="literal">uTrakMax, uTimeMax, uEkinMin,
|
|---|
| 76 | uRangMin</code>)
|
|---|
| 77 | </span></dt><dd><p>
|
|---|
| 78 | <code class="literal">G4UserSpecialCuts</code> process must be defined to affected
|
|---|
| 79 | particle types. This process limits a step and kills the track when
|
|---|
| 80 | the track comes to one of these limits. Step limitation occurs only
|
|---|
| 81 | for the final step.
|
|---|
| 82 | </p></dd></dl></div><p>
|
|---|
| 83 | </p><p>
|
|---|
| 84 | Example of <code class="literal">G4UserLimits</code> can be found in
|
|---|
| 85 | examples/novice/N02 : see <code class="literal">DetectorConstruction</code> and
|
|---|
| 86 | <code class="literal">PhysicsList</code>.
|
|---|
| 87 | </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch05s06.html"><img src="AllResources/IconsGIF/prev.gif" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="ch05.html"><img src="AllResources/IconsGIF/up.gif" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch05s08.html"><img src="AllResources/IconsGIF/next.gif" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">5.6.
|
|---|
| 88 | Physics Table
|
|---|
| 89 | </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="AllResources/IconsGIF/home.gif" alt="Home"></a></td><td width="40%" align="right" valign="top"> 5.8.
|
|---|
| 90 | Track Error Propagation
|
|---|
| 91 | </td></tr></table></div></body></html>
|
|---|