Docstoc

Development of an Interface for Using EGS4 Physics Processes in Geant4

Document Sample
Development of an Interface for Using EGS4 Physics Processes in Geant4 Powered By Docstoc
					                           An Interface for
             Using EGS4 Physics Processes
                                 in Geant4

                                                   K.Murakami (KEK)

                                         6/Sep./2003
                      Geant4 Workshop 2003 (TRIUMF)

06/Sep./03         Geant4 Workshop 2003 (TRIUMF)                  1
Outline
I.           Introduction
II.          System Analysis
III.         Design Details
IV.          Users’ Side View
V.           Summary



06/Sep./03             Geant4 Workshop 2003 (TRIUMF)   2
                                                         Introduction
   Geant4 has rich flexibility and expansibility for adding
    physics processes, in addition to its powerful geometry
    description.

   It is not easy to describe complicated/realistic geometry for
    EGS4 users.

   Taking advantage of the capabilities of Geant4 as a
    framework, we developed an interface for using EGS4 as a
    module of physics process in Geant4.

   By means of this interface,
       EGS4 users can share Geant4 powerful resources, such as
        geometry description, tracking etc.
       A common environment for comparison tests between EGS4 and
        Geant4 especially in users’ realistic application level.

06/Sep./03               Geant4 Workshop 2003 (TRIUMF)              3
             II. System Analysis




06/Sep./03     Geant4 Workshop 2003 (TRIUMF)   4
                                            Analysis of EGS4 System
                               - in terms of difference from Geant4-
     We first carried out analysis of the EGS4 system in terms of difference from
      Geant4.

     Our policy is that we should care for NOT to change algorithms and
      prescriptions which are used in the EGS4 system.

     Issue-1: A way of calculation of step size and process selection

           In Geant4, each process has its own fate in terms of NIL (N of Interaction Length).
            Then, a process having minimum fate will occur.

           In EGS4, the next step size is calculated based on the total cross section of a
            particle. Then, which process will occur is chosen at the rate of branching fraction
            of a process.

           In principle, these work in the same manner. Good!!
           We implemented the EGS physics processes as single Geant4 processes for
            electron/photon respectively.



    06/Sep./03                        Geant4 Workshop 2003 (TRIUMF)                                5
                              Analysis of EGS4 System (Cont’d)
    Issue-2: Scheme of describing material information
          In Geant4,
                Material information has only properties of material itself (atomic number/mass, density, composition...)
                Cross section tables are calculated at initialization time.
          In EGS4,
                Users have to prepare a material (cross section) file by executing PEGS, which is an external program,
                 preceding to execution of a EGS4 program.
                Additional information related to “processes” (cutoff, parameters/coefficients of formulas) are described as
                 material.

          We manage material information in terms of both of Geant4 and EGS4.
          Users have to execute PEGS externally and our interface manages material information listed in a
           PEGS output file.
          A mapping table between G4 materials and EGS4 materials is prepared.

    Issue-3: Cutoff scheme
          In Geant4,
                There is no cutoff energy. Particles basically will be transported until they have zero kinetic energy.
                An idea of production cut is introduced to avoid infrared divergence.
          In EGS4,
                An idea of cutoff energy is applied. Particles below cutoff energy will be discarded.

          According to our policy, we don’t disturb the EGS4 treatments in order to obtain the same output
           as obtained by EGS4 itself.
          Each material has its own cutoff energy for electron/photon.


    06/Sep./03                                 Geant4 Workshop 2003 (TRIUMF)                                                 6
                               Table of Components
                             Which package is used?

    Control Framework : EGS4                      Geant4
    Tracking :          EGS4                      Geant4
    Geometry :          EGS4                      Geant4
    Materials :         EGS4                      Geant4
    Cross Section Table:EGS4                      Geant4
                         (PEGS)
    Physics Process : EGS4                        Geant4
    Cutoff Scheme :     EGS4                      Geant4

06/Sep./03         Geant4 Workshop 2003 (TRIUMF)            7
                III. Design Details




06/Sep./03   Geant4 Workshop 2003 (TRIUMF)   8
                                             Functional Mapping
 EGS4 Flow            EGS4 subroutines             Geant4 Class

 SHOWER                                            tracking manager
  (tracking controller)

         ELECTOR                                    stepping manager
         PHOTON                                      single process for electron
         (controller for stepping and                single process for photon
             process invocation)                          GPIL() (GetPhysicalInteractionLength)
                                                                calculating the next interaction point
                                                          DoIt()
                                                                describing a reaction

                HOWFAR                              G4 geometry
                (geometry and navigation,            G4 transportation (as a process)
                 user code)
                each Physics Process                reused as-is
                     COMPT                           wrapped with FORTRAN-C++
                     BREMS                         interface
                     ...
06/Sep./03                         Geant4 Workshop 2003 (TRIUMF)                                    9
                                                                    Parts List
     Manager                                          Prefix of classes is “EGS2G4”.
         EGS2G4Manager
         which is automatically instantiated/deleted from an actual process class.
         Users don’t have to take care of it.


     Management of material information
           EGS2G4Material / EGS2G4PegsMaterial
           EGS2G4MaterialStore / EGS2G4PegsMaterialStore

     Implementation of actual processes
           EGS2G4VProcess / EGS2G4eProcess / EGS2G4gProcess

     Controller for user parameters/flags
           EGS2G4ParameterStore/EGS2G4TParameter
           All parameters/flags of EGS4 can be accessed via G4 user commands at
            run time.
           Users don’t have to re-compile any EGS4 library.



    06/Sep./03                   Geant4 Workshop 2003 (TRIUMF)                     10
06/Sep./03   Geant4 Workshop 2003 (TRIUMF)   11
                                                                         How It Works
     g4mate
                                                                              g4change
                      egsmate
                                                                                     evacuation
                                          A virtual volume with
                                update
                                            • no dimensions
              g4-egs                         • empty media               egs stack
                                                                                                  g4track
            material map                                                 egs stack
                                                                         egs stack    update


      In the EGS4 world, a single virtual volume with
            no dimensions (transportation is a G4 job)
            empty medium (dynamically updated)
     is prepared.

      At tracking time,
1.     Medium information of the EGS4 volume is updated at every step
       though the material map from G4 to EGS4.
2.     Kinematical information in the EGS4 stack is updated from G4 track.
3.     A EGS4 process is invoked.
4.     The stack information of EGS4 is evacuated to a G4 particle-change.
     06/Sep./03                          Geant4 Workshop 2003 (TRIUMF)                                 12
                                                          Material Description
                                                                         G4-EGS Material Map
                           EGS4 World
       PEGS Material                       EGS Material

                                                                                 Geant4 World

                                                                                     G4Material
   There are three classes describing materials:
        PEGS Material:
                It describes materials defined in a PEGS output.

        EGS Material:
                It has a PEGSMaterial.
                In addition, it has information, such as
                      user cutoffs, user density, user flags, ...

        G4 Material:
                A G4Material is related to a EGSMaterial by users at initialization time.
                A G4Material is translated to a EGSMaterial through the map at tracking
                 time.


06/Sep./03                               Geant4 Workshop 2003 (TRIUMF)                            13
                     Implementation of Physics Process
   Single process per electron/photon respectively
       easy to translate the flow control of EGS4
       GPIL() is based on “total cross section”                            G4VProcess
       Actual process is selected in DoIt().


   EGS2G4VProcess
         has common utility methods;                                  EGS2G4VProcess
                conversion from G4Material to EGSMaterial
                communication with the EGS4 stack...

   EGS2G4gProcess                                                   EGS2G4gProcess
         implemented as a discrete process                          (EGS4::PHOTON)

   EGS2G4eProcess
         implemented as a continuous-discrete-at-rest process
                                                                            EGS2G4eProcess

                                                                            (EGS4::ELECTR)
    06/Sep./03                       Geant4 Workshop 2003 (TRIUMF)                       14
                                                       Treatment of Cutoff
     We don’t disturb the cutoff treatment carried out in EGS4!! This is our
      policy.

     Basically, a particle below the cutoff will be discarded with depositing
      its kinetic energy.
     Positron will be stopped but still alive and followed by annihilation.

     Notes:
     There are two cutoff-s in EGS4.
          AP/AE (for photon/electron)
          UP/UE (upper-side limit)
                    which are given in PEGS and utilized as energy windows of cross section tables.
                    AP/AE works also as production thresholds for brems. / Moller.
                    For UP/UE, we provide a safety scheme not to exceed energy limit of cross section
                     tables.
          PCUT/ECUT
                    which are EGS user cutoff. (attributes of EGSMaterial)




    06/Sep./03                             Geant4 Workshop 2003 (TRIUMF)                            15
             Process List Currently Covered
    As the first target, we started with interfacing with a
     plain EGS4 (distributed as a KEK version).
   Photon processes                       Electron processes

                                       multiple scattering
      Rayleigh scattering
                                       momentum flip only.
      pair production
                                        lateral displacement is not included.
      photo-electric effect
                                       continuous energy loss
       w/ subsequent fluorescence
                                       Bremsstrahlung
      Compton scattering
                                       Møller scattering (e-)
                                       BhaBha(e+)
      To simulate multiple scattering
      more precisely, PRESTA have to
                                       positron annihilation (e+)
      be included.                       (in-flight / at-rest)
06/Sep./03                 Geant4 Workshop 2003 (TRIUMF)                 16
             IV. Users’ Side View




06/Sep./03    Geant4 Workshop 2003 (TRIUMF)   17
                                                             Product Hierarchy
                          Geant4
                                             EMegs Physics List
                  user program layer
                                                               EMegsPhysics
                           EGS4                                   : public G4VPhysicsConstructor
                         physics list
                                                               A modular PhysicsList for EM physics

                   interface layer                   EGS2G4 package
              Gean4 interface with EGS4
                                                                 Another G4 library for EM physics
             management of           invocation of               libEGS2G4.a
              EGS materials          EGS process




                 plug-in adapter layer                           Another EGS4 library for G4
                wrapped in MORTRAN                               GNUmake  cpp
                                                                     MORTRAN
   SUBROUTINE            SUBROUTINE          SUBROUTINE              F77  libegs4g4.a
     GTEMFP                EPSDIT              PPSDIT

                                                     EGS4g4 package
                              EGS4

06/Sep./03                              Geant4 Workshop 2003 (TRIUMF)                            18
                                        View from Users’ Side
   User Physics List:
            An alternative EM-physics list is provided as a modular “Physics List”
             for EM w/ EGS4 processes.

   User Detector Construction (Geometry):
            Users don’t have to modify any existing Geant4 geometry codes.
            Users make assignment of a Geant4 material to a EGS4 material by
             hands.

   Cross Section Table:
            Users have to execute PEGS externally.
                 define PEGS materials in PEGS input files.
                 execute PEGS to generate a cross section file (so-called PEGS output).

   All operations can be performed via G4 command line interface
    interactively.
            assigning G4Material to EGSMaterial
            setting users parameters
            initialization, ...
06/Sep./03                          Geant4 Workshop 2003 (TRIUMF)                          19
                                                                   # user macro to set up EGS matetials
                                                                   # create EGS materials [egs nama] [pegs name] [g4 name]
                                                                   /process/egs4/material/create AIR ! Air
   Example of                                                      /process/egs4/material/create PB PB Lead
                                                                   /process/egs4/material/create PB-2 PB
                                                                   /process/egs4/material/create NAI ! NaI
   Material Session                                                # assing g4 mate. to egs mate.
                                                                   /process/egs4/material/assign Vacuum VACUUM
Command directory path : /process/egs4/material/
Guidance :                                              # set user cutoff
commands relevant to EGS materials                      /process/egs4/material/setCuts NAI 0.1 0.7
 Sub-directories :
  /process/egs4/material/pegs/ commands for PEGS        /process/egs4/setPegsFile pegs.dat
materials                                               /process/egs4/initialize
 Commands :
  create * create a EGS material
  setPegs * set a Pegs material to a EGS material
  assign *   assign a material(G4) to a material(EGS)    b00(Idle)[/process/egs4/material/]:dump NAI
  clearAssingment * clear assignment list of G4Material  -------------------------------------------------------------------------
  dump *     dump EGS material information               (@): EGS material name         -> PEGS medium name           -> G4Material name
                                                         -------------------------------------------------------------------------
  print *    print EGS material information (EGS->G4)    (o):NAI                 :"NAI                 ":NaI
  printMap * print EGS material information (G4->EGS)        @PEGS=0x8d06600
  listG4Material * list materials(G4) defined                AP*=0.010 , UP*=100.000 , PCUT=0.010 (MeV)
  erase *    erase a EGS material                            AE*=0.521 , UE*=100.511 , ECUT=0.521 (MeV)
  clearAll * clear EGS materials                             URho/Rho*=3.667 /3.667 (g/cm3) =1.000
                                                             IRAYL= 1, IRAYLM*= 1, IEDGFL= 0
  setCuts * set cutoff energy (in MeV) for
              photon/electronto a EGS material           tb00(Idle)[/]:/process/egs4/material/printMap
  setIRAYLR * set a flag of Rayleigh scattering          -------------------------------------------------------------------------
  setIEDGFL * set IEDGFL parameter (K-shell fluorescence)(@): EGS material name -> PEGS medium name                   <- G4Material name
  setRHOR * set user density (in g/cm3)                  -------------------------------------------------------------------------
                                                         (o):VACUUM                 :"VACUUM                   ":Vacuum
  setDefaultParams * set defaut parameters               (o):AIR                    :"AIR                     ":Air
                                                                (-):n/a                   :"                   ":ArEthane
                                                                (o):PB                    :"PB                 ":Lead
                                                                (o):SCINTI                :"SCINTI             ":Scinti
    06/Sep./03                                                  (o):NAI
                                                 Geant4 Workshop 2003 (TRIUMF)            :"NAI                ":NaI           20
                                           Sample Event Display
                                                   5 electrons with Ek=50 MeV into
                                                   a slab geometry composed of
                                                   several materials.
                                                   w/ cutoff Ek=10 keV




    Robustness
       several-M events in a simple geometry
       were successfully generated without
       crush.
06/Sep./03                 Geant4 Workshop 2003 (TRIUMF)                       21
                                                  Status and Plans
   First implementation was finished.

   Detail system check and benchmark tests are started as
    the next target.

   We have plans of comparisons;
       between EGS4 itself and the EGS4-G4 interface.
       between G4 and EGS4(w/ the interface) on common geometries.


   Technical study for treating PRESTA is planned for more
    precise simulation.
       The treatment of multiple scattering is closely coupled with
        geometry (boundary).


06/Sep./03                  Geant4 Workshop 2003 (TRIUMF)              22
                                                         Summary
   We have successfully developed the first version of an
    interface between EGS4 and Geant4 based on OO-
    approach.

   This work is a proof of flexibility and expansibility of the
    Geant4 framework.

   By means of this interface, EGS4 users will be able to
    share Geant4 powerful resources, such as geometry
    description, tracking etc.

   Further detail benchmarks are on going.



06/Sep./03               Geant4 Workshop 2003 (TRIUMF)             23
                                    Acknowledgements

   This activity is proceeded under KEK-SLAC
    collaboration.

   Thanks to co-workers;
       K.Amako   (KEK)
       T.Sasaki (KEK)
       H.Hirayama (KEK)
       Y.Namito (KEK)
       M.Asai (SLAC)
       T.Koi (SLAC)




06/Sep./03           Geant4 Workshop 2003 (TRIUMF)   24

				
DOCUMENT INFO