What is wrong with the file revised?

I revised the file /usr/local/Geant4_11.2.0/data/G4PARTICLEXS4.0/alpha/inel4 for calculation, but the error occured:

“-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : had015
issued by : G4ParticleInelasticXS::RetrieveVector(..)
Data file </usr/local/Geant4_11.2.0/data/G4PARTICLEXS4.0/alpha/inel4> is not retrieved!Check G4PARTICLEXSDATA

*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------

*** G4Exception: Aborting execution ***“

the raw file is inel4.txt, and the file revised is inel4_revised.txt, they are attached.

what is wrong with the file revised?

inel4_revised.txt (14.1 KB)

inel4.txt (8.3 KB)

Geant4 Version:11.2.0
Operating System:Ubuntu 20.04
Compiler/Version:GCC G++ 9.4.0
CMake Version:3.16.3


I mean the format of the file.

You have many pairs of duplicated energies, it will simply fail if it encounters those which will cause the RetrieveVector function to fail. One of the many examples:

9.96 6.98027E-23   	
9.96 6.9794E-23 

I am also not sure but your irregular spacing may cause issues. I’d recommend either linear or logarithmic (probably better) binning. You can just resample what you already have.

Outside of this I think the more resilient way to do this is:

  1. Create a G4VCrossSectionDataSet instance
  2. Register it via G4HadronicProcess::AddDataSet()

@jrellin, thank you for your reply, the error is caused by the format of file, the file was processed in windows system, and the encoding of file is UTF-8 Unicode text, but Geant4 needs ASCII text.

and i will learn the more resilient way you recommend.