Skip to content

Commit 117e60a

Browse files
Increase binding scope
1 parent b495265 commit 117e60a

File tree

136 files changed

+17552
-386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+17552
-386
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ examples/**/*.macro
1313
examples/**/*.root
1414
examples/**/*.csv
1515
examples/**/*.xml
16+
17+
tests/*.macro
18+
tests/*.root
19+
tests/*.csv
20+
tests/*.xml

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
1515
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long")
1616
endif()
1717

18-
find_package(Geant4 10.0 REQUIRED)
18+
find_package(Geant4 10.7 REQUIRED)
1919
find_package(Geant4 OPTIONAL_COMPONENTS gdml ui_tcsh motif vis_raytracer_x11 vis_opengl_x11 vis_opengl_win32 qt)
2020
include_directories(${Geant4_INCLUDE_DIRS})
2121

22-
set(PYBIND11_PYTHON_VERSION 3)
22+
set(PYBIND11_PYTHON_VERSION 3.5)
2323

2424
if(EXISTS ${CMAKE_SOURCE_DIR}/pybind11/CMakeLists.txt)
2525
add_subdirectory(pybind11)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ui.SessionStart()
6060

6161
**Full examples**
6262

63-
Check out the [examples](examples) directory, which contains the Geant4 basic examples B1, B2 and B3 ported to Python. However, writing simulations in Python should be pretty straight forward as the API is almost identical to the C++ one. One notable exception are template classes, which have been renamed such that their type replaces the `T` (i.e. `G4TScoreNtupleWriter<G4RootAnalysisManager>` becomes `G4RootScoreNtupleWriter`).
63+
Check out the [examples](examples) directory, which contains the Geant4 basic examples ported to Python. However, writing simulations in Python should be pretty straight forward as the API is almost identical to the C++ one. One notable exception are template classes, which have been renamed such that their type replaces the `T` (i.e. `G4TScoreNtupleWriter<G4RootAnalysisManager>` becomes `G4RootScoreNtupleWriter`).
6464

6565
## Bugs?
6666

examples/B1/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
/process/(in)activate processName
4343
allows to activate/inactivate the processes one by one.
4444

45-
3- ACTION INITALIZATION
45+
3- ACTION INITIALIZATION
4646

4747
A newly introduced class, B1ActionInitialization, instantiates and registers
4848
to Geant4 kernel all user action classes.
4949

50-
While in sequential mode the action classes are instatiated just once,
50+
While in sequential mode the action classes are instantiated just once,
5151
via invoking the method:
5252
B1ActionInitialization::Build()
5353
in multi-threading mode the same method is invoked for each thread worker
@@ -75,7 +75,7 @@
7575
The energy deposited is collected step by step for a selected volume
7676
in B1SteppingAction and accumulated event by event in B1EventAction.
7777

78-
At end of event, the value acummulated in B1EventAction is added in B1RunAction
78+
At end of event, the value accumulated in B1EventAction is added in B1RunAction
7979
and summed over the whole run (see B1EventAction::EndOfevent()).
8080

8181
Total dose deposited is computed at B1RunAction::EndOfRunAction(),
@@ -96,11 +96,11 @@
9696

9797
The following paragraphs are common to all basic examples
9898

99-
A- VISUALISATION
99+
A- VISUALIZATION
100100

101101
The visualization manager is set via the G4VisExecutive class
102102
in the main() function in exampleB1.cc.
103-
The initialisation of the drawing is done via a set of /vis/ commands
103+
The initialization of the drawing is done via a set of /vis/ commands
104104
in the macro vis.mac. This macro is automatically read from
105105
the main function when the example is used in interactive running mode.
106106

examples/B1/exampleB1.in

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Macro file for example B1 test
2+
3+
/run/initialize
4+
5+
# gamma 6 MeV
6+
/gun/particle gamma
7+
/gun/energy 6 MeV
8+
#
9+
/run/printProgress 100
10+
/run/beamOn 1000
11+
#
12+
# proton 210 MeV
13+
/gun/particle proton
14+
/gun/energy 210 MeV
15+
#
16+
/run/beamOn 1000

0 commit comments

Comments
 (0)