Using BgsTransportation with the Geant4 Toolkit
Last modified :
Introduction
BgsTransportation is a specialized stepper developed for use in BaBar by
David Williams. Unlike the default, Runge-Kutta stepper provided by Geant4,
BgsTransportation uses perfect helices to track particles through magnetic
fields. As a result, BgsTransportation is faster and more accurate than the
default stepper, provided the field does not vary too rapidly.
It has been proposed to make BgsTransportation an official part of the Geant4
toolkit, but substantial changes in the Geant4 navigator must first be made.
For the time being, BgsTransportation is being made available as part of the
SLAC patch of the Geant4 toolkit and is included with the standard Geant4
libraries.
Building an Executable which uses BgsTransportation
Example A01 provides the ability to run simulations with either the default
stepper or BgsTransportation. Instructions for building this example are
found here .
Once the example is built, it may be run by executing
../bin/$G4SYSTEM/A01app novis.mac bgstrans
which uses BgsTransportation, or
../bin/$G4SYSTEM/A01app novis.mac
which uses the default stepper.
How BgsTransportation is Invoked
Like the default Geant4 stepper, BgsTransportation is a process which must be
instantiated and registered to all particles requiring transportation. This
is done in the PhysicsList. The implementation of this option, from the
command line to the addition of the process, is outlined here:
- the option "bgstrans" is passed to the physics list in main() :
- runManager->SetUserInitialization(new A01PhysicsList(UseBgsTrans));
- A01PhysicsList derives from G4VModularPhysicsList, so the constructor
for A01PhysicsList looks like :
- A01PhysicsList::A01PhysicsList(G4bool UseBgsTrans)
:G4VModularPhysicsList(UseBgsTrans)
In standard Geant4 the class G4VModularPhysicsList has no argument, so it
was modified in the SLAC patch
- In G4VModularPhysicsList::ConstructProcess() either
- AddBgsTransportation() or
- AddTransportation()
is called, depending on the value of the boolean UseBgsTrans
- G4VModularPhysicsList is derived from G4VUserPhysicsList. The method
AddBgsTransportation() was added to the standard G4VUserPhysicsList
in order to register the BgsTransportation process with all the particles
and to set the order of process invokation.
Restrictions
- As mentioned above, BgsTransportation should not be used in magnetic
fields which vary rapidly in space. In that case the routine will
continue to reduce the step size until the variation of the field
over that step is small relative to some tolerance. This will cause
the tracking to slow down significantly.
- BgsTransportation does not use the G4Navigator. This means that certain
classes and methods cannot be used. Amoung them are:
- G4PVParameterised, used in generating parameterized volumes
- G4TouchableHistory::GetHistory()
Dennis Wright