No ROOT output file with hadron therapy on Geant4 11.0.0

Hi,
I am unable to get a root output file with the hadrontherapy example in the latest geant4 11.0.0 with root 6.24.00. I could create a root output in my previous geant4 version 10.02.p03. I am booking the root output inside HadrontherapyMatrix.cc. Also, I am using the usual methods like book(), flush() in my hadrontherapy.cc. I can run the example B5 and create the root outputs. I would really appreciate any help. Thanks.

  1. I have the set G4ANALYSIS_USE_ROOT=1
  2. I have included the root include directories as following:

find_package(ROOT REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/shared/include
${Geant4_INCLUDE_DIR}
${ROOT_INCLUDE_DIRS})
add_executable(hadrontherapy hadrontherapy.cc ${sources} ${headers})
target_link_libraries(hadrontherapy ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} )

  1. My GNUMakefile looks like:
    ifdef G4ANALYSIS_USE_ROOT # If we have ROOT
    CPPFLAGS += -DG4ANALYSIS_USE_ROOT
    CPPFLAGS += $(shell root-config --cflags)
    EXTRALIBS += $(shell root-config --glibs)
    endif
1 Like

Hi, I’m working on this too, I found your post 3 days ago. Currently I’m trying to export the root file with version 10.0, and at the same time I emailed the original author G. A. Pablo asking for the new URL, so that I can output the root file and successfully implement compare directly results from the his/her simulation with reference data and get histograms and n-tuples.

I have a question, please download geant410 0 version of the code and import it into the latest version to run successfully?