Cannot open output ROOT file

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_11.2
Operating System: Window 11
Compiler/Version:
CMake Version:


Hi all,
I have a problem with Geant4 output in ROOT format as show in attached image.

I hope can anyone help me to fix the problem.
Thank you in advance.
Best regards.

Have you tried the suggestions in your cross-post here: There is an error when opening root file - ROOT - ROOT Forum?

Thanks @bmorgan.

  • Because the output file was generated from Geant4. So I hope anyone are expert in Geant4 and ROOT can help me fix the problem.
  • I think it is due to the scale factor that I set in the SetNumberOfParticles method of PrimaryGeneratorAction class.
PrimaryGeneratorAction::PrimaryGeneratorAction()
{
	fPrimaryGeneratorActionMessenger = new PrimaryGeneratorActionMessenger(this);
	particleGun = new G4ParticleGun();
	particleGun->SetNumberOfParticles(500);
}
  • The last test with a factor of 250 was no error. The below output is the result of the test (BeamOn=1E9, Scale Factor=250). Here
  • If I scale it to 500 times, the error is like the post.Here is the result.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.