| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>5.4. Production Threshold versus Tracking Cut</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="ch05s03.html" title="5.3. Particles"><link rel="next" href="ch05s05.html" title="5.5. Cuts per Region"><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.4.
|
|---|
| 9 | Production Threshold versus Tracking Cut
|
|---|
| 10 | </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch05s03.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="ch05s05.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.ProThres"></a>5.4.
|
|---|
| 13 | Production Threshold versus Tracking Cut
|
|---|
| 14 | </h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ProThres.Gen"></a>5.4.1.
|
|---|
| 15 | General considerations
|
|---|
| 16 | </h3></div></div></div><p>
|
|---|
| 17 | We have to fulfill two contradictory requirements. It is the
|
|---|
| 18 | responsibility of each individual <span class="bold"><strong>process</strong></span>
|
|---|
| 19 | to produce secondary particles according to its own capabilities. On
|
|---|
| 20 | the other hand, it is only the Geant4 kernel (i.e., tracking) which can
|
|---|
| 21 | ensure an overall coherence of the simulation.
|
|---|
| 22 | </p><p>
|
|---|
| 23 | The general principles in Geant4 are the following:
|
|---|
| 24 |
|
|---|
| 25 | </p><div class="orderedlist"><ol type="1" compact><li><p>
|
|---|
| 26 | Each <span class="bold"><strong>process</strong></span> has its intrinsic limit(s)
|
|---|
| 27 | to produce secondary particles.
|
|---|
| 28 | </p></li><li><p>
|
|---|
| 29 | All particles produced (and accepted) will be tracked up to
|
|---|
| 30 | <span class="bold"><strong>zero range</strong></span>.
|
|---|
| 31 | </p></li><li><p>
|
|---|
| 32 | Each <span class="bold"><strong>particle</strong></span> has a suggested cut in range
|
|---|
| 33 | (which is converted to energy for all materials), and defined via a
|
|---|
| 34 | <code class="literal">SetCut()</code> method (see
|
|---|
| 35 | <a href="ch02s04.html#sect.HowToSpecParti.RangeCuts" title="2.4.2.
|
|---|
| 36 | Range Cuts
|
|---|
| 37 | ">Section 2.4.2</a>).
|
|---|
| 38 | </p></li></ol></div><p>
|
|---|
| 39 | </p><p>
|
|---|
| 40 | Points 1 and 2 imply that the cut associated with the
|
|---|
| 41 | <span class="bold"><strong>particle</strong></span> is a (recommended)
|
|---|
| 42 | <span class="bold"><strong>production</strong></span> threshold of secondary particles.
|
|---|
| 43 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ProThres.Set"></a>5.4.2.
|
|---|
| 44 | Set production threshold (<code class="literal">SetCut</code> methods)
|
|---|
| 45 | </h3></div></div></div><p>
|
|---|
| 46 | As already mentioned, each kind of particle has a suggested
|
|---|
| 47 | production threshold. Some of the processes will not use this
|
|---|
| 48 | threshold (e.g., decay), while other processes will use it as a
|
|---|
| 49 | default value for their intrinsic limits (e.g., ionisation and
|
|---|
| 50 | bremsstrahlung).
|
|---|
| 51 | </p><p>See
|
|---|
| 52 | <a href="ch02s04.html#sect.HowToSpecParti.RangeCuts" title="2.4.2.
|
|---|
| 53 | Range Cuts
|
|---|
| 54 | ">Section 2.4.2</a> to see how to set
|
|---|
| 55 | the production threshold.
|
|---|
| 56 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ProThres.Apply"></a>5.4.3.
|
|---|
| 57 | Apply cut
|
|---|
| 58 | </h3></div></div></div><p>
|
|---|
| 59 | The <code class="literal">DoIt</code> methods of each process can produce secondary
|
|---|
| 60 | particles. Two cases can happen:
|
|---|
| 61 |
|
|---|
| 62 | </p><div class="itemizedlist"><ul type="disc" compact><li><p>
|
|---|
| 63 | a process sets its intrinsic limit greater than or equal to the
|
|---|
| 64 | recommended production threshold. OK. Nothing has to be done
|
|---|
| 65 | (nothing can be done !).
|
|---|
| 66 | </p></li><li><p>
|
|---|
| 67 | a process sets its intrinsic limit smaller than the production
|
|---|
| 68 | threshold (for instance 0).
|
|---|
| 69 | </p></li></ul></div><p>
|
|---|
| 70 | </p><p>
|
|---|
| 71 | The list of secondaries is sent to the <span class="emphasis"><em>SteppingManager</em></span>
|
|---|
| 72 | via a <span class="emphasis"><em>ParticleChange</em></span> object.
|
|---|
| 73 | </p><p>
|
|---|
| 74 | <span class="emphasis"><em>Before</em></span> being recopied to the temporary stack for later
|
|---|
| 75 | tracking, the particles below the production threshold will be kept or
|
|---|
| 76 | deleted according to the safe mechanism explained hereafter.
|
|---|
| 77 |
|
|---|
| 78 | </p><div class="itemizedlist"><ul type="disc" compact><li><p>
|
|---|
| 79 | The <span class="emphasis"><em>ParticleDefinition</em></span>
|
|---|
| 80 | (or <span class="emphasis"><em>ParticleWithCuts</em></span>) has a boolean data member:
|
|---|
| 81 | <code class="literal">ApplyCut</code>.</p></li><li><p><code class="literal">ApplyCut</code> is OFF: do nothing.
|
|---|
| 82 | All the secondaries are stacked (and then tracked later on), regardless
|
|---|
| 83 | of their initial energy. The Geant4 kernel respects the best that the
|
|---|
| 84 | physics can do, but neglects the overall coherence and the efficiency.
|
|---|
| 85 | Energy conservation is respected as far as the processes know how to
|
|---|
| 86 | handle correctly the particles they produced!
|
|---|
| 87 | </p></li><li><p>
|
|---|
| 88 | <code class="literal">ApplyCut</code> in ON: the <span class="emphasis"><em>TrackingManager</em></span>
|
|---|
| 89 | checks the range of each secondary against the production threshold and
|
|---|
| 90 | against the safety. The particle is stacked if <code class="literal">range >
|
|---|
| 91 | min(cut,safety).</code>
|
|---|
| 92 | </p><div class="itemizedlist"><ul type="circle" compact><li><p>
|
|---|
| 93 | If not, check if the process has nevertheless set the flag
|
|---|
| 94 | ``good for tracking'' and then stack it (see
|
|---|
| 95 | <a href="ch05s04.html#sect.ProThres.WhyProd" title="5.4.4.
|
|---|
| 96 | Why produce secondaries below threshold?
|
|---|
| 97 | ">Section 5.4.4</a>
|
|---|
| 98 | below for the explanation of the <code class="literal">GoodForTracking</code> flag).
|
|---|
| 99 | </p></li><li><p>
|
|---|
| 100 | If not, recuperate its kinetic energy in the
|
|---|
| 101 | <code class="literal">localEnergyDeposit</code>, and set
|
|---|
| 102 | <code class="literal">tkin=0</code>.
|
|---|
| 103 | </p></li><li><p>
|
|---|
| 104 | Then check in the <span class="emphasis"><em>ProcessManager</em></span> if the vector of
|
|---|
| 105 | <span class="emphasis"><em>ProcessAtRest</em></span> is not empty. If yes, stack the
|
|---|
| 106 | particle for performing the ``Action At Rest'' later. If not, and only
|
|---|
| 107 | in this case, abandon this secondary.
|
|---|
| 108 | </p></li></ul></div><p>
|
|---|
| 109 | </p></li></ul></div><p>
|
|---|
| 110 | </p><p>
|
|---|
| 111 | With this sophisticated mechanism we have the global cut that we
|
|---|
| 112 | wanted, but with energy conservation, and we respect boundary
|
|---|
| 113 | constraint (safety) and the wishes of the processes (via ``good for
|
|---|
| 114 | tracking'').
|
|---|
| 115 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ProThres.WhyProd"></a>5.4.4.
|
|---|
| 116 | Why produce secondaries below threshold?
|
|---|
| 117 | </h3></div></div></div><p>
|
|---|
| 118 | A process may have good reasons to produce particles below the
|
|---|
| 119 | recommended threshold:
|
|---|
| 120 |
|
|---|
| 121 | </p><div class="itemizedlist"><ul type="disc" compact><li><p>
|
|---|
| 122 | checking the range of the secondary versus geometrical
|
|---|
| 123 | quantities like safety may allow one to realize the possibility
|
|---|
| 124 | that the produced particle, even below threshold, will reach a
|
|---|
| 125 | sensitive part of the detector;
|
|---|
| 126 | </p></li><li><p>
|
|---|
| 127 | another example is the gamma conversion: the positron is always
|
|---|
| 128 | produced, even at zero energy, for further annihilation.
|
|---|
| 129 | </p></li></ul></div><p>
|
|---|
| 130 | </p><p>
|
|---|
| 131 | These secondary particles are sent to the ``Stepping Manager''
|
|---|
| 132 | with a flag <code class="literal">GoodForTracking</code> to pass the filter explained
|
|---|
| 133 | in the previous section (even when <code class="literal">ApplyCut</code> is ON).
|
|---|
| 134 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ProThres.RangOrEner"></a>5.4.5.
|
|---|
| 135 | Cuts in stopping range or in energy?
|
|---|
| 136 | </h3></div></div></div><p>
|
|---|
| 137 | The cuts in stopping range allow one to say that the energy has
|
|---|
| 138 | been released at the correct space position, limiting the
|
|---|
| 139 | approximation within a given distance. On the contrary, cuts in
|
|---|
| 140 | energy imply accuracies of the energy depositions which depend on
|
|---|
| 141 | the material.
|
|---|
| 142 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ProThres.Sum"></a>5.4.6.
|
|---|
| 143 | Summary
|
|---|
| 144 | </h3></div></div></div><p>
|
|---|
| 145 | In summary, we do not have tracking cuts; we only have production
|
|---|
| 146 | thresholds in range. All particles produced and accepted are
|
|---|
| 147 | tracked up to zero range.
|
|---|
| 148 | </p><p>
|
|---|
| 149 | It must be clear that the overall coherency that we provide
|
|---|
| 150 | cannot go beyond the capability of processes to produce particles
|
|---|
| 151 | down to the recommended threshold.
|
|---|
| 152 | </p><p>
|
|---|
| 153 | In other words a process can produce the secondaries down to the
|
|---|
| 154 | recommended threshold, and by interrogating the geometry, or by
|
|---|
| 155 | realizing when mass-to-energy conversion can occur, recognize when
|
|---|
| 156 | particles below the threshold have to be produced.
|
|---|
| 157 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.ProThres.Spe"></a>5.4.7.
|
|---|
| 158 | Special tracking cuts
|
|---|
| 159 | </h3></div></div></div><p>
|
|---|
| 160 | One may need to cut given particle types in given volumes for
|
|---|
| 161 | optimisation reasons. This decision is under user control, and can
|
|---|
| 162 | happen for particles during tracking as well.
|
|---|
| 163 | </p><p>
|
|---|
| 164 | The user must be able to apply these special cuts only for the
|
|---|
| 165 | desired particles and in the desired volumes, without introducing
|
|---|
| 166 | an overhead for all the rest.
|
|---|
| 167 | </p><p>
|
|---|
| 168 | The approach is as follows:
|
|---|
| 169 |
|
|---|
| 170 | </p><div class="itemizedlist"><ul type="disc" compact><li><p>
|
|---|
| 171 | special user cuts are registered in the <span class="emphasis"><em>UserLimits</em></span>
|
|---|
| 172 | class (or its descendant), which is associated with the logical volume
|
|---|
| 173 | class.
|
|---|
| 174 | </p><p>
|
|---|
| 175 | The current default list is:
|
|---|
| 176 | </p><div class="itemizedlist"><ul type="circle" compact><li><p>
|
|---|
| 177 | max allowed step size
|
|---|
| 178 | </p></li><li><p>
|
|---|
| 179 | max total track length
|
|---|
| 180 | </p></li><li><p>
|
|---|
| 181 | max total time of flight
|
|---|
| 182 | </p></li><li><p>
|
|---|
| 183 | min kinetic energy
|
|---|
| 184 | </p></li><li><p>
|
|---|
| 185 | min remaining range
|
|---|
| 186 | </p></li></ul></div><p>
|
|---|
| 187 | </p><p>
|
|---|
| 188 | </p><p>
|
|---|
| 189 | The user can instantiate a <span class="emphasis"><em>UserLimits</em></span> object only
|
|---|
| 190 | for the desired logical volumes and do the association.
|
|---|
| 191 | </p><p>
|
|---|
| 192 | </p><p>
|
|---|
| 193 | The first item (max step size) is automatically taken into
|
|---|
| 194 | account by the G4 kernel while the others items must be managed by
|
|---|
| 195 | the user, as explained below.
|
|---|
| 196 | </p><p>
|
|---|
| 197 | </p><p>
|
|---|
| 198 | <span class="bold"><strong>Example</strong></span>(see novice/N02):
|
|---|
| 199 | in the Tracker region, in order to force the step size not to exceed
|
|---|
| 200 | 1/10 of the Tracker thickness, it is enough to put the following code in
|
|---|
| 201 | <code class="literal">DetectorConstruction::Construct()</code>:
|
|---|
| 202 | </p><div class="informalexample"><pre class="programlisting">
|
|---|
| 203 | G4double maxStep = 0.1*TrackerLength;
|
|---|
| 204 | logicTracker->SetUserLimits(new G4UserLimits(maxStep));
|
|---|
| 205 | </pre></div><p>
|
|---|
| 206 | </p><p>
|
|---|
| 207 | </p><p>
|
|---|
| 208 | The <span class="emphasis"><em>G4UserLimits</em></span> class is in
|
|---|
| 209 | <code class="literal">source/global/management</code>.
|
|---|
| 210 | </p><p>
|
|---|
| 211 | </p></li><li><p>
|
|---|
| 212 | Concerning the others cuts, the user must define
|
|---|
| 213 | dedicaced process(es). He registers this process (or its descendant)
|
|---|
| 214 | only for the desired particles in their process manager. He can apply
|
|---|
| 215 | his cuts in the <code class="literal">DoIt</code> of this process, since, via
|
|---|
| 216 | <span class="emphasis"><em>G4Track</em></span>, he can access the logical volume and
|
|---|
| 217 | <span class="emphasis"><em>UserLimits</em></span>.
|
|---|
| 218 |
|
|---|
| 219 | </p><p>
|
|---|
| 220 | An example of such process (called <span class="emphasis"><em>UserSpecialCuts</em></span>) is
|
|---|
| 221 | provided in the repository, but not inserted in any process manager
|
|---|
| 222 | of any particle.
|
|---|
| 223 | </p><p>
|
|---|
| 224 | </p><p>
|
|---|
| 225 | <span class="bold"><strong>Example: neutrons.</strong></span> One may need to abandon
|
|---|
| 226 | the tracking of neutrons after a given time of flight (or a charged
|
|---|
| 227 | particle in a magnetic field after a given total track length ... etc ...).
|
|---|
| 228 | </p><p>
|
|---|
| 229 | </p><p>
|
|---|
| 230 | Example(see novice/N02): in the Tracker region, in order to
|
|---|
| 231 | force the total time of flight of the neutrons not to exceed 10
|
|---|
| 232 | milliseconds, put the following code in
|
|---|
| 233 | <code class="literal">DetectorConstruction::Construct()</code>:
|
|---|
| 234 |
|
|---|
| 235 | </p><div class="informalexample"><pre class="programlisting">
|
|---|
| 236 | G4double maxTime = 10*ms;
|
|---|
| 237 | logicTracker->SetUserLimits(new G4UserLimits(DBL_MAX,DBL_MAX,maxTime));
|
|---|
| 238 | </pre></div><p>
|
|---|
| 239 |
|
|---|
| 240 | and put the following code in <code class="literal">N02PhysicsList</code>:
|
|---|
| 241 |
|
|---|
| 242 | </p><div class="informalexample"><pre class="programlisting">
|
|---|
| 243 | G4ProcessManager* pmanager = G4Neutron::Neutron->GetProcessManager();
|
|---|
| 244 | pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1);
|
|---|
| 245 | </pre></div><p>
|
|---|
| 246 | </p><p>
|
|---|
| 247 | </p><p>
|
|---|
| 248 | (The default <span class="emphasis"><em>G4UserSpecialCuts</em></span> class is in
|
|---|
| 249 | <code class="literal">source/processes/transportation</code>.)
|
|---|
| 250 | </p><p>
|
|---|
| 251 | </p></li></ul></div><p>
|
|---|
| 252 | </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch05s03.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="ch05s05.html"><img src="AllResources/IconsGIF/next.gif" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">5.3.
|
|---|
| 253 | Particles
|
|---|
| 254 | </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.5.
|
|---|
| 255 | Cuts per Region
|
|---|
| 256 | </td></tr></table></div></body></html>
|
|---|