Import Geant4 10.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 14:11:04 +02:00
parent c9b32a6c0a
commit d4af681f38
4886 changed files with 420149 additions and 1023309 deletions
@@ -1,6 +1,6 @@
//$Id: .README 78001 2013-12-02 08:24:53Z gcosmo $
//$Id: .README.txt 94093 2015-11-05 15:16:06Z gcosmo $
///\file "B3/.README"
///\file "B3/.README.txt"
///\brief Example B3 README page
/*! \page ExampleB3 Example B3
@@ -48,18 +48,19 @@
\section B3_s3 ACTION INITALIZATION
A newly introduced class, B1ActionInitialization, instantiates and registers
to Geant4 kernel all user action classes.
B3aActionInitialization class (see also B3bActionInitialization) 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()
B3aActionInitialization::Build()
(see also B3bActionInitialization::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()
B3aActionInitialization::BuildForMaster()
(see also B3bActionInitialization::Build)
which is invoked only in multi-threading mode.
\section B3_s4 PRIMARY GENERATOR
@@ -77,17 +78,37 @@
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
Scorers are defined in B3DetectorConstruction::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().
Two variants of accumulation event statistics in a run are demonstrated
in this example:
B3a:
At the end of event, the values acummulated in B3aEventAction are passed
in B3aRunAction and summed over the whole run (see B3aEventAction::EndOfevent()).
In multi-threading mode the data accumulated in G4Parameter objects per
workers is merged to the master in B3aRunAction::EndOfRunAction() and the final
result is printed on the screen.
G4Parameter<> type instead of G4double and G4int types is used for the B3aRunAction
data members in order to facilitate merging of the values accumulated on workers
to the master. Currently the parameters have to be registered to G4ParametersManager
and G4ParametersManager::Merge() has to be called from the users code. This is planned
to be further simplified with a closer integration of G4Parameter classes in
the Geant4 kernel next year.
B3b:
B3bRun::RecordEvent(), called at end of event, collects informations
event per event from the hits collections, and accumulates statistic for
B3bRunAction::EndOfRunAction().
In multi-threading mode the statistics accumulated per workers is merged
to the master in Run::Merge().
to the master in B3bRun::Merge().
\section B3_s6 STACKING ACTION
Beta decay of Fluor generates a neutrino. One wishes not to track this
@@ -159,9 +180,9 @@ The following paragraphs are common to all basic examples
\section B3_C HOW TO RUN
- Execute exampleB3 in the 'interactive mode' with visualization
- Execute exampleB3a in the 'interactive mode' with visualization
\verbatim
% exampleB3
% exampleB3a
and type in the commands from run1.mac line by line:
Idle> /control/verbose 2
Idle> /tracking/verbose 2
@@ -176,11 +197,11 @@ Idle> /control/execute run1.mac
Idle> exit
\endverbatim
- Execute exampleB3 in the 'batch' mode from macro files
- Execute exampleB3a in the 'batch' mode from macro files
(without visualization)
\verbatim
% exampleB3 run2.mac
% exampleB3 exampleB3.in > exampleB3.out
% exampleB3a run2.mac
% exampleB3a exampleB3.in > exampleB3.out
\endverbatim
*/
+73
View File
@@ -0,0 +1,73 @@
# $Id: CMakeLists.txt 94031 2015-11-05 11:54:38Z ihrivnac $
#----------------------------------------------------------------------------
# Setup the project
#
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(B3a)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
include(${Geant4_USE_FILE})
include_directories(${PROJECT_SOURCE_DIR}/include)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
# NB: headers are included so they will show up in IDEs
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(exampleB3a exampleB3a.cc ${sources} ${headers})
target_link_libraries(exampleB3a ${Geant4_LIBRARIES})
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build B3a. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(EXAMPLEB3_SCRIPTS
debug.mac
exampleB3.in
exampleB3.out
init_vis.mac
run1.mac
run2.mac
vis.mac
)
foreach(_script ${EXAMPLEB3_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# For internal Geant4 use - but has no effect if you build this
# example standalone
#
add_custom_target(B3a DEPENDS exampleB3a)
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS exampleB3a DESTINATION bin )
+22
View File
@@ -0,0 +1,22 @@
# $Id: GNUmakefile 94031 2015-11-05 11:54:38Z ihrivnac $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB3a
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
+90
View File
@@ -0,0 +1,90 @@
$Id: History 89902 2015-05-04 09:30:08Z ihrivnac $
--------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example B3 History file
-----------------------
This file should be used by the G4 example coordinator to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
04/05/15 I. Hrivnacova (exampleB3-V10-01-00)
- Coding guidelines: removed empty lines
29/11/14 I. Hrivnacova
- Use G4endl instead of \n in G4cout;
this makes each new line in the output on threads preceded with
G4WTN >
06/11/14 I. Hrivnacova
- Finalized modifications in previous tag (01):
- Removed G4UI_USE/G4VIS_USE tests and init.mac macro (not needed)
- Moved G4UIExecutive at the beginning of main() in all examples
- Perform run initialization in macros instead of main()
04/11/14 L. Garnier (exampleB3-V10-00-01)
- Remove old G4UI_USE/G4VIS_USE
- Move G4UIExecutive at the beginning of main()
29/10/13 I. Hrivnacova (exampleB3-V09-06-06)
- Removed SetNumberOfThreads(4) from main (use Geant4 default)
- Updated README
09/09/13 M.Asai (exampleB3-V09-06-05)
- B3PrimaryGeneratorAction.cc : Change G4ParticleTable::GetIon() to
G4IonTable::GetIon(), as the former method becomes obsolete.
13/06/13 mma (exampleB3-V09-06-04)
Fixes for MT:
- Set sensitive detector via SetSensitiveDetector(..)
- Get hits collection IDs in B3Run::RecordEvent (and not B3Run constructor)
- Add a test for primary generator action in B3RunAction::EndOfRunAction()
as it does not exist on master
05/06/13 mma (exampleB3-V09-06-03)
- add section about ACTION INITALIZATION to README and .README
01/06/13 mma (exampleB3-V09-06-02)
- Migration for MT:
forgotten to add B3Run
31/05/13 mma (exampleB3-V09-06-01)
- Migration for MT:
Added B3ActionInitialization, B3Run
Removed B3EventAction
and updated actions classes accordingly.
README files still need to be updated.
28/02/13 I. Hrivnacova
- When building materials with NistManager
do not set fromIsotopes argument (which was set to false),
as since 9.6 all materials have to be built from isotopes.
Thanks to V. Ivantchenko for pointing at this.
21/11/11 I. Hrivnacova
- Improved vis.mac
- Removed alternative detector construction class
14/11/11 I. Hrivnacova
- The first tagged version of the new B3 example
(tagged in basic).
11-11-11 (mma)
- EventAction: printModulo 10000
01-11-11 (mma)
- DetectorConstruction2: - add an offset when replicate dPhi
29-09-11 (mma)
- DetectorConstruction: - replace crystal shape Trd by Box
- add a gap for wrapping
27-06-11 michel maire
- Created.
+168
View File
@@ -0,0 +1,168 @@
$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
@@ -4,57 +4,12 @@
############################################
*************************************************************
Geant4 version Name: geant4-10-01-ref-00 (5-December-2014)
Geant4MT version Name: geant4-09-06-ref-02 (18-January-2013)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateX (OGLIX)
OpenGLImmediateXm (OGLI, OGLIXm)
OpenGLStoredX (OGLSX)
OpenGLStoredXm (OGL, OGLS, OGLSXm)
RayTracer (RayTracer)
RayTracerX (RayTracerX)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
@@ -101,9 +56,7 @@ Checking overlaps for volume Patient ... OK!
***** Table : Nb of materials = 3 *****
Material: Lu2SiO5 density: 7.400 g/cm3 RadL: 1.143 cm Nucl.Int.Length: 20.915 cm
Imean: 418.807 eV
Material: Lu2SiO5 density: 7.400 g/cm3 RadL: 1.143 cm Nucl.Int.Length: 20.922 cm Imean: 418.807 eV
---> Element: Lu (Lu) Z = 71.0 N = 175.0 A = 174.97 g/mole
---> Isotope: Lu175 Z = 71 N = 175 A = 174.94 g/mole abundance: 97.41 %
---> Isotope: Lu176 Z = 71 N = 176 A = 175.94 g/mole abundance: 2.59 %
@@ -122,9 +75,7 @@ Checking overlaps for volume Patient ... OK!
ElmMassFraction: 17.47 % ElmAbundance 62.50 %
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.137 m
Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.261 m Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm
---> Element: C (C) Z = 6.0 N = 12.0 A = 12.01 g/mole
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.93 %
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.07 %
@@ -141,16 +92,14 @@ Checking overlaps for volume Patient ... OK!
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
ElmMassFraction: 23.18 % ElmAbundance 21.07 %
---> Element: Ar (Ar) Z = 18.0 N = 40.0 A = 39.95 g/mole
---> Element: Ar (Ar) Z = 18.0 N = 39.9 A = 39.95 g/mole
---> Isotope: Ar36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.34 %
---> Isotope: Ar38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.06 %
---> Isotope: Ar40 Z = 18 N = 40 A = 39.96 g/mole abundance: 99.60 %
ElmMassFraction: 1.28 % ElmAbundance 0.47 %
Material: G4_BRAIN_ICRP density: 1.040 g/cm3 RadL: 35.403 cm Nucl.Int.Length: 72.275 cm
Imean: 73.300 eV
Material: G4_BRAIN_ICRP density: 1.040 g/cm3 RadL: 35.403 cm Nucl.Int.Length: 72.293 cm Imean: 73.300 eV
---> Element: H (H) Z = 1.0 N = 1.0 A = 1.01 g/mole
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.99 %
---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.01 %
@@ -204,17 +153,63 @@ G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
New sensitive detector <crystal> is registored at /
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
New sensitive detector <patient> is registored at /
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateQt (OGLI, OGLIQt)
OpenGLImmediateX (OGLIX)
OpenGLImmediateXm (OGLIXm, OGLI_FALLBACK, OGLIQt_FALLBACK)
OpenGLStoredQt (OGL, OGLS, OGLSQt)
OpenGLStoredX (OGLSX)
OpenGLStoredXm (OGLSXm, OGL_FALLBACK, OGLS_FALLBACK, OGLSQt_FALLBACK)
RayTracer (RayTracer)
RayTracerX (RayTracerX)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
#
/run/beamOn 10000
### Run 0 start.
---> end of event: 0
---> Begin of event: 0
--------------------End of Global Run-----------------------
The run was 10000 events Nb of 'good' e+ annihilations: 1285
Total dose in patient : 305.51 picoGy
--------------------End of Run------------------------------
The run was 10000 F18[0.0] Nb of 'good' e+ annihilations: 1266
Total dose in patient : 310.47 picoGy
------------------------------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
Total navigation history collections cleaned: 10
+115
View File
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: exampleB3a.cc 94031 2015-11-05 11:54:38Z ihrivnac $
//
/// \file exampleB3.cc
/// \brief Main program of the B3 example
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "B3DetectorConstruction.hh"
#include "B3PhysicsList.hh"
#include "B3aActionInitialization.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv)
{
// Detect interactive mode (if no arguments) and define UI session
//
G4UIExecutive* ui = 0;
if ( argc == 1 ) {
ui = new G4UIExecutive(argc, argv);
}
// Choose the Random engine
//
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Construct the default run manager
//
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
#else
G4RunManager* runManager = new G4RunManager;
#endif
// Set mandatory initialization classes
//
runManager->SetUserInitialization(new B3DetectorConstruction);
//
runManager->SetUserInitialization(new B3PhysicsList);
// Set user action initialization
//
runManager->SetUserInitialization(new B3aActionInitialization());
// Initialize visualization
//
G4VisManager* visManager = new G4VisExecutive;
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
// G4VisManager* visManager = new G4VisExecutive("Quiet");
visManager->Initialize();
// Get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
// Process macro or start UI session
//
if ( ! ui ) {
// batch mode
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
else {
// interactive mode
UImanager->ApplyCommand("/control/execute init_vis.mac");
ui->SessionStart();
delete ui;
}
// Job termination
// Free the store: user actions, physics_list and detector_description are
// owned and deleted by the run manager, so they should not be deleted
// in the main() program !
delete visManager;
delete runManager;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+219
View File
@@ -0,0 +1,219 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
*************************************************************
Geant4 version Name: geant4-10-02-ref-00 (4-December-2015)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
RayTracerX (RayTracerX)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume Detector ... OK!
Checking overlaps for volume Patient ... OK!
***** Table : Nb of materials = 3 *****
Material: Lu2SiO5 density: 7.400 g/cm3 RadL: 1.143 cm Nucl.Int.Length: 20.920 cm
Imean: 418.807 eV
---> Element: Lu (Lu) Z = 71.0 N = 175 A = 174.967 g/mole
---> Isotope: Lu175 Z = 71 N = 175 A = 174.94 g/mole abundance: 97.410 %
---> Isotope: Lu176 Z = 71 N = 176 A = 175.94 g/mole abundance: 2.590 %
ElmMassFraction: 76.40 % ElmAbundance 25.00 %
---> Element: Si (Si) Z = 14.0 N = 28 A = 28.085 g/mole
---> Isotope: Si28 Z = 14 N = 28 A = 27.98 g/mole abundance: 92.230 %
---> Isotope: Si29 Z = 14 N = 29 A = 28.98 g/mole abundance: 4.683 %
---> Isotope: Si30 Z = 14 N = 30 A = 29.97 g/mole abundance: 3.087 %
ElmMassFraction: 6.13 % ElmAbundance 12.50 %
---> Element: O (O) Z = 8.0 N = 16 A = 15.999 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.038 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.205 %
ElmMassFraction: 17.47 % ElmAbundance 62.50 %
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.095 m
Imean: 85.700 eV temperature: 293.15 K pressure: 1.00 atm
---> Element: C (C) Z = 6.0 N = 12 A = 12.011 g/mole
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.070 %
ElmMassFraction: 0.01 % ElmAbundance 0.02 %
---> Element: N (N) Z = 7.0 N = 14 A = 14.007 g/mole
---> Isotope: N14 Z = 7 N = 14 A = 14.00 g/mole abundance: 99.632 %
---> Isotope: N15 Z = 7 N = 15 A = 15.00 g/mole abundance: 0.368 %
ElmMassFraction: 75.53 % ElmAbundance 78.44 %
---> Element: O (O) Z = 8.0 N = 16 A = 15.999 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.038 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.205 %
ElmMassFraction: 23.18 % ElmAbundance 21.07 %
---> Element: Ar (Ar) Z = 18.0 N = 40 A = 39.948 g/mole
---> Isotope: Ar36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.337 %
---> Isotope: Ar38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.063 %
---> Isotope: Ar40 Z = 18 N = 40 A = 39.96 g/mole abundance: 99.600 %
ElmMassFraction: 1.28 % ElmAbundance 0.47 %
Material: G4_BRAIN_ICRP density: 1.040 g/cm3 RadL: 35.403 cm Nucl.Int.Length: 72.156 cm
Imean: 73.300 eV
---> Element: H (H) Z = 1.0 N = 1 A = 1.008 g/mole
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.989 %
---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.011 %
ElmMassFraction: 10.70 % ElmAbundance 64.44 %
---> Element: C (C) Z = 6.0 N = 12 A = 12.011 g/mole
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.070 %
ElmMassFraction: 14.50 % ElmAbundance 7.33 %
---> Element: N (N) Z = 7.0 N = 14 A = 14.007 g/mole
---> Isotope: N14 Z = 7 N = 14 A = 14.00 g/mole abundance: 99.632 %
---> Isotope: N15 Z = 7 N = 15 A = 15.00 g/mole abundance: 0.368 %
ElmMassFraction: 2.20 % ElmAbundance 0.95 %
---> Element: O (O) Z = 8.0 N = 16 A = 15.999 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.038 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.205 %
ElmMassFraction: 71.20 % ElmAbundance 27.01 %
---> Element: Na (Na) Z = 11.0 N = 23 A = 22.990 g/mole
---> Isotope: Na23 Z = 11 N = 23 A = 22.99 g/mole abundance: 100.000 %
ElmMassFraction: 0.20 % ElmAbundance 0.05 %
---> Element: P (P) Z = 15.0 N = 31 A = 30.974 g/mole
---> Isotope: P31 Z = 15 N = 31 A = 30.97 g/mole abundance: 100.000 %
ElmMassFraction: 0.40 % ElmAbundance 0.08 %
---> Element: S (S) Z = 16.0 N = 32 A = 32.066 g/mole
---> Isotope: S32 Z = 16 N = 32 A = 31.97 g/mole abundance: 94.930 %
---> Isotope: S33 Z = 16 N = 33 A = 32.97 g/mole abundance: 0.760 %
---> Isotope: S34 Z = 16 N = 34 A = 33.97 g/mole abundance: 4.290 %
---> Isotope: S36 Z = 16 N = 36 A = 35.97 g/mole abundance: 0.020 %
ElmMassFraction: 0.20 % ElmAbundance 0.04 %
---> Element: Cl (Cl) Z = 17.0 N = 35 A = 35.453 g/mole
---> Isotope: Cl35 Z = 17 N = 35 A = 34.97 g/mole abundance: 75.780 %
---> Isotope: Cl37 Z = 17 N = 37 A = 36.97 g/mole abundance: 24.220 %
ElmMassFraction: 0.30 % ElmAbundance 0.05 %
---> Element: K (K) Z = 19.0 N = 39 A = 39.098 g/mole
---> Isotope: K39 Z = 19 N = 39 A = 38.96 g/mole abundance: 93.258 %
---> Isotope: K40 Z = 19 N = 40 A = 39.96 g/mole abundance: 0.012 %
---> Isotope: K41 Z = 19 N = 41 A = 40.96 g/mole abundance: 6.730 %
ElmMassFraction: 0.30 % ElmAbundance 0.05 %
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
New sensitive detector <crystal> is registored at /
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
New sensitive detector <patient> is registored at /
#
/run/beamOn 10000
### Run 0 start.
--------------------End of Global Run-----------------------
The run was 10000 events Nb of 'good' e+ annihilations: 1294
Total dose in patient : 291.523 picoGy
------------------------------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3DetectorConstruction.hh 71323 2013-06-13 16:54:23Z gcosmo $
// $Id: B3DetectorConstruction.hh 71079 2013-06-10 20:37:11Z ihrivnac $
//
/// \file B3DetectorConstruction.hh
/// \brief Definition of the B3DetectorConstruction class
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3PhysicsList.hh 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3PhysicsList.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3PhysicsList.hh
/// \brief Definition of the B3PhysicsList class
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3PrimaryGeneratorAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3PrimaryGeneratorAction.hh 89901 2015-05-04 09:28:53Z ihrivnac $
//
/// \file B3PrimaryGeneratorAction.hh
/// \brief Definition of the B3PrimaryGeneratorAction class
@@ -61,5 +61,3 @@ class B3PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3StackingAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3StackingAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3StackingAction.hh
/// \brief Definition of the B3StackingAction class
@@ -23,13 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3aActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B3ActionInitialization.hh
/// \brief Definition of the B3ActionInitialization class
/// \file B3aActionInitialization.hh
/// \brief Definition of the B3aActionInitialization class
#ifndef B3ActionInitialization_h
#define B3ActionInitialization_h 1
#ifndef B3aActionInitialization_h
#define B3aActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
@@ -38,11 +38,11 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class B3ActionInitialization : public G4VUserActionInitialization
class B3aActionInitialization : public G4VUserActionInitialization
{
public:
B3ActionInitialization();
virtual ~B3ActionInitialization();
B3aActionInitialization();
virtual ~B3aActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id$
//
/// \file B3aEventAction.hh
/// \brief Definition of the B3aEventAction class
#ifndef B3aEventAction_h
#define B3aEventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
class B3aRunAction;
/// Event action class
///
/// In EndOfEventAction() there is collected information event per event
/// from Hits Collections, and accumulated statistic for
/// B3RunAction::EndOfRunAction().
class B3aEventAction : public G4UserEventAction
{
public:
B3aEventAction(B3aRunAction* runAction);
virtual ~B3aEventAction();
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
private:
B3aRunAction* fRunAction;
G4int fCollID_cryst;
G4int fCollID_patient;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,60 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3aRunAction.hh 94031 2015-11-05 11:54:38Z ihrivnac $
//
/// \file B3aRunAction.hh
/// \brief Definition of the B3aRunAction class
#ifndef B3aRunAction_h
#define B3aRunAction_h 1
#include "G4UserRunAction.hh"
#include "G4Parameter.hh"
#include "globals.hh"
/// Run action class
class B3aRunAction : public G4UserRunAction
{
public:
B3aRunAction();
virtual ~B3aRunAction();
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
void CountEvent() { fGoodEvents += 1; };
void SumDose(G4double dose) { fSumDose += dose; };
private:
G4Parameter<G4int> fGoodEvents;
G4Parameter<G4double> fSumDose;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -1,4 +1,4 @@
# $Id: run1.mac 86065 2014-11-07 08:51:15Z gcosmo $
# $Id: run1.mac 85993 2014-11-06 16:34:10Z ihrivnac $
#
# Macro file of "exampleB3.cc"
#
@@ -1,4 +1,4 @@
# $Id: run2.mac 86065 2014-11-07 08:51:15Z gcosmo $
# $Id: run2.mac 85993 2014-11-06 16:34:10Z ihrivnac $
#
# Macro file of "exampleB3.cc"
# To be run preferably in batch, without graphics:
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3DetectorConstruction.cc 71323 2013-06-13 16:54:23Z gcosmo $
// $Id: B3DetectorConstruction.cc 71079 2013-06-10 20:37:11Z ihrivnac $
//
/// \file B3DetectorConstruction.cc
/// \brief Implementation of the B3DetectorConstruction class
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3PhysicsList.cc 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3PhysicsList.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3PhysicsList.cc
/// \brief Implementation of the B3PhysicsList class
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3PrimaryGeneratorAction.cc 73766 2013-09-10 12:57:13Z gcosmo $
// $Id: B3PrimaryGeneratorAction.cc 73744 2013-09-09 20:25:07Z asaim $
//
/// \file B3PrimaryGeneratorAction.cc
/// \brief Implementation of the B3PrimaryGeneratorAction class
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3StackingAction.cc 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3StackingAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3StackingAction.cc
/// \brief Implementation of the B3StackingAction class
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3aActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B3aActionInitialization.cc
/// \brief Implementation of the B3aActionInitialization class
#include "B3aActionInitialization.hh"
#include "B3aRunAction.hh"
#include "B3aEventAction.hh"
#include "B3PrimaryGeneratorAction.hh"
#include "B3StackingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3aActionInitialization::B3aActionInitialization()
: G4VUserActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3aActionInitialization::~B3aActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3aActionInitialization::BuildForMaster() const
{
SetUserAction(new B3aRunAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3aActionInitialization::Build() const
{
B3aRunAction* runAction = new B3aRunAction();
SetUserAction(runAction);
SetUserAction(new B3aEventAction(runAction));
SetUserAction(new B3PrimaryGeneratorAction);
SetUserAction(new B3StackingAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+109
View File
@@ -0,0 +1,109 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id$
//
/// \file B3aEventAction.cc
/// \brief Implementation of the B3aEventAction class
#include "B3aEventAction.hh"
#include "B3aRunAction.hh"
#include "G4RunManager.hh"
#include "G4Event.hh"
#include "G4SDManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4THitsMap.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3aEventAction::B3aEventAction(B3aRunAction* runAction)
: G4UserEventAction(),
fRunAction(runAction),
fCollID_cryst(0),
fCollID_patient(0)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3aEventAction::~B3aEventAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3aEventAction::BeginOfEventAction(const G4Event* evt )
{
G4int evtNb = evt->GetEventID();
if (evtNb == 0) {
G4SDManager* SDMan = G4SDManager::GetSDMpointer();
fCollID_cryst = SDMan->GetCollectionID("crystal/edep");
fCollID_patient = SDMan->GetCollectionID("patient/dose");
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3aEventAction::EndOfEventAction(const G4Event* evt )
{
//Hits collections
//
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
if(!HCE) return;
//Energy in crystals : identify 'good events'
//
const G4double eThreshold = 500*keV;
G4int nbOfFired = 0;
G4THitsMap<G4double>* evtMap =
(G4THitsMap<G4double>*)(HCE->GetHC(fCollID_cryst));
std::map<G4int,G4double*>::iterator itr;
for (itr = evtMap->GetMap()->begin(); itr != evtMap->GetMap()->end(); itr++) {
///G4int copyNb = (itr->first);
G4double edep = *(itr->second);
if (edep > eThreshold) nbOfFired++;
///G4cout << "\n cryst" << copyNb << ": " << edep/keV << " keV ";
}
if (nbOfFired == 2) fRunAction->CountEvent();
//Dose deposit in patient
//
G4double dose = 0.;
evtMap = (G4THitsMap<G4double>*)(HCE->GetHC(fCollID_patient));
for (itr = evtMap->GetMap()->begin(); itr != evtMap->GetMap()->end(); itr++) {
///G4int copyNb = (itr->first);
dose = *(itr->second);
}
if (dose > 0.) fRunAction->SumDose(dose);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+135
View File
@@ -0,0 +1,135 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3aRunAction.cc 94031 2015-11-05 11:54:38Z ihrivnac $
//
/// \file B3aRunAction.cc
/// \brief Implementation of the B3aRunAction class
#include "B3aRunAction.hh"
#include "B3PrimaryGeneratorAction.hh"
#include "G4RunManager.hh"
#include "G4Run.hh"
#include "G4ParameterManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3aRunAction::B3aRunAction()
: G4UserRunAction(),
fGoodEvents("GoodEvents", 0),
fSumDose("SumDose", 0.)
{
//add new units for dose
//
const G4double milligray = 1.e-3*gray;
const G4double microgray = 1.e-6*gray;
const G4double nanogray = 1.e-9*gray;
const G4double picogray = 1.e-12*gray;
new G4UnitDefinition("milligray", "milliGy" , "Dose", milligray);
new G4UnitDefinition("microgray", "microGy" , "Dose", microgray);
new G4UnitDefinition("nanogray" , "nanoGy" , "Dose", nanogray);
new G4UnitDefinition("picogray" , "picoGy" , "Dose", picogray);
// Register parameter to the parameter manager
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
parameterManager->RegisterParameter(fGoodEvents);
parameterManager->RegisterParameter(fSumDose);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3aRunAction::~B3aRunAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3aRunAction::BeginOfRunAction(const G4Run* run)
{
G4cout << "### Run " << run->GetRunID() << " start." << G4endl;
// reset parameters to their initial values
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
parameterManager->Reset();
//inform the runManager to save random number seed
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3aRunAction::EndOfRunAction(const G4Run* run)
{
G4int nofEvents = run->GetNumberOfEvent();
if (nofEvents == 0) return;
// Merge parameters
G4ParameterManager* parameterManager = G4ParameterManager::Instance();
parameterManager->Merge();
// Run conditions
// note: There is no primary generator action object for "master"
// run manager for multi-threaded mode.
const B3PrimaryGeneratorAction* generatorAction
= static_cast<const B3PrimaryGeneratorAction*>(
G4RunManager::GetRunManager()->GetUserPrimaryGeneratorAction());
G4String partName;
if (generatorAction)
{
G4ParticleDefinition* particle
= generatorAction->GetParticleGun()->GetParticleDefinition();
partName = particle->GetParticleName();
}
// Print results
//
if (IsMaster())
{
G4cout
<< G4endl
<< "--------------------End of Global Run-----------------------"
<< G4endl
<< " The run was " << nofEvents << " events ";
}
else
{
G4cout
<< G4endl
<< "--------------------End of Local Run------------------------"
<< G4endl
<< " The run was " << nofEvents << " "<< partName;
}
G4cout
<< "; Nb of 'good' e+ annihilations: " << fGoodEvents.GetValue() << G4endl
<< " Total dose in patient : " << G4BestUnit(fSumDose.GetValue(),"Dose")
<< G4endl
<< "------------------------------------------------------------" << G4endl
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+73
View File
@@ -0,0 +1,73 @@
# $Id: CMakeLists.txt 94031 2015-11-05 11:54:38Z ihrivnac $
#----------------------------------------------------------------------------
# Setup the project
#
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(B3b)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
include(${Geant4_USE_FILE})
include_directories(${PROJECT_SOURCE_DIR}/include)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
# NB: headers are included so they will show up in IDEs
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(exampleB3b exampleB3b.cc ${sources} ${headers})
target_link_libraries(exampleB3b ${Geant4_LIBRARIES})
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build B3. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(EXAMPLEB3_SCRIPTS
debug.mac
exampleB3.in
exampleB3.out
init_vis.mac
run1.mac
run2.mac
vis.mac
)
foreach(_script ${EXAMPLEB3_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# For internal Geant4 use - but has no effect if you build this
# example standalone
#
add_custom_target(B3b DEPENDS exampleB3b)
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS exampleB3b DESTINATION bin )
+22
View File
@@ -0,0 +1,22 @@
# $Id: GNUmakefile 94031 2015-11-05 11:54:38Z ihrivnac $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := exampleB3b
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
+90
View File
@@ -0,0 +1,90 @@
$Id: History 89902 2015-05-04 09:30:08Z ihrivnac $
--------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example B3 History file
-----------------------
This file should be used by the G4 example coordinator to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
04/05/15 I. Hrivnacova (exampleB3-V10-01-00)
- Coding guidelines: removed empty lines
29/11/14 I. Hrivnacova
- Use G4endl instead of \n in G4cout;
this makes each new line in the output on threads preceded with
G4WTN >
06/11/14 I. Hrivnacova
- Finalized modifications in previous tag (01):
- Removed G4UI_USE/G4VIS_USE tests and init.mac macro (not needed)
- Moved G4UIExecutive at the beginning of main() in all examples
- Perform run initialization in macros instead of main()
04/11/14 L. Garnier (exampleB3-V10-00-01)
- Remove old G4UI_USE/G4VIS_USE
- Move G4UIExecutive at the beginning of main()
29/10/13 I. Hrivnacova (exampleB3-V09-06-06)
- Removed SetNumberOfThreads(4) from main (use Geant4 default)
- Updated README
09/09/13 M.Asai (exampleB3-V09-06-05)
- B3PrimaryGeneratorAction.cc : Change G4ParticleTable::GetIon() to
G4IonTable::GetIon(), as the former method becomes obsolete.
13/06/13 mma (exampleB3-V09-06-04)
Fixes for MT:
- Set sensitive detector via SetSensitiveDetector(..)
- Get hits collection IDs in B3Run::RecordEvent (and not B3Run constructor)
- Add a test for primary generator action in B3RunAction::EndOfRunAction()
as it does not exist on master
05/06/13 mma (exampleB3-V09-06-03)
- add section about ACTION INITALIZATION to README and .README
01/06/13 mma (exampleB3-V09-06-02)
- Migration for MT:
forgotten to add B3Run
31/05/13 mma (exampleB3-V09-06-01)
- Migration for MT:
Added B3ActionInitialization, B3Run
Removed B3EventAction
and updated actions classes accordingly.
README files still need to be updated.
28/02/13 I. Hrivnacova
- When building materials with NistManager
do not set fromIsotopes argument (which was set to false),
as since 9.6 all materials have to be built from isotopes.
Thanks to V. Ivantchenko for pointing at this.
21/11/11 I. Hrivnacova
- Improved vis.mac
- Removed alternative detector construction class
14/11/11 I. Hrivnacova
- The first tagged version of the new B3 example
(tagged in basic).
11-11-11 (mma)
- EventAction: printModulo 10000
01-11-11 (mma)
- DetectorConstruction2: - add an offset when replicate dPhi
29-09-11 (mma)
- DetectorConstruction: - replace crystal shape Trd by Box
- add a gap for wrapping
27-06-11 michel maire
- Created.
+168
View File
@@ -0,0 +1,168 @@
$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
+13
View File
@@ -0,0 +1,13 @@
# $Id: run1.mac,v 1.2 2000-11-21 10:59:42 maire Exp $
#
# Macro file for "exampleB3.cc"
#
# can be run in batch, without graphic
# or interactively: Idle> /control/execute debug.mac
#
/run/initialize
#
/tracking/verbose 1
#
/gun/particle geantino
/run/beamOn 1
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: exampleB3.cc 86065 2014-11-07 08:51:15Z gcosmo $
// $Id: exampleB3.cc 85993 2014-11-06 16:34:10Z ihrivnac $
//
/// \file exampleB3.cc
/// \brief Main program of the B3 example
+9
View File
@@ -0,0 +1,9 @@
# $Id: run2.mac,v 1.6 2002-12-16 16:37:25 maire Exp $
#
# Macro file for example B3 test
#
/run/initialize
#
/control/verbose 2
#
/run/beamOn 10000
+215
View File
@@ -0,0 +1,215 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
*************************************************************
Geant4MT version Name: geant4-09-06-ref-02 (18-January-2013)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume Detector ... OK!
Checking overlaps for volume Patient ... OK!
***** Table : Nb of materials = 3 *****
Material: Lu2SiO5 density: 7.400 g/cm3 RadL: 1.143 cm Nucl.Int.Length: 20.922 cm Imean: 418.807 eV
---> Element: Lu (Lu) Z = 71.0 N = 175.0 A = 174.97 g/mole
---> Isotope: Lu175 Z = 71 N = 175 A = 174.94 g/mole abundance: 97.41 %
---> Isotope: Lu176 Z = 71 N = 176 A = 175.94 g/mole abundance: 2.59 %
ElmMassFraction: 76.40 % ElmAbundance 25.00 %
---> Element: Si (Si) Z = 14.0 N = 28.1 A = 28.09 g/mole
---> Isotope: Si28 Z = 14 N = 28 A = 27.98 g/mole abundance: 92.23 %
---> Isotope: Si29 Z = 14 N = 29 A = 28.98 g/mole abundance: 4.68 %
---> Isotope: Si30 Z = 14 N = 30 A = 29.97 g/mole abundance: 3.09 %
ElmMassFraction: 6.13 % ElmAbundance 12.50 %
---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
ElmMassFraction: 17.47 % ElmAbundance 62.50 %
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.261 m Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm
---> Element: C (C) Z = 6.0 N = 12.0 A = 12.01 g/mole
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.93 %
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.07 %
ElmMassFraction: 0.01 % ElmAbundance 0.02 %
---> Element: N (N) Z = 7.0 N = 14.0 A = 14.01 g/mole
---> Isotope: N14 Z = 7 N = 14 A = 14.00 g/mole abundance: 99.63 %
---> Isotope: N15 Z = 7 N = 15 A = 15.00 g/mole abundance: 0.37 %
ElmMassFraction: 75.53 % ElmAbundance 78.44 %
---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
ElmMassFraction: 23.18 % ElmAbundance 21.07 %
---> Element: Ar (Ar) Z = 18.0 N = 39.9 A = 39.95 g/mole
---> Isotope: Ar36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.34 %
---> Isotope: Ar38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.06 %
---> Isotope: Ar40 Z = 18 N = 40 A = 39.96 g/mole abundance: 99.60 %
ElmMassFraction: 1.28 % ElmAbundance 0.47 %
Material: G4_BRAIN_ICRP density: 1.040 g/cm3 RadL: 35.403 cm Nucl.Int.Length: 72.293 cm Imean: 73.300 eV
---> Element: H (H) Z = 1.0 N = 1.0 A = 1.01 g/mole
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.99 %
---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.01 %
ElmMassFraction: 10.70 % ElmAbundance 64.44 %
---> Element: C (C) Z = 6.0 N = 12.0 A = 12.01 g/mole
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.93 %
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.07 %
ElmMassFraction: 14.50 % ElmAbundance 7.33 %
---> Element: N (N) Z = 7.0 N = 14.0 A = 14.01 g/mole
---> Isotope: N14 Z = 7 N = 14 A = 14.00 g/mole abundance: 99.63 %
---> Isotope: N15 Z = 7 N = 15 A = 15.00 g/mole abundance: 0.37 %
ElmMassFraction: 2.20 % ElmAbundance 0.95 %
---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
ElmMassFraction: 71.20 % ElmAbundance 27.01 %
---> Element: Na (Na) Z = 11.0 N = 23.0 A = 22.99 g/mole
---> Isotope: Na23 Z = 11 N = 23 A = 22.99 g/mole abundance: 100.00 %
ElmMassFraction: 0.20 % ElmAbundance 0.05 %
---> Element: P (P) Z = 15.0 N = 31.0 A = 30.97 g/mole
---> Isotope: P31 Z = 15 N = 31 A = 30.97 g/mole abundance: 100.00 %
ElmMassFraction: 0.40 % ElmAbundance 0.08 %
---> Element: S (S) Z = 16.0 N = 32.1 A = 32.07 g/mole
---> Isotope: S32 Z = 16 N = 32 A = 31.97 g/mole abundance: 94.93 %
---> Isotope: S33 Z = 16 N = 33 A = 32.97 g/mole abundance: 0.76 %
---> Isotope: S34 Z = 16 N = 34 A = 33.97 g/mole abundance: 4.29 %
---> Isotope: S36 Z = 16 N = 36 A = 35.97 g/mole abundance: 0.02 %
ElmMassFraction: 0.20 % ElmAbundance 0.04 %
---> Element: Cl (Cl) Z = 17.0 N = 35.5 A = 35.45 g/mole
---> Isotope: Cl35 Z = 17 N = 35 A = 34.97 g/mole abundance: 75.78 %
---> Isotope: Cl37 Z = 17 N = 37 A = 36.97 g/mole abundance: 24.22 %
ElmMassFraction: 0.30 % ElmAbundance 0.05 %
---> Element: K (K) Z = 19.0 N = 39.1 A = 39.10 g/mole
---> Isotope: K39 Z = 19 N = 39 A = 38.96 g/mole abundance: 93.26 %
---> Isotope: K40 Z = 19 N = 40 A = 39.96 g/mole abundance: 0.01 %
---> Isotope: K41 Z = 19 N = 41 A = 40.96 g/mole abundance: 6.73 %
ElmMassFraction: 0.30 % ElmAbundance 0.05 %
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
New sensitive detector <crystal> is registored at /
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
New sensitive detector <patient> is registored at /
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateQt (OGLI, OGLIQt)
OpenGLImmediateX (OGLIX)
OpenGLImmediateXm (OGLIXm, OGLI_FALLBACK, OGLIQt_FALLBACK)
OpenGLStoredQt (OGL, OGLS, OGLSQt)
OpenGLStoredX (OGLSX)
OpenGLStoredXm (OGLSXm, OGL_FALLBACK, OGLS_FALLBACK, OGLSQt_FALLBACK)
RayTracer (RayTracer)
RayTracerX (RayTracerX)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
#
/run/beamOn 10000
### Run 0 start.
---> Begin of event: 0
--------------------End of Run------------------------------
The run was 10000 F18[0.0] Nb of 'good' e+ annihilations: 1266
Total dose in patient : 310.47 picoGy
------------------------------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
+115
View File
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: exampleB3b.cc 94031 2015-11-05 11:54:38Z ihrivnac $
//
/// \file exampleB3.cc
/// \brief Main program of the B3 example
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "B3DetectorConstruction.hh"
#include "B3PhysicsList.hh"
#include "B3bActionInitialization.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv)
{
// Detect interactive mode (if no arguments) and define UI session
//
G4UIExecutive* ui = 0;
if ( argc == 1 ) {
ui = new G4UIExecutive(argc, argv);
}
// Choose the Random engine
//
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Construct the default run manager
//
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
#else
G4RunManager* runManager = new G4RunManager;
#endif
// Set mandatory initialization classes
//
runManager->SetUserInitialization(new B3DetectorConstruction);
//
runManager->SetUserInitialization(new B3PhysicsList);
// Set user action initialization
//
runManager->SetUserInitialization(new B3bActionInitialization());
// Initialize visualization
//
G4VisManager* visManager = new G4VisExecutive;
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
// G4VisManager* visManager = new G4VisExecutive("Quiet");
visManager->Initialize();
// Get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
// Process macro or start UI session
//
if ( ! ui ) {
// batch mode
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
else {
// interactive mode
UImanager->ApplyCommand("/control/execute init_vis.mac");
ui->SessionStart();
delete ui;
}
// Job termination
// Free the store: user actions, physics_list and detector_description are
// owned and deleted by the run manager, so they should not be deleted
// in the main() program !
delete visManager;
delete runManager;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
+221
View File
@@ -0,0 +1,221 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
*************************************************************
Geant4 version Name: geant4-10-02-ref-00 (4-December-2015)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
RayTracerX (RayTracerX)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume crystal ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume ring ... OK!
Checking overlaps for volume Detector ... OK!
Checking overlaps for volume Patient ... OK!
***** Table : Nb of materials = 3 *****
Material: Lu2SiO5 density: 7.400 g/cm3 RadL: 1.143 cm Nucl.Int.Length: 20.920 cm
Imean: 418.807 eV
---> Element: Lu (Lu) Z = 71.0 N = 175 A = 174.967 g/mole
---> Isotope: Lu175 Z = 71 N = 175 A = 174.94 g/mole abundance: 97.410 %
---> Isotope: Lu176 Z = 71 N = 176 A = 175.94 g/mole abundance: 2.590 %
ElmMassFraction: 76.40 % ElmAbundance 25.00 %
---> Element: Si (Si) Z = 14.0 N = 28 A = 28.085 g/mole
---> Isotope: Si28 Z = 14 N = 28 A = 27.98 g/mole abundance: 92.230 %
---> Isotope: Si29 Z = 14 N = 29 A = 28.98 g/mole abundance: 4.683 %
---> Isotope: Si30 Z = 14 N = 30 A = 29.97 g/mole abundance: 3.087 %
ElmMassFraction: 6.13 % ElmAbundance 12.50 %
---> Element: O (O) Z = 8.0 N = 16 A = 15.999 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.038 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.205 %
ElmMassFraction: 17.47 % ElmAbundance 62.50 %
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.095 m
Imean: 85.700 eV temperature: 293.15 K pressure: 1.00 atm
---> Element: C (C) Z = 6.0 N = 12 A = 12.011 g/mole
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.070 %
ElmMassFraction: 0.01 % ElmAbundance 0.02 %
---> Element: N (N) Z = 7.0 N = 14 A = 14.007 g/mole
---> Isotope: N14 Z = 7 N = 14 A = 14.00 g/mole abundance: 99.632 %
---> Isotope: N15 Z = 7 N = 15 A = 15.00 g/mole abundance: 0.368 %
ElmMassFraction: 75.53 % ElmAbundance 78.44 %
---> Element: O (O) Z = 8.0 N = 16 A = 15.999 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.038 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.205 %
ElmMassFraction: 23.18 % ElmAbundance 21.07 %
---> Element: Ar (Ar) Z = 18.0 N = 40 A = 39.948 g/mole
---> Isotope: Ar36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.337 %
---> Isotope: Ar38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.063 %
---> Isotope: Ar40 Z = 18 N = 40 A = 39.96 g/mole abundance: 99.600 %
ElmMassFraction: 1.28 % ElmAbundance 0.47 %
Material: G4_BRAIN_ICRP density: 1.040 g/cm3 RadL: 35.403 cm Nucl.Int.Length: 72.156 cm
Imean: 73.300 eV
---> Element: H (H) Z = 1.0 N = 1 A = 1.008 g/mole
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.989 %
---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.011 %
ElmMassFraction: 10.70 % ElmAbundance 64.44 %
---> Element: C (C) Z = 6.0 N = 12 A = 12.011 g/mole
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.070 %
ElmMassFraction: 14.50 % ElmAbundance 7.33 %
---> Element: N (N) Z = 7.0 N = 14 A = 14.007 g/mole
---> Isotope: N14 Z = 7 N = 14 A = 14.00 g/mole abundance: 99.632 %
---> Isotope: N15 Z = 7 N = 15 A = 15.00 g/mole abundance: 0.368 %
ElmMassFraction: 2.20 % ElmAbundance 0.95 %
---> Element: O (O) Z = 8.0 N = 16 A = 15.999 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.038 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.205 %
ElmMassFraction: 71.20 % ElmAbundance 27.01 %
---> Element: Na (Na) Z = 11.0 N = 23 A = 22.990 g/mole
---> Isotope: Na23 Z = 11 N = 23 A = 22.99 g/mole abundance: 100.000 %
ElmMassFraction: 0.20 % ElmAbundance 0.05 %
---> Element: P (P) Z = 15.0 N = 31 A = 30.974 g/mole
---> Isotope: P31 Z = 15 N = 31 A = 30.97 g/mole abundance: 100.000 %
ElmMassFraction: 0.40 % ElmAbundance 0.08 %
---> Element: S (S) Z = 16.0 N = 32 A = 32.066 g/mole
---> Isotope: S32 Z = 16 N = 32 A = 31.97 g/mole abundance: 94.930 %
---> Isotope: S33 Z = 16 N = 33 A = 32.97 g/mole abundance: 0.760 %
---> Isotope: S34 Z = 16 N = 34 A = 33.97 g/mole abundance: 4.290 %
---> Isotope: S36 Z = 16 N = 36 A = 35.97 g/mole abundance: 0.020 %
ElmMassFraction: 0.20 % ElmAbundance 0.04 %
---> Element: Cl (Cl) Z = 17.0 N = 35 A = 35.453 g/mole
---> Isotope: Cl35 Z = 17 N = 35 A = 34.97 g/mole abundance: 75.780 %
---> Isotope: Cl37 Z = 17 N = 37 A = 36.97 g/mole abundance: 24.220 %
ElmMassFraction: 0.30 % ElmAbundance 0.05 %
---> Element: K (K) Z = 19.0 N = 39 A = 39.098 g/mole
---> Isotope: K39 Z = 19 N = 39 A = 38.96 g/mole abundance: 93.258 %
---> Isotope: K40 Z = 19 N = 40 A = 39.96 g/mole abundance: 0.012 %
---> Isotope: K41 Z = 19 N = 41 A = 40.96 g/mole abundance: 6.730 %
ElmMassFraction: 0.30 % ElmAbundance 0.05 %
G4SDManager::AddNewCollection : the collection <crystal/edep> is registered at 1
New sensitive detector <crystal> is registored at /
G4SDManager::AddNewCollection : the collection <patient/dose> is registered at 2
New sensitive detector <patient> is registored at /
#
/run/beamOn 10000
### Run 0 start.
---> end of event: 0
--------------------End of Global Run-----------------------
The run was 10000 events Nb of 'good' e+ annihilations: 1294
Total dose in patient : 291.523 picoGy
------------------------------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3DetectorConstruction.hh 71079 2013-06-10 20:37:11Z ihrivnac $
//
/// \file B3DetectorConstruction.hh
/// \brief Definition of the B3DetectorConstruction class
#ifndef B3DetectorConstruction_h
#define B3DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "globals.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
/// Detector construction class to define materials and geometry.
///
/// Crystals are positioned in Ring, with an appropriate rotation matrix.
/// Several copies of Ring are placed in the full detector.
class B3DetectorConstruction : public G4VUserDetectorConstruction
{
public:
B3DetectorConstruction();
virtual ~B3DetectorConstruction();
public:
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
private:
void DefineMaterials();
G4bool fCheckOverlaps;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3PhysicsList.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3PhysicsList.hh
/// \brief Definition of the B3PhysicsList class
#ifndef B3PhysicsList_h
#define B3PhysicsList_h 1
#include "G4VModularPhysicsList.hh"
/// Modular physics list
///
/// It includes the folowing physics builders
/// - G4DecayPhysics
/// - G4RadioactiveDecayPhysics
/// - G4EmStandardPhysics
class B3PhysicsList: public G4VModularPhysicsList
{
public:
B3PhysicsList();
virtual ~B3PhysicsList();
virtual void SetCuts();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3PrimaryGeneratorAction.hh 89901 2015-05-04 09:28:53Z ihrivnac $
//
/// \file B3PrimaryGeneratorAction.hh
/// \brief Definition of the B3PrimaryGeneratorAction class
#ifndef B3PrimaryGeneratorAction_h
#define B3PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4ParticleGun.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
/// The primary generator action class with particle gum.
///
/// It defines an ion (F18), at rest, randomly distribued within a zone
/// in a patient defined in GeneratePrimaries(). Ion F18 can be changed
/// with the G4ParticleGun commands (see run2.mac).
class B3PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
B3PrimaryGeneratorAction();
virtual ~B3PrimaryGeneratorAction();
virtual void GeneratePrimaries(G4Event*);
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
private:
G4ParticleGun* fParticleGun;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3StackingAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3StackingAction.hh
/// \brief Definition of the B3StackingAction class
#ifndef B3StackingAction_h
#define B3StackingAction_h 1
#include "G4UserStackingAction.hh"
#include "globals.hh"
/// Stacking action class : manage the newly generated particles
///
/// One wishes do not track secondary neutrino.Therefore one kills it
/// immediately, before created particles will put in a stack.
class B3StackingAction : public G4UserStackingAction
{
public:
B3StackingAction();
virtual ~B3StackingAction();
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3bActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B3bActionInitialization.hh
/// \brief Definition of the B3bActionInitialization class
#ifndef B3bActionInitialization_h
#define B3bActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
/// Action initialization class.
///
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class B3bActionInitialization : public G4VUserActionInitialization
{
public:
B3bActionInitialization();
virtual ~B3bActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,13 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3Run.hh 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3bRun.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B3Run.hh
/// \brief Definition of the B3Run class
/// \file B3bRun.hh
/// \brief Definition of the B3bRun class
#ifndef B3Run_h
#define B3Run_h 1
#ifndef B3bRun_h
#define B3bRun_h 1
#include "G4Run.hh"
#include "globals.hh"
@@ -39,11 +39,11 @@
/// In RecordEvent() there is collected information event per event
/// from Hits Collections, and accumulated statistic for the run
class B3Run : public G4Run
class B3bRun : public G4Run
{
public:
B3Run();
virtual ~B3Run();
B3bRun();
virtual ~B3bRun();
virtual void RecordEvent(const G4Event*);
virtual void Merge(const G4Run*);
@@ -23,13 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3RunAction.hh 70599 2013-06-03 11:14:56Z gcosmo $
// $Id: B3bRunAction.hh 94031 2015-11-05 11:54:38Z ihrivnac $
//
/// \file B3RunAction.hh
/// \brief Definition of the B3RunAction class
/// \file B3bRunAction.hh
/// \brief Definition of the B3bRunAction class
#ifndef B3RunAction_h
#define B3RunAction_h 1
#ifndef B3bRunAction_h
#define B3bRunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
@@ -38,11 +38,11 @@ class G4Run;
/// Run action class
class B3RunAction : public G4UserRunAction
class B3bRunAction : public G4UserRunAction
{
public:
B3RunAction();
virtual ~B3RunAction();
B3bRunAction();
virtual ~B3bRunAction();
virtual G4Run* GenerateRun();
virtual void BeginOfRunAction(const G4Run*);
+17
View File
@@ -0,0 +1,17 @@
# Macro file for the initialization of example B3
# in interactive session
#
# Set some default verbose
#
/control/verbose 2
/control/saveHistory
/run/verbose 2
#
# Change the default number of threads (in multi-threaded mode)
#/run/numberOfThreads 4
#
# Initialize kernel
/run/initialize
#
# Visualization setting
/control/execute vis.mac
+17
View File
@@ -0,0 +1,17 @@
# $Id: run1.mac 85993 2014-11-06 16:34:10Z ihrivnac $
#
# Macro file of "exampleB3.cc"
#
# Change the default number of workers (in multi-threading mode)
#/run/numberOfWorkers 4
#
# Initialize kernel
/run/initialize
#
/control/verbose 2
/tracking/verbose 2
#
/run/beamOn 1
#
/tracking/verbose 0
/run/beamOn 20
+19
View File
@@ -0,0 +1,19 @@
# $Id: run2.mac 85993 2014-11-06 16:34:10Z ihrivnac $
#
# Macro file of "exampleB3.cc"
# To be run preferably in batch, without graphics:
# % exampleB3 run3.mac
#
#/run/numberOfWorkers 4
/run/initialize
#
/control/verbose 2
#
/run/beamOn 40000
#
# change beta source
#
/gun/particle ion
/gun/ion 6 11
#
/run/beamOn 40000
@@ -0,0 +1,272 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3DetectorConstruction.cc 71079 2013-06-10 20:37:11Z ihrivnac $
//
/// \file B3DetectorConstruction.cc
/// \brief Implementation of the B3DetectorConstruction class
#include "B3DetectorConstruction.hh"
#include "G4NistManager.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4Transform3D.hh"
#include "G4SDManager.hh"
#include "G4MultiFunctionalDetector.hh"
#include "G4VPrimitiveScorer.hh"
#include "G4PSEnergyDeposit.hh"
#include "G4PSDoseDeposit.hh"
#include "G4VisAttributes.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3DetectorConstruction::B3DetectorConstruction()
: G4VUserDetectorConstruction(),
fCheckOverlaps(true)
{
DefineMaterials();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3DetectorConstruction::~B3DetectorConstruction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3DetectorConstruction::DefineMaterials()
{
G4NistManager* man = G4NistManager::Instance();
G4bool isotopes = false;
G4Element* O = man->FindOrBuildElement("O" , isotopes);
G4Element* Si = man->FindOrBuildElement("Si", isotopes);
G4Element* Lu = man->FindOrBuildElement("Lu", isotopes);
G4Material* LSO = new G4Material("Lu2SiO5", 7.4*g/cm3, 3);
LSO->AddElement(Lu, 2);
LSO->AddElement(Si, 1);
LSO->AddElement(O , 5);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* B3DetectorConstruction::Construct()
{
// Gamma detector Parameters
//
G4double cryst_dX = 6*cm, cryst_dY = 6*cm, cryst_dZ = 3*cm;
G4int nb_cryst = 32;
G4int nb_rings = 9;
//
G4double dPhi = twopi/nb_cryst, half_dPhi = 0.5*dPhi;
G4double cosdPhi = std::cos(half_dPhi);
G4double tandPhi = std::tan(half_dPhi);
//
G4double ring_R1 = 0.5*cryst_dY/tandPhi;
G4double ring_R2 = (ring_R1+cryst_dZ)/cosdPhi;
//
G4double detector_dZ = nb_rings*cryst_dX;
//
G4NistManager* nist = G4NistManager::Instance();
G4Material* default_mat = nist->FindOrBuildMaterial("G4_AIR");
G4Material* cryst_mat = nist->FindOrBuildMaterial("Lu2SiO5");
//
// World
//
G4double world_sizeXY = 2.4*ring_R2;
G4double world_sizeZ = 1.2*detector_dZ;
G4Box* solidWorld =
new G4Box("World", //its name
0.5*world_sizeXY, 0.5*world_sizeXY, 0.5*world_sizeZ); //its size
G4LogicalVolume* logicWorld =
new G4LogicalVolume(solidWorld, //its solid
default_mat, //its material
"World"); //its name
G4VPhysicalVolume* physWorld =
new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
logicWorld, //its logical volume
"World", //its name
0, //its mother volume
false, //no boolean operation
0, //copy number
fCheckOverlaps); // checking overlaps
//
// ring
//
G4Tubs* solidRing =
new G4Tubs("Ring", ring_R1, ring_R2, 0.5*cryst_dX, 0., twopi);
G4LogicalVolume* logicRing =
new G4LogicalVolume(solidRing, //its solid
default_mat, //its material
"Ring"); //its name
//
// define crystal
//
G4double gap = 0.5*mm; //a gap for wrapping
G4double dX = cryst_dX - gap, dY = cryst_dY - gap;
G4Box* solidCryst = new G4Box("crystal", dX/2, dY/2, cryst_dZ/2);
G4LogicalVolume* logicCryst =
new G4LogicalVolume(solidCryst, //its solid
cryst_mat, //its material
"CrystalLV"); //its name
// place crystals within a ring
//
for (G4int icrys = 0; icrys < nb_cryst ; icrys++) {
G4double phi = icrys*dPhi;
G4RotationMatrix rotm = G4RotationMatrix();
rotm.rotateY(90*deg);
rotm.rotateZ(phi);
G4ThreeVector uz = G4ThreeVector(std::cos(phi), std::sin(phi),0.);
G4ThreeVector position = (ring_R1+0.5*cryst_dZ)*uz;
G4Transform3D transform = G4Transform3D(rotm,position);
new G4PVPlacement(transform, //rotation,position
logicCryst, //its logical volume
"crystal", //its name
logicRing, //its mother volume
false, //no boolean operation
icrys, //copy number
fCheckOverlaps); // checking overlaps
}
//
// full detector
//
G4Tubs* solidDetector =
new G4Tubs("Detector", ring_R1, ring_R2, 0.5*detector_dZ, 0., twopi);
G4LogicalVolume* logicDetector =
new G4LogicalVolume(solidDetector, //its solid
default_mat, //its material
"Detector"); //its name
//
// place rings within detector
//
G4double OG = -0.5*(detector_dZ + cryst_dX);
for (G4int iring = 0; iring < nb_rings ; iring++) {
OG += cryst_dX;
new G4PVPlacement(0, //no rotation
G4ThreeVector(0,0,OG), //position
logicRing, //its logical volume
"ring", //its name
logicDetector, //its mother volume
false, //no boolean operation
iring, //copy number
fCheckOverlaps); // checking overlaps
}
//
// place detector in world
//
new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
logicDetector, //its logical volume
"Detector", //its name
logicWorld, //its mother volume
false, //no boolean operation
0, //copy number
fCheckOverlaps); // checking overlaps
//
// patient
//
G4double patient_radius = 8*cm;
G4double patient_dZ = 10*cm;
G4Material* patient_mat = nist->FindOrBuildMaterial("G4_BRAIN_ICRP");
G4Tubs* solidPatient =
new G4Tubs("Patient", 0., patient_radius, 0.5*patient_dZ, 0., twopi);
G4LogicalVolume* logicPatient =
new G4LogicalVolume(solidPatient, //its solid
patient_mat, //its material
"PatientLV"); //its name
//
// place patient in world
//
new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
logicPatient, //its logical volume
"Patient", //its name
logicWorld, //its mother volume
false, //no boolean operation
0, //copy number
fCheckOverlaps); // checking overlaps
// Visualization attributes
//
logicRing->SetVisAttributes (G4VisAttributes::Invisible);
logicDetector->SetVisAttributes (G4VisAttributes::Invisible);
// Print materials
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//always return the physical World
//
return physWorld;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3DetectorConstruction::ConstructSDandField()
{
G4SDManager::GetSDMpointer()->SetVerboseLevel(1);
// declare crystal as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* cryst = new G4MultiFunctionalDetector("crystal");
G4VPrimitiveScorer* primitiv1 = new G4PSEnergyDeposit("edep");
cryst->RegisterPrimitive(primitiv1);
SetSensitiveDetector("CrystalLV",cryst);
// declare patient as a MultiFunctionalDetector scorer
//
G4MultiFunctionalDetector* patient = new G4MultiFunctionalDetector("patient");
G4VPrimitiveScorer* primitiv2 = new G4PSDoseDeposit("dose");
patient->RegisterPrimitive(primitiv2);
SetSensitiveDetector("PatientLV",patient);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3PhysicsList.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3PhysicsList.cc
/// \brief Implementation of the B3PhysicsList class
#include "B3PhysicsList.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
#include "G4EmStandardPhysics.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3PhysicsList::B3PhysicsList()
: G4VModularPhysicsList(){
SetVerboseLevel(1);
// Default physics
RegisterPhysics(new G4DecayPhysics());
// Radioactive decay
RegisterPhysics(new G4RadioactiveDecayPhysics());
// EM physics
RegisterPhysics(new G4EmStandardPhysics());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3PhysicsList::~B3PhysicsList()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3PhysicsList::SetCuts()
{
G4VUserPhysicsList::SetCuts();
}
@@ -0,0 +1,104 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3PrimaryGeneratorAction.cc 73744 2013-09-09 20:25:07Z asaim $
//
/// \file B3PrimaryGeneratorAction.cc
/// \brief Implementation of the B3PrimaryGeneratorAction class
#include "B3PrimaryGeneratorAction.hh"
#include "G4RunManager.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4ChargedGeantino.hh"
#include "G4SystemOfUnits.hh"
#include "Randomize.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3PrimaryGeneratorAction::B3PrimaryGeneratorAction()
: G4VUserPrimaryGeneratorAction(),
fParticleGun(0)
{
G4int n_particle = 1;
fParticleGun = new G4ParticleGun(n_particle);
// default particle kinematic
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* particle
= particleTable->FindParticle("chargedgeantino");
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticlePosition(G4ThreeVector(0.,0.,0.));
fParticleGun->SetParticleEnergy(1*eV);
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3PrimaryGeneratorAction::~B3PrimaryGeneratorAction()
{
delete fParticleGun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
G4ParticleDefinition* particle = fParticleGun->GetParticleDefinition();
if (particle == G4ChargedGeantino::ChargedGeantino()) {
//fluorine
G4int Z = 9, A = 18;
G4double ionCharge = 0.*eplus;
G4double excitEnergy = 0.*keV;
G4ParticleDefinition* ion
= G4IonTable::GetIonTable()->GetIon(Z,A,excitEnergy);
fParticleGun->SetParticleDefinition(ion);
fParticleGun->SetParticleCharge(ionCharge);
}
// randomized position
//
///G4double x0 = 0*cm, y0 = 0*cm, z0 = 0*cm;
///G4double dx0 = 0*cm, dy0 = 0*cm, dz0 = 0*cm;
G4double x0 = 4*cm, y0 = 4*cm, z0 = 4*cm;
G4double dx0 = 1*cm, dy0 = 1*cm, dz0 = 1*cm;
x0 += dx0*(G4UniformRand()-0.5);
y0 += dy0*(G4UniformRand()-0.5);
z0 += dz0*(G4UniformRand()-0.5);
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
//create vertex
//
fParticleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,59 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B3StackingAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B3StackingAction.cc
/// \brief Implementation of the B3StackingAction class
#include "B3StackingAction.hh"
#include "G4Track.hh"
#include "G4NeutrinoE.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3StackingAction::B3StackingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3StackingAction::~B3StackingAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4ClassificationOfNewTrack
B3StackingAction::ClassifyNewTrack(const G4Track* track)
{
//keep primary particle
if (track->GetParentID() == 0) return fUrgent;
//kill secondary neutrino
if (track->GetDefinition() == G4NeutrinoE::NeutrinoE()) return fKill;
else return fUrgent;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,40 +23,40 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3bActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B3ActionInitialization.cc
/// \brief Implementation of the B3ActionInitialization class
/// \file B3bActionInitialization.cc
/// \brief Implementation of the B3bActionInitialization class
#include "B3ActionInitialization.hh"
#include "B3bActionInitialization.hh"
#include "B3bRunAction.hh"
#include "B3PrimaryGeneratorAction.hh"
#include "B3RunAction.hh"
#include "B3StackingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3ActionInitialization::B3ActionInitialization()
B3bActionInitialization::B3bActionInitialization()
: G4VUserActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3ActionInitialization::~B3ActionInitialization()
B3bActionInitialization::~B3bActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3ActionInitialization::BuildForMaster() const
void B3bActionInitialization::BuildForMaster() const
{
SetUserAction(new B3RunAction);
SetUserAction(new B3bRunAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3ActionInitialization::Build() const
void B3bActionInitialization::Build() const
{
SetUserAction(new B3bRunAction);
SetUserAction(new B3PrimaryGeneratorAction);
SetUserAction(new B3RunAction);
SetUserAction(new B3StackingAction);
}
@@ -23,12 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3Run.cc 68058 2013-03-13 14:47:43Z gcosmo $
// $Id: B3bRun.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B3Run.cc
/// \brief Implementation of the B3Run class
/// \file B3bRun.cc
/// \brief Implementation of the B3bRun class
#include "B3Run.hh"
#include "B3bRun.hh"
#include "G4RunManager.hh"
#include "G4Event.hh"
@@ -40,7 +40,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3Run::B3Run()
B3bRun::B3bRun()
: G4Run(),
fCollID_cryst(-1),
fCollID_patient(-1),
@@ -49,15 +49,14 @@ B3Run::B3Run()
fSumDose(0.)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3Run::~B3Run()
B3bRun::~B3bRun()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3Run::RecordEvent(const G4Event* event)
void B3bRun::RecordEvent(const G4Event* event)
{
if ( fCollID_cryst < 0 ) {
fCollID_cryst
@@ -116,9 +115,9 @@ void B3Run::RecordEvent(const G4Event* event)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3Run::Merge(const G4Run* aRun)
void B3bRun::Merge(const G4Run* aRun)
{
const B3Run* localRun = static_cast<const B3Run*>(aRun);
const B3bRun* localRun = static_cast<const B3bRun*>(aRun);
fGoodEvents += localRun->fGoodEvents;
fSumDose += localRun->fSumDose;
@@ -23,14 +23,14 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: B3RunAction.cc 87359 2014-12-01 16:04:27Z gcosmo $
// $Id: B3bRunAction.cc 94031 2015-11-05 11:54:38Z ihrivnac $
//
/// \file B3RunAction.cc
/// \brief Implementation of the B3RunAction class
/// \file B3bRunAction.cc
/// \brief Implementation of the B3bRunAction class
#include "B3RunAction.hh"
#include "B3bRunAction.hh"
#include "B3bRun.hh"
#include "B3PrimaryGeneratorAction.hh"
#include "B3Run.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
@@ -39,7 +39,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3RunAction::B3RunAction()
B3bRunAction::B3bRunAction()
: G4UserRunAction()
{
//add new units for dose
@@ -57,17 +57,17 @@ B3RunAction::B3RunAction()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B3RunAction::~B3RunAction()
B3bRunAction::~B3bRunAction()
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Run* B3RunAction::GenerateRun()
{ return new B3Run; }
G4Run* B3bRunAction::GenerateRun()
{ return new B3bRun; }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3RunAction::BeginOfRunAction(const G4Run* run)
void B3bRunAction::BeginOfRunAction(const G4Run* run)
{
G4cout << "### Run " << run->GetRunID() << " start." << G4endl;
@@ -77,7 +77,7 @@ void B3RunAction::BeginOfRunAction(const G4Run* run)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B3RunAction::EndOfRunAction(const G4Run* run)
void B3bRunAction::EndOfRunAction(const G4Run* run)
{
G4int nofEvents = run->GetNumberOfEvent();
if (nofEvents == 0) return;
@@ -98,7 +98,7 @@ void B3RunAction::EndOfRunAction(const G4Run* run)
//results
//
const B3Run* b3Run = static_cast<const B3Run*>(run);
const B3bRun* b3Run = static_cast<const B3bRun*>(run);
G4int nbGoodEvents = b3Run->GetNbGoodEvents();
G4double sumDose = b3Run->GetSumDose();
+83
View File
@@ -0,0 +1,83 @@
# Macro file for the visualization setting in the initialization phase
# of the B3 example when running in interactive mode
#
# Use these open statements to open selected visualization
#
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
#
# Use this open statement to create an OpenInventor view:
#/vis/open OIX
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
#/vis/open DAWNFILE
#
# Use this open statement to create a .heprep file suitable for
# viewing in HepRApp:
#/vis/open HepRepFile
#
# Use this open statement to create a .wrl file suitable for
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
/vis/verbose errors
#
# Draw geometry:
/vis/drawVolume
#
# Specify view angle:
##/vis/viewer/set/viewpointThetaPhi 90. 180.
#
# Specify zoom value:
/vis/viewer/zoom 1.4
#
# Specify style (surface, wireframe, auxiliary edges,...)
#/vis/viewer/set/style wireframe
#/vis/viewer/set/auxiliaryEdge true
#/vis/viewer/set/lineSegmentsPerCircle 100
#
# Draw coordinate axes:
#/vis/scene/add/axes 0 0 0 1 m
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 1
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
#
# Draw hits at end of event:
#/vis/scene/add/hits
#
# To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#
# To invert the above, drawing all particles except gammas,
# keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
#
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
/vis/modeling/trajectories/create/drawByParticleID
/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
#/vis/modeling/trajectories/drawByParticleID-0/default/setStepPtsSize 1
# To select or override default colours (note: e+ is blue by default):
#/vis/modeling/trajectories/list
#/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
#
# To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/verbose warnings
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
+7 -69
View File
@@ -1,73 +1,11 @@
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
# $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 ----------
#----------------------------------------------------------------------------
# Setup the project
#
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(B3)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
add_subdirectory(B3a)
add_subdirectory(B3b)
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
include(${Geant4_USE_FILE})
include_directories(${PROJECT_SOURCE_DIR}/include)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
# NB: headers are included so they will show up in IDEs
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(exampleB3 exampleB3.cc ${sources} ${headers})
target_link_libraries(exampleB3 ${Geant4_LIBRARIES})
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build B3. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(EXAMPLEB3_SCRIPTS
debug.mac
exampleB3.in
exampleB3.out
init_vis.mac
run1.mac
run2.mac
vis.mac
)
foreach(_script ${EXAMPLEB3_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# For internal Geant4 use - but has no effect if you build this
# example standalone
#
add_custom_target(B3 DEPENDS exampleB3)
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS exampleB3 DESTINATION bin )
add_custom_target(B3 DEPENDS exampleB3a exampleB3b)
+9 -1
View File
@@ -1,4 +1,4 @@
$Id: History 87359 2014-12-01 16:04:27Z gcosmo $
$Id: History 94093 2015-11-05 15:16:06Z gcosmo $
--------------------------------------------------
=========================================================
@@ -15,6 +15,14 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
05/11/15 I. Hrivnacova (exampleB3-V10-01-01)
- Splitting example in two variants of merging data:
-B3a (new) with the code based on G4Parameter
-B3b (as previous B3) with the code based on G4Run
04/05/15 I. Hrivnacova (exampleB3-V10-01-00)
- Coding guidelines: removed empty lines
29/11/14 I. Hrivnacova
- Use G4endl instead of \n in G4cout;
this makes each new line in the output on threads preceded with
+35 -15
View File
@@ -1,4 +1,4 @@
$Id: README 78001 2013-12-02 08:24:53Z gcosmo $
$Id: README 94093 2015-11-05 15:16:06Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -50,18 +50,18 @@ $Id: README 78001 2013-12-02 08:24:53Z gcosmo $
/InstallationGuide/html/ch03s03.html
3- ACTION INITALIZATION
A newly introduced class, B1ActionInitialization, instantiates and registers
to Geant4 kernel all user action classes.
B3[a,b]ActionInitialization class 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()
B3[a,b]ActionInitialization::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()
B3[a,b]ActionInitialization::BuildForMaster()
which is invoked only in multi-threading mode.
4- PRIMARY GENERATOR
@@ -79,16 +79,36 @@ $Id: README 78001 2013-12-02 08:24:53Z gcosmo $
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
Scorers are defined in B3DetectorConstruction::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
Two variants of accumulation event statistics in a run are demonstrated
in this example:
B3a:
At the end of event, the values acummulated in B3aEventAction are passed
in B3aRunAction and summed over the whole run (see B3aEventAction::EndOfevent()).
In multi-threading mode the data accumulated in G4Parameter objects per
workers is merged to the master in B3aRunAction::EndOfRunAction() and the final
result is printed on the screen.
G4Parameter<> type instead of G4double and G4int types is used for the B3aRunAction
data members in order to facilitate merging of the values accumulated on workers
to the master. Currently the parameters have to be registered to G4ParametersManager
and G4ParametersManager::Merge() has to be called from the users code. This is planned
to be further simplified with a closer integration of G4Parameter classes in
the Geant4 kernel next year.
B3b:
B3bRun::RecordEvent(), called at end of event, collects informations
event per event from the hits collections, and accumulates statistic for
RunAction::EndOfRunAction().
B3bRunAction::EndOfRunAction().
In multi-threading mode the statistics accumulated per workers is merged
to the master in Run::Merge().
to the master in B3bRun::Merge().
6- STACKING ACTION
@@ -147,8 +167,8 @@ $Id: README 78001 2013-12-02 08:24:53Z gcosmo $
C- HOW TO RUN
- Execute exampleB3 in the 'interactive mode' with visualization
% exampleB3
- Execute exampleB3a in the 'interactive mode' with visualization
% exampleB3a
and type in the commands from run1.mac line by line:
Idle> /control/verbose 2
Idle> /tracking/verbose 2
@@ -160,9 +180,9 @@ C- HOW TO RUN
....
Idle> exit
- Execute exampleB3 in the 'batch' mode from macro files
- Execute exampleB3a in the 'batch' mode from macro files
(without visualization)
% exampleB3 run2.mac
% exampleB3 exampleB3.in > exampleB3.out
% exampleB3a run2.mac
% exampleB3a exampleB3.in > exampleB3.out
+13
View File
@@ -0,0 +1,13 @@
# $Id: run1.mac,v 1.2 2000-11-21 10:59:42 maire Exp $
#
# Macro file for "exampleB3.cc"
#
# can be run in batch, without graphic
# or interactively: Idle> /control/execute debug.mac
#
/run/initialize
#
/tracking/verbose 1
#
/gun/particle geantino
/run/beamOn 1
+9
View File
@@ -0,0 +1,9 @@
# $Id: run2.mac,v 1.6 2002-12-16 16:37:25 maire Exp $
#
# Macro file for example B3 test
#
/run/initialize
#
/control/verbose 2
#
/run/beamOn 10000
+17
View File
@@ -0,0 +1,17 @@
# Macro file for the initialization of example B3
# in interactive session
#
# Set some default verbose
#
/control/verbose 2
/control/saveHistory
/run/verbose 2
#
# Change the default number of threads (in multi-threaded mode)
#/run/numberOfThreads 4
#
# Initialize kernel
/run/initialize
#
# Visualization setting
/control/execute vis.mac
+17
View File
@@ -0,0 +1,17 @@
# $Id: run1.mac 94031 2015-11-05 11:54:38Z ihrivnac $
#
# Macro file of "exampleB3.cc"
#
# Change the default number of workers (in multi-threading mode)
#/run/numberOfWorkers 4
#
# Initialize kernel
/run/initialize
#
/control/verbose 2
/tracking/verbose 2
#
/run/beamOn 1
#
/tracking/verbose 0
/run/beamOn 20
+19
View File
@@ -0,0 +1,19 @@
# $Id: run2.mac 94031 2015-11-05 11:54:38Z ihrivnac $
#
# Macro file of "exampleB3.cc"
# To be run preferably in batch, without graphics:
# % exampleB3 run3.mac
#
#/run/numberOfWorkers 4
/run/initialize
#
/control/verbose 2
#
/run/beamOn 40000
#
# change beta source
#
/gun/particle ion
/gun/ion 6 11
#
/run/beamOn 40000
+83
View File
@@ -0,0 +1,83 @@
# Macro file for the visualization setting in the initialization phase
# of the B3 example when running in interactive mode
#
# Use these open statements to open selected visualization
#
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
#
# Use this open statement to create an OpenInventor view:
#/vis/open OIX
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
#/vis/open DAWNFILE
#
# Use this open statement to create a .heprep file suitable for
# viewing in HepRApp:
#/vis/open HepRepFile
#
# Use this open statement to create a .wrl file suitable for
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
/vis/verbose errors
#
# Draw geometry:
/vis/drawVolume
#
# Specify view angle:
##/vis/viewer/set/viewpointThetaPhi 90. 180.
#
# Specify zoom value:
/vis/viewer/zoom 1.4
#
# Specify style (surface, wireframe, auxiliary edges,...)
#/vis/viewer/set/style wireframe
#/vis/viewer/set/auxiliaryEdge true
#/vis/viewer/set/lineSegmentsPerCircle 100
#
# Draw coordinate axes:
#/vis/scene/add/axes 0 0 0 1 m
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 1
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
#
# Draw hits at end of event:
#/vis/scene/add/hits
#
# To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#
# To invert the above, drawing all particles except gammas,
# keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
#
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
/vis/modeling/trajectories/create/drawByParticleID
/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
#/vis/modeling/trajectories/drawByParticleID-0/default/setStepPtsSize 1
# To select or override default colours (note: e+ is blue by default):
#/vis/modeling/trajectories/list
#/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
#
# To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/verbose warnings
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush