Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
//$Id: .README.txt 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
|
||||
///\file "B3/.README.txt"
|
||||
///\brief Example B3 README page
|
||||
@@ -84,6 +83,10 @@
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
The scorers hits are saved in form of ntuples in a Root file using Geant4
|
||||
analysis tools. This feature is activated in the main () function with instantiating
|
||||
G4ScoreNtupleWriter.
|
||||
|
||||
Two variants of accumulation event statistics in a run are demonstrated
|
||||
in this example:
|
||||
|
||||
@@ -107,6 +110,15 @@
|
||||
B3bRun::RecordEvent(), called at end of event, collects informations
|
||||
event per event from the hits collections, and accumulates statistic for
|
||||
B3bRunAction::EndOfRunAction().
|
||||
In addition, results for dose are accumulated in a
|
||||
standard floating-point summation and using a new lightweight statistical
|
||||
class called G4StatAnalysis. The G4StatAnalysis class records four values:
|
||||
(1) the sum, (2) sum^2, (3) number of entries, and (4) the number of entries
|
||||
less than mean * machine-epsilon (the machine epsilon is the difference
|
||||
between 1.0 and the next value representable by the floating-point type).
|
||||
From these 4 values, G4StatAnalysis provides the mean, FOM, relative error,
|
||||
standard deviation, variance, coefficient of variation, efficiency, r2int,
|
||||
and r2eff.
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in B3bRun::Merge().
|
||||
@@ -184,7 +196,7 @@ The following paragraphs are common to all basic examples
|
||||
|
||||
- Execute exampleB3a in the 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% exampleB3a
|
||||
% ./exampleB3a
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 2
|
||||
@@ -202,8 +214,8 @@ Idle> exit
|
||||
- Execute exampleB3a in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
\verbatim
|
||||
% exampleB3a run2.mac
|
||||
% exampleB3a exampleB3.in > exampleB3.out
|
||||
% ./exampleB3a run2.mac
|
||||
% ./exampleB3a exampleB3.in > exampleB3.out
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
//$Id: .README 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
|
||||
///\file "B3/.README"
|
||||
///\brief Example B3 README page
|
||||
|
||||
/*! \page ExampleB3 Example B3
|
||||
|
||||
This example simulates schematically a Positron Emitted Tomography system.
|
||||
|
||||
\section B3_s1 GEOMETRY DEFINITION
|
||||
|
||||
The support of gamma detection are scintillating crystals. A small number
|
||||
of such crystals are optically grouped in a matrix of crystals. In
|
||||
this example, individual crystals are not described; only the matrix of
|
||||
crystals is and it is still called 'Crystal' hereafter.
|
||||
|
||||
Crystals are circularly arranged to form a ring. Few rings make up the full
|
||||
detector (gamma camera). This is done by positionning Crystals in
|
||||
Ring with an appropriate rotation matrix. Several copies of Ring are
|
||||
then placed in the full detector.
|
||||
|
||||
The head of a patient is schematised as a homogeneous cylinder of brain
|
||||
tissue, placed at the center of full detector.
|
||||
|
||||
The Crystal material, Lu2SiO5, is not included in the G4Nist database.
|
||||
Therefore, it is explicitly built in DefineMaterials().
|
||||
|
||||
\section B3_s2 PHYSICS LIST
|
||||
|
||||
The physics list contains standard electromagnetic processes and the
|
||||
radioactiveDecay module for GenericIon. It is defined in the B3PhysicsList
|
||||
class as a Geant4 modular physics list with registered physics builders
|
||||
provided in Geant4:
|
||||
- G4DecayPhysics - defines all particles and their decay processes
|
||||
- G4RadioactiveDecayPhysics - defines radioactiveDecay for GenericIon
|
||||
- G4EmStandardPhysics - defines all EM standard processes
|
||||
|
||||
This physics list requires data files for:
|
||||
- low energy electromagnetic processes which path is defined via
|
||||
the G4LEDATA envirnoment variable
|
||||
- radioactive decay hadronic processes which path is defined via
|
||||
the G4RADIOACTIVEDATA envirnoment variable.
|
||||
|
||||
See more on installation of the datasets in
|
||||
<a href="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
|
||||
/InstallationGuide/html/ch03s03.html">
|
||||
Geant4 Installation Guide, Chapter 3.3: Note On Geant4 Datasets </a>.
|
||||
|
||||
\section B3_s3 ACTION INITALIZATION
|
||||
|
||||
A newly introduced class, B1ActionInitialization, instantiates and registers
|
||||
to Geant4 kernel all user action classes.
|
||||
|
||||
While in sequential mode the action classes are instatiated just once,
|
||||
via invoking the method:
|
||||
B3ActionInitialization::Build()
|
||||
in multi-threading mode the same method is invoked for each thread worker
|
||||
and so all user action classes are defined thread-local.
|
||||
|
||||
A run action class is instantiated both thread-local
|
||||
and global that's why its instance is created also in the method
|
||||
B3ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
\section B3_s4 PRIMARY GENERATOR
|
||||
|
||||
The default particle beam is an ion (F18), at rest, randomly distributed
|
||||
within a zone inside a patient and is defined in
|
||||
B3PrimaryGeneratorAction::GeneratePrimaries().
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
\section B3_s5 DETECTOR RESPONSE : scorers
|
||||
|
||||
A 'good' event is an event in which an identical energy of 511 keV is
|
||||
deposited in two separate Crystals. A count of the number of such events
|
||||
corresponds to a measure of the efficiency of the PET system.
|
||||
The total dose deposited in a patient during a run is also computed.
|
||||
|
||||
Scorers are defined in DetectorConstruction::ConstructSDandField(). There are
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
B3Run::RecordEvent() collects informations event per event
|
||||
from the hits collections, and accumulates statistic for
|
||||
RunAction::EndOfRunAction().
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in Run::Merge().
|
||||
|
||||
\section B3_s6 STACKING ACTION
|
||||
|
||||
Beta decay of Fluor generates a neutrino. One wishes not to track this
|
||||
neutrino; therefore one kills it immediately, before created particles
|
||||
are put in a stack.
|
||||
The function B3StackingAction::ClassifyNewTrack() is invoked by G4 kernel
|
||||
each time a new particle is created.
|
||||
|
||||
<hr>
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
\section B3_A VISUALISATION
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main () function in exampleB3.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other /vis/open statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
\verbatim
|
||||
/vis/open DAWNFILE
|
||||
\endverbatim
|
||||
then to get the same view
|
||||
\verbatim
|
||||
/vis/viewer/copyView viewer-0
|
||||
\endverbatim
|
||||
or to get the same view *plus* scene-modifications
|
||||
\verbatim
|
||||
/vis/viewer/set/all viewer-0
|
||||
\endverbatim
|
||||
then to see the result
|
||||
\verbatim
|
||||
/vis/viewer/flush
|
||||
\endverbatim
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,\n
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html">
|
||||
OpenGL Tutorial </a>
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html">
|
||||
DAWN Tutorial </a>
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html">
|
||||
HepRApp Tutorial </a>
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
\section B3_B USER INTERFACES
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main () function in exampleB3.cc
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
|
||||
|
||||
\section B3_C HOW TO RUN
|
||||
|
||||
- Execute exampleB3 in the 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% exampleB3
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 2
|
||||
Idle> /run/beamOn 1
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
or
|
||||
\verbatim
|
||||
Idle> /control/execute run1.mac
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
- Execute exampleB3 in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
\verbatim
|
||||
% exampleB3 run2.mac
|
||||
% exampleB3 exampleB3.in > exampleB3.out
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: CMakeLists.txt 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: GNUmakefile 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
$Id: README 77985 2013-11-30 21:33:08Z ihrivnac $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Example B3
|
||||
----------
|
||||
|
||||
This example simulates schematically a Positron Emitted Tomography system.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The support of gamma detection are scintillating crystals. A small number
|
||||
of such crystals are optically grouped in a matrix of crystals. In
|
||||
this example, individual crystals are not described; only the matrix of
|
||||
crystals is and it is still called 'Crystal' hereafter.
|
||||
|
||||
Crystals are circularly arranged to form a ring. Few rings make up the full
|
||||
detector (gamma camera). This is done by positionning Crystals in
|
||||
Ring with an appropriate rotation matrix. Several copies of Ring are
|
||||
then placed in the full detector.
|
||||
|
||||
The head of a patient is schematised as a homogeneous cylinder of brain
|
||||
tissue, placed at the center of full detector.
|
||||
|
||||
The Crystal material, Lu2SiO5, is not included in the G4Nist database.
|
||||
Therefore, it is explicitly built in DefineMaterials().
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list contains standard electromagnetic processes and the
|
||||
radioactiveDecay module for GenericIon. It is defined in the B3PhysicsList
|
||||
class as a Geant4 modular physics list with registered physics builders
|
||||
provided in Geant4:
|
||||
- G4DecayPhysics - defines all particles and their decay processes
|
||||
- G4RadioactiveDecayPhysics - defines radioactiveDecay for GenericIon
|
||||
- G4EmStandardPhysics - defines all EM standard processes
|
||||
|
||||
This physics list requires data files for:
|
||||
- low energy electromagnetic processes which path is defined via
|
||||
the G4LEDATA envirnoment variable
|
||||
- radioactive decay hadronic processes which path is defined via
|
||||
the G4RADIOACTIVEDATA envirnoment variable.
|
||||
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
Chapter 3.3: Note On Geant4 Datasets:
|
||||
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
|
||||
/InstallationGuide/html/ch03s03.html
|
||||
3- ACTION INITALIZATION
|
||||
|
||||
A newly introduced class, B1ActionInitialization, instantiates and registers
|
||||
to Geant4 kernel all user action classes.
|
||||
|
||||
While in sequential mode the action classes are instatiated just once,
|
||||
via invoking the method:
|
||||
B3ActionInitialization::Build()
|
||||
in multi-threading mode the same method is invoked for each thread worker
|
||||
and so all user action classes are defined thread-local.
|
||||
|
||||
A run action class is instantiated both thread-local
|
||||
and global that's why its instance is created also in the method
|
||||
B3ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
4- PRIMARY GENERATOR
|
||||
|
||||
The default particle beam is an ion (F18), at rest, randomly distributed
|
||||
within a zone inside a patient and is defined in
|
||||
B3PrimaryGeneratorAction::GeneratePrimaries().
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
5- DETECTOR RESPONSE: scorers
|
||||
|
||||
A 'good' event is an event in which an identical energy of 511 keV is
|
||||
deposited in two separate Crystals. A count of the number of such events
|
||||
corresponds to a measure of the efficiency of the PET system.
|
||||
The total dose deposited in a patient during a run is also computed.
|
||||
|
||||
Scorers are defined in DetectorConstruction::ConstructSDandField(). There are
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
B3Run::RecordEvent(), called at end of event, collects informations
|
||||
event per event from the hits collections, and accumulates statistic for
|
||||
RunAction::EndOfRunAction().
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in Run::Merge().
|
||||
|
||||
6- STACKING ACTION
|
||||
|
||||
Beta decay of Fluor generates a neutrino. One wishes not to track this
|
||||
neutrino; therefore one kills it immediately, before created particles
|
||||
are put in a stack.
|
||||
The function B3StackingAction::ClassifyNewTrack() is invoked by G4 kernel
|
||||
each time a new particle is created.
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
A- VISUALISATION
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main() function in exampleB3.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other /vis/open statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
/vis/open DAWNFILE
|
||||
then to get the same view
|
||||
/vis/viewer/copyView viewer-0
|
||||
or to get the same view *plus* scene-modifications
|
||||
/vis/viewer/set/all viewer-0
|
||||
then to see the result
|
||||
/vis/viewer/flush
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,
|
||||
http://geant4.slac.stanford.edu/Presentations/vis/G4[VIS]Tutorial/G4[VIS]Tutorial.html
|
||||
(where [VIS] can be replaced by DAWN, OpenGL and HepRApp)
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
B- USER INTERFACES
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main() function in exampleB3.cc
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
|
||||
|
||||
C- HOW TO RUN
|
||||
|
||||
- Execute exampleB3 in the 'interactive mode' with visualization
|
||||
% exampleB3
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 2
|
||||
Idle> /run/beamOn 1
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
or
|
||||
Idle> /control/execute run1.mac
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
- Execute exampleB3 in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
% exampleB3 run2.mac
|
||||
% exampleB3 exampleB3.in > exampleB3.out
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run1.mac,v 1.2 2000-11-21 10:59:42 maire Exp $
|
||||
#
|
||||
# Macro file for "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run2.mac,v 1.6 2002-12-16 16:37:25 maire Exp $
|
||||
#
|
||||
# Macro file for example B3 test
|
||||
#
|
||||
@@ -6,4 +5,5 @@
|
||||
#
|
||||
/control/verbose 2
|
||||
#
|
||||
/run/printProgress 1000
|
||||
/run/beamOn 10000
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB3a.cc 109713 2018-05-08 13:37:44Z gcosmo $
|
||||
//
|
||||
/// \file exampleB3a.cc
|
||||
/// \brief Main program of the B3a example
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
|
||||
Geant4 version Name: geant4-10-05-ref-00 (7-December-2018)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -207,6 +207,7 @@ Checking overlaps for volume Patient ... OK!
|
||||
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
|
||||
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
|
||||
#
|
||||
/run/printProgress 1000
|
||||
/run/beamOn 10000
|
||||
=======================================================================
|
||||
====== Radioactive Decay Physics Parameters ========
|
||||
@@ -219,14 +220,25 @@ Max 2J for sampling of angular correlations 10
|
||||
Atomic de-excitation enabled 1
|
||||
Auger electron emission enabled 1
|
||||
Auger cascade enabled 1
|
||||
Check EM cuts disabled for atomic de-excitation 0
|
||||
Check EM cuts disabled for atomic de-excitation 1
|
||||
Use Bearden atomic level energies 0
|
||||
=======================================================================
|
||||
### Run 0 starts.
|
||||
### Run 0 start.
|
||||
--> Event 0 starts.
|
||||
--> Event 1000 starts.
|
||||
--> Event 2000 starts.
|
||||
--> Event 3000 starts.
|
||||
--> Event 4000 starts.
|
||||
--> Event 5000 starts.
|
||||
--> Event 6000 starts.
|
||||
--> Event 7000 starts.
|
||||
--> Event 8000 starts.
|
||||
--> Event 9000 starts.
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1344
|
||||
Total dose in patient : 290.282 picoGy
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1276
|
||||
Total dose in patient : 289.186 picoGy
|
||||
------------------------------------------------------------
|
||||
|
||||
Graphics systems deleted.
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3DetectorConstruction.hh 71079 2013-06-10 20:37:11Z ihrivnac $
|
||||
//
|
||||
/// \file B3DetectorConstruction.hh
|
||||
/// \brief Definition of the B3DetectorConstruction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PhysicsList.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B3PhysicsList.hh
|
||||
/// \brief Definition of the B3PhysicsList class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PrimaryGeneratorAction.hh 89901 2015-05-04 09:28:53Z ihrivnac $
|
||||
//
|
||||
/// \file B3PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B3PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3StackingAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B3StackingAction.hh
|
||||
/// \brief Definition of the B3StackingAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3aActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3aActionInitialization.hh
|
||||
/// \brief Definition of the B3aActionInitialization class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/// \file B3aEventAction.hh
|
||||
/// \brief Definition of the B3aEventAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3aRunAction.hh 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
//
|
||||
/// \file B3aRunAction.hh
|
||||
/// \brief Definition of the B3aRunAction class
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run1.mac 85993 2014-11-06 16:34:10Z ihrivnac $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run2.mac 85993 2014-11-06 16:34:10Z ihrivnac $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
# To be run preferably in batch, without graphics:
|
||||
@@ -16,4 +15,5 @@
|
||||
/gun/particle ion
|
||||
/gun/ion 6 11
|
||||
#
|
||||
/run/printProgress 10000
|
||||
/run/beamOn 40000
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B3DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3DetectorConstruction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PhysicsList.cc 102186 2017-01-09 13:35:29Z gcosmo $
|
||||
//
|
||||
/// \file B3PhysicsList.cc
|
||||
/// \brief Implementation of the B3PhysicsList class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PrimaryGeneratorAction.cc 73744 2013-09-09 20:25:07Z asaim $
|
||||
//
|
||||
/// \file B3PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B3PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3StackingAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B3StackingAction.cc
|
||||
/// \brief Implementation of the B3StackingAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3aActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3aActionInitialization.cc
|
||||
/// \brief Implementation of the B3aActionInitialization class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/// \file B3aEventAction.cc
|
||||
/// \brief Implementation of the B3aEventAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3aRunAction.cc 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
//
|
||||
/// \file B3aRunAction.cc
|
||||
/// \brief Implementation of the B3aRunAction class
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
//$Id: .README 94957 2016-01-08 13:27:26Z gcosmo $
|
||||
|
||||
///\file "B3/.README"
|
||||
///\brief Example B3 README page
|
||||
|
||||
/*! \page ExampleB3 Example B3
|
||||
|
||||
This example simulates schematically a Positron Emitted Tomography system.
|
||||
|
||||
\section B3_s1 GEOMETRY DEFINITION
|
||||
|
||||
The support of gamma detection are scintillating crystals. A small number
|
||||
of such crystals are optically grouped in a matrix of crystals. In
|
||||
this example, individual crystals are not described; only the matrix of
|
||||
crystals is and it is still called 'Crystal' hereafter.
|
||||
|
||||
Crystals are circularly arranged to form a ring. Few rings make up the full
|
||||
detector (gamma camera). This is done by positionning Crystals in
|
||||
Ring with an appropriate rotation matrix. Several copies of Ring are
|
||||
then placed in the full detector.
|
||||
|
||||
The head of a patient is schematised as a homogeneous cylinder of brain
|
||||
tissue, placed at the center of full detector.
|
||||
|
||||
The Crystal material, Lu2SiO5, is not included in the G4Nist database.
|
||||
Therefore, it is explicitly built in DefineMaterials().
|
||||
|
||||
\section B3_s2 PHYSICS LIST
|
||||
|
||||
The physics list contains standard electromagnetic processes and the
|
||||
radioactiveDecay module for GenericIon. It is defined in the B3PhysicsList
|
||||
class as a Geant4 modular physics list with registered physics builders
|
||||
provided in Geant4:
|
||||
- G4DecayPhysics - defines all particles and their decay processes
|
||||
- G4RadioactiveDecayPhysics - defines radioactiveDecay for GenericIon
|
||||
- G4EmStandardPhysics - defines all EM standard processes
|
||||
|
||||
This physics list requires data files for:
|
||||
- low energy electromagnetic processes which path is defined via
|
||||
the G4LEDATA envirnoment variable
|
||||
- radioactive decay hadronic processes which path is defined via
|
||||
the G4RADIOACTIVEDATA envirnoment variable.
|
||||
|
||||
See more on installation of the datasets in
|
||||
<a href="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
|
||||
/InstallationGuide/html/ch03s03.html">
|
||||
Geant4 Installation Guide, Chapter 3.3: Note On Geant4 Datasets </a>.
|
||||
|
||||
\section B3_s3 ACTION INITALIZATION
|
||||
|
||||
A newly introduced class, B1ActionInitialization, instantiates and registers
|
||||
to Geant4 kernel all user action classes.
|
||||
|
||||
While in sequential mode the action classes are instatiated just once,
|
||||
via invoking the method:
|
||||
B3ActionInitialization::Build()
|
||||
in multi-threading mode the same method is invoked for each thread worker
|
||||
and so all user action classes are defined thread-local.
|
||||
|
||||
A run action class is instantiated both thread-local
|
||||
and global that's why its instance is created also in the method
|
||||
B3ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
\section B3_s4 PRIMARY GENERATOR
|
||||
|
||||
The default particle beam is an ion (F18), at rest, randomly distributed
|
||||
within a zone inside a patient and is defined in
|
||||
B3PrimaryGeneratorAction::GeneratePrimaries().
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
\section B3_s5 DETECTOR RESPONSE : scorers
|
||||
|
||||
A 'good' event is an event in which an identical energy of 511 keV is
|
||||
deposited in two separate Crystals. A count of the number of such events
|
||||
corresponds to a measure of the efficiency of the PET system.
|
||||
The total dose deposited in a patient during a run is also computed.
|
||||
|
||||
Scorers are defined in DetectorConstruction::ConstructSDandField(). There are
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
B3Run::RecordEvent() collects informations event per event
|
||||
from the hits collections, and accumulates statistic for
|
||||
RunAction::EndOfRunAction().
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in Run::Merge().
|
||||
|
||||
\section B3_s6 STACKING ACTION
|
||||
|
||||
Beta decay of Fluor generates a neutrino. One wishes not to track this
|
||||
neutrino; therefore one kills it immediately, before created particles
|
||||
are put in a stack.
|
||||
The function B3StackingAction::ClassifyNewTrack() is invoked by G4 kernel
|
||||
each time a new particle is created.
|
||||
|
||||
<hr>
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
\section B3_A VISUALISATION
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main () function in exampleB3.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other /vis/open statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
\verbatim
|
||||
/vis/open DAWNFILE
|
||||
\endverbatim
|
||||
then to get the same view
|
||||
\verbatim
|
||||
/vis/viewer/copyView viewer-0
|
||||
\endverbatim
|
||||
or to get the same view *plus* scene-modifications
|
||||
\verbatim
|
||||
/vis/viewer/set/all viewer-0
|
||||
\endverbatim
|
||||
then to see the result
|
||||
\verbatim
|
||||
/vis/viewer/flush
|
||||
\endverbatim
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,\n
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html">
|
||||
OpenGL Tutorial </a>
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html">
|
||||
DAWN Tutorial </a>
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html">
|
||||
HepRApp Tutorial </a>
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
\section B3_B USER INTERFACES
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main () function in exampleB3.cc
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
|
||||
|
||||
\section B3_C HOW TO RUN
|
||||
|
||||
- Execute exampleB3 in the 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% exampleB3
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 2
|
||||
Idle> /run/beamOn 1
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
or
|
||||
\verbatim
|
||||
Idle> /control/execute run1.mac
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
- Execute exampleB3 in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
\verbatim
|
||||
% exampleB3 run2.mac
|
||||
% exampleB3 exampleB3.in > exampleB3.out
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: CMakeLists.txt 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: GNUmakefile 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
$Id: README 77985 2013-11-30 21:33:08Z ihrivnac $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Example B3
|
||||
----------
|
||||
|
||||
This example simulates schematically a Positron Emitted Tomography system.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The support of gamma detection are scintillating crystals. A small number
|
||||
of such crystals are optically grouped in a matrix of crystals. In
|
||||
this example, individual crystals are not described; only the matrix of
|
||||
crystals is and it is still called 'Crystal' hereafter.
|
||||
|
||||
Crystals are circularly arranged to form a ring. Few rings make up the full
|
||||
detector (gamma camera). This is done by positionning Crystals in
|
||||
Ring with an appropriate rotation matrix. Several copies of Ring are
|
||||
then placed in the full detector.
|
||||
|
||||
The head of a patient is schematised as a homogeneous cylinder of brain
|
||||
tissue, placed at the center of full detector.
|
||||
|
||||
The Crystal material, Lu2SiO5, is not included in the G4Nist database.
|
||||
Therefore, it is explicitly built in DefineMaterials().
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list contains standard electromagnetic processes and the
|
||||
radioactiveDecay module for GenericIon. It is defined in the B3PhysicsList
|
||||
class as a Geant4 modular physics list with registered physics builders
|
||||
provided in Geant4:
|
||||
- G4DecayPhysics - defines all particles and their decay processes
|
||||
- G4RadioactiveDecayPhysics - defines radioactiveDecay for GenericIon
|
||||
- G4EmStandardPhysics - defines all EM standard processes
|
||||
|
||||
This physics list requires data files for:
|
||||
- low energy electromagnetic processes which path is defined via
|
||||
the G4LEDATA envirnoment variable
|
||||
- radioactive decay hadronic processes which path is defined via
|
||||
the G4RADIOACTIVEDATA envirnoment variable.
|
||||
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
Chapter 3.3: Note On Geant4 Datasets:
|
||||
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
|
||||
/InstallationGuide/html/ch03s03.html
|
||||
3- ACTION INITALIZATION
|
||||
|
||||
A newly introduced class, B1ActionInitialization, instantiates and registers
|
||||
to Geant4 kernel all user action classes.
|
||||
|
||||
While in sequential mode the action classes are instatiated just once,
|
||||
via invoking the method:
|
||||
B3ActionInitialization::Build()
|
||||
in multi-threading mode the same method is invoked for each thread worker
|
||||
and so all user action classes are defined thread-local.
|
||||
|
||||
A run action class is instantiated both thread-local
|
||||
and global that's why its instance is created also in the method
|
||||
B3ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
4- PRIMARY GENERATOR
|
||||
|
||||
The default particle beam is an ion (F18), at rest, randomly distributed
|
||||
within a zone inside a patient and is defined in
|
||||
B3PrimaryGeneratorAction::GeneratePrimaries().
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
5- DETECTOR RESPONSE: scorers
|
||||
|
||||
A 'good' event is an event in which an identical energy of 511 keV is
|
||||
deposited in two separate Crystals. A count of the number of such events
|
||||
corresponds to a measure of the efficiency of the PET system.
|
||||
The total dose deposited in a patient during a run is also computed.
|
||||
|
||||
Scorers are defined in DetectorConstruction::ConstructSDandField(). There are
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
B3Run::RecordEvent(), called at end of event, collects informations
|
||||
event per event from the hits collections, and accumulates statistic for
|
||||
RunAction::EndOfRunAction().
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in Run::Merge().
|
||||
|
||||
6- STACKING ACTION
|
||||
|
||||
Beta decay of Fluor generates a neutrino. One wishes not to track this
|
||||
neutrino; therefore one kills it immediately, before created particles
|
||||
are put in a stack.
|
||||
The function B3StackingAction::ClassifyNewTrack() is invoked by G4 kernel
|
||||
each time a new particle is created.
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
A- VISUALISATION
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main() function in exampleB3.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other /vis/open statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
/vis/open DAWNFILE
|
||||
then to get the same view
|
||||
/vis/viewer/copyView viewer-0
|
||||
or to get the same view *plus* scene-modifications
|
||||
/vis/viewer/set/all viewer-0
|
||||
then to see the result
|
||||
/vis/viewer/flush
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,
|
||||
http://geant4.slac.stanford.edu/Presentations/vis/G4[VIS]Tutorial/G4[VIS]Tutorial.html
|
||||
(where [VIS] can be replaced by DAWN, OpenGL and HepRApp)
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
B- USER INTERFACES
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main() function in exampleB3.cc
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
|
||||
|
||||
C- HOW TO RUN
|
||||
|
||||
- Execute exampleB3 in the 'interactive mode' with visualization
|
||||
% exampleB3
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 2
|
||||
Idle> /run/beamOn 1
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
or
|
||||
Idle> /control/execute run1.mac
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
- Execute exampleB3 in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
% exampleB3 run2.mac
|
||||
% exampleB3 exampleB3.in > exampleB3.out
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run1.mac,v 1.2 2000-11-21 10:59:42 maire Exp $
|
||||
#
|
||||
# Macro file for "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run2.mac,v 1.6 2002-12-16 16:37:25 maire Exp $
|
||||
#
|
||||
# Macro file for example B3 test
|
||||
#
|
||||
@@ -6,4 +5,5 @@
|
||||
#
|
||||
/control/verbose 2
|
||||
#
|
||||
/run/printProgress 1000
|
||||
/run/beamOn 10000
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB3b.cc 109713 2018-05-08 13:37:44Z gcosmo $
|
||||
//
|
||||
/// \file exampleB3b.cc
|
||||
/// \brief Main program of the B3b example
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
|
||||
Geant4 version Name: geant4-10-05-ref-00 (7-December-2018)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -207,6 +207,7 @@ Checking overlaps for volume Patient ... OK!
|
||||
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
|
||||
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
|
||||
#
|
||||
/run/printProgress 1000
|
||||
/run/beamOn 10000
|
||||
=======================================================================
|
||||
====== Radioactive Decay Physics Parameters ========
|
||||
@@ -219,16 +220,28 @@ Max 2J for sampling of angular correlations 10
|
||||
Atomic de-excitation enabled 1
|
||||
Auger electron emission enabled 1
|
||||
Auger cascade enabled 1
|
||||
Check EM cuts disabled for atomic de-excitation 0
|
||||
Check EM cuts disabled for atomic de-excitation 1
|
||||
Use Bearden atomic level energies 0
|
||||
=======================================================================
|
||||
### Run 0 starts.
|
||||
### Run 0 start.
|
||||
--> Event 0 starts.
|
||||
|
||||
---> end of event: 0
|
||||
--> Event 1000 starts.
|
||||
--> Event 2000 starts.
|
||||
--> Event 3000 starts.
|
||||
--> Event 4000 starts.
|
||||
--> Event 5000 starts.
|
||||
--> Event 6000 starts.
|
||||
--> Event 7000 starts.
|
||||
--> Event 8000 starts.
|
||||
--> Event 9000 starts.
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1344
|
||||
Total dose in patient : 290.282 picoGy
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1276
|
||||
Total dose in patient : 289.186 picoGy
|
||||
Total dose in patient : 2.89186e-10 [sigma: 1.74469e-14 | error: 0.00603313 | coeff: 0.00603313 | eff: 1 | fom: 27473.6 | r2int: 3.6395e-05 | r2eff: 0 | hits: 10000 ] Gy
|
||||
------------------------------------------------------------
|
||||
|
||||
Graphics systems deleted.
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3DetectorConstruction.hh 71079 2013-06-10 20:37:11Z ihrivnac $
|
||||
//
|
||||
/// \file B3DetectorConstruction.hh
|
||||
/// \brief Definition of the B3DetectorConstruction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PhysicsList.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B3PhysicsList.hh
|
||||
/// \brief Definition of the B3PhysicsList class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PrimaryGeneratorAction.hh 89901 2015-05-04 09:28:53Z ihrivnac $
|
||||
//
|
||||
/// \file B3PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B3PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3StackingAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B3StackingAction.hh
|
||||
/// \brief Definition of the B3StackingAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3bActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3bActionInitialization.hh
|
||||
/// \brief Definition of the B3bActionInitialization class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3bRun.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3bRun.hh
|
||||
/// \brief Definition of the B3bRun class
|
||||
@@ -33,6 +32,7 @@
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4StatAnalysis.hh"
|
||||
|
||||
/// Run class
|
||||
///
|
||||
@@ -51,13 +51,15 @@ class B3bRun : public G4Run
|
||||
public:
|
||||
G4int GetNbGoodEvents() const { return fGoodEvents; }
|
||||
G4double GetSumDose() const { return fSumDose; }
|
||||
|
||||
G4StatAnalysis GetStatDose() const { return fStatDose; }
|
||||
|
||||
private:
|
||||
G4int fCollID_cryst;
|
||||
G4int fCollID_patient;
|
||||
G4int fPrintModulo;
|
||||
G4int fGoodEvents;
|
||||
G4double fSumDose;
|
||||
G4double fSumDose;
|
||||
G4StatAnalysis fStatDose;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3bRunAction.hh 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
//
|
||||
/// \file B3bRunAction.hh
|
||||
/// \brief Definition of the B3bRunAction class
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run1.mac 85993 2014-11-06 16:34:10Z ihrivnac $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run2.mac 85993 2014-11-06 16:34:10Z ihrivnac $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
# To be run preferably in batch, without graphics:
|
||||
@@ -16,4 +15,5 @@
|
||||
/gun/particle ion
|
||||
/gun/ion 6 11
|
||||
#
|
||||
/run/printProgress 10000
|
||||
/run/beamOn 40000
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/// \file B3DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3DetectorConstruction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PhysicsList.cc 102186 2017-01-09 13:35:29Z gcosmo $
|
||||
//
|
||||
/// \file B3PhysicsList.cc
|
||||
/// \brief Implementation of the B3PhysicsList class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3PrimaryGeneratorAction.cc 73744 2013-09-09 20:25:07Z asaim $
|
||||
//
|
||||
/// \file B3PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B3PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3StackingAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B3StackingAction.cc
|
||||
/// \brief Implementation of the B3StackingAction class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3bActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3bActionInitialization.cc
|
||||
/// \brief Implementation of the B3bActionInitialization class
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3bRun.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3bRun.cc
|
||||
/// \brief Implementation of the B3bRun class
|
||||
@@ -46,7 +45,8 @@ B3bRun::B3bRun()
|
||||
fCollID_patient(-1),
|
||||
fPrintModulo(10000),
|
||||
fGoodEvents(0),
|
||||
fSumDose(0.)
|
||||
fSumDose(0.),
|
||||
fStatDose()
|
||||
{ }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -109,6 +109,7 @@ void B3bRun::RecordEvent(const G4Event* event)
|
||||
dose = *(itr->second);
|
||||
}
|
||||
fSumDose += dose;
|
||||
fStatDose += dose;
|
||||
|
||||
G4Run::RecordEvent(event);
|
||||
}
|
||||
@@ -120,7 +121,7 @@ void B3bRun::Merge(const G4Run* aRun)
|
||||
const B3bRun* localRun = static_cast<const B3bRun*>(aRun);
|
||||
fGoodEvents += localRun->fGoodEvents;
|
||||
fSumDose += localRun->fSumDose;
|
||||
|
||||
fStatDose += localRun->fStatDose;
|
||||
G4Run::Merge(aRun);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B3bRunAction.cc 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
//
|
||||
/// \file B3bRunAction.cc
|
||||
/// \brief Implementation of the B3bRunAction class
|
||||
@@ -100,7 +99,8 @@ void B3bRunAction::EndOfRunAction(const G4Run* run)
|
||||
//
|
||||
const B3bRun* b3Run = static_cast<const B3bRun*>(run);
|
||||
G4int nbGoodEvents = b3Run->GetNbGoodEvents();
|
||||
G4double sumDose = b3Run->GetSumDose();
|
||||
G4double sumDose = b3Run->GetSumDose();
|
||||
G4StatAnalysis statDose = b3Run->GetStatDose();
|
||||
|
||||
//print
|
||||
//
|
||||
@@ -120,9 +120,11 @@ void B3bRunAction::EndOfRunAction(const G4Run* run)
|
||||
<< G4endl
|
||||
<< " The run was " << nofEvents << " "<< partName;
|
||||
}
|
||||
statDose /= gray;
|
||||
G4cout
|
||||
<< "; Nb of 'good' e+ annihilations: " << nbGoodEvents << G4endl
|
||||
<< " Total dose in patient : " << G4BestUnit(sumDose,"Dose") << G4endl
|
||||
<< " Total dose in patient : " << G4BestUnit(sumDose, "Dose") << G4endl
|
||||
<< " Total dose in patient : " << statDose << " Gy" << G4endl
|
||||
<< "------------------------------------------------------------" << G4endl
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: CMakeLists.txt 94093 2015-11-05 15:16:06Z gcosmo $
|
||||
|
||||
#---Adding example B2 subdirectories explicitly
|
||||
# and a custom target to for building all example B2 options ----------
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: GNUmakefile 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
$Id: History 109713 2018-05-08 13:37:44Z gcosmo $
|
||||
--------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +14,26 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
30/11/18 I. Hrivnacova (exampleB3-V10-04-05)
|
||||
- Moved the previous update from B3b in B3 documentation
|
||||
and removed obsolete README files from B3a and B3b.
|
||||
|
||||
16/11/18 J. Madsen (exampleB3-V10-04-04)
|
||||
- Updated documentation for example B3b
|
||||
|
||||
13/11/18 J. Madsen (exampleB3-V10-04-03)
|
||||
- Added StatAnalysis to example B3b according to Lund agreement
|
||||
to demonstrate statistical computations in a basic example
|
||||
|
||||
30/10/18 I. Hrivnacova (exampleB3-V10-04-02)
|
||||
- Removed usage of G4ScoreNtupleWriter;
|
||||
will be demonstrated in a new extended analysis example
|
||||
|
||||
26/10/18 I. Hrivnacova (exampleB3-V10-04-01)
|
||||
- Activated storing hits in Root file using new G4ScoreNtupleWriter
|
||||
- Replaced explicit printing of Run ID with /run/printProgress
|
||||
- Updated README
|
||||
|
||||
08/05/18 B. Morgan (exampleB3-V10-04-00)
|
||||
- Include G4Types before use of G4MULTITHREADED. For forward
|
||||
compatibility with move to #defines over -D for G4 preprocessor
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
$Id: README 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -85,6 +84,10 @@ $Id: README 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
The scorers hits are saved in form of ntuples in a Root file using Geant4
|
||||
analysis tools. This feature is activated in the main () function with instantiating
|
||||
G4ScoreNtupleWriter.
|
||||
|
||||
Two variants of accumulation event statistics in a run are demonstrated
|
||||
in this example:
|
||||
|
||||
@@ -108,6 +111,15 @@ $Id: README 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
B3bRun::RecordEvent(), called at end of event, collects informations
|
||||
event per event from the hits collections, and accumulates statistic for
|
||||
B3bRunAction::EndOfRunAction().
|
||||
In addition, results for dose are accumulated in a
|
||||
standard floating-point summation and using a new lightweight statistical
|
||||
class called G4StatAnalysis. The G4StatAnalysis class records four values:
|
||||
(1) the sum, (2) sum^2, (3) number of entries, and (4) the number of entries
|
||||
less than mean * machine-epsilon (the machine epsilon is the difference
|
||||
between 1.0 and the next value representable by the floating-point type).
|
||||
From these 4 values, G4StatAnalysis provides the mean, FOM, relative error,
|
||||
standard deviation, variance, coefficient of variation, efficiency, r2int,
|
||||
and r2eff.
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in B3bRun::Merge().
|
||||
@@ -170,7 +182,7 @@ $Id: README 99559 2016-09-27 07:02:21Z gcosmo $
|
||||
C- HOW TO RUN
|
||||
|
||||
- Execute exampleB3a in the 'interactive mode' with visualization
|
||||
% exampleB3a
|
||||
% ./exampleB3a
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 2
|
||||
@@ -184,7 +196,7 @@ C- HOW TO RUN
|
||||
|
||||
- Execute exampleB3a in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
% exampleB3a run2.mac
|
||||
% exampleB3a exampleB3.in > exampleB3.out
|
||||
% ./exampleB3a run2.mac
|
||||
% ./exampleB3a exampleB3.in > exampleB3.out
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run1.mac,v 1.2 2000-11-21 10:59:42 maire Exp $
|
||||
#
|
||||
# Macro file for "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run2.mac,v 1.6 2002-12-16 16:37:25 maire Exp $
|
||||
#
|
||||
# Macro file for example B3 test
|
||||
#
|
||||
@@ -6,4 +5,5 @@
|
||||
#
|
||||
/control/verbose 2
|
||||
#
|
||||
/run/printProgress 1000
|
||||
/run/beamOn 10000
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run1.mac 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# $Id: run2.mac 94031 2015-11-05 11:54:38Z ihrivnac $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
# To be run preferably in batch, without graphics:
|
||||
@@ -16,4 +15,5 @@
|
||||
/gun/particle ion
|
||||
/gun/ion 6 11
|
||||
#
|
||||
/run/printProgress 10000
|
||||
/run/beamOn 40000
|
||||
|
||||
Reference in New Issue
Block a user