Issue running laserDrivenBeamline.mac in hadrontherapy example

Hi all!

I’m a relative newbie to GEANT4 and have an issue regarding running macros in the command line. In particular, I would like to run laserDrivenBeamline.mac in the hadrontherapy example.

When I run

./hadrontherapy ../macro/laserDrivenBeamline.mac

in the build directory, I get the following error:

***** COMMAND NOT FOUND </process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

When I run the executable (./hadrontherapy), I do not receive an error. However, when I run

/control/execute laserDrivenBeamline.mac

in the visualization, I receive the following error:

***** Illegal application state </geometrySetup/selectGeometry LaserDriven> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (200)
Error code : 200
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

illegal application state – command refused:“/control/execute laserDrivenBeamline.mac”

In a previous thread, the latter error was attributed to GEANT4’s inability to change geometry once an already loaded geometry. However, I receive the former error when I try the thread’s recommended solution (implementing the macro in the command line).

How should I best go about running the macro? Is there another way I should do so?

Completely aside, there’s a typo in the visualization manager. In the “Documentation :” section, it links the “Visualisation Publication :” with “visualization” spelled as so.

Hi Samuel

I’m not familiar with the hadrontherapy example, but it’s usual to run your application in a working directory containing the macro files. So rather than a full pathname to the macros

./hadrontherapy ../macro/laserDrivenBeamline.mac

cd to the macro directory, then give the full pathname of the executable:

<path_to_executable_directory>/hadrontherapy laserDrivenBeamline.mac

Let us know if this helps.

John

Hi John

Thank you for your response.

I ran the executable in the macro directory, but am still encountering the following error:
***** COMMAND NOT FOUND </process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year> *****

I also reinstalled G4; however, the error persists.

I would greatly appreciate any suggestions you might have to resolve this issue.

Thank you for your time and assistance.

Samuel

Hi Samuel

Maybe the command is simply not there. Have you looked at the help tree? (help, or ls, cd, etc.). In an app I am developing it is not there, but maybe I don’t have the right physics list. If it’s not there in the hadrontherapy example, it’s a bug. If you don’t get a response from a hadron expert, please file a bug report.

John