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