TestEm15 example: errors in macro file for studying gamma conversion in G4BetheHeitler5DModel

Geant4 Version: geant4-11-02-patch-02
Operating System: Ubuntu 22.04.4
Compiler/Version: gcc 11.4.0
CMake Version: 3.22.1

Dear G4 experts,
I have been trying to study e+ e- pair creation with the G4BetheHeitler5DModel in the extended/electromagnetic/TestEm15 example. It seems however that the provided macro file gamma.mac (and also the similar gamma2mumu.mac) is outdated/broken.

I run the macro file provided together with the example in the G4 source code as

./TestEm15 gamma.mac

There are several issues:

  1. The line

    /testem/phys/addPhysics emstandard5D

    in gamma.mac causes the error message PhysicsList::AddPhysicsList: <emstandard5D> is not defined (but the program continues and finishes with exit code zero). I replaced this with

    /testem/phys/addPhysics emstandard_opt4

    and then the error disappears.

  2. However, now the lines

     /process/inactivate phot
     /process/inactivate compt
     /process/inactivate Rayl
     /process/inactivate GammaToMuPair

    cause an exception:

    -------- WWWW ------- G4Exception-START -------- WWWW -------
    *** G4Exception : UIMAN0123
          issued by : G4UImanager::ApplyCommand
     illegal process (or type) name [phot]
    Error code : 1
    *** This is just a warning message. ***
    -------- WWWW -------- G4Exception-END --------- WWWW -------
    ***** Illegal parameter (1) </process/inactivate phot> *****

    I can remove them, but this will counteract the purpose stated in README.gamma: “All discrete processes are inactivated (see macro), so Gamma Conversion is ‘forced’.”

  3. Finally the histogram relevant to studying the conversion of polarized gammas, histogram 16, “Gamma Conversion. Phi of Gamma Polarization”, which is actived by

    /analysis/h1/set 16  100 -{pi} {pi} none   # Phi of Gamma Polarization

    only has entries at phi=0, which is clearly unphysical. I suspect that the G4BetheHeitler5DModel is not used at all in the current state of the example.

Any help by the experts would be greatly appreciated.

Best regards