[904] | 1 | <!-- ******************************************************** --> |
---|
| 2 | <!-- --> |
---|
| 3 | <!-- [History] --> |
---|
| 4 | <!-- Changed by: Katsuya Amako, 30-Nov-1998 --> |
---|
| 5 | <!-- Changed by: Katsuya Amako, 10-Jul-1998 --> |
---|
| 6 | <!-- Proof read by: Joe Chuma, 30-Jun-1999 --> |
---|
| 7 | <!-- Changed by: Takashi SasakI, 15-Nov-2001 --> |
---|
| 8 | <!-- Changed by: Dennis Wright, 27-Nov-2001 --> |
---|
| 9 | <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> |
---|
| 10 | <!-- Changed by: Hisaya Kurashige, 01-Dec-2007 --> |
---|
[1208] | 11 | <!-- Changed by: Hisaya Kurashige, 18-Nov-2009 --> |
---|
[904] | 12 | <!-- --> |
---|
| 13 | <!-- ******************************************************** --> |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | <!-- ******************* Section (Level#1) ****************** --> |
---|
| 17 | <sect1 id="sect.Track"> |
---|
| 18 | <title> |
---|
| 19 | Tracking |
---|
| 20 | </title> |
---|
| 21 | |
---|
| 22 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 23 | <sect2 id="sect.Track.Basic"> |
---|
| 24 | <title> |
---|
| 25 | Basic Concepts |
---|
| 26 | </title> |
---|
| 27 | |
---|
| 28 | <!-- ******* Bridgehead ******* --> |
---|
| 29 | <bridgehead renderas='sect4'> |
---|
| 30 | Philosophy of Tracking |
---|
| 31 | </bridgehead> |
---|
| 32 | |
---|
| 33 | <para> |
---|
| 34 | All Geant4 processes, including the transportation of particles, |
---|
| 35 | are treated generically. In spite of the name "<emphasis>tracking</emphasis>", |
---|
| 36 | particles are not <emphasis>transported</emphasis> in the tracking category. |
---|
| 37 | <emphasis>G4TrackingManager</emphasis> is an interface class which brokers |
---|
| 38 | transactions between the event, track and tracking categories. An |
---|
| 39 | instance of this class handles the message passing between the |
---|
| 40 | upper hierarchical object, which is the event manager, and lower |
---|
| 41 | hierarchical objects in the tracking category. The event manager is |
---|
| 42 | a singleton instance of the <emphasis>G4EventManager</emphasis> class. |
---|
| 43 | </para> |
---|
| 44 | |
---|
| 45 | <para> |
---|
| 46 | The tracking manager receives a track from the event manager and |
---|
| 47 | takes the actions required to finish tracking it. |
---|
| 48 | <emphasis>G4TrackingManager</emphasis> aggregates the pointers to |
---|
| 49 | <emphasis>G4SteppingManager,</emphasis> <emphasis>G4Trajectory</emphasis> and |
---|
| 50 | <emphasis>G4UserTrackingAction</emphasis>. Also there is a "use" relation to |
---|
| 51 | <emphasis>G4Track</emphasis> and <emphasis>G4Step</emphasis>. |
---|
| 52 | </para> |
---|
| 53 | |
---|
| 54 | <para> |
---|
| 55 | <emphasis>G4SteppingManager</emphasis> plays an essential role in tracking the |
---|
| 56 | particle. It takes care of all message passing between objects in |
---|
| 57 | the different categories relevant to transporting a particle (for |
---|
| 58 | example, geometry and interactions in matter). Its public method |
---|
[1208] | 59 | <literal>Stepping()</literal> steers the stepping of the particle. |
---|
| 60 | The algorithm to handle one step is given below. |
---|
[904] | 61 | |
---|
| 62 | <orderedlist spacing="compact"> |
---|
| 63 | <listitem><para> |
---|
[1208] | 64 | If the particle stop (i.e. zero kinetic energy), each active atRest |
---|
| 65 | process proposes a step length in time based on the interaction |
---|
| 66 | it describes. And the process proposing the smallest step length |
---|
| 67 | will be invoked. |
---|
[904] | 68 | </para></listitem> |
---|
[1208] | 69 | |
---|
[904] | 70 | <listitem><para> |
---|
| 71 | Each active discrete or continuous process must propose a step |
---|
| 72 | length based on the interaction it describes. The smallest of these |
---|
| 73 | step lengths is taken. |
---|
| 74 | </para></listitem> |
---|
[1208] | 75 | |
---|
[904] | 76 | <listitem><para> |
---|
| 77 | The geometry navigator calculates "Safety", the distance to the |
---|
| 78 | next volume boundary. If the minimum physical-step-length from the |
---|
| 79 | processes is shorter than "Safety", the physical-step-length is |
---|
| 80 | selected as the next step length. In this case, no further |
---|
| 81 | geometrical calculations will be performed. |
---|
| 82 | </para></listitem> |
---|
[1208] | 83 | |
---|
[904] | 84 | <listitem><para> |
---|
| 85 | If the minimum physical-step-length from the processes is |
---|
| 86 | longer than "Safety", the distance to the next boundary is |
---|
| 87 | re-calculated. |
---|
| 88 | </para></listitem> |
---|
[1208] | 89 | |
---|
[904] | 90 | <listitem><para> |
---|
| 91 | The smaller of the minimum physical-step-length and the |
---|
| 92 | geometric step length is taken. |
---|
| 93 | </para></listitem> |
---|
[1208] | 94 | |
---|
[904] | 95 | <listitem><para> |
---|
| 96 | All active continuous processes are invoked. Note that the |
---|
| 97 | particle's kinetic energy will be updated only after all invoked |
---|
| 98 | processes have completed. The change in kinetic energy will be the |
---|
| 99 | sum of the contributions from these processes. |
---|
| 100 | </para></listitem> |
---|
[1208] | 101 | |
---|
[904] | 102 | <listitem><para> |
---|
| 103 | The current track properties are updated before discrete |
---|
[1208] | 104 | processes are invoked. In the same time, the secondary |
---|
| 105 | particles created by processes are stored in SecondaryList. |
---|
| 106 | The updated properties are: |
---|
[904] | 107 | <itemizedlist spacing="compact"> |
---|
| 108 | <listitem><para> |
---|
| 109 | updating the kinetic energy of the current track particle (note |
---|
[1208] | 110 | that 'sumEnergyChange' is the sum of the energy difference |
---|
| 111 | before and after each process invocation) |
---|
[904] | 112 | </para></listitem> |
---|
| 113 | <listitem><para> |
---|
[1208] | 114 | updating position and time |
---|
[904] | 115 | </para></listitem> |
---|
[1208] | 116 | </itemizedlist> |
---|
| 117 | </para></listitem> |
---|
| 118 | |
---|
| 119 | <listitem><para> |
---|
| 120 | The kinetic energy of the particle is checked to see whether |
---|
| 121 | or not it has been terminated by a continuous process. |
---|
| 122 | If the kinetic energy goes down to zero, atRest processes |
---|
| 123 | will be applied at the next step if applicable. |
---|
[904] | 124 | </para></listitem> |
---|
[1208] | 125 | |
---|
[904] | 126 | <listitem><para> |
---|
| 127 | The discrete process is invoked. After the invocation, |
---|
| 128 | <itemizedlist spacing="compact"> |
---|
| 129 | <listitem><para> |
---|
[1208] | 130 | the energy, position and time of the current track particle |
---|
| 131 | are updated, and |
---|
[904] | 132 | </para></listitem> |
---|
| 133 | <listitem><para> |
---|
[1208] | 134 | the secondaries are stored in SecondaryList. |
---|
[904] | 135 | </para></listitem> |
---|
| 136 | </itemizedlist> |
---|
| 137 | </para></listitem> |
---|
[1208] | 138 | |
---|
[904] | 139 | <listitem><para> |
---|
| 140 | The track is checked to see whether or not it has been |
---|
| 141 | terminated by the discrete process. |
---|
| 142 | </para></listitem> |
---|
[1208] | 143 | |
---|
[904] | 144 | <listitem><para> |
---|
| 145 | "Safety" is updated. |
---|
| 146 | </para></listitem> |
---|
[1208] | 147 | |
---|
[904] | 148 | <listitem><para> |
---|
| 149 | If the step was limited by the volume boundary, push the |
---|
| 150 | particle into the next volume. |
---|
| 151 | </para></listitem> |
---|
[1208] | 152 | |
---|
[904] | 153 | <listitem><para> |
---|
| 154 | Invoke the user intervention <emphasis>G4UserSteppingAction</emphasis>. |
---|
| 155 | </para></listitem> |
---|
[1208] | 156 | |
---|
[904] | 157 | <listitem><para> |
---|
| 158 | Handle hit information. |
---|
| 159 | </para></listitem> |
---|
[1208] | 160 | |
---|
[904] | 161 | <listitem><para> |
---|
| 162 | Save data to Trajectory. |
---|
| 163 | </para></listitem> |
---|
[1208] | 164 | |
---|
[904] | 165 | <listitem><para> |
---|
| 166 | Update the mean free paths of the discrete processes. |
---|
| 167 | </para></listitem> |
---|
[1208] | 168 | |
---|
[904] | 169 | <listitem><para> |
---|
| 170 | If the parent particle is still alive, reset the maximum |
---|
| 171 | interaction length of the discrete process which has occurred. |
---|
| 172 | </para></listitem> |
---|
[1208] | 173 | |
---|
[904] | 174 | <listitem><para> |
---|
| 175 | One step completed. |
---|
| 176 | </para></listitem> |
---|
[1208] | 177 | |
---|
[904] | 178 | </orderedlist> |
---|
| 179 | </para> |
---|
| 180 | |
---|
[1208] | 181 | |
---|
[904] | 182 | <!-- ******* Bridgehead ******* --> |
---|
| 183 | <bridgehead renderas='sect4'> |
---|
[1208] | 184 | What is a Process? |
---|
| 185 | </bridgehead> |
---|
| 186 | |
---|
| 187 | <para> |
---|
| 188 | Only processes can change information of <emphasis>G4Track</emphasis> |
---|
| 189 | and add secondary tracks via <literal>ParticleChange</literal>. |
---|
| 190 | <emphasis>G4VProcess</emphasis> is a base class of all processes and |
---|
| 191 | it has 3 kinds of <literal>DoIt</literal> and |
---|
| 192 | <literal>GetPhysicalInteraction</literal> methods in order to |
---|
| 193 | describe interactions generically. |
---|
| 194 | If a user want to modify information of <emphasis>G4Track</emphasis>, |
---|
| 195 | he (or she) SHOULD create a special process for the purpose and |
---|
| 196 | register the process to the particle. |
---|
| 197 | </para> |
---|
| 198 | |
---|
| 199 | <!-- ******* Bridgehead ******* --> |
---|
| 200 | <bridgehead renderas='sect4'> |
---|
| 201 | What is a Track? |
---|
| 202 | </bridgehead> |
---|
| 203 | |
---|
| 204 | <para> |
---|
| 205 | <emphasis>G4Track</emphasis> keeps 'current' information of the particle. |
---|
| 206 | (i.e. energy,momentum, position ,time and so on) and has 'static' |
---|
| 207 | information (i.e. mass, charge, life and so on) also. |
---|
| 208 | Note that <emphasis>G4Track</emphasis> keeps information at the beginning |
---|
| 209 | of the step while the <literal>AlongStepDoIt</literal>s are being |
---|
| 210 | invoked for the step in progress.After finishing all |
---|
| 211 | <literal>AlongStepDoIt</literal>s, <emphasis>G4Track</emphasis> |
---|
| 212 | is updated. |
---|
| 213 | On the other hand, <emphasis>G4Track</emphasis> is |
---|
| 214 | updated after each invocation of a <literal>PostStepDoIt</literal>. |
---|
| 215 | </para> |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | <!-- ******* Bridgehead ******* --> |
---|
| 219 | <bridgehead renderas='sect4'> |
---|
[904] | 220 | What is a Step? |
---|
| 221 | </bridgehead> |
---|
| 222 | |
---|
| 223 | <para> |
---|
| 224 | <emphasis>G4Step</emphasis> stores the transient information of a step. This |
---|
| 225 | includes the two endpoints of the step, <literal>PreStepPoint</literal> and |
---|
| 226 | <literal>PostStepPoint</literal>, which contain the points' coordinates and |
---|
| 227 | the volumes containing the points. <emphasis>G4Step</emphasis> also stores the |
---|
| 228 | change in track properties between the two points. These |
---|
| 229 | properties, such as energy and momentum, are updated as the various |
---|
| 230 | active processes are invoked. |
---|
| 231 | </para> |
---|
| 232 | |
---|
| 233 | <!-- ******* Bridgehead ******* --> |
---|
| 234 | <bridgehead renderas='sect4'> |
---|
[1208] | 235 | What is a ParticleChange? |
---|
[904] | 236 | </bridgehead> |
---|
| 237 | |
---|
| 238 | <para> |
---|
[1208] | 239 | Processes do NOT change any information of <emphasis>G4Track</emphasis> |
---|
| 240 | directly in their <literal>DoIt</literal>. Instead, they proposes |
---|
| 241 | changes as a result of interactions |
---|
| 242 | by using <literal>ParticleChange</literal>. |
---|
| 243 | After each <literal>DoIt</literal>, <literal>ParticleChange</literal> |
---|
| 244 | updates <literal>PostStepPoint</literal> based on proposed changes. |
---|
| 245 | Then, <emphasis>G4Track</emphasis> is updated |
---|
| 246 | after finishing all <literal>AlongStepDoIt</literal>s and |
---|
| 247 | after each <literal>PostStepDoIt</literal>. |
---|
[904] | 248 | </para> |
---|
| 249 | |
---|
[1208] | 250 | |
---|
| 251 | |
---|
[904] | 252 | </sect2> |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 256 | <sect2 id="sect.Track.AccInfo"> |
---|
| 257 | <title> |
---|
| 258 | Access to Track and Step Information |
---|
| 259 | </title> |
---|
| 260 | |
---|
| 261 | <!-- ******* Bridgehead ******* --> |
---|
| 262 | <bridgehead renderas='sect4'> |
---|
| 263 | How to Get Track Information |
---|
| 264 | </bridgehead> |
---|
| 265 | |
---|
| 266 | <para> |
---|
| 267 | Track information may be accessed by invoking various |
---|
| 268 | <literal>Get</literal> methods provided in the <emphasis>G4Track</emphasis> |
---|
| 269 | class. For details, see the |
---|
| 270 | <emphasis role="bold">Software Reference Manual</emphasis>. |
---|
| 271 | Typical information available includes: |
---|
| 272 | |
---|
| 273 | <itemizedlist spacing="compact"> |
---|
| 274 | <listitem><para> |
---|
| 275 | (x,y,z) |
---|
| 276 | </para></listitem> |
---|
| 277 | <listitem><para> |
---|
| 278 | Global time (time since the event was created) |
---|
| 279 | </para></listitem> |
---|
| 280 | <listitem><para> |
---|
| 281 | Local time (time since the track was created) |
---|
| 282 | </para></listitem> |
---|
| 283 | <listitem><para> |
---|
| 284 | Proper time (time in its rest frame since the track was created ) |
---|
| 285 | </para></listitem> |
---|
| 286 | <listitem><para> |
---|
| 287 | Momentum direction ( unit vector ) |
---|
| 288 | </para></listitem> |
---|
| 289 | <listitem><para> |
---|
| 290 | Kinetic energy |
---|
| 291 | </para></listitem> |
---|
| 292 | <listitem><para> |
---|
| 293 | Accumulated geometrical track length |
---|
| 294 | </para></listitem> |
---|
| 295 | <listitem><para> |
---|
| 296 | Accumulated true track length |
---|
| 297 | </para></listitem> |
---|
| 298 | <listitem><para> |
---|
| 299 | Pointer to dynamic particle |
---|
| 300 | </para></listitem> |
---|
| 301 | <listitem><para> |
---|
| 302 | Pointer to physical volume |
---|
| 303 | </para></listitem> |
---|
| 304 | <listitem><para> |
---|
| 305 | Track ID number |
---|
| 306 | </para></listitem> |
---|
| 307 | <listitem><para> |
---|
| 308 | Track ID number of the parent |
---|
| 309 | </para></listitem> |
---|
| 310 | <listitem><para> |
---|
| 311 | Current step number |
---|
| 312 | </para></listitem> |
---|
| 313 | <listitem><para> |
---|
| 314 | Track status |
---|
| 315 | </para></listitem> |
---|
| 316 | <listitem><para> |
---|
| 317 | (x,y,z) at the start point (vertex position) of the track |
---|
| 318 | </para></listitem> |
---|
| 319 | <listitem><para> |
---|
| 320 | Momentum direction at the start point (vertex position) of the |
---|
| 321 | track |
---|
| 322 | </para></listitem> |
---|
| 323 | <listitem><para> |
---|
| 324 | Kinetic energy at the start point (vertex position) of the track |
---|
| 325 | </para></listitem> |
---|
| 326 | <listitem><para> |
---|
| 327 | Pinter to the process which created the current track |
---|
| 328 | </para></listitem> |
---|
| 329 | </itemizedlist> |
---|
| 330 | </para> |
---|
| 331 | |
---|
| 332 | <!-- ******* Bridgehead ******* --> |
---|
| 333 | <bridgehead renderas='sect4'> |
---|
| 334 | How to Get Step Information |
---|
| 335 | </bridgehead> |
---|
| 336 | |
---|
| 337 | <para> |
---|
| 338 | Step and step-point information can be retrieved by invoking |
---|
| 339 | various <literal>Get</literal> methods provided in the |
---|
| 340 | <emphasis>G4Step</emphasis>/<emphasis>G4StepPoint</emphasis> |
---|
| 341 | classes. For details, see the |
---|
| 342 | <emphasis role="bold">Software Reference Manual</emphasis>. |
---|
| 343 | </para> |
---|
| 344 | |
---|
| 345 | <para> |
---|
| 346 | Information in <emphasis>G4Step</emphasis> |
---|
| 347 | includes: |
---|
| 348 | |
---|
| 349 | <itemizedlist spacing="compact"> |
---|
| 350 | <listitem><para> |
---|
| 351 | Pointers to <literal>PreStep</literal> and |
---|
| 352 | <literal>PostStepPoint</literal> |
---|
| 353 | </para></listitem> |
---|
| 354 | <listitem><para> |
---|
| 355 | Geometrical step length (step length before the correction of |
---|
| 356 | multiple scattering) |
---|
| 357 | </para></listitem> |
---|
| 358 | <listitem><para> |
---|
| 359 | True step length (step length after the correction of multiple |
---|
| 360 | scattering) |
---|
| 361 | </para></listitem> |
---|
| 362 | <listitem><para> |
---|
| 363 | Increment of position and time between <literal>PreStepPoint</literal> |
---|
| 364 | and <literal>PostStepPoint</literal> |
---|
| 365 | </para></listitem> |
---|
| 366 | <listitem><para> |
---|
| 367 | Increment of momentum and energy between <literal>PreStepPoint</literal> |
---|
| 368 | and <literal>PostStepPoint</literal>. (Note: to get the energy deposited in |
---|
| 369 | the step, you cannot use this 'Delta energy'. You have to use |
---|
| 370 | 'Total energy deposit' as below.) |
---|
| 371 | </para></listitem> |
---|
| 372 | <listitem><para> |
---|
| 373 | Pointer to <literal>G4Track</literal> |
---|
| 374 | </para></listitem> |
---|
| 375 | <listitem><para> |
---|
| 376 | Total energy deposited during the step - this is the sum of |
---|
| 377 | <para> |
---|
| 378 | <itemizedlist spacing="compact"> |
---|
| 379 | <listitem><para> |
---|
| 380 | the energy deposited by the energy loss process, and |
---|
| 381 | </para></listitem> |
---|
| 382 | <listitem><para> |
---|
| 383 | the energy lost by secondaries which have NOT been generated |
---|
| 384 | because each of their energies was below the cut threshold |
---|
| 385 | </para></listitem> |
---|
| 386 | </itemizedlist> |
---|
| 387 | </para> |
---|
| 388 | </para></listitem> |
---|
| 389 | <listitem><para> |
---|
| 390 | Energy deposited not by ionization during the step |
---|
| 391 | </para></listitem> |
---|
| 392 | </itemizedlist> |
---|
| 393 | </para> |
---|
| 394 | |
---|
| 395 | <para> |
---|
| 396 | Information in <emphasis>G4StepPoint</emphasis> |
---|
| 397 | (<literal>PreStepPoint</literal> and <literal>PostStepPoint</literal>) |
---|
| 398 | includes: |
---|
| 399 | |
---|
| 400 | <itemizedlist spacing="compact"> |
---|
| 401 | <listitem><para> |
---|
| 402 | (x, y, z, t) |
---|
| 403 | </para></listitem> |
---|
| 404 | <listitem><para> |
---|
| 405 | (px, py, pz, Ek) |
---|
| 406 | </para></listitem> |
---|
| 407 | <listitem><para> |
---|
| 408 | Momentum direction (unit vector) |
---|
| 409 | </para></listitem> |
---|
| 410 | <listitem><para> |
---|
| 411 | Pointers to physical volumes |
---|
| 412 | </para></listitem> |
---|
| 413 | <listitem><para> |
---|
| 414 | Safety |
---|
| 415 | </para></listitem> |
---|
| 416 | <listitem><para> |
---|
| 417 | Beta, gamma |
---|
| 418 | </para></listitem> |
---|
| 419 | <listitem><para> |
---|
| 420 | Polarization |
---|
| 421 | </para></listitem> |
---|
| 422 | <listitem><para> |
---|
| 423 | Step status |
---|
| 424 | </para></listitem> |
---|
| 425 | <listitem><para> |
---|
| 426 | Pointer to the physics process which defined the current step |
---|
| 427 | and its <literal>DoIt</literal> type |
---|
| 428 | </para></listitem> |
---|
| 429 | <listitem><para> |
---|
| 430 | Pointer to the physics process which defined the previous step |
---|
| 431 | and its <literal>DoIt</literal> type |
---|
| 432 | </para></listitem> |
---|
| 433 | <listitem><para> |
---|
| 434 | Total track length |
---|
| 435 | </para></listitem> |
---|
| 436 | <listitem><para> |
---|
| 437 | Global time (time since the current event began) |
---|
| 438 | </para></listitem> |
---|
| 439 | <listitem><para> |
---|
| 440 | Local time (time since the current track began) |
---|
| 441 | </para></listitem> |
---|
| 442 | <listitem><para> |
---|
| 443 | Proper time |
---|
| 444 | </para></listitem> |
---|
| 445 | </itemizedlist> |
---|
| 446 | </para> |
---|
| 447 | |
---|
| 448 | <!-- ******* Bridgehead ******* --> |
---|
| 449 | <bridgehead renderas='sect4'> |
---|
| 450 | How to Get "particle change" |
---|
| 451 | </bridgehead> |
---|
| 452 | |
---|
| 453 | <para> |
---|
| 454 | Particle change information can be accessed by invoking various |
---|
| 455 | <literal>Get</literal> methods provided in the |
---|
| 456 | <emphasis>G4ParticleChange</emphasis> class. |
---|
| 457 | Typical information available includes (for details, see the |
---|
| 458 | <emphasis role="bold">Software Reference Manual</emphasis>): |
---|
| 459 | |
---|
| 460 | <itemizedlist spacing="compact"> |
---|
| 461 | <listitem><para> |
---|
| 462 | final momentum direction of the parent particle |
---|
| 463 | </para></listitem> |
---|
| 464 | <listitem><para> |
---|
| 465 | final kinetic energy of the parent particle |
---|
| 466 | </para></listitem> |
---|
| 467 | <listitem><para> |
---|
| 468 | final position of the parent particle |
---|
| 469 | </para></listitem> |
---|
| 470 | <listitem><para> |
---|
| 471 | final global time of the parent particle |
---|
| 472 | </para></listitem> |
---|
| 473 | <listitem><para> |
---|
| 474 | final proper time of the parent particle |
---|
| 475 | </para></listitem> |
---|
| 476 | <listitem><para> |
---|
| 477 | final polarization of the parent particle |
---|
| 478 | </para></listitem> |
---|
| 479 | <listitem><para> |
---|
| 480 | status of the parent particle (<emphasis>G4TrackStatus</emphasis>) |
---|
| 481 | </para></listitem> |
---|
| 482 | <listitem><para> |
---|
| 483 | true step length (this is used by multiple scattering to store |
---|
| 484 | the result of the transformation from the geometrical step length |
---|
| 485 | to the true step length) |
---|
| 486 | </para></listitem> |
---|
| 487 | <listitem><para> |
---|
| 488 | local energy deposited - this consists of either |
---|
| 489 | <para> |
---|
| 490 | <itemizedlist spacing="compact"> |
---|
| 491 | <listitem><para> |
---|
| 492 | energy deposited by the energy loss process, or |
---|
| 493 | </para></listitem> |
---|
| 494 | <listitem><para> |
---|
| 495 | the energy lost by secondaries which have NOT been generated |
---|
| 496 | because each of their energies was below the cut threshold. |
---|
| 497 | </para></listitem> |
---|
| 498 | </itemizedlist> |
---|
| 499 | </para> |
---|
| 500 | </para></listitem> |
---|
| 501 | <listitem><para> |
---|
| 502 | number of secondaries particles |
---|
| 503 | </para></listitem> |
---|
| 504 | <listitem><para> |
---|
| 505 | list of secondary particles (list of <emphasis>G4Track</emphasis>) |
---|
| 506 | </para></listitem> |
---|
| 507 | </itemizedlist> |
---|
| 508 | </para> |
---|
| 509 | |
---|
| 510 | </sect2> |
---|
| 511 | |
---|
| 512 | |
---|
| 513 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 514 | <sect2 id="sect.Track.SecPar"> |
---|
| 515 | <title> |
---|
| 516 | Handling of Secondary Particles |
---|
| 517 | </title> |
---|
| 518 | |
---|
| 519 | <para> |
---|
| 520 | Secondary particles are passed as <emphasis>G4Track</emphasis>s from a physics |
---|
[1208] | 521 | process to tracking. |
---|
| 522 | <emphasis>G4ParticleChange</emphasis> provides the following |
---|
[904] | 523 | four methods for a physics process: |
---|
| 524 | |
---|
| 525 | <itemizedlist spacing="compact"> |
---|
| 526 | <listitem><para> |
---|
| 527 | <literal>AddSecondary( G4Track* aSecondary )</literal> |
---|
| 528 | </para></listitem> |
---|
| 529 | <listitem><para> |
---|
| 530 | <literal>AddSecondary( G4DynamicParticle* aSecondary )</literal> |
---|
| 531 | </para></listitem> |
---|
| 532 | <listitem><para> |
---|
| 533 | <literal>AddSecondary( G4DynamicParticle* aSecondary, G4ThreeVector |
---|
| 534 | position )</literal> |
---|
| 535 | </para></listitem> |
---|
| 536 | <listitem><para> |
---|
| 537 | <literal>AddSecondary( G4DynamicParticle* aSecondary, G4double time)</literal> |
---|
| 538 | </para></listitem> |
---|
| 539 | </itemizedlist> |
---|
| 540 | </para> |
---|
| 541 | |
---|
| 542 | <para> |
---|
| 543 | In all but the first, the construction of <emphasis>G4Track</emphasis> is done in |
---|
[1208] | 544 | the methods using information given by the arguments. |
---|
[904] | 545 | </para> |
---|
| 546 | |
---|
| 547 | </sect2> |
---|
| 548 | |
---|
| 549 | |
---|
| 550 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 551 | <sect2 id="sect.Track.UserAct"> |
---|
| 552 | <title> |
---|
| 553 | User Actions |
---|
| 554 | </title> |
---|
| 555 | |
---|
| 556 | <para> |
---|
| 557 | There are two classes which allow the user to intervene in the |
---|
| 558 | tracking. These are: |
---|
| 559 | |
---|
| 560 | <itemizedlist spacing="compact"> |
---|
| 561 | <listitem><para> |
---|
| 562 | <emphasis>G4UserTrackingAction</emphasis>, and |
---|
| 563 | </para></listitem> |
---|
| 564 | <listitem><para> |
---|
| 565 | <emphasis>G4UserSteppingAction</emphasis>. |
---|
| 566 | </para></listitem> |
---|
| 567 | </itemizedlist> |
---|
| 568 | </para> |
---|
| 569 | |
---|
| 570 | <para> |
---|
| 571 | Each provides methods which allow the user access to the Geant4 |
---|
| 572 | kernel at specific points in the tracking. For details, see the |
---|
| 573 | <emphasis role="bold">Software Reference Manual</emphasis>. |
---|
| 574 | </para> |
---|
| 575 | |
---|
[1208] | 576 | <para> |
---|
[1222] | 577 | <emphasis role="bold">Note-1:</emphasis> |
---|
[1208] | 578 | Users SHOULD NOT (and CAN NOT) change <emphasis>G4Track</emphasis> |
---|
| 579 | in <literal>UserSteppingAction</literal>. |
---|
| 580 | Only the exception is the <literal>TrackStatus</literal>. |
---|
| 581 | </para> |
---|
| 582 | |
---|
[1222] | 583 | <para> |
---|
| 584 | <emphasis role="bold">Note-2:</emphasis> |
---|
| 585 | Users have to be cautious to implement an unnatural/unphysical |
---|
| 586 | action in these user actions. See the section |
---|
| 587 | <link linkend="sect.OptUAct.EngyConsv"> |
---|
| 588 | Killing Tracks in User Actions and Energy Conservation</link> |
---|
| 589 | for more details. |
---|
| 590 | </para> |
---|
| 591 | |
---|
[904] | 592 | </sect2> |
---|
| 593 | |
---|
| 594 | |
---|
| 595 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 596 | <sect2 id="sect.Track.Verb"> |
---|
| 597 | <title> |
---|
| 598 | Verbose Outputs |
---|
| 599 | </title> |
---|
| 600 | |
---|
| 601 | <para> |
---|
| 602 | The verbose information output flag can be turned on or off. The |
---|
| 603 | amount of information printed about the track/step, from brief to |
---|
| 604 | very detailed, can be controlled by the value of the verbose flag, |
---|
| 605 | for example, |
---|
| 606 | |
---|
| 607 | <informalexample> |
---|
| 608 | <programlisting> |
---|
| 609 | G4UImanager* UI = G4UImanager::GetUIpointer(); |
---|
| 610 | |
---|
| 611 | UI->ApplyCommand("/tracking/verbose 1"); |
---|
| 612 | </programlisting> |
---|
| 613 | </informalexample> |
---|
| 614 | </para> |
---|
| 615 | |
---|
| 616 | </sect2> |
---|
| 617 | |
---|
| 618 | |
---|
| 619 | <!-- ******************* Section (Level#2) ****************** --> |
---|
| 620 | <sect2 id="sect.Track.Traj"> |
---|
| 621 | <title> |
---|
| 622 | Trajectory and Trajectory Point |
---|
| 623 | </title> |
---|
| 624 | |
---|
| 625 | <!-- ******* Bridgehead ******* --> |
---|
| 626 | <bridgehead renderas='sect4'> |
---|
| 627 | G4Trajectory and G4TrajectoryPoint |
---|
| 628 | </bridgehead> |
---|
| 629 | |
---|
| 630 | <para> |
---|
| 631 | <emphasis>G4Trajectory</emphasis> and <emphasis>G4TrajectoryPoint</emphasis> |
---|
| 632 | are default concrete classes provided by Geant4, which are derived from the |
---|
| 633 | <emphasis>G4VTrajectory</emphasis> and <emphasis>G4VTrajectoryPoint</emphasis> |
---|
| 634 | base classes, respectively. |
---|
| 635 | A <emphasis>G4Trajectory</emphasis> class object is created by |
---|
| 636 | <emphasis>G4TrackingManager</emphasis> when a <emphasis>G4Track</emphasis> |
---|
| 637 | is passed from the <emphasis>G4EventManager</emphasis>. |
---|
| 638 | <emphasis>G4Trajectory</emphasis> has the following data |
---|
| 639 | members: |
---|
| 640 | |
---|
| 641 | <itemizedlist spacing="compact"> |
---|
| 642 | <listitem><para> |
---|
| 643 | ID numbers of the track and the track's parent |
---|
| 644 | </para></listitem> |
---|
| 645 | <listitem><para> |
---|
| 646 | particle name, charge, and PDG code |
---|
| 647 | </para></listitem> |
---|
| 648 | <listitem><para> |
---|
| 649 | a collection of <emphasis>G4TrajectoryPoint</emphasis> pointers |
---|
| 650 | </para></listitem> |
---|
| 651 | </itemizedlist> |
---|
| 652 | </para> |
---|
| 653 | |
---|
| 654 | <para> |
---|
| 655 | <emphasis>G4TrajectoryPoint</emphasis> corresponds to a step point along |
---|
| 656 | the path followed by the track. Its position is given by a |
---|
| 657 | <emphasis>G4ThreeVector</emphasis>. A <emphasis>G4TrajectoryPoint</emphasis> |
---|
| 658 | class object is created in the <emphasis>AppendStep()</emphasis> method of |
---|
| 659 | <emphasis>G4Trajectory</emphasis> and this method is invoked by |
---|
| 660 | <emphasis>G4TrackingManager</emphasis> at the end of each step. |
---|
| 661 | The first point is created when the <emphasis>G4Trajectory</emphasis> |
---|
| 662 | is created, thus the first point is the original vertex. |
---|
| 663 | </para> |
---|
| 664 | |
---|
| 665 | <para> |
---|
| 666 | The creation of a trajectory can be controlled by invoking |
---|
| 667 | <emphasis>G4TrackingManager::SetStoreTrajectory(G4bool)</emphasis>. The UI |
---|
| 668 | command <emphasis>/tracking/storeTrajectory _bool_</emphasis> does the same. The |
---|
| 669 | user can set this flag for each individual track from his/her |
---|
| 670 | <emphasis>G4UserTrackingAction::PreUserTrackingAction()</emphasis> method. |
---|
| 671 | </para> |
---|
| 672 | |
---|
| 673 | <note><title></title> |
---|
| 674 | <para> |
---|
| 675 | The user should not create trajectories for secondaries in a shower |
---|
| 676 | due to the large amount of memory consumed. |
---|
| 677 | </para> |
---|
| 678 | </note> |
---|
| 679 | |
---|
| 680 | <para> |
---|
| 681 | All the created trajectories in an event are stored in |
---|
| 682 | <emphasis>G4TrajectoryContainer</emphasis> class object and this object will be |
---|
| 683 | kept by <emphasis>G4Event</emphasis>. To draw or print trajectories generated in |
---|
| 684 | an event, the user may invoke the <emphasis>DrawTrajectory()</emphasis> or |
---|
| 685 | <emphasis>ShowTrajectory()</emphasis> methods of <emphasis>G4VTrajectory</emphasis>, |
---|
| 686 | respectively, from his/her |
---|
| 687 | <emphasis>G4UserEventAction::EndOfEventAction()</emphasis>. The geometry must be |
---|
| 688 | drawn before the trajectory drawing. The color of the drawn |
---|
| 689 | trajectory depends on the particle charge: |
---|
| 690 | |
---|
| 691 | <itemizedlist spacing="compact"> |
---|
| 692 | <listitem><para> |
---|
| 693 | negative: red |
---|
| 694 | </para></listitem> |
---|
| 695 | <listitem><para> |
---|
| 696 | neutral: green |
---|
| 697 | </para></listitem> |
---|
| 698 | <listitem><para> |
---|
| 699 | positive: blue |
---|
| 700 | </para></listitem> |
---|
| 701 | </itemizedlist> |
---|
| 702 | </para> |
---|
| 703 | |
---|
| 704 | <note><title></title> |
---|
| 705 | <para> |
---|
| 706 | Due to improvements in <emphasis>G4Navigator</emphasis>, a track |
---|
| 707 | can execute more than one turn of its spiral trajectory without |
---|
| 708 | being broken into smaller steps as long as the trajectory does not |
---|
| 709 | cross a geometrical boundary. Thus a drawn trajectory may not be |
---|
| 710 | circular. |
---|
| 711 | </para> |
---|
| 712 | </note> |
---|
| 713 | |
---|
| 714 | <!-- ******* Bridgehead ******* --> |
---|
| 715 | <bridgehead renderas='sect4'> |
---|
| 716 | Customizing trajectory and trajectory point |
---|
| 717 | </bridgehead> |
---|
| 718 | |
---|
| 719 | <para> |
---|
| 720 | <emphasis>G4Track</emphasis> and <emphasis>G4Step</emphasis> are |
---|
| 721 | transient classes; they are not available at the end of the event. |
---|
| 722 | Thus, the concrete classes <emphasis>G4VTrajectory</emphasis> and |
---|
| 723 | <emphasis>G4VTrajectoryPoint</emphasis> are the only |
---|
| 724 | ones a user may employ for end-of-event analysis or for |
---|
| 725 | persistency. As mentioned above, the default classes which Geant4 |
---|
| 726 | provides, i.e. <emphasis>G4Trajectory</emphasis> and |
---|
| 727 | <emphasis>G4TrajectoryPoint</emphasis>, |
---|
| 728 | have only very primitive quantities. The user can customize his/her |
---|
| 729 | own trajectory and trajectory point classes by deriving directly |
---|
| 730 | from the respective base classes. |
---|
| 731 | </para> |
---|
| 732 | |
---|
| 733 | <para> |
---|
| 734 | To use the customized trajectory, the user must construct a |
---|
| 735 | concrete trajectory class object in the |
---|
| 736 | <emphasis>G4UserTrackingAction::PreUserTrackingAction()</emphasis> method and |
---|
| 737 | make its pointer available to <emphasis>G4TrackingManager</emphasis> by using the |
---|
| 738 | <emphasis>SetTrajectory()</emphasis> method. The customized trajectory point |
---|
| 739 | class object must be constructed in the <emphasis>AppendStep()</emphasis> method |
---|
| 740 | of the user's implementation of the trajectory class. This |
---|
| 741 | <emphasis>AppendStep()</emphasis> method will be invoked by |
---|
| 742 | <emphasis>G4TrackingManager</emphasis>. |
---|
| 743 | </para> |
---|
| 744 | |
---|
| 745 | <para> |
---|
| 746 | To customize trajectory drawing, the user can override the |
---|
| 747 | <emphasis>DrawTrajectory()</emphasis> method in his/her own trajectory class. |
---|
| 748 | </para> |
---|
| 749 | |
---|
| 750 | <para> |
---|
| 751 | When a customized version of G4Trajectory declares any new class |
---|
| 752 | variables, <emphasis>operator new</emphasis> and |
---|
| 753 | <emphasis>operator delete</emphasis> must be |
---|
| 754 | provided. It is also useful to check that the allocation size in |
---|
| 755 | <emphasis>operator new</emphasis> is equal to |
---|
| 756 | <emphasis>sizeof(G4Trajectory)</emphasis>. These two points do not |
---|
| 757 | apply to <emphasis>G4VTrajectory</emphasis> because it has no |
---|
| 758 | <emphasis>operator new</emphasis> or <emphasis>operator delete</emphasis>. |
---|
| 759 | </para> |
---|
| 760 | |
---|
| 761 | |
---|
| 762 | </sect2> |
---|
| 763 | </sect1> |
---|