12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tracking and Physicsbe<strong>for</strong>e the event loop, not in the initialization phase. So, at least one event must be executed be<strong>for</strong>e using the"storePhysicsTable" command.Calculated physics tables can be retrieved from files by using the "retrievePhysicsTable" command. Materialsand cuts from files are compared with those defined in the current geometry setup, and only physics vectorscorresponding to the MaterialCutsCouples used in the current setup are restored. Note that nothing happens justafter the "retrievePhysicsTable" command is issued. Restoration of physics tables will be executed in parallelwith the calculation of physics tables.5.6.4. Building the Physics TableIn the G4RunManagerKernel::RunInitialization() method, after the list of MaterialCutsCouples isupdated, the G4VUserPhysicsList::BuildPhysicsTable() method is invoked to build physics tables<strong>for</strong> all processes.Initially, the G4VProcess::PreparePhysicsTable() method is invoked. Each process createsG4PhysicsTable objects as necessary. It then checks whether the MaterialCutsCouples have been modified aftera run to determine if the corresponding physics vectors can be used in the next run or need to be re-calculated.Next, the G4VProcess::RetrievePhysicsTable() method is invoked if theG4VUserPhysicsList::fRetrievePhysicsTable flag is asserted. After checking materials and cutsin files, physics vectors corresponding to the MaterialCutsCouples used in the current setup are restored.Finally, the G4VProcess::BuildPhysicsTable() method is invoked and only physics vectors which needto be re-calculated are built.5.7. User Limits5.7.1. General ConceptsThe user can define artificial limits affecting to the <strong>Geant4</strong> tracking.G4UserLimits(G4double uStepMax = DBL_MAX,G4double uTrakMax = DBL_MAX,G4double uTimeMax = DBL_MAX,G4double uEkinMin = 0.,G4double uRangMin = 0. );uStepMaxuTrakMaxuTimeMaxuEkinMinuRangMinMaximum step lengthMaximum total track lengthMaximum global time <strong>for</strong> a trackMinimum remaining kinetic energy <strong>for</strong> a trackMinimum remaining range <strong>for</strong> a trackNote that uStepMax is affecting to each step, while all other limits are affecting to a track.The user can set G4UserLimits to logical volume and/or to a region. User limits assigned to logical volumedo not propagate to daughter volumes, while User limits assigned to region propagate to daughter volumes unlessdaughters belong to another region. If both logical volume and associated region have user limits, those of logicalvolume win.5.7.2. Processes co-working with G4UserLimitsIn addition to instantiating G4UserLimits and setting it to logical volume or region, the user has to assign thefollowing process(es) to particle types he/she wants to affect. If none of these processes is assigned, that kind ofparticle is not affected by G4UserLimits.188

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!