IAEA Phase space files - warning and empty files

Dear all
I am trying to include the IAEA phase space files Writer funcionalities in my Geant 4 application.

I have done all modifications on RunAction, Event Action and SteppingAction files according to the manual, and also I have include all IAEA Phase-space database files to my source and iclude folder. As I am running Geant4 11.1 version, I have also made some modification on the G4IAEAphspWriter.cc file to correct some errors in compilation.

I have some warnings on my compilation:
/Users/alessandratomal/Documents/Radboudumc/voxmammo-master/monte_carlo/include/utilities.h:83:9: warning: ‘LITTLE_ENDIAN’ macro redefined [-Wmacro-redefined]
#define LITTLE_ENDIAN __LITTLE_ENDIAN
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/arm/endian.h:71:9: note: previous definition is here
#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
^
In file included from /Users/alessandratomal/Documents/Radboudumc/voxmammo-master/monte_carlo/sources/iaea_phsp.cc:68:
/Users/alessandratomal/Documents/Radboudumc/voxmammo-master/monte_carlo/include/utilities.h:84:9: warning: ‘BIG_ENDIAN’ macro redefined [-Wmacro-redefined]
#define BIG_ENDIAN __BIG_ENDIAN
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/arm/endian.h:72:9: note: previous definition is here
#define BIG_ENDIAN __DARWIN_BIG_ENDIAN
^
In file included from /Users/alessandratomal/Documents/Radboudumc/voxmammo-master/monte_carlo/sources/iaea_phsp.cc:68:
/Users/alessandratomal/Documents/Radboudumc/voxmammo-master/monte_carlo/include/utilities.h:85:9: warning: ‘PDP_ENDIAN’ macro redefined [-Wmacro-redefined]
#define PDP_ENDIAN __PDP_ENDIAN
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/arm/endian.h:73:9: note: previous definition is here
#define PDP_ENDIAN __DARWIN_PDP_ENDIAN
^
I can run the executable, but even If I used a single calculation mode, the resulting files IAEAphsp file was empty.

I included score planes and several points of the geometry, where I am sure that there is transport of particles and none is recorded. See example below

Phase-space file at z = -1.78e-16 cm closed successfully!

NEW PHASE SPACE FILE WILL BE CREATED

IAEA_INDEX: 1000
TITLE: PHASESPACE in IAEA format
FILE TYPE: PHASESPACE
RECORD LENGTH: 33

RECORD_CONTENTS:
// Variable 3 is constant
// 1 extra LONG variable(s) defined
// Incremental history number stored in the extralong array [ 0]

RECORD_CONSTANT:
0.0000 // Constant variable # 3

NUMBER OF PRIMARY PARTICLES: 1000
PARTICLES: 0

GLOBAL_PHOTON_ENERGY_CUTOFF: 0.00000
GLOBAL_PARTICLE_ENERGY_CUTOFF: 0.00000

Is it can be related to the warnings? I am using a MacBook M2.

Dear alessandratomal,

Sorry for my delayed reply. Here I identify two different issues:

  1. It seems that the warning is triggered by the file utilities.h, which is developed external to Geant4 within the IAEA phsp project. In this sense, the best thing to do is to write an email to the project officer regarding this issue with MacOS. I can contact him, too.
  2. As for the actual cause of having no particles written, I think it is better to interact directly with the code, if possible. This issue can be related with the warnings, but also with the code modifications you needed to introduce in order to have this working with a recent version. Did you track these code changes?

Regards,
Miguel

Thank you Miguel

Regarding the issues:
1 - The warnings only appear on MacOS, while on Linux it works properly
2 - During the last weeks I implement some modification for the recent version and also tracked all code modification. In fact, I realized that SteppingActions was not activated. Now it is working and I am able to Write phsp.

Ok, this sounds good!