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 PhysicsLimitation to step (uStepMax)G4StepLimiter process must be defined to affected particle types. This process limits a step, but it doesnot kill a track.Limitations to track (uTrakMax, uTimeMax, uEkinMin, uRangMin)G4UserSpecialCuts process must be defined to affected particle types. This process limits a step andkills the track when the track comes to one of these limits. Step limitation occurs only <strong>for</strong> the final step.Example of G4UserLimits can be found in examples/novice/N02 : see DetectorConstruction andPhysicsList.5.8. Track Error PropagationThe error propagation package serves to propagate one particle together with its error from a given trajectory stateuntil a user-defined target is reached (a surface, a volume, a given track length,...).5.8.1. PhysicsThe error propagator package computes the average trajectory that a particle would follow. This means that thephysics list must have the following characteristics:• No multiple scattering• No random fluctuations <strong>for</strong> energy loss• No creation of secondary tracks• No hadronic processesIt has also to be taken into account that when the propagation is done backwards (in the direction opposed to theone the original track traveled) the energy loss has to be changed into an energy gain.All this is done in the G4ErrorPhysicsList class, that is automatically set byG4ErrorPropagatorManager as the GEANT4 physics list. It sets G4ErrorEnergyLoss as unique electromagneticprocess. This process uses the GEANT4 class G4EnergyLossForExtrapolator to computethe average energy loss <strong>for</strong> <strong>for</strong>wards or backwards propagation. To avoid getting too different energy loss calculationwhen the propagation is done <strong>for</strong>wards (when the energy at the beginning of the step is used) or backwards(when the energy at the end of the step is used, always smaller than at the beginning) G4ErrorEnergyLosscomputes once the energy loss and then replaces the original energy loss by subtracting/adding half of this value(what is approximately the same as computing the energy loss with the energy at the middle of the step). In thisway, a better calculation of the energy loss is obtained with a minimal impact on the total CPU time.The user may use his/her own physics list instead of G4ErrorPhysicsList. As it is not needed to define aphysics list when running this package, the user may have not realized that somewhere else in his/her applicationit has been defined; there<strong>for</strong>e a warning will be sent to advert the user that he is using a physics list different toG4ErrorPhysicsList. If a new physics list is used, it should also initialize the G4ErrorMessenger withthe classes that serve to limit the step:G4ErrorEnergyLoss* eLossProcess = new G4ErrorEnergyLoss;G4ErrorStepLengthLimitProcess* stepLengthLimitProcess = new G4ErrorStepLengthLimitProcess;G4ErrorMagFieldLimitProcess* magFieldLimitProcess = new G4ErrorMagFieldLimitProcess;new G4ErrorMessenger( stepLengthLimitProcess, magFieldLimitProcess, eLossProcess );To ease the use of this package in the reconstruction code, the physics list, whether G4ErrorPhysicsListor the user's one, will be automatically initialized be<strong>for</strong>e starting the track propagation if it has not been doneby the user.5.8.2. Trajectory stateThe user has to provide the particle trajectory state at the initial point. To do this it has to create an object of oneof the children classes of G4ErrorTrajState, providing:189

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

Saved successfully!

Ooh no, something went wrong!