Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.8...3.18)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
endif()
|
||||
project(hadrontherapy)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -3,11 +3,37 @@ History File, 2004/02/27 G.A.P. Cirrone, Created
|
||||
cirrone@lns.infn.it
|
||||
https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
====================================================
|
||||
History file of the Hadrontherapy application
|
||||
====================================================
|
||||
|
||||
15.11.20 S. Guatelli; Tag hadrontherapy-V10-06-07
|
||||
- Migration to G4RunManagerFactory
|
||||
|
||||
05.11.20 G.A.P. Cirrone; Tag hadrontherapy-V10-06-06
|
||||
- README update
|
||||
- Minor changes in macro files
|
||||
|
||||
02.11.20 B.Morgan, Tag: hadrontherapy-V10-06-05
|
||||
- Support same CMake version range as core Geant4
|
||||
|
||||
27.10.2020 L. Pandola, Tag: hadrontherapy-V10-06-04
|
||||
- Added protections against FPEs in RBE module
|
||||
|
||||
23.10.2020 I. Hrivnacova; Tag: hadrontherapy-V10-06-03
|
||||
- Fixes in using analysis:
|
||||
- Added test for open file before calling write & close
|
||||
- Uncommented delete of analysis manager in RunAction
|
||||
|
||||
25.09.2020 L. Pandola; Tag: hadrontherapy-V10-06-02
|
||||
- Further fix for the failures seen on Windows builds
|
||||
|
||||
24.09.2020 G.A.P. Cirrone; Tag: hadrontherapy-V10-06-01
|
||||
- Added BEST beamline
|
||||
- Code cleaning; fixed compiling errors in Windows related tp size_t G4int conversion and seg fault in MT;
|
||||
|
||||
|
||||
06.03.2020 G.A.P. Cirrone; Tag: hadrontherapy-V10-06-00
|
||||
- Many osolete macro files were deleted
|
||||
- Code cleaning; removed ROOT script folder, other cosmetics
|
||||
@@ -37,14 +63,14 @@ https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
|
||||
|
||||
19.08.2018 G.A.P.Cirrone, G.Petringa, Z.Mei; Tag: hadrontherapy-V10-04-06
|
||||
- Fixed compilation erors in Windows
|
||||
- LET class completely renewed with new calculation approaches
|
||||
- LET class completely renewed with new calculation approaches
|
||||
|
||||
10.08.2018 G.A.P.Cirrone; hadrontherapy-V10-04-05
|
||||
- Trying to fix compilation error under Windows
|
||||
- Trying to fix compilation error under Windows
|
||||
|
||||
09.08.2018 G.A.P.Cirrone; Tag: hadrontherapy-V10-04-04
|
||||
- Updated History file;
|
||||
- Corrected the pow use in the RBE class trying so solve a compilation problem under Windows
|
||||
- Corrected the pow use in the RBE class trying so solve a compilation problem under Windows
|
||||
|
||||
Tag: hadrontherapy-V10-04-03: History file not updated
|
||||
Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
@@ -71,11 +97,11 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- LaserDrivenBeamLine.cc build fix
|
||||
|
||||
24.06.2017 G.A.P.Cirrone; Tag: hadrontherapy-V10-03-10
|
||||
- Added the batch.mac file
|
||||
- Added the batch.mac file
|
||||
|
||||
23.06.2017 G.A.P.Cirrone; Tag: hadrontherapy-V10-03-09
|
||||
- Removed the obsolete /experimentalData/iaeaBenchmark folder and batch.mac file
|
||||
- Added the batch.mac file
|
||||
- Added the batch.mac file
|
||||
|
||||
22.06.2017 G.A.P.Cirrone; Tag: hadrontherapy-V10-03-08
|
||||
- Removed crash due to a bad pointer
|
||||
@@ -84,29 +110,29 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Physics list cleaned
|
||||
- The local and obsolete ion-ion physics list has been removed
|
||||
|
||||
06.05.2017 G. Petringa, G.A.P. Cirrone, L. Pandola, F. Romano, F. Tommasino; Tag: hadrontherapy-V10-03-06
|
||||
06.05.2017 G. Petringa, G.A.P. Cirrone, L. Pandola, F. Romano, F. Tommasino; Tag: hadrontherapy-V10-03-06
|
||||
- Removed the SetCuts() method from the PhysicsList.cc
|
||||
— RippleFilter geometry on PassiveCarbonBeamLine
|
||||
— Added TIFPA beam line
|
||||
|
||||
|
||||
28.03.2017 L. Pandola, G.Petringa, G.A.P.Cirrone, G. Cuttone; Tag: hadrontherapy-V10-03-05
|
||||
- G4SetCuts definition added in the PhysicsList
|
||||
|
||||
27.03.2017 G.Petringa, G.A.P.Cirrone, G. Cuttone; Tag: hadrontherapy-V10-03-04
|
||||
- Carbon beamline geometry corrected and updated and corresponding code
|
||||
- Carbon beamline geometry corrected and updated and corresponding code
|
||||
revised;
|
||||
- G4Region definition corrected
|
||||
|
||||
22.03.2017 G.Petringa, G.A.P.Cirrone; Tag: hadrontherapy-V10-03-03
|
||||
- Fixed cmakelist error
|
||||
|
||||
|
||||
19.03.2017 G.Petringa, G.A.P.Cirrone; Tag: hadrontherapy-V10-03-02
|
||||
- Carbon beam line geometry corrected and new modulators added
|
||||
- Carbon beam line geometry corrected and new modulators added
|
||||
07.02.2017 G.A.P.Cirrone, G.Petringa; Tag: hadrontherapy-V10-03-01
|
||||
- Physics list corrected
|
||||
- Physics list corrected
|
||||
31.01.2017 G. Petringa, J.Pipek, L.Pandola, G.A.P.Cirrone; Tag: hadrontherapy-V10-03-00
|
||||
- HadrontherapyAnalysisManager.cc class deleted and G4tools inserted in HadrontherapyMatrix.cc class
|
||||
- Fixed Bugzilla #1879 (remaining edge cases)
|
||||
- Fixed Bugzilla #1879 (remaining edge cases)
|
||||
19.05.2016 F. Romano, B. Jia Tag: hadrontherapy-V10-02-00
|
||||
- new modulator class implemented
|
||||
31.10.2015 F. Romano, J. Pipek Tag: hadrontherapy-V10-01-03
|
||||
@@ -154,7 +180,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
no macro file is passed as argument;
|
||||
When a macro file is passed, the run is considered 'in batch mode' and
|
||||
no UI starts.
|
||||
- Step max is setted bigger in the various macro files: the previous value was bringing
|
||||
- Step max is setted bigger in the various macro files: the previous value was bringing
|
||||
computation times extremely long.
|
||||
- Author names updated in the main() file and various minor revisions
|
||||
- Now the PHYSLIST enviroment variable (to define an external Reference Physics
|
||||
@@ -164,38 +190,38 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
'bachMacro.mac' to be used only in batch-mode configuration.
|
||||
- PhysicsLists class complety updated:
|
||||
-- The G4EmStandardPhysics_option4 now substitute the G4EmStandardPhyscis_option3 builder.
|
||||
G4EmStandardPhysics_option4 in, at moment, the most accurate
|
||||
G4EmStandardPhysics_option4 in, at moment, the most accurate
|
||||
Electromagnetic physics in Geant4
|
||||
-- A new Physics List, called HADRONTHERAPY_1 and specifically implemented
|
||||
for this application, has been defined.
|
||||
-- A new Physics List, called HADRONTHERAPY_1 and specifically implemented
|
||||
for this application, has been defined.
|
||||
HADONTHERAPY is defined as a collection of builders and is very similar to the QGSP_BIC_HP.
|
||||
Reference Physcs List.
|
||||
Reference Physcs List.
|
||||
HADRONTHERAPY_1 differs from the QGSP_BIC_HP in the followings:
|
||||
--> It contains G4EmStandardPhysics_option4 in place of G4EmStandardPhysics;
|
||||
--> It contains the builder G4RadioactiveDecayPhysics;
|
||||
-- The defaults for the physics models are now complete and they corresponds
|
||||
to the HADROTHERAPY_1 apart that:
|
||||
-- The defaults for the physics models are now complete and they corresponds
|
||||
to the HADROTHERAPY_1 apart that:
|
||||
--> G4HadronPhysicsQGSP_BIC is used in place of G4HadronPhysicsQGSP_BIC_HP
|
||||
--> G4HadronElasticPhysics is used in place of G4HadronElasticPhysics_HP
|
||||
Physics List
|
||||
-- Cuts messengers completely removed. Now cuts can be defined using
|
||||
-- Cuts messengers completely removed. Now cuts can be defined using
|
||||
the commands '/run/setCut' 'run/setCutForAGivenParticle', etc.
|
||||
-- Multiple G4Regions can now be defined in the PhysicsList class file, to apply specific
|
||||
CUTs values via the command '/run/setCutForRegion <G4Region Name> <Cut value>'
|
||||
-- The new physics list HADRONTHERAPY_2 is created. This list contains the local
|
||||
implementation of a specific ion-ion inelastic hadronic physics.
|
||||
-- The new physics list HADRONTHERAPY_2 is created. This list contains the local
|
||||
implementation of a specific ion-ion inelastic hadronic physics.
|
||||
It use the QMD model to treat the ion-ion interactions.
|
||||
-- Livermore and Penelope electromagnetic physics removed
|
||||
- HadrontherapyPhysicsLists.hh header file cleaned.
|
||||
- Corrected the command moving the simulated .root file to the experimental folder in the
|
||||
- Corrected the command moving the simulated .root file to the experimental folder in the
|
||||
defaultMcro.mac and batch.mac macro files
|
||||
- The 'LocalINCLIonIonInelasticPhysic' has been removed
|
||||
- The 'defaultMacro.mac', 'defaultMacroWithReferencePhysicsList.mac' and 'bachMacro.mac' have
|
||||
- The 'defaultMacro.mac', 'defaultMacroWithReferencePhysicsList.mac' and 'bachMacro.mac' have
|
||||
been competely updated and adapted to the new physics list
|
||||
- Migration to MT have been done.
|
||||
|
||||
|
||||
13.02.2014 L.Pandola; Tag: hadrontherapy-V10-00-01
|
||||
- Fix bug (missing inizialization) producing the problem
|
||||
- Fix bug (missing inizialization) producing the problem
|
||||
observed with x86_64-mac108-gcc42. Remove debug printout
|
||||
|
||||
12.02.2014 L.Pandola; Tag: hadrontherapy-V10-00-00
|
||||
@@ -225,7 +251,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
data filed): in case of no ROOT found
|
||||
|
||||
30.07.2013 A.Dotti; Tag: hadrontherapy-V09-06-01
|
||||
- Fixing compilation warnings from clang32 (unused private
|
||||
- Fixing compilation warnings from clang32 (unused private
|
||||
data filed)
|
||||
|
||||
03.02.2013 V.Ivanchenko; Tag: hadrontherapy-V09-06-00
|
||||
@@ -243,7 +269,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
08.11.2012 F.Romano; Tag: hadrontherapy-V09-05-10
|
||||
- hadrontherapy.cc: fixed problem for referencePhysList if condition.
|
||||
- README revised.
|
||||
|
||||
|
||||
29.10.2012 F.Romano; Tag: hadrontherapy-V09-05-09
|
||||
- Added explicit inclusion of units and constants headers where missing.
|
||||
- Executable renamed to the same name of the directory to avoid possible
|
||||
@@ -279,22 +305,22 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
in HadrontherapyMatrix::ion. Fixes compilation warning on gcc-4.7.
|
||||
|
||||
08.12.2011 G.Folger; Tag: hadrontherapy-V09-05-00
|
||||
- Added CMakeLists.txt file
|
||||
- Added CMakeLists.txt file
|
||||
|
||||
25.11.2011 G.Folger; Tag: hadrontherapy-V09-04-08
|
||||
- remove #include for not needed unistd.h in
|
||||
- remove #include for not needed unistd.h in
|
||||
HadrontherapyMatrix.cc
|
||||
|
||||
21.11.2011 G.Folger; Tag: hadrontherapy-V09-04-07
|
||||
- remove #include for not needed unistd.h in
|
||||
- remove #include for not needed unistd.h in
|
||||
HadrontherapyInteractionParameters; unistd.h does not exist on Windows
|
||||
- Fix compilation error when G4ANALYSIS_USE_ROOT is set in
|
||||
- Fix compilation error when G4ANALYSIS_USE_ROOT is set in
|
||||
HadrontherapyMatrix::TotalEnergyDeposit()
|
||||
|
||||
21.11.2011 G.A.P.Cirrone; Tag: hadrontherapy-V09-04-06
|
||||
- Updated and cleaned physics
|
||||
- Updated macro files;
|
||||
|
||||
|
||||
14.11.2011 G.A.P.Cirrone; Tag: hadrontherapy-V09-04-05
|
||||
- Corrected macro files for a double call to the Decay physics
|
||||
- Added the complete physics to the batch.mac file
|
||||
@@ -318,8 +344,8 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Removed obsolete hadron elastic builders
|
||||
|
||||
09.12.2010 S.E.Mazzaglia; Tag: hadrontherapy-V09-03-17
|
||||
- Changed materials definition (by macro command) for Range Shifter with the NIST one.
|
||||
The same macro /beamLine/RangeShifter/RSMat must be used, but with
|
||||
- Changed materials definition (by macro command) for Range Shifter with the NIST one.
|
||||
The same macro /beamLine/RangeShifter/RSMat must be used, but with
|
||||
NIST material name as parameter.
|
||||
|
||||
26.11.2010 G.A.P.Cirrone; Tag: hadrontherapy-V09-03-16
|
||||
@@ -339,9 +365,9 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Deleted the addPackage command. Now the Reference Physics lists
|
||||
can be activated setting the enviroment variable PHYSLIST to
|
||||
the name of the list (i.e. export PHYSLIST=QGSP_BIC_EMY)
|
||||
- The main file has been modified in order to launch different macro file
|
||||
- The main file has been modified in order to launch different macro file
|
||||
depending if PHYSILIST variable is activated or not: if PHYSLIST is
|
||||
activated the 'defaultMacroWithReferencePhysicsList.mac' file
|
||||
activated the 'defaultMacroWithReferencePhysicsList.mac' file
|
||||
is used; if not the 'defaultMacro.mac' is used
|
||||
- The 'packageQGSP_BIC.mac' macro file has been removed as now the activation of the Reference Physiocs Lists
|
||||
is done via the PHYSLIST envitoment variable
|
||||
@@ -373,7 +399,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
|
||||
19.10.2010 G.A.P.Cirrone; Tag: hadrontherapy-V09-03-06
|
||||
- Physics list 'QGSP_BIC_EMY' definition has been updated
|
||||
in the physics lists class to to be constistent with the definition
|
||||
in the physics lists class to to be constistent with the definition
|
||||
of the one defined in the Geant4 kernel ($G4INSTALL/source/physics_lists/)
|
||||
- Macro file consequently updated
|
||||
|
||||
@@ -392,7 +418,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Main file updated
|
||||
|
||||
22.05.2010 S.E.Mazzaglia; Tag: hadrontherapy-V09-03-02
|
||||
- Updated ROOT scripts in folder RootScripts/proton/BraggPeak
|
||||
- Updated ROOT scripts in folder RootScripts/proton/BraggPeak
|
||||
|
||||
21.05.2010 S.E.Mazzaglia; Tag: hadrontherapy-V09-03-01
|
||||
- Solved some bugs related to the preprocessor variable G4ANALYSIS_USE_ROOT.
|
||||
@@ -405,7 +431,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Added the possibility to store dose & fluence for all secondary particles
|
||||
produced in the same ASCII file. This feature can be switched on by the macro
|
||||
command: /analysis/secondaries true/false.
|
||||
|
||||
|
||||
|
||||
16.12.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-42
|
||||
- Added the possibility to calculate the Let too, using an ASCII file to store it.
|
||||
@@ -413,12 +439,12 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Minor revisions of the code.
|
||||
|
||||
27.11.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-41
|
||||
- Added the possibility to store dose and fluence for every particle/ion
|
||||
produced during the simulation
|
||||
- Added the possibility to store dose and fluence for every particle/ion
|
||||
produced during the simulation
|
||||
|
||||
25.11.2009 S.E.Mazzaglia & F.Romano; Tag: hadrontherapy-V09-02-40
|
||||
- Corrected a bug in HadrontherapyDetectorConstruction class
|
||||
- Added G4RadiactivedecayPhysics class to the Physics List.
|
||||
- Corrected a bug in HadrontherapyDetectorConstruction class
|
||||
- Added G4RadiactivedecayPhysics class to the Physics List.
|
||||
|
||||
22.11.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-39
|
||||
- Correction in the initialization of the passiveProtonBeamLine class.
|
||||
@@ -434,30 +460,30 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Correction for a missing function in the HadrontherapyPhysicsListMessenger.cc class file
|
||||
|
||||
18.11.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-35
|
||||
- Updated the README file and general code revision for the
|
||||
- Updated the README file and general code revision for the
|
||||
Geant4 9.3 release
|
||||
|
||||
17.11.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-34
|
||||
- Added some functionalities in order to change, via messengers, the geometry, the voxelization
|
||||
- Added some functionalities in order to change, via messengers, the geometry, the voxelization
|
||||
of the detector, and the disposition in the space of the detector/phantom.
|
||||
- Added the possibility to calculate the stopping powers for ions too.
|
||||
- Modified the HadrontherapyDetectorROGeometry class constructor.
|
||||
- Various additions and fixes to the matrix class.
|
||||
|
||||
10.11.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-33
|
||||
- Added the possibility to make a graphical user interface (GUI) using the QT libraries.
|
||||
To start a GUI the correct enviroment variables must be configured (see the Geant4 installation
|
||||
manual) and a QT version must be installed
|
||||
- Added the possibility to make a graphical user interface (GUI) using the QT libraries.
|
||||
To start a GUI the correct enviroment variables must be configured (see the Geant4 installation
|
||||
manual) and a QT version must be installed
|
||||
|
||||
05.10.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-32
|
||||
- Fixed a compilation error with GCC 4.4
|
||||
|
||||
28.09.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-31
|
||||
- Now the HadrontherapyDetectorConstruction class implements only phantom and detector [RO]geometry.
|
||||
World volume and the rest of the geometry is inside another class whose messenger allows
|
||||
World volume and the rest of the geometry is inside another class whose messenger allows
|
||||
modification by users with the same old syntax
|
||||
- Removed HadrontherapyInteractionParameters from the HadrontherapyGeometryController class
|
||||
|
||||
- Removed HadrontherapyInteractionParameters from the HadrontherapyGeometryController class
|
||||
|
||||
20.09.2009 P.Kaitaniemi; Tag: hadrontherapy-V09-02-30
|
||||
- Added ability to use command based scoring
|
||||
- IAEA geometry: produce Bragg peak using command based scoring
|
||||
@@ -469,7 +495,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
|
||||
11.09.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-28
|
||||
- Added messengers to control the event number and to draw only particular tracks.
|
||||
The new command are accessible via the command /event/drawTracks and /event/PrintEventNumber
|
||||
The new command are accessible via the command /event/drawTracks and /event/PrintEventNumber
|
||||
|
||||
08.09.2009 S.E.Mazzaglia; Tag: hadrontherapy-V09-02-27
|
||||
- Added a method to retrieve stopping power values for protons, alphas and electrons.
|
||||
@@ -502,15 +528,15 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- ROOT script preparing an IAEA benchmark figure with data
|
||||
|
||||
08.07.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-21
|
||||
- Removed the README file in ASCII format
|
||||
- Removed the README file in ASCII format
|
||||
|
||||
27.06.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-20
|
||||
- Eliminated not necessary dependences in the SteppingAction class
|
||||
- Added folders containing experimental data (its name is 'experimentalData') and
|
||||
- Added folders containing experimental data (its name is 'experimentalData') and
|
||||
ROOT scripts ('RootScripts') where Root scripts are stored to
|
||||
perform a fast comparison with experimental data.
|
||||
A folder where simulation results are stored is also created. Its
|
||||
name is 'simulationResults'.
|
||||
name is 'simulationResults'.
|
||||
|
||||
27.06.2009 P. Kaitaniemi; Tag hadrontherapy-V09-02-19
|
||||
- Added ability to change the name of the output file between runs
|
||||
@@ -525,11 +551,11 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Local INCL/ABLA physics list for deuterons, tritons and alphas
|
||||
|
||||
26.06.2009 G.A.P.Cirrone; Tag hadrontherapy-V09-02-17
|
||||
- Corrected the definition of total inelastic cross section for light ions in the
|
||||
- Corrected the definition of total inelastic cross section for light ions in the
|
||||
LocalIonIonInelasticPhysic.cc file
|
||||
|
||||
26.06.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-16
|
||||
- Momentarely removed the class for LET calculation
|
||||
- Momentarely removed the class for LET calculation
|
||||
for a conflict with the general structure of Hadrontherapy
|
||||
|
||||
10.06.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-15
|
||||
@@ -549,7 +575,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
Activation can be done via macro commands in the usual way
|
||||
|
||||
19.05.2009 F.Romano; Tag hadrontherapy-V09-02-11
|
||||
- Corrected the stepMax value in each macro in order to avoid
|
||||
- Corrected the stepMax value in each macro in order to avoid
|
||||
a wrong dose deposition in the first slice.
|
||||
- Modified and revised the README and macro files.
|
||||
|
||||
@@ -564,7 +590,7 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- README file improved.
|
||||
|
||||
14.05.2009 G.A.P.Cirrone; Tag: hadrontherapy-V09-02-07
|
||||
- Physic implementation completely changed. Now Hadrontherapy can be launched
|
||||
- Physic implementation completely changed. Now Hadrontherapy can be launched
|
||||
with physics lists, packages and built-in physic models;
|
||||
In the README we give some suggestion in the physic models to use.
|
||||
All models can be activated via macro command.
|
||||
@@ -610,19 +636,19 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Corrected cross sections definitions for ions
|
||||
- Revised the definition and use of the electromagnetic options
|
||||
for the use with the Standard models
|
||||
|
||||
|
||||
20.11.2008: G.A.P.Cirrone and M.Russo; Tag: hadrontherapy-V09-01-09
|
||||
- Updated readme and improved the comments.
|
||||
- Updated readme and improved the comments.
|
||||
|
||||
20.11.2008: G.A.P.Cirrone and M.Russo; Tag: hadrontherapy-V09-01-08
|
||||
- Add new approach for the choice of the physic models.
|
||||
Now packaged physic lists can be used alternatively
|
||||
Now packaged physic lists can be used alternatively
|
||||
to the the physic models implemented in the class files
|
||||
EM, HE and HI.
|
||||
EM, HE and HI.
|
||||
- Improved the electromagnetic models for the generic ions
|
||||
|
||||
22.09.2008 G.A.P.Cirrone; Tag: hadrontherapy-V09-01-07
|
||||
- Corrected the G4eBremsstrahlung() process in the file
|
||||
- Corrected the G4eBremsstrahlung() process in the file
|
||||
EMElectronStandard.cc;
|
||||
- Updated the head of the History file;
|
||||
|
||||
@@ -630,22 +656,22 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Corrections in the Low Energy Electromagnetic physic lists.
|
||||
|
||||
15.06.2008 G.A.P.Cirrone; Tag: hadrontherapy-V09-01-05
|
||||
- Removed AIDA call from GNUmakefile
|
||||
- Removed AIDA call from GNUmakefile
|
||||
|
||||
19.05.2008 G.A.P.Cirrone tag hadrontherapy-V09-01-04
|
||||
- Added in the beam line the MOPI detector. MOPI is a microstrip
|
||||
detector that, in the real case, is able to check during
|
||||
the treatment, the beam simmetry of the therapy beam.
|
||||
Its physical structure is here exactly simulated so that
|
||||
Its physical structure is here exactly simulated so that
|
||||
the its contribute to the energy loss can be take into account;
|
||||
A detailed description if the detector can be found in
|
||||
A detailed description if the detector can be found in
|
||||
NIM A 572 (2007) 1094-1101 and its references.
|
||||
- Corrected the position of the Phantom and Detector;
|
||||
- Added variables to the HadrontherapyBeamLine.cc file;
|
||||
- Added comments to the HadrontherapyBeamLine.cc file
|
||||
to improve the clearness.
|
||||
- Updated the README file.
|
||||
- Changed the default dimensions of histogram bins
|
||||
- Changed the default dimensions of histogram bins
|
||||
(from 200 um to 100 um).
|
||||
|
||||
09.03.2008 G.A.P.Cirrone tag hadrontherapy-V09-01-03
|
||||
@@ -657,9 +683,9 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Added NIST definition materials in Material class;
|
||||
- Code review of the DetectorConstruction class;
|
||||
- Changed name of the volume where the energy deposited is collected
|
||||
from "phantom" to "detector". "Detector" is a more appropiate
|
||||
from "phantom" to "detector". "Detector" is a more appropiate
|
||||
name.
|
||||
- Changed name of the volume where the detector is inserted from
|
||||
- Changed name of the volume where the detector is inserted from
|
||||
"patient" to the more appropriate "Water Phantom";
|
||||
|
||||
03.03.2008 G.A.P.Cirrone tag hadrontherapy-V09-01-01
|
||||
@@ -667,13 +693,13 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
- Removed a segmentation due to an uncorect pointer
|
||||
in the EMHadronIonStandard class;
|
||||
- Added options for an accurate use of Standard electromagnetic models
|
||||
in the EMHadronIonStandard, EMElectronStandard,
|
||||
in the EMHadronIonStandard, EMElectronStandard,
|
||||
EMPositronStandard, EMPhotonStandard and EMMuonStandard classes;
|
||||
- Added a macro file (physicsElectromagneticStandard.mac)
|
||||
- Added a macro file (physicsElectromagneticStandard.mac)
|
||||
for the use of Hadrontherapy with the Standard Electromagnetic models;
|
||||
- Corrected in the defaultMacro.mac, a wrong command for the
|
||||
- Corrected in the defaultMacro.mac, a wrong command for the
|
||||
activation of the Standard Electromagnetic models;
|
||||
|
||||
|
||||
29.02.2007 G.A.P.Cirrone tag hadrontherapy-V09-01-00
|
||||
- Updated README
|
||||
|
||||
@@ -694,27 +720,27 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
|
||||
04.06.2007 G.A.P. Cirrone (hadrontherapy-V09-00-00)
|
||||
- Changed the random engine.
|
||||
|
||||
|
||||
10.05.2007 G.A.P. Cirrone (hadrontherapy-V08-03-02)
|
||||
- Improved the modulator geometry and fixed a bug on its rotation;
|
||||
- Improved the modulator geometry and fixed a bug on its rotation;
|
||||
|
||||
07.05.2007 G.A.P. Cirrone (hadrontherapy-V08-02-02)
|
||||
- Geometry upgrade(hadrontherapyBeamLine class) according
|
||||
to the experimental CATANA proton therapy beam line;
|
||||
- Geometry upgrade(hadrontherapyBeamLine class) according
|
||||
to the experimental CATANA proton therapy beam line;
|
||||
|
||||
23.04.2007 S. Guatelli (hadrontherapy-V08-02-01)
|
||||
- Compilation error corrected - human error of Susanna Guatelli.
|
||||
- The file src/HadrontherapyProtonBertiniElastic.cc
|
||||
and the file include/HadrontherapyProtonBertiniElastic.hh
|
||||
have been removed
|
||||
- This class is part of the previous version of the hadrontherapy
|
||||
application,and it not necessary anymore in the current version
|
||||
- This class is part of the previous version of the hadrontherapy
|
||||
application,and it not necessary anymore in the current version
|
||||
of the hadrontherapy application.
|
||||
|
||||
24.1.2007 S. Guatelli (hadrontherapy-V08-02-00)
|
||||
- Design iteration
|
||||
- Physics lists added
|
||||
|
||||
|
||||
16.11.2006 S. Guatelli (hadrontherapy-V08-01-05)
|
||||
- Physics lists cleaned
|
||||
|
||||
@@ -755,23 +781,23 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
06.12.2005 S. Guatelli (hadrontherapy-V07-01-05)
|
||||
- Particles updated
|
||||
- Updated macros
|
||||
|
||||
|
||||
23.11.2005 S. Guatelli (hadrontherapy-V07-01-04)
|
||||
- File ASCII as output file deleted
|
||||
|
||||
02.09.2005 S. Guatelli (hadrontherapy-V07-01-03)
|
||||
- Added Hadronic physics models
|
||||
|
||||
|
||||
08.07.2005 S. Guatelli (hadrontherapy-V07-01-02)
|
||||
- Added alternative stopping power parameterisations for protons:
|
||||
ICRU49, Ziegler 1977, Ziegler 1985, Ziegler (SRIM) 2000
|
||||
|
||||
|
||||
30.05.2005 G.A.P. Cirrone and S.Guatelli (hadrontherapy-V07-00-06)
|
||||
- Removed warnings;
|
||||
- Analisys with AIDA 3.2.1 and PI 1.3.3;
|
||||
- Corrected bug in the modulator wheel;
|
||||
- Corrected bug in the modulator wheel;
|
||||
- Added the hadronic physic list for proton and ion;
|
||||
- Code review
|
||||
- Code review
|
||||
|
||||
18.05.2005 Susanna Guatelli (hadrontherapy-V07-00-03)
|
||||
- Delete public variables
|
||||
@@ -790,11 +816,11 @@ Tag: hadrontherapy-V10-04-02: History file not updated
|
||||
|
||||
25.02.2005 - G.A.P. Cirrone & M.Piergentili, update of the physiscList
|
||||
class to correct some bugs.
|
||||
30.11.2004 - S. Guatelli,
|
||||
30.11.2004 - S. Guatelli,
|
||||
correct analysis, tag: hadrontherapy-V06-02-00
|
||||
|
||||
|
||||
16.07.2004 - G.A.P. Cirrone
|
||||
AIDA classes inserted. Generation of an .hbk file
|
||||
AIDA classes inserted. Generation of an .hbk file
|
||||
containing the depth dose distribution.
|
||||
|
||||
28.05.2004 - S. Guatelli
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -1,14 +1,13 @@
|
||||
|
||||
=========================================================
|
||||
Text version of the Hadrontherapy README file
|
||||
=========================================================
|
||||
=========================================================
|
||||
Text version of the Hadrontherapy README file
|
||||
=========================================================
|
||||
|
||||
Last revision: F.Romano, 5 November 2015;
|
||||
Released with the Geant4 10.2 version (December 2015)
|
||||
Last revision:
|
||||
Released with the Geant4 10.7 version (December 2020)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
ADVERTISEMENT: this is the text version of the README file of the 'basic' hadrontherapy,
|
||||
as it has been released in the official Geant4 9.6 release
|
||||
as it has been released in the Geant4 10.7 release
|
||||
|
||||
Visit the Hadrontherapy web site (https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy) to request
|
||||
the complete version of this program, together with its documentation;
|
||||
@@ -17,54 +16,60 @@ Institute in the framework of the MC-INFN Group
|
||||
|
||||
-------------------------------------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
HADRONTHERAPY
|
||||
=========================================================
|
||||
=========================================================
|
||||
HADRONTHERAPY
|
||||
=========================================================
|
||||
==========> MAIN AUTHORS <==========
|
||||
|
||||
G.A.P. Cirrone(a)*, F.Romano(a), G.Cuttone(a), L. Pandola(a), G.Milluzzo(a), J.Pipek(a)
|
||||
|
||||
G.A.P. Cirrone(a)*, L. Pandola(a), G.Milluzzo(a), G.Petringa(a)
|
||||
|
||||
==========> PAST AUTHORS <==========
|
||||
|
||||
R. Calcagno(a), G.Danielsen (b), F.Di Rosa(a), S.Guatelli(c), A.Heikkinen(b), P.Kaitaniemi(b),
|
||||
A.Lechner(d), S.E.Mazzaglia(a), M.G.Pia(e), G.Russo(a), M.Russo(a), A.Varisano(a), A. Tramontana (a,f)
|
||||
J.Pipek(a),R. Calcagno(a), G.Cuttone(a),G.Danielsen (b), F.Di Rosa(a), S.Guatelli(c), A.Heikkinen(b), P.Kaitaniemi(b),
|
||||
A.Lechner(d), S.E.Mazzaglia(a), M.G.Pia(e), F.Romano(f), G.Russo(a), M.Russo(a), A.Varisano(a), A. Tramontana (a,f)
|
||||
|
||||
|
||||
(a) Laboratori Nazionali del Sud of the INFN, Catania, Italy
|
||||
(b) Helsinki Institute of Physics, Helsinki, Finland
|
||||
(c) University of Wollongong, Australia
|
||||
(d) CERN, (CH)
|
||||
(e) INFN Section of Genova, genova, Italy
|
||||
(f) Physics and Astronomy Department, Universituy of Catania, Catania, Italy
|
||||
(e) INFN Section of Genova, Genova, Italy
|
||||
(f) Physics and Astronomy Department, University of Catania, Catania, Italy
|
||||
|
||||
*Corresponding authors, email to: cirrone@lns.infn.it, francesco.romano@lns.infn.it
|
||||
*Corresponding author, email to: cirrone@lns.infn.it
|
||||
-------------------------------------------------------------------------------------------------
|
||||
|
||||
HADRONTHERAPY:
|
||||
WHAT IT IS, WHAT IT DOES AND WHAT IT WILL PROVIDE
|
||||
'hadrontherapy' is a Geant4-based application specifically developed to address typical needs related to the proton and ion therapy.
|
||||
Its first release was in 2004. At that time 'hadrontherapy' was only capable to simulate a well specified proton therapy facility: the passive transport beam line installed at Laboratori Nazionali del Sud (INFN) in Catania, Italy.
|
||||
===================================================
|
||||
|
||||
Today Hadrontontherapy, except that it is in continuous development, is more flexible and shows many additional capabilities with respect to the past.
|
||||
Its geometrical set-up, for example, is now completely interchangeable permitting a simple switch between different geometrical configurations, which all share the same phantom (sensible detector) with the related features.
|
||||
It is possible to do a simulation of a generic proton/ion transport beam line and laser-driven beam line. In this release, a module for dose average LET computations has been also included.
|
||||
Deprecated ReadOutGeometry has been replaced by the use of Parallel World.
|
||||
'hadrontherapy' is a Geant4-based application specifically developed to address typical needs related to proton and ion therapy.
|
||||
Its first release was in 2004. At that time 'hadrontherapy' was only capable of simulating a well-specified proton therapy facility: the passive transport beam line installed at Laboratori Nazionali del Sud (INFN) in Catania, Italy.
|
||||
|
||||
Today Hadrontherapy, except that it is in continuous development, is more flexible and shows many additional capabilities with respect to the past.
|
||||
Its geometrical set-up, for example, is now completely interchangeable permitting a simple switch between different geometrical configurations, which all share the same phantom (sensitive detector) with the related features.
|
||||
It is possible to do a simulation of a generic proton/ion transport beam line and laser-driven beam line. In this release, a module for dose average LET and RBE computations have been also included.
|
||||
|
||||
The configurations are:
|
||||
|
||||
- Passive proton beam line, which is installed at the LNS-INFN facility in Catania for eye tumor treatment with protons at 62 MeV. It is simulated in PassiveProtonBeamLine.cc;
|
||||
- Passive proton beam line, which is installed at the LNS-INFN facility in Catania for eye tumor treatment with protons at 62 MeV. It is simulated in PassiveProtonBeamLine.cc; (G.A.P. Cirrone et al., IEEE Nuclear Science Symposium Conference Record, 2003, 3, pp. 1756-1758, J2-5)
|
||||
|
||||
- Passive carbon beam line, which is the simulation of the transport beam line at LNS-INFN of Catania for experiments with carbon ion beams. It is simulated in PassiveCarbonBeamLine.cc;
|
||||
- Passive carbon beam line, which is the simulation of the transport beam line at LNS-INFN of Catania for experiments with ion beams (Carbon, Oxygen and Helium). It is simulated in PassiveCarbonBeamLine.cc;
|
||||
|
||||
- Laser-driven beam line, which is the simulation of a beam line for the focusing, the handling and the transport of a laser-driven beam, a Faraday Cup is the eligible detector for this class. It is simulated in LaserDrivenBeamLine.cc;
|
||||
- Laser-driven beam line, which is the simulation of a beam line for the focusing, the handling and the transport of a laser-driven beam, a Faraday Cup is the eligible detector for this class. It is simulated in LaserDrivenBeamLine.cc;
|
||||
(A.Tramontana et al., A transport beamline solution for laser-driven proton beams
|
||||
6th International Particle Accelerator Conference, IPAC 2015, 2015, pp. 2515-2518)
|
||||
|
||||
- TIFPA passive proton beam line, which is installed at the Protontherapy Center of Trento (Italy), used for experiments with proton beams. Geometry is implemented in HadrontherapyTIFPAPassiveProtonBeamLine.cc
|
||||
(F.Tommasino et al., A new facility for proton radiobiology at the Trento proton therapy centre: Design and implementation, Physica Medica 58 (2019) 99–106)
|
||||
|
||||
- BEST passive proton beam line is the beamline INFN-LNS is developing for the BEST Cyclotron company for eye tumor treatment with 70 MeV protons. The geometry is implemented in BESTPassiveProtonBeamline.cc.
|
||||
|
||||
in PassiveProtonBeamLine.cc, in PassiveCarbonBeamLine.cc and in LaserDrivenBeamLine.cc, the user can change the geometrical characteristics of beam line elements.
|
||||
Alternatively, the user can use the macro file.
|
||||
|
||||
In PassiveProtonBeamLine.cc, in PassiveCarbonBeamLine.cc, in LaserDrivenBeamLine.cc,in HadrontherapyTIFPAPassiveProtonBeamLine.cc and in BESTPassiveProtonBeamline.cc, the user can change the geometrical characteristics of beam line elements.
|
||||
Alternatively, the user can use the macro file.
|
||||
|
||||
Folder structure of 'hadrontherapy'
|
||||
|
||||
|
||||
'hadrontherapy' distribution contain different sub-folders:
|
||||
|
||||
\src: where source .cc files are stored
|
||||
@@ -73,78 +78,86 @@ Folder structure of 'hadrontherapy'
|
||||
|
||||
\macro: where a set of ready-to-use macro files are provided
|
||||
|
||||
\field: where a set of ready-to-use .TABLE files are provided. These files are generated from OPERA & COMSOL codes for the laser-driven beam line.
|
||||
\field: where a set of ready-to-use.TABLE files are provided. These files are generated from OPERA & COMSOL codes for the laser-driven beam line.
|
||||
|
||||
\experimentalData: in this directory, a set of reference (both experimental and analythical) data are stored. These data are then used to perform a direct comparison with simulation results that are stored in the simulationResults folder. Data stored are better described in the README file contained inside.
|
||||
\experimentalData: in this directory, a set of reference (both experimental and analytical) data are stored.
|
||||
|
||||
\SimulationOutputs: when one of the .mac file contained in the macro folder is used, simulation results are directly stored in this directory.
|
||||
|
||||
\RootScripts: if the ROOT program is installed the User can use scripts contained in this directory to compare directly results from the his/her simulation with reference data provided inside the experimentalData folder.
|
||||
|
||||
Currently this folders structure is in development and reference data as well as ROOT scripts alongside the newly implemented features. Moreover some ROOT script can be missed. We apologize for this; please contact the authors if you need more information, clarification or useful discussion.
|
||||
\data\rbe: contains the file lem1.csv including the alpha and beta values and rbe resulted from the radiobiological Local Effect Model (LEM) for three cell lines ( AG01522, U87 and HSG)
|
||||
|
||||
Description of the \macro folder
|
||||
|
||||
Inside the "macro" folder, different macro files are provided. In particular, three macro files are related to the different beam lines: hadron_therapy.mac, carbon_beamline.mac and laserDrivenBeamline.mac.
|
||||
The hadron_therapy.mac permits to run a simulation with the whole proton passive beam line installed in Catania.
|
||||
The carbon_beamline.mac excludes all the elements (moving the origin of the ion beam close to the water phantom) and reproduce a simple passive beam line for the use with carbon ion beams.
|
||||
The laserDrivenBeamline.mac simulates a typical laser-driven proton spectrum as input for a beam line made of a quadrupole system and an energy selector.
|
||||
Inside the "macro" folder, different macro files are provided.
|
||||
In particular, five macro files are related to the different beam lines:
|
||||
|
||||
defaultMacro.mac: permits to run a simulation using the default geometry, i.e. the CATANA proton beam line in Catania. A 62 MeV gaussian proton beam with 0.25 MeV sigma and 0.028° as divergence (sigma) is launched.
|
||||
You can modify by macro the range shifter thickness you
|
||||
want to select. The entrance of the phantom is positioned at the isocentre ( (0,0,0)
|
||||
coordinates). LET and RBE computation are activated.
|
||||
|
||||
carbon_beamline.mac: reproduces a simple passive beam line for the use of carbon, oxygen and helium ion beams for multidisciplinary applications (selectGeometry Carbon). A parallel 62 MeV/u carbon beam with 0.740 MeV/u sigma is simulated.
|
||||
|
||||
laserDrivenBeamline.mac: simulates a typical laser-driven proton spectrum as input for a beam line made of a quadrupole system, an energy selector and a Faraday Cup (selectGeometry LaserDriven)
|
||||
|
||||
|
||||
Trento_parameters.mac: reproduces the experimental beam line installed at the Trento protontherapy centre and implements a typical source.
|
||||
|
||||
BestBeamLine.mac: implements the elements of the beam line developed for the BEST company and simulates a 70 MeV proton beam as input of the simulation. Dose and LET longitudinal distributions are computed at the isocentre and a native dose scorer is also added to retrieve the lateral dose profiles.
|
||||
|
||||
3 additional macro files are also included:
|
||||
|
||||
modulatorMacro.mac : allows the reconstruction of the spread out bragg peak modulating the proton beams by means of a rotating modulator wheel. The wheel is rotated of 1 degree at each run and 1000 protons are simulated in each run.
|
||||
stoppingPowers.mac : calculates the stopping power of protons and alpha particles in the energy range between 1 keV up to 200 MeV
|
||||
detectorGeometry.mac : example of how to modify the detector geometry
|
||||
|
||||
The main folder also includes an additional macro file, batch.mac which runs a simple simulation using the default geometry of the CATANA beamline.This macro is also used during the system testing process.
|
||||
|
||||
DOWNLOAD AND INSTALLATION
|
||||
===================================================
|
||||
|
||||
'hadrontherapy' source code is actually released inside the official distribution of the Geant4 toolkit in the $G4INSTALL/examples/advanced folder.
|
||||
'hadrontherapy' source code is released inside the distribution of the Geant4 toolkit in the $G4INSTALL/examples/advanced folder.
|
||||
|
||||
To run 'hadrontherapy' you must first install the Geant4 package. Once Geant4 is installed, the example must be first compiled. When compilation is completed the program can be executed.
|
||||
To run 'hadrontherapy' you must first install the Geant4 package. Once Geant4 is installed, the example must be first compiled. When the compilation is completed the program can be executed.
|
||||
|
||||
A complete guide for the Geant4 installation in different operating systems can be found inside the official installation Geant4 pages.
|
||||
|
||||
If you have troubles with the Geant4 installation please send an e-mail to us.
|
||||
|
||||
A CMakeLists.txt file (preferred) is provided together with a standard GNUmakefile for compilation.
|
||||
|
||||
|
||||
GEOMETRICAL SET-UP
|
||||
GEOMETRIC SET-UP
|
||||
===================================================
|
||||
|
||||
The idea of 'hadrontherapy' is to provide a tool useful for Users interested in the field of proton and ion therapy. These can include the simple calculation of dose distribution curves in water or other materials, the derivation of important transport parameters (stopping powers, ranges, etc.) in different geometrical set-ups and for different materials, up to the complete simulation of a real transport beam line for therapy.
|
||||
The main component of the simulation is the phantom, a box that can be filled with different materials and where the scoring of different information (at moment the dose deposited in voxels) can be performed. A more complete description of the phantom is given in the next subsection.
|
||||
|
||||
The main component of the simulation is the phantom, a box that can be filled with different material and where the score of different information (at moment the dose deposited in voxels) can be performed. A more complete description of the phantom is given in the next subsection.
|
||||
All these configurations will be set using macro commands.
|
||||
|
||||
At the moment the 'hadrontherapy' example includes the simulation of passive beam lines.
|
||||
In the next future an ActiveProtonBeamLine.cc will be provided for the simulation of the active scanning treatment modality.
|
||||
Moreover the possibility to add a very simple set-up (a beam, a phantom where collect the informations and some simple component) will be also provided.
|
||||
|
||||
All these configuration will be set using macro commands.
|
||||
|
||||
There is also a feature that allows the user to make a choice between alternative geometry set-ups. This can be done by using command:
|
||||
There is also a feature that allows the user to make a choice between alternative geometry set-ups. This can be done by using the command:
|
||||
/geometrySetup/selectGeometry <name>
|
||||
where <name> is either "default" for the standard 'hadrontherapy' geometry or "Carbon" for INFN-LNS transport beam line,
|
||||
normally used for interdisciplinary researches at LNS-INFN in Catania with carbon and other ion beams or "LaserDriven" for the laser-driven beam line.
|
||||
|
||||
At the end of the beam line a phantom (a box of uniform material) is reproduced. Inside it, a user-defined region is divided
|
||||
in cubic and identical voxels. The voxels size can be varied as well as the voxelized region.
|
||||
At the end of a simulation run, the dose deposited by primaries and secondaries in each voxel is collected. This information is available as an .out file or as a .root (if activated).
|
||||
where <name> is either "default" for the standard 'hadrontherapy' geometry, "Carbon" for INFN-LNS transport beam line, normally used for interdisciplinary researches at LNS-INFN in Catania with carbon and other ion beams, "LaserDriven" for the laser-driven beam line, "TrentoLine" for the TIFPA beam line and "BESTBeamLine" for the beam line designed for the BEST company.
|
||||
|
||||
At the end of the beam line a phantom (a box of uniform material) is reproduced. Inside it, a user-defined region is divided into cubic and identical voxels. The voxel size can be varied as well as the voxelized region.
|
||||
At the end of a simulation run, the dose deposited by primaries and secondaries in each voxel is collected. This information is available as an .out file.
|
||||
The default size of the active voxelized region is 40x40x40 mm and actually the default voxel configuration is 200 x 1 x 1, which means 200 slices with 0.2 mm of thickness.
|
||||
Of course this default can be modified in order to obtain, for example, a matrix of 80x80x80 cubic voxels each with a lateral dimension of 0.5 mm.
|
||||
Of course, this default can be modified in order to obtain, for example, a matrix of 80x80x80 cubic voxels each with a lateral dimension of 0.5 mm.
|
||||
|
||||
Concerning the cut and stepMax values, the default configuration implies a cut value of 1 mm in the whole world (use the command /run/setCut <length> in order to set the cut for all, and the command /run/setCutForRegion <name> <length> to set the cut for the desired volume (<name>) only) and a stepMax of 0.01 mm just in the phantom and in other volumes of the laser-driven beam line (use the command /Step/waterPhantomStepMax 0.01 mm).
|
||||
In any case it is strongly recommended to use a stepMax value not bigger than 5% of the dose slice thickness.
|
||||
In any case, it is strongly recommended to use a stepMax value not bigger than 5% of the dose slice thickness.
|
||||
|
||||
THE PROTON PASSIVE LINE CLASS FILE
|
||||
===================================================
|
||||
|
||||
The following is the description of the elements of the passive proton beam line of the Laboratori Nazionali del Sud in Catania (I). This line is completely simulated inside this class.
|
||||
The following is the description of the elements of the passive proton beam line of the INFN, Laboratori Nazionali del Sud in Catania (I). This line is completely simulated inside this class.
|
||||
|
||||
The main elements are:
|
||||
|
||||
* The SCATTERING SYSTEM: to transversally enlarge the original beam
|
||||
* The COLLIMATORS: placed along the beam line to collimate the beam;
|
||||
* The RANGE SHIFTERS: to decrease the energy of the primary proton beam to a specific value;
|
||||
* The MODULATOR WHEEL: to modulate the energy of the primary and mono-energetic beam in to a wide spectrum. The energy modulation is necessary to homogeneously irradiate a tumour volume that can extends in depth up to 20 mm;
|
||||
* The MONITOR CHAMBERS: very thin ionisation chamber that permit the dose monitoring during the patient irradiation;
|
||||
* The MOPI detector: microstrips, air free detector utilised for the check of the beam symmetry during the treatment;
|
||||
* The PATIENT COLLIMATOR: a brass, tumour-shaped collimator able to confine the proton irradiation field in order to irradiate just the tumour mass in the transverse direction;
|
||||
* The MODULATOR WHEEL: to modulate the energy of the primary and mono-energetic beam into a wide spectrum. The energy modulation is necessary to homogeneously irradiate a tumour volume that can extend in depth up to 20 mm;
|
||||
* The MONITOR CHAMBERS: very thin ionisation chamber that permits the dose monitoring during the patient irradiation;
|
||||
* The MOPI detector: microstrips, air-free detector utilised for the check of the beam symmetry during the treatment;
|
||||
* The PATIENT COLLIMATOR: a brass, tumour-shaped collimator able to confine the proton irradiation field to irradiate just the tumour mass in the transverse direction;
|
||||
|
||||
The user has the possibility to vary, via messenger, almost all the geometrical characteristics of the beam line elements (i.e. their position along the beam line, their thickness, etc.).
|
||||
The user can vary, via messenger, almost all the geometrical characteristics of the beam line elements (i.e. their position along the beam line, their thickness, etc.).
|
||||
|
||||
The elements simulated in the PassiveBeamLine.cc file are:
|
||||
|
||||
@@ -152,58 +165,117 @@ The elements simulated in the PassiveBeamLine.cc file are:
|
||||
|
||||
2. A system of collimators, to avoid the scattering radiation;
|
||||
|
||||
3. A modulation system that spreads the beam in energy and produces the so-called spread out Bragg peak; It is constituted by a rotating wheel of different thicknesses. The wheel rotates around its axis (parallel to the proton beam axis) and its movement can be obtained by means of a messenger between runs.
|
||||
3. A modulation system that spreads the beam in energy and produces the so-called spread-out Bragg peak; It is constituted by a rotating wheel of different thicknesses. The wheel rotates around its axis (parallel to the proton beam axis) and its movement can be obtained employing a messenger between runs.
|
||||
|
||||
4. A set of monitor chambers (special transmission ionization chambers used to control the particle flux during the irradiation);
|
||||
|
||||
5. A final long collimator and a patient collimator defining the final shape of the beam before reaching the patient.
|
||||
|
||||
6. A water phantom: it is a box of water where the dose deposit is calculated. The use of the water phantom is required by the international protocol on the measure of dose in the case of proton and ion beams (IAEA 398, 2000).
|
||||
6. A water phantom: it is a box of water where the dose deposit is calculated. The use of the water phantom is required by the international protocol on the measure of dose in the case of proton and ion beams (IAEA 398, 2000).
|
||||
|
||||
THE CARBON PASSIVE LINE CLASS FILE
|
||||
===================================================
|
||||
|
||||
The PassiveCarbonBeamLine.cc class implements the Zero Degree (ZD) beamline installed at LNS-INFN and entirely dedicated to in-air irradiation with ion beams (Z > 1, E ≤ 80AMeV ).
|
||||
The beam line is composed of an exit 50 um Kapton window which separates the in vacuum pipe from the in air section. The beam then hits a scattering system composed by a 20 um tantalum foil and a brass central stopper. Moreover, two different systems for the beam modulation energy are simulated reproducing the available systems at LNS-INFN: a ripple filter specifically designed for 62 AMeV carbon ion beams and a ridge filter designed for 62 AMeV helium and oxygen ion beams. A transmission monitor ionization chamber providing the on-line monitoring of the delivered dose is also simulated.
|
||||
The final collimator system is then composed by a brass tube (50 cm long and 27 mm in diameter) and a brass collimator with a variable in diameter from a maximum of 27 mm to 1 mm.
|
||||
RIDGE FILTER
|
||||
The ridge filter consists in a 2D array of pins, whose the shape and the thickness is optimized to obtain the desired SOBP.
|
||||
The developed and simulated ridge filter is composed of 900 pins, each having a square base of 1.7 x 1.7 mm2 and height of 4.72 mm. The material chosen for its realization was plastic (C21 O4 N24) with a density of 1.18 g/cm3. The filter was designed and produced thanks to a collaboration between the INFN-LNS group and the GSI, Darmstadt(D). The reconstruction of the ridge geometry was obtained by superimposed native structures (with a trapezoid shape) already presented in Geant4 (G4Trp).
|
||||
|
||||
RIPPLE FILTERS
|
||||
===================================================
|
||||
|
||||
Due to the native norrower bragg peak of carbon ions with respect to protons, a configuration with two ripple filters is the most suggested for realizing a SOBP.
|
||||
This solution was adopted at the ZD beam line and implemented in the simulation to obtain a flat longitudinal dose profile with carbon ions: the first filter is positioned at 7 cm from the exit window and the second one at 10 cm from the first. A single structure has a triangular section with a thin base of plexiglass (200 mm x 200 mm x 0.3 mm) and a basis 3 mm in thickness. The material density is 1.19 g/cm3.
|
||||
|
||||
|
||||
LASER DRIVEN PROTON BEAMLINE
|
||||
===================================================
|
||||
|
||||
Nowadays a big effort is being devoted to optically accelerate charged particles. There are several ion acceleration regimes that are being discussed in literature, but up to now the most experimentally investigated is the Target Normal Sheath Acceleration (TNSA) one.
|
||||
The beam transport and focusing as well as the energy selection of these laser produced beams represents one of the critical points in order to make such beams suitable for clinical applications. In fact, in contrast to conventional accelerators, the beams produced by high intensity laser-matter interaction are typically characterized by a wide angular divergence (for example ± 25 degrees) and a 100 % energy spread.
|
||||
Moreover due to the high current, conventional dosimetric systems cannot be used during the experimental sections (saturation issues) and for this reason the faraday cup detector has been proposed as the elegible absolute dosimetric device.
|
||||
|
||||
The following is the description of the elements of the laser-driven beam line. This line is completely simulated inside this class.
|
||||
|
||||
The main elements are:
|
||||
|
||||
* The QUADRUPOLES SYSTEM: made of four quadrupoles, to focus/defocus protons with a different energy;
|
||||
* The COLLIMATORS: placed along the beam line to collimate the beam;
|
||||
* The ENERGY SELECTOR SYSTEM: made of four dipoles, that provide the spatial separation of charged particles with different energies;
|
||||
* The FARADAY CUP: that provide the charge measurement and the distribution of the secondary electrons;
|
||||
|
||||
The user can have the possibility to vary, via messenger, many characteristics of the beam line elements (i.e. their position along the beam line, their thickness, etc.).
|
||||
|
||||
- /LaserDriven/EnergySelector/Disable -> to disable the Energy Selector
|
||||
|
||||
- /LaserDriven/EnergySelector/FirstCollimator/Radius <value> -> to set the Radius of the first collimator
|
||||
- /LaserDriven/EnergySelector/FirstCollimator/thickness <value> -> to set the Thickness of the first collimator
|
||||
- /LaserDriven/EnergySelector/FirstCollimator/zPosizion <value> -> to set the position of the first collimator hole along the radial plane
|
||||
|
||||
- /LaserDriven/EnergySelector/SecondCollimator/Radius <value> -> to set the Radius of the second collimator
|
||||
- /LaserDriven/EnergySelector/SecondCollimator/thickness <value> -> to set the Thickness of the second collimator
|
||||
- /LaserDriven/EnergySelector/SecondCollimator/zPosizion <value> -> to set the position of the second collimator hole along the radial plane
|
||||
|
||||
- /LaserDriven/EnergySelector/Slit/thickness <value> -> to set the Thickness of the slit, maximum value 10mm for geometric constraintconstrain
|
||||
- /LaserDriven/EnergySelector/Slit/HoleDimensionY <value> -> to set the Y dimension of the Slit Hole
|
||||
- /LaserDriven/EnergySelector/Slit/HoleDimensionZ <value> -> to set the Z dimension of the Slit Hole
|
||||
- /LaserDriven/EnergySelector/Slit/HolePositionZ <value> -> to set the Slit hole position in the Z direction as respect the Slit body center
|
||||
|
||||
- /LaserDriven/Quadrupoles/DisableQuad -> to disable the Quadrupole system
|
||||
|
||||
PHYSICS PROCESSES AND PHYSICS MODELS IMPLEMENTATION
|
||||
===================================================
|
||||
|
||||
Physics models in 'hadrontherapy', following the Geant4 organization, can be definied using four different approaches:
|
||||
Physics models in 'hadrontherapy', following the Geant4 organization, can be defined using four different approaches:
|
||||
|
||||
A particular care is addressed to the simulation of the physic processes.
|
||||
Particular care is addressed to the simulation of the physics processes.
|
||||
Three different approaches can be used for the choose of the physic models.
|
||||
|
||||
Approach 1:
|
||||
Using the macro command:
|
||||
/physic/addPhysics/<physics List name>.
|
||||
|
||||
In this case the models (for electromagnetic, hadronic elastic and hadronic inelastic) can be
|
||||
In this case, the models (for electromagnetic, hadronic elastic and hadronic inelastic) can be
|
||||
activated directly calling the name of the Physics Lists that are available inside the
|
||||
Geant4 kernel in the directory:
|
||||
|
||||
$G4INSTALL/source/physics_lists/builders/include
|
||||
|
||||
An example of the use of the Physics List can be found in the macro files:
|
||||
hadron_therapy.mac and carbon_beamline.mac
|
||||
default_macro.mac and carbon_beamline.mac
|
||||
|
||||
Approach 2:
|
||||
A set of built-in physic models are also contained inside the 'hadrontherapy' directory. These
|
||||
are called Local*.cc and Local*.hh and can be activated using the macro command:
|
||||
|
||||
A set of built-in physic lists are also defined and included in the class HadrontherapyPhisicsList.cc and can be activated by macro command:
|
||||
|
||||
/physic/addPhysics/<name>.
|
||||
|
||||
NOTE: we do not recommend the use of local physics lists while we recommend the use of the Physics Lists or of the Reference Physics Lists (Approach 1 or 3)
|
||||
Two different physics lists can be selected using this approach:
|
||||
- HADRONTHERAPY_1: include HP hadronic physics models
|
||||
- HADRONTHERAPY_2: HP physics models are switched off
|
||||
|
||||
Approach 3:
|
||||
We developed this approach in order to simplify the choice of the physic models to
|
||||
be used in the application.
|
||||
With this approach the user must only insert a command line in his/her .mac file using the: /physics/addPackage <PACKAGE_NAME>
|
||||
This permits to switch-on an already build physic package.
|
||||
This permits to switch-on an already built physics package.
|
||||
Various packages are already present in the Geant4 tree: they are in the directory: geant4/source/physics_lists/lists/include
|
||||
|
||||
Approach 4:
|
||||
Directly call a reference physics list by setting the variable PHYSLIST. Ex.:
|
||||
export PHYSLIST=QGSP_BIC_EMY
|
||||
and the export QGSP_BIC_EMY refernce physics list will be setted
|
||||
and the export QGSP_BIC_EMY reference physics list will be setted
|
||||
|
||||
|
||||
|
||||
INTERACTIVE COMMANDS
|
||||
===================================================
|
||||
|
||||
How to change Phantom and Detector geometries
|
||||
|
||||
In order to let the user to change phantom and detector geometries and voxelization, some interactive commands have been provided. All parameters are mandatory, except those inside square brackets.
|
||||
In order to let the user change phantom and detector geometries and voxelization, some interactive commands have been provided. All parameters are mandatory, except those inside square brackets.
|
||||
|
||||
Detector geometry
|
||||
|
||||
@@ -211,10 +283,10 @@ The user can change:
|
||||
|
||||
(1) The detector (box) size.
|
||||
|
||||
(2) The voxels sizes. Changing this parameters, and/or the detector sizes, user should choose values in order to be divisors of the detector correspondent sizes.
|
||||
(2) The voxels sizes. Changing these parameters, and/or the detector sizes, users should choose values in order to be divisors of the detector correspondent sizes.
|
||||
For both above commands, zero or negative values mean << don't change it >>
|
||||
|
||||
(3) The displacement between the phantom and the detector. Displacement parameters refer to the lower left corner of the detector respect to that of the phantom, by the point of view of the beam. In this case zero or positive values are allowed, while the negatives ones mean: << don't change it>>.
|
||||
(3) The displacement between the phantom and the detector. Displacement parameters refer to the lower-left corner of the detector with respect to that of the phantom, by the point of view of the beam. In this case, zero or positive values are allowed, while the negatives ones mean: << don't change it>>.
|
||||
|
||||
Command synopsis:
|
||||
|
||||
@@ -222,14 +294,13 @@ Command synopsis:
|
||||
/changeDetector/voxelSize <dimX> <dimY> <dimZ> <[unit]>
|
||||
/changeDetector/displacement <dispX> <dispY> <dispZ> <[unit]>
|
||||
|
||||
Default size values are 4x4x4 cm for the detector, 0.2x40x40 mm for any voxel and 0x18x18 cm
|
||||
for the displacement.
|
||||
Default size values are 4x4x4 cm for the detector, 0.2x40x40 mm for any voxel and 0x18x18 cm for the displacement.
|
||||
where the X dimension is that along the beam direction
|
||||
|
||||
Phantom geometry
|
||||
|
||||
(1) The phantom size. As usually, zero or negatives values mean: <<don't change it>>.
|
||||
(2) The phantom position respect to the world. In this case specified values refer to the three components of the position of the phantom's center respect to the world's.
|
||||
(1) The phantom size. As usually, zero or negative values mean: <<don't change it>>.
|
||||
(2) The phantom position respects the world. In this case, specified values refer to the three components of the position of the phantom's centre respect to the world.
|
||||
|
||||
Command synopsis:
|
||||
|
||||
@@ -237,9 +308,9 @@ Command synopsis:
|
||||
/changePhantom/position <posX> <posY> <posZ> <[unit]> # 20 0 0 cm
|
||||
|
||||
All these commands must be followed by the command /changePhantom/update
|
||||
in order to check and eventually apply changes to the real geometry.
|
||||
Moreover they must be issued between runs (so where you want but after the /run/initialize initialization command, or the G4State_Idle Geant4 state machine).
|
||||
Obviously all the previous sizes must be set in order to maintain the detector fully inside the phantom, otherwise system complains.
|
||||
to check and eventually apply changes to the real geometry.
|
||||
Moreover, they must be issued between runs (so where you want but after the /run/initialize initialization command, or the G4State_Idle Geant4 state machine).
|
||||
Obviously, all the previous sizes must be set in order to maintain the detector fully inside the phantom, otherwise, the system will give an error message.
|
||||
|
||||
Some examples follow:
|
||||
|
||||
@@ -254,7 +325,7 @@ Obviously all the previous sizes must be set in order to maintain the detector f
|
||||
|
||||
/changeDetector/size 0 8 0 cm
|
||||
# Will extend the Y size to 8 cm. In this case voxel size Y doesn't change, but
|
||||
# the number of voxel along Y doubles.
|
||||
# the number of voxels along Y doubles.
|
||||
/changePhantom/update
|
||||
|
||||
/changeDetector/voxelSize 100 0 0 um
|
||||
@@ -268,7 +339,7 @@ Obviously all the previous sizes must be set in order to maintain the detector f
|
||||
|
||||
Stopping powers calculation
|
||||
|
||||
It is possible for the end-user to calculate, via macro command, stopping powers only for those materials inserted into G4NistMaterialBuilder class (about 300).
|
||||
The end-user can calculate, via macro command, stopping powers only for those materials inserted into G4NistMaterialBuilder class (about 300).
|
||||
To get stopping powers user must provide this command line on the idle interactive terminal (or into a macro file) :
|
||||
|
||||
/parameter/getstopping <G4_material> <Emin> <Emax> <nPoints> <[particle]> <[output_filename]>
|
||||
@@ -280,7 +351,7 @@ Parameters are respectively:
|
||||
|
||||
The material (NIST) name (something like G4_..., the complete list of elements and materials is available into the G4NistMaterialBuilder class and can be printed to the terminal screen via the macro command: /parameter/nist )
|
||||
Kinetic energy range in MeV and the number of data points to be retrieved (in a logarithmically uniform space)
|
||||
The particle name (proton, e+, e-, He3, neutron,... a full list can be gotten via the macro command: /particle/list).
|
||||
The particle name (proton, e+, e-, He3, neutron,... a full list can be produced via the macro command: /particle/list).
|
||||
Currently, it does not work with ions.
|
||||
The output filename: if users leave this blank then the standard output is used.
|
||||
|
||||
@@ -288,50 +359,84 @@ Below is an example in order to calculate the stopping power for alphas into Hyd
|
||||
|
||||
/parameter/getstopping G4_H 0.001 150 15 alpha
|
||||
|
||||
|
||||
GEANT4 GENERAL PARTICLE SOURCE
|
||||
===================================================
|
||||
|
||||
The General Particle Source (GPS, G4 class name: G4GeneralParticleSource) is in the current version of 'hadrontherapy': it enables the user to use standard energy, angular and spatial distributions. The GPS includes also methods to bias the sampling distribution.
|
||||
The General Particle Source (GPS, G4 class name: G4GeneralParticleSource) is in the current version of 'hadrontherapy': it enables the user to use standard energy, angular and spatial distributions. The GPS also includes methods to bias the sampling distribution.
|
||||
|
||||
The G4GeneralParticleSource can be utilized by typing commands from the /gps command directory, or include the /gps commands in a g4macro file.
|
||||
The G4GeneralParticleSource can be utilized by typing commands from the /gps command directory, or include the /gps commands in a macro file.
|
||||
|
||||
RADIOBIOLOGICAL QUANTITIES: DOSE, LET, RBE
|
||||
===================================================
|
||||
|
||||
LET calculation
|
||||
|
||||
'hadrontherapy' application simulates and calculates the averaged dose LET.
|
||||
'hadrontherapy' application simulates and calculates the averaged LET-dose and LET-track fully accounting for the contribution of secondary particles generated in the target fragmentation
|
||||
Dependencies as respect to the transport parameters adopted during the Monte Carlo simulations as the production cut of secondaries particles, voxel size and the maximum steps length are minimized in the LET calculation. The first implementation of LET calculation adopted in hadrontherapy is reported in F. Romano et al.,(2014) Phys Med Biol 59(12): 2863–8. Now, in ‘hadrontherapy’ is implemented the approach reported in G. Petringa et al., (2020) Phys Med Bio. (DOI: 10.1088/1361-6560/abaeb9)
|
||||
At run time, data needed to calculate LET are collected. At the end of simulation, LET mean values are calculated and stored into a file.
|
||||
|
||||
The Let.out file will be produced at the end of a run, where you can
|
||||
find the dose average LET for each tracked particles (both primary and
|
||||
find the dose and track average LET for each tracked particles (both primary and
|
||||
secondary ones) and the total mean LET.
|
||||
|
||||
The file is structured as follows:
|
||||
- The first three columns contains the voxel indexes (first index "i" refers to the beam direction);
|
||||
- The fourth and fifth columns contain respectively total mean dose LET and primary mean dose LET;
|
||||
- The rest of columns contain LET Dose for each single ion (whose name is in the top row of the file).
|
||||
- The first three columns contain the voxel indexes (first index "i" refers to the beam direction);
|
||||
- The fourth and fifth columns contain respectively total mean dose LET (LDT) and total mean track LET (LTT)
|
||||
- The rest of columns contain LET Dose and Track for each single ion (whose name is in the top row of the file).
|
||||
|
||||
To activate the LET computation (HadrontherapyLet.cc), you have to execute
|
||||
the following command:
|
||||
|
||||
/analysis/secondary true
|
||||
/analysis/computeLet
|
||||
|
||||
RBE and Survival calculation
|
||||
|
||||
A method was developed to assess the biological damages produced by proton and ion beams in terms of survival fraction curves, i.e of the number of cells able to survive after the irradiation at different dose. The approach is based on the combined use of Monte Carlo Geant4 simulations (to calculate the doses deposited and the energy spectra of particles interacting with cells) and of the Survival analytical code (Manganaro L, Russo G, et al. Survival: a simulation toolkit introducing a modular approach for radiobiological evaluations in ion beam therapy. Phys. Med. Biol. 2018;63(8). 08–01).
|
||||
The Monte Carlo simulations permit the calculation of the Edep and Ekin distributions that, coupled with the radiobiological response model, allow the final and calculation of a survival curve.
|
||||
The kinetic energy and the LET value of any primary ion and of the secondaries generated in each slice of the simulated water phantom are retrieved at each simulation step. The corresponding values of αi and βi, for each specific ion i with a kinetic energy Ei and a released dose Di, are then calculated by direct linear interpolation of the Look-up-tables provided by the Survival analytical code.
|
||||
(G.Petringa et al., Physica Medica 58 (2019) 72–80)
|
||||
|
||||
The AlphaAndBeta.out and RBE.out files are produced at the end of the run.
|
||||
AlphaAndBeta.out contains the average alpha (first column) and beta (second column) parameters calculated for each slice (third column).
|
||||
|
||||
RBE.out contains the following quantities:
|
||||
Dose (Gy): the physical dose;
|
||||
ln(S): the natural log of the Survival Fraction;
|
||||
Survival Fraction;
|
||||
DoseB (Gy): the biological dose;
|
||||
RBE: relative biological effectiveness;
|
||||
depth (slice): n. of the slice;
|
||||
|
||||
To activate the RBE computation (HadrontherapyRBEcc), you have to execute
|
||||
the following command:
|
||||
|
||||
#you can choose the verbosity level
|
||||
/rbe/verbose 2
|
||||
|
||||
#you have to indicate the name of the LUT inside the rbe folder
|
||||
/rbe/loadLemTable data/rbe/lem.csv
|
||||
|
||||
/rbe/calculation 1
|
||||
/rbe/accumulate 1
|
||||
|
||||
#you have to indicate the name of the cell line
|
||||
/rbe/cellLine ARPE19
|
||||
/rbe/doseScale 7777770
|
||||
|
||||
SIMULATION OUTPUT
|
||||
===================================================
|
||||
|
||||
Store results in an ASCII file
|
||||
|
||||
A .out ASCII file is generated at the end of each run, Dose.out is its default name that can be changed in the HadrontherapyMatrix.cc file.
|
||||
The file contains four columns; the first three columns represent the voxel indexes (that univocally identify the voxel volume), while the last column represents the dose deposited in that given voxel.
|
||||
Alternatively, user can force store of data to a given filename, after any BeamOn command and before the program end, by the macro command /analysis/writeDoseFile <myfile.out>.
|
||||
The file contains four columns; the first three columns represent the voxel indexes (that unequivocally identify the voxel volume), while the last column represents the dose deposited in that given voxel.
|
||||
Alternatively, users can force the store of data to a given filename, after any BeamOn command and before the program ends, by the macro command /analysis/writeDoseFile <myfile.out>.
|
||||
|
||||
Moreover, if the macro command /analysis/secondary <true> is given, before the BeamOn command, ordinated dose and fluence, for every secondary produced, is added to the file.
|
||||
If the macro command /analysis/computeLet is given, an the ascii file Let.out is written, with the dose average LET computations.
|
||||
If the macro command /analysis/computeLet is given, and the ascii file Let.out is written, with the dose and track average LET computations.
|
||||
|
||||
User must take care that any change of the phantom geometry will clear all dose data.
|
||||
|
||||
Setting the name of the ROOT output file
|
||||
|
||||
By default the name of the ROOT output file is DoseDistribution.root. The name of the file can be set by using the macro command: analysis/setAnalysisFile <filename>
|
||||
Users must take care that any change of the phantom geometry will clear all dose data.
|
||||
|
||||
It is also possible to create multiple new output files in the same simulation session. For example:
|
||||
|
||||
@@ -345,56 +450,6 @@ It is also possible to create multiple new output files in the same simulation s
|
||||
/run/beamOn 1000
|
||||
/analysis/writeDoseFile secondRun.out
|
||||
|
||||
Use of the ROOT analysis
|
||||
|
||||
It is possible to use ROOT data analysis package directly for the production of output files.
|
||||
In the last version, anyway, this functionality must be implemented by User. This can be accomplished by setting an ad-hoc environment variable (i.e. G4ANALYSIS_USE_ROOT) to 1, adding in the code lines to create outputs with the ROOT libraries and recompiling the application.
|
||||
In this case you must have the ROOT framework installed in your machine.
|
||||
|
||||
Warning: If you plan to use ROOT analysis, please avoid compiling in the multi-threaded mode as the the ROOT library is not thread-safe.
|
||||
In the next release, we plan to base the whole analysis on g4tools which will solve this issue an MT will be safe to use.
|
||||
|
||||
LASER DRIVEN PROTON BEAMLINE
|
||||
|
||||
Nowadays a big effort is being devoted for optically accelerated charged particles. There are several ion acceleration regimes that are being discussed in literature, but up to now the most experimentally investigated is the Target Normal Sheath Acceleration (TNSA) one.
|
||||
The beam transport and focusing as well as the energy selection of these laser produced beams represents one of the critical points in order to make such kind of beams suitable for clinical applications. In fact, in contrast to conventional accelerators, the beams produced by high intensity laser-matter interaction are typically characterized by a wide angular divergence (for example ± 25 degrees) and a 100 % energy spread.
|
||||
Moreover due to the high current, conventional dosimetric system cannot be used during the experimental sections (saturation issues) and for this reason the faraday cup detector has been proposed as the elegible absolute dosimetric device.
|
||||
|
||||
The following is the description of the elements of the laser-driven beam line. This line is completely simulated inside this class.
|
||||
|
||||
The main elements are:
|
||||
|
||||
* The QUADRUPOLES SYSTEM: made of four quadrupoles, to focus/defocus protons with different energy;
|
||||
* The COLLIMATORS: placed along the beam line to collimate the beam;
|
||||
* The ENERGY SELECTOR SYSTEM: made of four dipoles, that provide the spatial separation of charged particles with different energies;
|
||||
* The FARADAY CUP: that provide the charge measurement and the distribution of the secondary electrons;
|
||||
|
||||
The user has the possibility to vary, via messenger, many characteristics of the beam line elements (i.e. their position along the beam line, their thickness, etc.).
|
||||
|
||||
- /LaserDriven/EnergySelector/Disable -> to disable the Energy Selector
|
||||
|
||||
- /LaserDriven/EnergySelector/FirstCollimator/Radius <value> -> to set the Radius of the first collimator
|
||||
- /LaserDriven/EnergySelector/FirstCollimator/thickness <value> -> to set the Thickness of the first collimator
|
||||
- /LaserDriven/EnergySelector/FirstCollimator/zPosizion <value> -> to set the position of the first collimator hole along the radial plane
|
||||
|
||||
- /LaserDriven/EnergySelector/SecondCollimator/Radius <value> -> to set the Radius of the second collimator
|
||||
- /LaserDriven/EnergySelector/SecondCollimator/thickness <value> -> to set the Thickness of the second collimator
|
||||
- /LaserDriven/EnergySelector/SecondCollimator/zPosizion <value> -> to set the position of the second collimator hole along the radial plane
|
||||
|
||||
- /LaserDriven/EnergySelector/Slit/thickness <value> -> to set the Thickness of the slit, maximum value 10mm for geometric constrain
|
||||
- /LaserDriven/EnergySelector/Slit/HoleDimensionY <value> -> to set the Y dimension of the Slit Hole
|
||||
- /LaserDriven/EnergySelector/Slit/HoleDimensionZ <value> -> to set the Z dimension of the Slit Hole
|
||||
- /LaserDriven/EnergySelector/Slit/HolePositionZ <value> -> to set the Slit hole position in the Z direction as respect the Slit body center
|
||||
|
||||
- /LaserDriven/Quadrupoles/DisableQuad -> to disable the Quadrupole system
|
||||
Please contact cirrone@lns.infn.it for more details or suggestions and feedback on this document.
|
||||
|
||||
|
||||
FUTURE CHALLENGES AND USERS' REQUESTS
|
||||
|
||||
This is a list of future components and feature that will be added in 'hadrontherapy' and of main Users requests that we hope to fulfill in the next future.
|
||||
|
||||
- A module for the RBE (Relative Biological Effectiveness) calculation will be also delivered. The Catania Group in Collaboration with the Turin one is working on this. This module is already implemented (in a preliminary version) in an internal version of 'hadrontherapy' and can be provided, if requested. Please, contact us.
|
||||
|
||||
- A g4tools-compatible ROOT output from HadrontherapyAnalysisManager.
|
||||
|
||||
Please contact cirrone@lns.infn.it or francesco.romano@lns.infn.it for more details or suggestions and feedbacks on this document.
|
||||
|
||||
Executable → Regular
@@ -87,14 +87,7 @@
|
||||
#include "G4ParallelWorldPhysics.hh"
|
||||
#include <time.h>
|
||||
#include "G4Timer.hh"
|
||||
|
||||
//************************MT*********************
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "HadrontherapyActionInitialization.hh"
|
||||
|
||||
#include "G4VisExecutive.hh"
|
||||
@@ -119,16 +112,13 @@ int main(int argc ,char ** argv)
|
||||
// in multithread
|
||||
CLHEP::RanluxEngine defaultEngine( 1234567, 4 );
|
||||
G4Random::setTheEngine( &defaultEngine );
|
||||
G4int seed = time( NULL );
|
||||
G4int seed = (G4int) time( NULL );
|
||||
G4Random::setTheSeed( seed );
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
|
||||
G4MTRunManager* runManager = new G4MTRunManager;
|
||||
#else
|
||||
G4RunManager* runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
G4int nThreads = 4;
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
|
||||
// Geometry controller is responsible for instantiating the
|
||||
// geometries. All geometry specific m tasks are now in class
|
||||
// HadrontherapyGeometryController.
|
||||
|
||||
@@ -0,0 +1,275 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Hadrontherapy advanced example for Geant4
|
||||
// See more at: https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
|
||||
|
||||
#ifndef BESTPassiveProtonBeamLine_H
|
||||
#define BESTPassiveProtonBeamLine_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class HadrontherapyDetectorConstruction;
|
||||
class HadrontherapyModulator;
|
||||
class BESTPassiveProtonBeamLineMessenger;
|
||||
class HadrontherapyDetectorROGeometry;
|
||||
|
||||
class BESTPassiveProtonBeamLine : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
|
||||
BESTPassiveProtonBeamLine();
|
||||
~BESTPassiveProtonBeamLine();
|
||||
// static G4bool doCalculation;
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
//***************************** PW **************NON SERVE*************************
|
||||
|
||||
static BESTPassiveProtonBeamLine* GetInstance();
|
||||
|
||||
//***************************** PW **************NON SERVE*************************
|
||||
|
||||
void BESTBeamLineSupport();
|
||||
// Definition of the beam line support
|
||||
|
||||
void BESTBeamScatteringFoils();
|
||||
// Definition of the first scattering foil,
|
||||
// of the Kapton window, of the stopper
|
||||
|
||||
void BESTRangeShifter();
|
||||
// This defines the "range shifter". Is is a slab
|
||||
// (usually of PMMA" acting as energy degrader
|
||||
// of primary beam
|
||||
|
||||
void BESTBeamCollimators();
|
||||
// Definition of the first collimator, of the range shifter,
|
||||
// of the second collimator, of the first and second
|
||||
// collimator modulators
|
||||
|
||||
void BESTBeamMonitoring();
|
||||
// Definition of three monitor chambers
|
||||
|
||||
|
||||
void BESTBeamNozzle();
|
||||
// Definition of the beam noozle
|
||||
|
||||
void BESTBeamFinalCollimator();
|
||||
// Definition of the final collimator
|
||||
|
||||
// The following methods allow to change parameters
|
||||
// of some beam line components
|
||||
|
||||
void SetRangeShifterXSize(G4double halfSize);
|
||||
// This method allows to change the size of the range shifter along
|
||||
// the X axis
|
||||
|
||||
void SetFirstScatteringFoilXSize(G4double);
|
||||
// This method allows to change the size of the first scattering foil
|
||||
// along the X axis
|
||||
|
||||
void SetSecondScatteringFoilXSize(G4double);
|
||||
// This method allows to change the size of the second scattering foil
|
||||
// along the X axis
|
||||
|
||||
void SetOuterRadiusStopper(G4double);
|
||||
// This method allows to change the size of the outer radius of the stopper
|
||||
|
||||
void SetInnerRadiusFinalCollimator(G4double);
|
||||
// This method allows to change the size of the inner radius of the
|
||||
// final collimator
|
||||
|
||||
void SetRSMaterial(G4String);
|
||||
// This method allows to change the material
|
||||
// of the range shifter
|
||||
|
||||
void SetModulatorAngle(G4double angle);
|
||||
// This method allows moving the modulator through UI commands
|
||||
|
||||
|
||||
private:
|
||||
static BESTPassiveProtonBeamLine* instance;
|
||||
//passive proton line dimensions
|
||||
void SetDefaultDimensions();
|
||||
void ConstructBESTPassiveProtonBeamLine();
|
||||
|
||||
HadrontherapyModulator* modulator; // Pointer to the modulator
|
||||
// geometry component
|
||||
BESTPassiveProtonBeamLineMessenger* passiveMessenger;
|
||||
G4VPhysicalVolume* physicalTreatmentRoom;
|
||||
HadrontherapyDetectorConstruction* hadrontherapyDetectorConstruction;
|
||||
|
||||
|
||||
G4Material* kapton;
|
||||
|
||||
G4double BESTvacuumZoneXSize;
|
||||
G4double BESTvacuumZoneYSize;
|
||||
G4double BESTvacuumZoneZSize;
|
||||
G4double BESTvacuumZoneXPosition;
|
||||
|
||||
G4double BESTfirstScatteringFoilXSize;
|
||||
G4double BESTfirstScatteringFoilYSize;
|
||||
G4double BESTfirstScatteringFoilZSize;
|
||||
G4double BESTfirstScatteringFoilXPosition;
|
||||
|
||||
G4double BESTkaptonWindowXSize;
|
||||
G4double BESTkaptonWindowYSize;
|
||||
G4double BESTkaptonWindowZSize;
|
||||
G4double BESTkaptonWindowXPosition;
|
||||
|
||||
G4double BESTinnerRadiusStopper;
|
||||
G4double BESTheightStopper;
|
||||
G4double BESTstartAngleStopper;
|
||||
G4double BESTspanningAngleStopper;
|
||||
G4double BESTstopperXPosition;
|
||||
G4double BESTstopperYPosition;
|
||||
G4double BESTstopperZPosition;
|
||||
G4double BESTouterRadiusStopper;
|
||||
|
||||
G4double BESTsecondScatteringFoilXSize;
|
||||
G4double BESTsecondScatteringFoilYSize;
|
||||
G4double BESTsecondScatteringFoilZSize;
|
||||
G4double BESTsecondScatteringFoilXPosition;
|
||||
G4double BESTsecondScatteringFoilYPosition;
|
||||
G4double BESTsecondScatteringFoilZPosition;
|
||||
|
||||
G4double BESTrangeShifterXSize;
|
||||
G4double BESTrangeShifterYSize;
|
||||
G4double BESTrangeShifterZSize;
|
||||
G4double BESTrangeShifterXPosition;
|
||||
G4double BESTrangeShifterYPosition;
|
||||
G4double BESTrangeShifterZPosition;
|
||||
|
||||
|
||||
G4VPhysicalVolume* physiBeamLineSupport;
|
||||
G4VPhysicalVolume* physiBeamLineCover;
|
||||
G4VPhysicalVolume* physiBeamLineCover2;
|
||||
G4Box* BESTfirstScatteringFoil;
|
||||
G4VPhysicalVolume* physiBESTFirstScatteringFoil;
|
||||
G4VPhysicalVolume* physiBESTKaptonWindow;
|
||||
|
||||
G4Tubs* solidBESTStopper;
|
||||
G4VPhysicalVolume* physiBESTStopper;
|
||||
G4LogicalVolume* logicBESTStopper;
|
||||
|
||||
G4Box* BESTsecondScatteringFoil;
|
||||
G4VPhysicalVolume* physiBESTSecondScatteringFoil;
|
||||
G4VPhysicalVolume* physiBESTFirstCollimator;
|
||||
G4VPhysicalVolume* physiBESTHoleFirstCollimator;
|
||||
G4Box* solidBESTRangeShifterBox;
|
||||
G4LogicalVolume* logicBESTRangeShifterBox;
|
||||
G4VPhysicalVolume* physiBESTRangeShifterBox;
|
||||
G4VPhysicalVolume* physiBESTSecondCollimator;
|
||||
G4VPhysicalVolume* physiBESTHoleSecondCollimator;
|
||||
|
||||
G4VPhysicalVolume* physiBESTFirstCollimatorModulatorBox;
|
||||
G4VPhysicalVolume* physiBESTHoleFirstCollimatorModulatorBox;
|
||||
|
||||
G4VPhysicalVolume* physiBESTSecondCollimatorModulatorBox;
|
||||
G4VPhysicalVolume* physiBESTHoleSecondCollimatorModulatorBox;
|
||||
|
||||
G4double BESTinnerRadiusFinalCollimator;
|
||||
G4VPhysicalVolume* mother;
|
||||
|
||||
|
||||
G4VPhysicalVolume* chamberPhys;
|
||||
G4VPhysicalVolume*innerchamberPhys;
|
||||
G4VPhysicalVolume*enterWindowPhys;
|
||||
G4VPhysicalVolume*enterElectrodePhys;
|
||||
G4VPhysicalVolume* kaptonLayerPhys1;
|
||||
G4VPhysicalVolume*copperLayerPhys1;
|
||||
G4VPhysicalVolume*nickelLayerPhys1;
|
||||
G4VPhysicalVolume*fFirstCavityPhys;
|
||||
G4VPhysicalVolume*centralElectrode1Phys;
|
||||
G4VPhysicalVolume*centralWindowPhys;
|
||||
G4VPhysicalVolume*centralElectrode2Phys;
|
||||
G4VPhysicalVolume*fSecondCavityPhys;
|
||||
G4VPhysicalVolume*exitElectrodePhys;
|
||||
G4VPhysicalVolume* kaptonLayerPhys2;
|
||||
G4VPhysicalVolume*copperLayerPhys2;
|
||||
G4VPhysicalVolume*nickelLayerPhys2;
|
||||
|
||||
G4VPhysicalVolume* exitWindowPhys;
|
||||
|
||||
G4Material* CopperLayerMaterial;
|
||||
G4Material* NichelLayerMaterial;
|
||||
G4Material* KaptonLayerMaterial;
|
||||
G4Material* WindowMaterial;
|
||||
G4Material* CentralWindowMaterial;
|
||||
G4Material* wallMaterial;
|
||||
G4Material* ElectrodeMaterial;
|
||||
G4Material* CavityMaterial;
|
||||
|
||||
|
||||
G4VPhysicalVolume* physiNozzleSupport;
|
||||
G4VPhysicalVolume* physiHoleNozzleSupport;
|
||||
G4VPhysicalVolume* physiBrassTube;
|
||||
G4VPhysicalVolume* physiBrassTube2;
|
||||
G4VPhysicalVolume* physiBrassTube3;
|
||||
G4Tubs* solidFinalCollimator;
|
||||
G4VPhysicalVolume* physiFinalCollimator;
|
||||
|
||||
G4VisAttributes* blue;
|
||||
G4VisAttributes* gray;
|
||||
G4VisAttributes* white;
|
||||
G4VisAttributes* red;
|
||||
G4VisAttributes* yellow;
|
||||
G4VisAttributes* green;
|
||||
G4VisAttributes* darkGreen;
|
||||
G4VisAttributes* darkOrange3;
|
||||
G4VisAttributes* skyBlue;
|
||||
|
||||
G4Material* rangeShifterMaterial;
|
||||
G4Material* beamLineSupportMaterial;
|
||||
G4Material* vacuumZoneMaterial;
|
||||
G4Material* firstScatteringFoilMaterial;
|
||||
G4Material* kaptonWindowMaterial;
|
||||
G4Material* stopperMaterial;
|
||||
G4Material* secondScatteringFoilMaterial;
|
||||
G4Material* firstCollimatorMaterial;
|
||||
G4Material* holeFirstCollimatorMaterial;
|
||||
G4Material* modulatorBoxMaterial;
|
||||
G4Material* holeModulatorBoxMaterial;
|
||||
|
||||
|
||||
G4Material* nozzleSupportMaterial;
|
||||
G4Material* holeNozzleSupportMaterial;
|
||||
|
||||
G4Material* brassTubeMaterial;
|
||||
G4Material* brassTube2Material;
|
||||
G4Material* brassTube3Material;
|
||||
G4Material* finalCollimatorMaterial;
|
||||
|
||||
|
||||
HadrontherapyDetectorROGeometry* RO;
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Hadrontherapy advanced example for Geant4
|
||||
// See more at: https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
|
||||
|
||||
#ifndef PassiveProtonBeamLineMessenger_h
|
||||
#define PassiveProtonBeamLineMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
|
||||
class BESTPassiveProtonBeamLine;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAString;
|
||||
|
||||
class BESTPassiveProtonBeamLineMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
BESTPassiveProtonBeamLineMessenger(BESTPassiveProtonBeamLine*);
|
||||
~BESTPassiveProtonBeamLineMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
// Pointer to the detector component
|
||||
BESTPassiveProtonBeamLine* passiveProton;
|
||||
|
||||
G4UIdirectory* changeTheBeamLineDir;
|
||||
G4UIcmdWithAString* changeTheBeamLineNameCmd; // Control the name of the beam line
|
||||
|
||||
G4UIdirectory* modulatorDir; // Control of the modulator
|
||||
G4UIdirectory* beamLineDir; // Control of the beam line
|
||||
|
||||
G4UIdirectory* rangeShifterDir;
|
||||
// Control of the range shifter component of the beam line
|
||||
|
||||
G4UIdirectory* firstScatteringFoilDir;
|
||||
// Control of the first scattering foil component of the beam line
|
||||
|
||||
G4UIdirectory* secondScatteringFoilDir;
|
||||
// Control of the first scattering foil component of the beam line
|
||||
|
||||
G4UIdirectory* rangeStopperDir;
|
||||
// Control of the range stopper component of the beam line
|
||||
|
||||
G4UIdirectory* finalCollimatorDir;
|
||||
// Control of the final collimator component of the beam line
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* modulatorAngleCmd;
|
||||
// UI command to rotate the modulator wheel
|
||||
|
||||
G4UIcmdWithAString* rangeShifterMatCmd;
|
||||
// UI command to set the material of the rangeShifter component of
|
||||
// the beam line
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* rangeShifterXSizeCmd;
|
||||
// UI command to set half of the X size of the rangeShifter component of
|
||||
// the beam line
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* rangeShifterXPositionCmd;
|
||||
// UI command to change the X position of the rangeShifter component of
|
||||
// the beam line
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* firstScatteringFoilXSizeCmd;
|
||||
// UI command to set half X size of the first scattering foil of
|
||||
// the beam line
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* secondScatteringFoilXSizeCmd;
|
||||
// UI command to set half X size of the second scattering foil
|
||||
// the beam line
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* outerRadiusStopperCmd;
|
||||
// UI command to set the outer radius of the range stopper component of
|
||||
// the beam line
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* innerRadiusFinalCollimatorCmd;
|
||||
// UI command to set the inner radius of the final collimator component of
|
||||
// the beam line
|
||||
};
|
||||
#endif
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -31,48 +31,33 @@
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
#include "HadrontherapyPrimaryGeneratorMessenger.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
|
||||
class G4GeneralParticleSource;
|
||||
class G4Event;
|
||||
|
||||
class HadrontherapyPrimaryGeneratorMessenger;
|
||||
|
||||
class HadrontherapyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
HadrontherapyPrimaryGeneratorAction();
|
||||
~HadrontherapyPrimaryGeneratorAction();
|
||||
public:
|
||||
HadrontherapyPrimaryGeneratorAction();
|
||||
~HadrontherapyPrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
// Methods to change the parameters of primary particle generation
|
||||
// interactively
|
||||
void GeneratePrimaries(G4Event*);
|
||||
static G4bool ReadFile;
|
||||
public:
|
||||
// Methods to change the parameters of primary particle generation
|
||||
// interactively
|
||||
void GeneratePrimaries(G4Event*);
|
||||
inline void setNewSource(G4bool Varbool){fNewSource= Varbool;};
|
||||
inline void setCalculatedPhaseSpaceFileIN(G4String val){calculatedPhaseSpaceFileIN=val;}
|
||||
|
||||
inline void setNewSource(G4bool Varbool){NewSource= Varbool;};
|
||||
G4String PathSource;
|
||||
G4bool Readfile;
|
||||
G4bool NewSource;
|
||||
inline void setCalculatedPhaseSpaceFileIN(G4String val){calculatedPhaseSpaceFileIN=val;}
|
||||
|
||||
|
||||
private:
|
||||
void SetDefaultPrimaryParticle();
|
||||
|
||||
|
||||
G4String calculatedPhaseSpaceFileIN;
|
||||
void setGunCalculatedPhaseSpace();
|
||||
|
||||
HadrontherapyPrimaryGeneratorMessenger *PrimaryGeneratorMessenger;
|
||||
G4ParticleGun *particleGuns;
|
||||
|
||||
|
||||
private:
|
||||
G4GeneralParticleSource* particleGun;
|
||||
G4double sigmaX;
|
||||
std::ofstream ofs;
|
||||
private:
|
||||
// void SetDefaultPrimaryParticle();
|
||||
G4bool fNewSource;
|
||||
G4String calculatedPhaseSpaceFileIN;
|
||||
void setGunCalculatedPhaseSpace();
|
||||
|
||||
HadrontherapyPrimaryGeneratorMessenger *PrimaryGeneratorMessenger;
|
||||
G4GeneralParticleSource* particleGun;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Executable → Regular
+3
-3
@@ -114,9 +114,9 @@ public:
|
||||
void StoreRBE();
|
||||
|
||||
// Information about voxels
|
||||
size_t GetNumberOfVoxelsAlongX() const { return fNumberOfVoxelsAlongX; }
|
||||
size_t GetNumberOfVoxelsAlongY() const { return fNumberOfVoxelsAlongY; }
|
||||
size_t GetNumberOfVoxelsAlongZ() const { return fNumberOfVoxelsAlongZ; }
|
||||
G4int GetNumberOfVoxelsAlongX() const { return fNumberOfVoxelsAlongX; }
|
||||
G4int GetNumberOfVoxelsAlongY() const { return fNumberOfVoxelsAlongY; }
|
||||
G4int GetNumberOfVoxelsAlongZ() const { return fNumberOfVoxelsAlongZ; }
|
||||
|
||||
// Some basic output to the screen
|
||||
void PrintParameters();
|
||||
|
||||
Executable → Regular
+8
-3
@@ -88,11 +88,16 @@ private:
|
||||
|
||||
// How many voxels do we have?
|
||||
// ...along each axis
|
||||
size_t fVoxelsAlongX;
|
||||
size_t fVoxelsAlongY;
|
||||
size_t fVoxelsAlongZ;
|
||||
G4int fVoxelsAlongX;
|
||||
G4int fVoxelsAlongY;
|
||||
G4int fVoxelsAlongZ;
|
||||
|
||||
// ...and in total
|
||||
size_t fVoxels;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // HADRONTHERAPYRBEACCUMULABLE_HH
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -0,0 +1,157 @@
|
||||
##############################
|
||||
####### BEST BEAM LINE #######
|
||||
##############################
|
||||
# Set of the verboses
|
||||
#
|
||||
/control/verbose 1
|
||||
/tracking/verbose 0
|
||||
/run/verbose 1
|
||||
/event/verbose 0
|
||||
|
||||
##########################
|
||||
# Set of the physic models
|
||||
#
|
||||
/Physics/addPhysics QGSP_BIC_EMY
|
||||
/run/numberOfThreads 16
|
||||
|
||||
######## Geometry selection #######
|
||||
/geometrySetup/selectGeometry BESTBeamLine
|
||||
|
||||
##########################
|
||||
# Initialisation procedure
|
||||
#
|
||||
/run/initialize
|
||||
|
||||
#########################
|
||||
# Set the primary particle type,
|
||||
# energy and position along the X direction
|
||||
#
|
||||
#---------------------------gps-----------------
|
||||
####### BEST beam parameters #######
|
||||
/gps/pos/shape Circle
|
||||
/gps/pos/centre -310. 0. 0. cm
|
||||
/gps/pos/radius 0. mm
|
||||
/gps/pos/sigma_r 3. mm
|
||||
/gps/particle proton
|
||||
/gps/pos/type Beam
|
||||
|
||||
|
||||
# the incident surface is in the y-z plane
|
||||
|
||||
/gps/pos/rot1 0 1 0
|
||||
/gps/pos/rot2 0 0 1
|
||||
|
||||
# the beam is travelling along the x-axis without any angular dispersion (angular despersion set to 0.0)
|
||||
#
|
||||
|
||||
/gps/ang/rot1 0 0 1
|
||||
/gps/ang/rot2 0 1 0
|
||||
/gps/ang/type beam1d
|
||||
/gps/ang/sigma_r 0.16 deg
|
||||
|
||||
|
||||
# the beam energy is in gaussian profile
|
||||
#
|
||||
/gps/ene/type Gauss
|
||||
/gps/ene/mono 70 MeV
|
||||
/gps/ene/sigma 0.3 MeV
|
||||
|
||||
|
||||
######## Range shifter settings #########
|
||||
#/beamLine/BESTRangeShifter/RSMat G4_PLEXIGLASS
|
||||
#/beamLine/BESTRangeShifter/thickness 13 mm
|
||||
/beamLine/BESTFinalCollimator/halfInnerRad 12.5 mm
|
||||
|
||||
##########################
|
||||
# Set here the cut and the step max for the tracking.
|
||||
# Suggested values of cut and step:
|
||||
# Set cuts OUTSIDE the detector
|
||||
#
|
||||
/run/setCut 1 m
|
||||
|
||||
|
||||
|
||||
# Set cuts ONLY inside the detector
|
||||
#
|
||||
/run/setCutForRegion DetectorLog 0.05 mm
|
||||
|
||||
/Step/waterPhantomStepMax 1 mm
|
||||
|
||||
#########################
|
||||
##############################################################################################################################
|
||||
# DETECTOR DESCRIPTION
|
||||
###################################################
|
||||
# USE THE FOLLOWING FOUR LINES FOR DEFINITION OF PHANTOM
|
||||
###################################################
|
||||
#
|
||||
#/changePhantom/position 20. 0. 0. cm
|
||||
#/changePhantom/update
|
||||
|
||||
/changePhantom/size 40 40 40 cm
|
||||
/changePhantom/position 20 0 0 cm
|
||||
|
||||
###################################################
|
||||
# USE THE FOLLOWING FOR A VOXELLIZED DETECTOR
|
||||
###################################################
|
||||
#
|
||||
|
||||
|
||||
/changeDetector/size 4 1 1 cm
|
||||
/changeDetector/voxelSize .1 10 10 mm
|
||||
|
||||
# Put the detector in the lower left corner of the phantom
|
||||
#
|
||||
/changeDetector/displacement 0 19.5 19.5 cm
|
||||
/changePhantom/update
|
||||
|
||||
|
||||
# Visualisation
|
||||
#
|
||||
#/vis/scene/create
|
||||
#/vis/open OGL
|
||||
#/vis/viewer/flush
|
||||
#/vis/viewer/set/viewpointThetaPhi 30 140 deg
|
||||
#/vis/viewer/zoomTo 1
|
||||
#/vis/viewer/panTo 100 20 cm
|
||||
#/vis/viewer/panTo -10 0 cm
|
||||
#/vis/scene/add/trajectories
|
||||
#/tracking/storeTrajectory 1
|
||||
#/vis/scene/endOfEventAction accumulate -1
|
||||
#/vis/viewer/update
|
||||
|
||||
#########################
|
||||
# Display the event number
|
||||
# during the run
|
||||
#
|
||||
/event/printEventNumber 1
|
||||
/run/printProgress 1000
|
||||
|
||||
# Default material is liquid water (G4_WATER)
|
||||
#/changePhantom/material G4_Pb
|
||||
|
||||
/run/setCutForRegion DetectorLog 0.1 mm
|
||||
|
||||
|
||||
/run/setCutForAGivenParticle e- 0.1 mm
|
||||
/run/setCutForAGivenParticle e+ 0.1 mm
|
||||
/run/setCutForAGivenParticle proton 0.1 mm
|
||||
|
||||
# For dose/fleunce computation of primary and secondary particles
|
||||
#/analysis/secondary true
|
||||
|
||||
# For dose average LET computations of primary and secondary particles#
|
||||
|
||||
/analysis/computeLet
|
||||
|
||||
####### Dose scorer at the isocentre #######
|
||||
/score/create/boxMesh detector
|
||||
/score/mesh/boxSize 1 20 20 mm
|
||||
/score/mesh/nBin 1 80 80
|
||||
/score/mesh/translate/xyz 0.5 0 0 mm
|
||||
/score/quantity/doseDeposit dose_detector
|
||||
/score/close
|
||||
|
||||
/run/beamOn 100
|
||||
#########################
|
||||
|
||||
/score/dumpQuantityToFile detector dose_detector dose_70Mev.txt
|
||||
Executable → Regular
@@ -49,19 +49,19 @@
|
||||
#/gps/ang/maxtheta .1 deg
|
||||
|
||||
################### the beam energy is uniform profile from 4.0 MeV to 12 MeV
|
||||
/gps/ene/type User
|
||||
/gps/ene/type User
|
||||
/gps/hist/type energy
|
||||
/gps/hist/point 4.000001 0
|
||||
/gps/hist/point 12. 1
|
||||
/gps/direction 1 0 0
|
||||
#/gps/ene/type User
|
||||
#/gps/ene/type User
|
||||
#/gps/hist/type energy
|
||||
#/gps/hist/point 4.000001 0
|
||||
#/gps/hist/point 12. 1
|
||||
#/gps/direction 1 0 0
|
||||
|
||||
#####################################################################
|
||||
# TARANIS energy spectrum without angular dipendence: exp(-.44E) for energy between 1. to 12 MeV
|
||||
###/gps/ene/type Exp
|
||||
###/gps/ene/min 1. MeV
|
||||
###/gps/ene/max 12. MeV
|
||||
###/gps/ene/ezero 2.272727273
|
||||
/gps/ene/type Exp
|
||||
/gps/ene/min 1. MeV
|
||||
/gps/ene/max 12. MeV
|
||||
/gps/ene/ezero 2.272727273
|
||||
|
||||
######################################################################
|
||||
###/vis/scene/create
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,175 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Hadrontherapy advanced example for Geant4
|
||||
// See more at: https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
|
||||
|
||||
#include "BESTPassiveProtonBeamLineMessenger.hh"
|
||||
#include "BESTPassiveProtonBeamLine.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
BESTPassiveProtonBeamLineMessenger::BESTPassiveProtonBeamLineMessenger(BESTPassiveProtonBeamLine* beamLine)
|
||||
:passiveProton(beamLine)
|
||||
|
||||
{
|
||||
changeTheBeamLineDir = new G4UIdirectory("/ChangeBeamLine/");
|
||||
changeTheBeamLineDir -> SetGuidance("Command to change the transport beam line");
|
||||
|
||||
changeTheBeamLineNameCmd = new G4UIcmdWithAString("/ChangeBeamLine/beamLineName",this);
|
||||
changeTheBeamLineNameCmd -> SetGuidance("Insert the name of the beam line you want simulate");
|
||||
changeTheBeamLineNameCmd -> SetParameterName("List",false);
|
||||
changeTheBeamLineNameCmd -> AvailableForStates(G4State_PreInit);
|
||||
|
||||
modulatorDir = new G4UIdirectory("/modulator/");
|
||||
modulatorDir -> SetGuidance("Command to rotate the modulator wheel");
|
||||
|
||||
beamLineDir = new G4UIdirectory("/beamLine/");
|
||||
beamLineDir -> SetGuidance("set specification of range shifter");
|
||||
|
||||
rangeShifterDir = new G4UIdirectory("/beamLine/BESTRangeShifter/");
|
||||
rangeShifterDir -> SetGuidance("set specification of range shifter");
|
||||
|
||||
firstScatteringFoilDir = new G4UIdirectory("/beamLine/BESTScatteringFoil1/");
|
||||
firstScatteringFoilDir -> SetGuidance("set specification of first scattering foil");
|
||||
|
||||
secondScatteringFoilDir = new G4UIdirectory("/beamLine/BESTScatteringFoil2/");
|
||||
secondScatteringFoilDir -> SetGuidance("set specification of second scattering foil");
|
||||
|
||||
rangeStopperDir = new G4UIdirectory("/beamLine/BESTStopper/");
|
||||
rangeStopperDir -> SetGuidance("set specification of stopper");
|
||||
|
||||
finalCollimatorDir = new G4UIdirectory("/beamLine/BESTFinalCollimator/");
|
||||
finalCollimatorDir -> SetGuidance("set specification of final collimator");
|
||||
|
||||
modulatorAngleCmd = new G4UIcmdWithADoubleAndUnit("/modulator/angle",this);
|
||||
modulatorAngleCmd -> SetGuidance("Set Modulator Angle");
|
||||
modulatorAngleCmd -> SetParameterName("Size",false);
|
||||
modulatorAngleCmd -> SetRange("Size>=0.");
|
||||
modulatorAngleCmd -> SetUnitCategory("Angle");
|
||||
modulatorAngleCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
rangeShifterMatCmd = new G4UIcmdWithAString("/beamLine/BESTRangeShifter/RSMat",this);
|
||||
rangeShifterMatCmd -> SetGuidance("Set material of range shifter");
|
||||
rangeShifterMatCmd -> SetParameterName("choice",false);
|
||||
rangeShifterMatCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
rangeShifterXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/BESTRangeShifter/thickness",this);
|
||||
rangeShifterXSizeCmd -> SetGuidance("Set half of the thickness of range shifter along X axis");
|
||||
rangeShifterXSizeCmd -> SetParameterName("Size",false);
|
||||
rangeShifterXSizeCmd -> SetDefaultUnit("mm");
|
||||
rangeShifterXSizeCmd -> SetUnitCandidates("mm cm m");
|
||||
rangeShifterXSizeCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
rangeShifterXPositionCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/BESTRangeShifter/position",this);
|
||||
rangeShifterXPositionCmd -> SetGuidance("Set position of range shifter");
|
||||
rangeShifterXPositionCmd -> SetParameterName("Size",false);
|
||||
rangeShifterXPositionCmd -> SetDefaultUnit("mm");
|
||||
rangeShifterXPositionCmd -> SetUnitCandidates("mm cm m");
|
||||
rangeShifterXPositionCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
firstScatteringFoilXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/BESTScatteringFoil1/thickness",this);
|
||||
firstScatteringFoilXSizeCmd -> SetGuidance("Set half thickness of first scattering foil");
|
||||
firstScatteringFoilXSizeCmd -> SetParameterName("Size",false);
|
||||
firstScatteringFoilXSizeCmd -> SetDefaultUnit("mm");
|
||||
firstScatteringFoilXSizeCmd -> SetUnitCandidates("mm cm m");
|
||||
firstScatteringFoilXSizeCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
secondScatteringFoilXSizeCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/BESTScatteringFoil2/thickness",this);
|
||||
secondScatteringFoilXSizeCmd -> SetGuidance("Set half thickness of second scattering foil");
|
||||
secondScatteringFoilXSizeCmd -> SetParameterName("Size",false);
|
||||
secondScatteringFoilXSizeCmd -> SetDefaultUnit("mm");
|
||||
secondScatteringFoilXSizeCmd -> SetUnitCandidates("mm cm m");
|
||||
secondScatteringFoilXSizeCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
outerRadiusStopperCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/BESTStopper/outRadius",this);
|
||||
outerRadiusStopperCmd -> SetGuidance("Set size of outer radius");
|
||||
outerRadiusStopperCmd -> SetParameterName("Size",false);
|
||||
outerRadiusStopperCmd -> SetDefaultUnit("mm");
|
||||
outerRadiusStopperCmd -> SetUnitCandidates("mm cm m");
|
||||
outerRadiusStopperCmd -> AvailableForStates(G4State_Idle);
|
||||
|
||||
innerRadiusFinalCollimatorCmd = new G4UIcmdWithADoubleAndUnit("/beamLine/BESTFinalCollimator/halfInnerRad",this);
|
||||
innerRadiusFinalCollimatorCmd -> SetGuidance("Set size of inner radius ( max 21.5 mm)");
|
||||
innerRadiusFinalCollimatorCmd -> SetParameterName("Size",false);
|
||||
innerRadiusFinalCollimatorCmd -> SetDefaultUnit("mm");
|
||||
innerRadiusFinalCollimatorCmd -> SetUnitCandidates("mm cm m");
|
||||
innerRadiusFinalCollimatorCmd -> AvailableForStates(G4State_Idle);
|
||||
}
|
||||
|
||||
BESTPassiveProtonBeamLineMessenger::~BESTPassiveProtonBeamLineMessenger()
|
||||
{
|
||||
delete innerRadiusFinalCollimatorCmd;
|
||||
delete outerRadiusStopperCmd;
|
||||
delete secondScatteringFoilXSizeCmd;
|
||||
delete firstScatteringFoilXSizeCmd;
|
||||
delete rangeShifterXPositionCmd;
|
||||
delete rangeShifterXSizeCmd;
|
||||
delete rangeShifterMatCmd;
|
||||
delete modulatorAngleCmd;
|
||||
delete finalCollimatorDir;
|
||||
delete rangeStopperDir;
|
||||
delete secondScatteringFoilDir;
|
||||
delete firstScatteringFoilDir;
|
||||
delete rangeShifterDir;
|
||||
delete beamLineDir;
|
||||
delete modulatorDir;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void BESTPassiveProtonBeamLineMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if( command == modulatorAngleCmd )
|
||||
{ passiveProton -> SetModulatorAngle
|
||||
(modulatorAngleCmd -> GetNewDoubleValue(newValue));}
|
||||
|
||||
else if( command == rangeShifterMatCmd )
|
||||
{ passiveProton -> SetRSMaterial(newValue);}
|
||||
|
||||
else if( command == rangeShifterXSizeCmd )
|
||||
{ passiveProton -> SetRangeShifterXSize
|
||||
(rangeShifterXSizeCmd -> GetNewDoubleValue(newValue));}
|
||||
|
||||
else if( command == firstScatteringFoilXSizeCmd )
|
||||
{ passiveProton -> SetFirstScatteringFoilXSize
|
||||
(firstScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
|
||||
|
||||
else if( command == secondScatteringFoilXSizeCmd )
|
||||
{ passiveProton -> SetSecondScatteringFoilXSize
|
||||
(secondScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
|
||||
|
||||
else if( command == outerRadiusStopperCmd )
|
||||
{ passiveProton -> SetOuterRadiusStopper(
|
||||
outerRadiusStopperCmd -> GetNewDoubleValue(newValue));}
|
||||
|
||||
else if( command == innerRadiusFinalCollimatorCmd )
|
||||
{ passiveProton -> SetInnerRadiusFinalCollimator
|
||||
(innerRadiusFinalCollimatorCmd -> GetNewDoubleValue(newValue));}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "HadrontherapyMatrix.hh"
|
||||
#include "HadrontherapyLet.hh"
|
||||
#include "PassiveProtonBeamLine.hh"
|
||||
|
||||
#include "BESTPassiveProtonBeamLine.hh"
|
||||
#include "HadrontherapyMatrix.hh"
|
||||
|
||||
#include "HadrontherapyRBE.hh"
|
||||
|
||||
@@ -231,8 +231,10 @@ G4bool HadrontherapyDetectorSD::ProcessHits(G4Step* aStep, G4TouchableHistory* )
|
||||
G4Exception("HadrontherapyDetectorSD::ProcessHits", "NoAccumulable", FatalException, "Accumulable RBE not found.");
|
||||
}
|
||||
}
|
||||
|
||||
fRBEAccumulable->Accumulate(kineticEnergy / A, energyDeposit, DX, Z, i, j, k);
|
||||
if (A>0) //protect against gammas, e- , etc
|
||||
{
|
||||
fRBEAccumulable->Accumulate(kineticEnergy / A, energyDeposit, DX, Z, i, j, k);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Executable → Regular
@@ -84,8 +84,8 @@ void HadrontherapyEventAction::EndOfEventAction(const G4Event* evt)
|
||||
// Fill the matrix with the information: voxel and associated energy deposit
|
||||
// in the detector at the end of the event
|
||||
|
||||
G4int HitCount = CHC -> entries();
|
||||
for (G4int h=0; h<HitCount; h++)
|
||||
size_t HitCount = CHC -> entries();
|
||||
for (size_t h=0; h<HitCount; h++)
|
||||
{
|
||||
G4int i = ((*CHC)[h]) -> GetXID();
|
||||
G4int j = ((*CHC)[h]) -> GetYID();
|
||||
|
||||
Executable → Regular
@@ -32,6 +32,7 @@
|
||||
#include "HadrontherapyDetectorROGeometry.hh"
|
||||
#include "HadrontherapyTIFPAPassiveProtonBeamLine.hh"
|
||||
#include "PassiveProtonBeamLine.hh"
|
||||
#include "BESTPassiveProtonBeamLine.hh"
|
||||
#include "PassiveCarbonBeamLine.hh"
|
||||
#include "LaserDrivenBeamLine.hh"
|
||||
#include "G4RunManager.hh"
|
||||
@@ -67,6 +68,11 @@ void HadrontherapyGeometryController::SetGeometry(G4String name)
|
||||
{
|
||||
registerGeometry(new TrentoPassiveProtonBeamLine());
|
||||
}
|
||||
else if(name == "BESTBeamLine")
|
||||
{
|
||||
registerGeometry(new BESTPassiveProtonBeamLine());
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
G4cout <<"Unknown geometry: " << name << ". Geometry not changed." << G4endl;
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -52,81 +52,74 @@
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
HadrontherapyPrimaryGeneratorAction::HadrontherapyPrimaryGeneratorAction()
|
||||
HadrontherapyPrimaryGeneratorAction::HadrontherapyPrimaryGeneratorAction() :
|
||||
fNewSource(false)
|
||||
{
|
||||
PrimaryGeneratorMessenger = new HadrontherapyPrimaryGeneratorMessenger(this);
|
||||
SetDefaultPrimaryParticle();
|
||||
particleGun = new G4GeneralParticleSource();
|
||||
|
||||
calculatedPhaseSpaceFileIN = "NULL";
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
HadrontherapyPrimaryGeneratorAction::~HadrontherapyPrimaryGeneratorAction()
|
||||
{
|
||||
delete PrimaryGeneratorMessenger;
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void HadrontherapyPrimaryGeneratorAction::SetDefaultPrimaryParticle()
|
||||
{
|
||||
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void HadrontherapyPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
|
||||
if(NewSource==true)
|
||||
if(fNewSource==true)
|
||||
{
|
||||
std::ifstream in(calculatedPhaseSpaceFileIN);
|
||||
G4double e, xpos, ypos, zpos,dirx,diry,dirz;
|
||||
G4int PDG;
|
||||
G4ThreeVector pos,dir;
|
||||
|
||||
if(in.eof())
|
||||
std::ifstream in(calculatedPhaseSpaceFileIN);
|
||||
G4double e, xpos, ypos, zpos,dirx,diry,dirz;
|
||||
G4int PDG;
|
||||
G4ThreeVector pos,dir;
|
||||
|
||||
if(in.eof())
|
||||
{
|
||||
G4Exception("HadrontherapyPrimaryGeneratorAction", "NoParticles", FatalException, "No more particles in the file");
|
||||
G4Exception("HadrontherapyPrimaryGeneratorAction", "NoParticles", FatalException, "No more particles in the file");
|
||||
}
|
||||
|
||||
while(!in.eof())
|
||||
|
||||
while(!in.eof())
|
||||
{
|
||||
|
||||
in >> e >> xpos >> ypos >>zpos >>dirx>>diry>>dirz >> PDG;
|
||||
dir= G4ThreeVector(dirx,diry,dirz);
|
||||
particleGun->GetCurrentSource()->GetEneDist()->SetMonoEnergy(e);
|
||||
|
||||
particleGun->GetCurrentSource()->GetParticlePosition().setX(xpos);
|
||||
particleGun->GetCurrentSource()->GetParticlePosition().setY(ypos);
|
||||
particleGun->GetCurrentSource()->GetParticlePosition().setZ(zpos);
|
||||
particleGun->GetCurrentSource()->GetAngDist()->SetParticleMomentumDirection(dir);
|
||||
|
||||
G4ParticleDefinition* particleDef = nullptr;
|
||||
if (PDG > 1000000000)
|
||||
|
||||
in >> e >> xpos >> ypos >>zpos >>dirx>>diry>>dirz >> PDG;
|
||||
dir= G4ThreeVector(dirx,diry,dirz);
|
||||
particleGun->GetCurrentSource()->GetEneDist()->SetMonoEnergy(e);
|
||||
|
||||
particleGun->GetCurrentSource()->GetParticlePosition().setX(xpos);
|
||||
particleGun->GetCurrentSource()->GetParticlePosition().setY(ypos);
|
||||
particleGun->GetCurrentSource()->GetParticlePosition().setZ(zpos);
|
||||
particleGun->GetCurrentSource()->GetAngDist()->SetParticleMomentumDirection(dir);
|
||||
|
||||
G4ParticleDefinition* particleDef = nullptr;
|
||||
if (PDG > 1000000000)
|
||||
{
|
||||
int a=(PDG-1000000000)-(((PDG-1000000000)/10)*10);
|
||||
if(a>0)
|
||||
int a=(PDG-1000000000)-(((PDG-1000000000)/10)*10);
|
||||
if(a>0)
|
||||
{
|
||||
PDG=PDG-a;
|
||||
particleDef = G4IonTable::GetIonTable()->GetIon(PDG);
|
||||
G4String Nome = particleDef->GetParticleName();
|
||||
PDG=PDG-a;
|
||||
particleDef = G4IonTable::GetIonTable()->GetIon(PDG);
|
||||
G4String Nome = particleDef->GetParticleName();
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
else
|
||||
{
|
||||
particleDef = G4IonTable::GetIonTable()->GetIon(PDG);
|
||||
G4String Nome = particleDef->GetParticleName();
|
||||
particleDef = G4IonTable::GetIonTable()->GetIon(PDG);
|
||||
G4String Nome = particleDef->GetParticleName();
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
else
|
||||
{
|
||||
particleDef = G4ParticleTable::GetParticleTable()->FindParticle(PDG);
|
||||
particleDef = G4ParticleTable::GetParticleTable()->FindParticle(PDG);
|
||||
}
|
||||
|
||||
particleGun->GetCurrentSource()->SetParticleDefinition(particleDef);
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
|
||||
particleGun->GetCurrentSource()->SetParticleDefinition(particleDef);
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
}
|
||||
|
||||
in.close();
|
||||
|
||||
Executable → Regular
+22
-8
@@ -172,7 +172,7 @@ void HadrontherapyRBE::LoadLEMTable(G4String path)
|
||||
}
|
||||
else
|
||||
{
|
||||
columnIndices[columnName] = distance(header.begin(), pos);
|
||||
columnIndices[columnName] = (G4int) distance(header.begin(), pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ std::tuple<G4double, G4double> HadrontherapyRBE::GetHitAlphaAndBeta(G4double E,
|
||||
|
||||
// Find the row in energy tables
|
||||
const auto eLarger = upper_bound(begin(vecEnergy), end(vecEnergy), E);
|
||||
const G4int lower = distance(begin(vecEnergy), eLarger) - 1;
|
||||
const G4int lower = (G4int) distance(begin(vecEnergy), eLarger) - 1;
|
||||
const G4int upper = lower + 1;
|
||||
|
||||
// Interpolation
|
||||
@@ -358,11 +358,23 @@ void HadrontherapyRBE::ComputeAlphaAndBeta()
|
||||
{
|
||||
G4cout << "RBE: Computing alpha and beta..." << G4endl;
|
||||
}
|
||||
fAlpha = fAlphaNumerator / (fDenominator * gray);
|
||||
|
||||
fBeta = pow(fBetaNumerator / fDenominator * gray, 2.0);
|
||||
|
||||
//g4pow -> powN(fBetaNumerator / fDenominator * gray, 2)
|
||||
//Re-inizialize the number of voxels
|
||||
fAlpha.resize(fAlphaNumerator.size()); //Initialize with the same number of elements
|
||||
fBeta.resize(fBetaNumerator.size()); //Initialize with the same number of elements
|
||||
for (size_t ii=0; ii<fDenominator.size();ii++)
|
||||
{
|
||||
if (fDenominator[ii] > 0)
|
||||
{
|
||||
fAlpha[ii] = fAlphaNumerator[ii] / (fDenominator[ii] * gray);
|
||||
fBeta[ii] = std::pow(fBetaNumerator[ii] / (fDenominator[ii] * gray), 2.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
fAlpha[ii] = 0.;
|
||||
fBeta[ii] = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HadrontherapyRBE::ComputeRBE()
|
||||
@@ -398,7 +410,9 @@ void HadrontherapyRBE::ComputeRBE()
|
||||
fDoseX[i] = ( (-fLnS[i] + ln_Scut) / smax ) + fDoseCut;
|
||||
}
|
||||
}
|
||||
fRBE = fDoseX / fDose;
|
||||
fRBE.resize(fDoseX.size());
|
||||
for (size_t ii=0;ii<fDose.size();ii++)
|
||||
fRBE[ii] = (fDose[ii] > 0) ? fDoseX[ii] / fDose[ii] : 0.;
|
||||
fSurvival = exp(fLnS);
|
||||
}
|
||||
|
||||
|
||||
Executable → Regular
+1
-1
@@ -116,7 +116,7 @@ void HadrontherapyRBEAccumulable::Initialize()
|
||||
fVoxelsAlongX = rbe->GetNumberOfVoxelsAlongX();
|
||||
fVoxelsAlongY = rbe->GetNumberOfVoxelsAlongY();
|
||||
fVoxelsAlongZ = rbe->GetNumberOfVoxelsAlongZ();
|
||||
fVoxels = fVoxelsAlongX * fVoxelsAlongY * fVoxelsAlongZ;
|
||||
fVoxels = (size_t) (fVoxelsAlongX * fVoxelsAlongY * fVoxelsAlongZ);
|
||||
|
||||
if (GetVerboseLevel() > 1)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ HadrontherapyRunAction::HadrontherapyRunAction()
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
HadrontherapyRunAction::~HadrontherapyRunAction()
|
||||
{
|
||||
//delete G4AnalysisManager::Instance();
|
||||
delete G4AnalysisManager::Instance();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -108,9 +108,10 @@ void HadrontherapyRunAction::EndOfRunAction(const G4Run*)
|
||||
rbe->StoreRBE();
|
||||
}
|
||||
|
||||
analysisManager->Write();
|
||||
analysisManager->CloseFile();
|
||||
|
||||
if (analysisManager->IsOpenFile()) {
|
||||
analysisManager->Write();
|
||||
analysisManager->CloseFile();
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void HadrontherapyRunAction::AddEMProcess()
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user