Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(PRadSim)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -luuid")

add_compile_definitions(G4VIS_USE)
add_compile_definitions(G4UI_USE)

#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui to build a batch mode only executable
Expand Down Expand Up @@ -58,3 +66,4 @@ foreach(_file ${PRADSIM_RESOURCE_FILES})
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/${_file} ${PROJECT_BINARY_DIR}/${_file}
)
endforeach()

45 changes: 45 additions & 0 deletions G4History.macro
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/run/verbose 2
/pradsim/det/target/material hydrogen
/pradsim/det/target/radius 25.0 mm
/pradsim/det/target/halfl 20.0 mm
/run/initialize
/control/execute vis.mac
/vis/open OGLSQt 600x600-0+0
/vis/sceneHandler/create OGLSQt
/vis/viewer/create ! ! 600x600-0+0
/vis/viewer/refresh
/vis/viewer/set/autoRefresh false
/vis/verbose errors
/vis/drawVolume
/vis/scene/create
/vis/scene/add/volume world -1 -1 none m 0 0 0 0 0 0
/vis/sceneHandler/attach
/vis/viewer/set/viewpointThetaPhi 90. 180.
/vis/viewer/zoom 1.4
/vis/scene/add/trajectories smooth
/tracking/storeTrajectory 2
/vis/scene/notifyHandlers
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/scene/notifyHandlers scene-0
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
/vis/scene/notifyHandlers scene-0
/vis/scene/add/hits
/vis/scene/notifyHandlers
/vis/scene/endOfEventAction accumulate
/vis/viewer/set/autoRefresh true
/vis/viewer/refresh
/vis/verbose warnings
/control/execute gui.mac
/gui/addMenu file File
/gui/addButton file Quit exit
/gui/addMenu run Run
/gui/addButton run "beamOn 1" "/run/beamOn 1"
/gui/addButton run run1 "/control/execute run.mac"
/gui/addMenu viewer Viewer
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
Binary file added PRadDig
Binary file not shown.
Binary file added PRadRec
Binary file not shown.
3 changes: 2 additions & 1 deletion PRadSim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ int main(int argc, char **argv)
// Initialize visualization
G4VisManager *visManager = new G4VisExecutive;
visManager->Initialize();
std::cout << "init " << physics_list << " !!!" << std::endl;
#endif

#ifdef G4UI_USE
G4UIExecutive *ui = new G4UIExecutive(argc, argv);

std::cout << "init UI" << physics_list << " !!!" << std::endl;
#ifdef G4VIS_USE
UImanager->ApplyCommand("/control/execute init_vis.mac");
#endif
Expand Down
2 changes: 2 additions & 0 deletions README2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# PRadSim_PRad2
new version PRadSim for PRad2, time 2024 September
Loading