Download Geant4 User's Guide for Application Developers
Transcript
Tracking and Physics 5.7. User Limits 5.7.1. General Concepts The user can define artificial limits affecting to the Geant4 tracking. G4UserLimits(G4double G4double G4double G4double G4double uStepMax uTrakMax uTimeMax uEkinMin uRangMin = = = = = DBL_MAX, DBL_MAX, DBL_MAX, 0., 0. ); uStepMax Maximum step length uTrakMax Maximum total track length uTimeMax Maximum global time for a track uEkinMin Minimum remaining kinetic energy for a track uRangMin Minimum remaining range for a track Note that uStepMax is affecting to each step, while all other limits are affecting to a track. The user can assign G4UserLimits to logical volume and/or to a region. User limits assigned to logical volume do not propagate to daughter volumes, while User limits assigned to region propagate to daughter volumes unless daughters belong to another region. If both logical volume and associated region have user limits, those of logical volume win. A G4UserLimits object must be instantiated for the duration of whatever logical volume or region to which it is assigned. It is the responsibility of the user's code to delete the object after the assigned volume(s)/region(s) have been deleted. 5.7.2. Processes co-working with G4UserLimits In addition to instantiating G4UserLimits and setting it to logical volume or region, the user has to assign the following process(es) to particle types he/she wants to affect. If none of these processes is assigned, that kind of particle is not affected by G4UserLimits. Limitation to step (uStepMax) G4StepLimiter process must be defined to affected particle types. This process limits a step, but it does not kill a track. Limitations to track (uTrakMax, uTimeMax, uEkinMin, uRangMin) G4UserSpecialCuts process must be defined to affected particle types. This process limits a step and kills the track when the track comes to one of these limits. Step limitation occurs only for the final step. Example of G4UserLimits can be found in examples/basic/B2 : see B2aDetectorConstruction (or B2bDetectorConstruction). The G4StepLimiter process is added in the Geant4 physics list via the G4StepLimiterBuilder class in the main() function in exampleB4a.cc (or exampleB4b.cc ). 5.8. Track Error Propagation The error propagation package serves to propagate one particle together with its error from a given trajectory state until a user-defined target is reached (a surface, a volume, a given track length,...). 5.8.1. Physics The error propagator package computes the average trajectory that a particle would follow. This means that the physics list must have the following characteristics: 229