Created attachment 225 [details] Error reported by the software when I revised the ml2.mac file to run the project. Dear Sir/Madam: I have installed the Geant4.9.5.p02 on my Ubuntu 12.04 64-bit system. I am trying to import a IAEA phase space data(TrueBeam_v2_6FFF_00.IAEAphsp) to advanced medical linac example. In the build ml2.mac file, I made revision like this: ### Primary generator .... #/primaryParticleData/sourceTypeName randomTarget # type of particle generator source /primaryParticleData/sourceTypeName phaseSpace #/primaryParticleData/calculatedPhaseSpaceFileIN PhSp_Acc1_1.txt # full path and file name of the phase space file to be used as particle generator /primaryParticleData/calculatedPhaseSpaceFileIN TrueBeam_v2_6FFF_00.IAEAphsp ..... When I try to run the build ml2 file (./ml2), the software complain the following errors: -------- EEEE ------- G4Exception-START -------- EEEE ------- *** G4Exception : TRACK003 issued by : G4ParticleChange::CheckIt momentum, energy, and/or time was illegal *** Event Must Be Aborted *** -------- EEEE -------- G4Exception-END --------- EEEE ------- Could you give me some suggestions about how to use the phase space data as the particle rather than random target? I find online that IAEA provide an interface to read the IAEA space phase files (http://www-nds.iaea.org/phsp/phsp.htmlx). I tried to copy the needed function and headers to linac /include and /src folder and modified the source code (ML2PhantomConstruction.cc and ML2PhantomConstruction.hh) files based on the IAEA document but it still does not work. I just wonder should I use the IAEA interface to import the IAEA phase space data? Thank you for your help and have a nice day. Sincerely Yours Yue
Created attachment 226 [details] Error information when I try to build the project using make -j2
Dear Sir/Madam: Hope you have a nice day. I just add some revision to my reported problem. I tried to use the interface developed by IAEA to make some revisions to the source code in linac example. I revised the following two files located in /src and /include folders in the medical linac project: ML2PrimaryGenerationAction.cc and ML2PrimaryGenerationAction.hh. You can see the attachments for the detail information for my revision. When I try to build the project, there are some problems. I use command cmake -DGeant4_DIR=/home/yunzhongfan107/Program/Geant4/geant4.9.5-install/lib/Geant4-9.5.2/ /media/7b6affeb-931d-46f5-ab55-dca1255b2204/yunzhongfan107/work/Geant4/TrueBeam/medical_linac/ Success then I use make -j2 The software complains about some problems (you can see the screen-shot for details. Could you give me some suggestions please? Thank you for your help. Best Yue
Created attachment 227 [details] revised ML2PrimaryGenerationAction.hh file
Created attachment 228 [details] revised ML2PrimaryGenerationAction.cc file
The medical_linac example is not meant to import directly the phase space data from the IAEA format. It is able to re-read only phase-space files that are generated by the program itself.