Title: Geant4 Tutorial European Medical Physics School, Archamps, France
1Geant4 TutorialEuropean Medical Physics School,
Archamps, France
2Overview of the contents
- Software process
- Geant4 advanced example brachytherapy
- Integration of the brachytherapy application
- in a distributed computing environment
- Run the brachytherapy example
3Software Process
- How to develop a rigorous and reliable
- software application
Documentation http//www.ge.infn.it/geant4
link training, software engineering
documentation
4Software process
For example, a process model is the Unified
Software Development Process (USDP)
Iterative-incremental method
Concepts
- User Requirements
- Define the software functionality
- Design
- Project of the software structure
- Implementation
- Test
-
5Capture User Requirements
Define the scope of the software system to be
built (what it should do)
6How to collect User Requirements
Example of User Requirement UR1. The user shall
be able to define electromagnetic processes for
gamma Need Essential Priority High Source ESA
7Collect User Requirements in proper domains
User Requirements
8Design
Define the structure of the software by a
software engineering point of view
9Design
OOAD
Primary particles
Physics
Run
Event
Analysis
Detector
Visualisation
10Software development
UR1
Test phase is crucial and extremely important
11Test
- Important and crucial issue
- Always in respect to experimental data
- Comparisons in respect to other MC toolkit are
just - curiosity
- Levels of tests
- Microscopic test
- Test on components of the application (i.e.
Physics models adopted) - Macroscopic test
- Test on the experimental set-up (physics,
geometry, etc. together) -
12Iterative, incremental method
- Gain feedback on the developed software
- Examples - Is the UR satisfied?
- - Do we need new UR?
- - How can we improve the
software ?
..
13Documentation
- User Requirement document
- Design
- Traceability documents
- How to use the software application
- Comments in the code
- Software process and documentation are important
for - Develop a rigorous and reliable software
- Develop clear and clean software
- Limit the possibility of introducing bugs
- Help other people to understand the software
application
14Geant4 brachytherapy advanced example
F. Foppiano3, S.Guatelli2,J.Moscicki1, M.G.
Pia2 CERN1 ,INFN Genova2, National Institute
for Cancer Research, IST Genova3
www.ge.infn.it/geant4, advanced examples
15Brachytherapy
Endocavitary brachytherapy (lungs, uterus)
- Brachytherapy is a medical therapy used for
cancer treatment
Radioactive sources are used to deposit
therapeutic doses near tumors, while preserving
surrounding healthy tissues
- Treatment planning how to set (where?, how
long?) - radioactive sources in treatments target area
Superficial brachytherapy(skin)
- Software is used to define patients treatment
planning - It calculates the dose in the patient
Interstitial brachytherapy (prostate)
16Commercial software for brachytherapy
- Various commercial software products for
treatment planning - No commercial software available for superficial
brachytherapy with Leipzig applicators
Precision
- Based on approximated analytical methods,
because of speed constraints - Uniform material water
Cost
- Each software is specific to one technique
- Treatment planning software is expensive (
hundreds K /euro)
17dosimetric system
precise
Develop a
general purpose
Patients anatomy modeling
with the capability of
interface to CT images
with a
user-friendly interface
adequate speed for clinical usage
performing at
18Requirements
Calculation of 3-D dose distribution in the
treatment area Determination of isodose curves
Based on Monte Carlo methods Accurate description
of physics interactions
Precision
Accurate model of the real experimental set-up
Realistic description of geometry and
tissue Possibility to interface to CT images
Simple user interface Graphic visualisation
Elaboration of dose distributions and isodoses
Easy configuration for hospital usage
Parallelisation Access to distributed computing
resources
Speed
Transparent Open to extension and new
functionality Publicly accessible
Other requirements
19User Requirements
The application provides the simulation of energy
deposit of brachytherapic sources in a phantom
1.The phantom is a box 2.The user shall be
able to change the absorber material of
the phantom 3.The user shall be able to model
patient anatomy 4.The dose should be
collected in 1. mm wide voxels
1. Particles e,e-, gamma 2. Low Energy
electromagnetic processes
1. The user shall be able to calculate the total
absorbed energy in the phantom 3D distribution
in the volume 2D distribution in the plain
containing the source
- 1.The user shall be able to visualise the
geometry involved and the trajectories of the
particles
20Precision
Based on Monte Carlo methods
Experimental validation of physics involved
Microscopic validation of the physics
models Comparison with experimental data
specific to the brachytherapic practice
21Low Energy Package
Photon transmission, 1mm Pb
shell effects
- Validity range 250 eV 100 GeV
- 250 eV is a suggested lower limit
- data libraries down to 10 eV
- 1 lt Z lt 100
- Exploit evaluated data libraries (from LLNL)
- EADL (Evaluated Atomic Data Library)
- EEDL (Evaluated Electron Data Library)
- EPDL97 (Evaluated Photon Data Library)
- for the calculation of total cross section and
generation - of the final state
- Compton scattering
- Rayleigh scattering
- Photoelectric effect
- Pair production
- Bremsstrahlung
- Ionisation
- atomic relaxation
22Microscopic validation
Photons and electron physics processes
Dosimetric validation
Comparison to protocol data, original
experimental data
23General purpose system
For any brachytherapy technique
Object Oriented technology Software system
designed in terms of Abstract Interfaces
For any source type
Abstract Factory design pattern Source spectrum
and geometry transparently interchangeable
24Flexibility of modeling
- Configuration of
- any brachytherapy technique
- any source type
- through an Abstract Factory
- to define geometry, primary spectrum
Abstract Factory
- CT DICOM interface
- through Geant4 parameterised volumes
- parameterisation function material
- Phantom
- various materials
- water, soft tissue, bone, muscle etc.
General purpose software system for brachytherapy
No commercial general software exists!
25Realistic model of the experimental set-up
Radioactive source
Spectrum (192Ir, 125I) Geometry
Patient
Phantom with realistic material model Possibility
to interface the system to CT images
26Model of a I-125 brachytherapic sourcegeometry
and materials
Model the source geometry
Precise geometry and material model of any type
of source
Titanium capsule tips Titanium tube
Iodium core
Golden marker
Air
Titanium tube Outer radius0.40mm Half
length1.84mm
Iodium core Inner radius 0 Outer radius
0.30mm Half length1.75mm
Golden marker Inner radius 0 Outer radius
0.085 mm Half length1.75mm
Air Outer radius0.35mm half length1.84mm
Ir-192 source applicator for superficial
brachytherapy
Titanium capsule tip Semisphere radius0.40mm
Ir-192
27Effects of source anisotropy
Plato-BPS treatment planning algorithm makes some
crude approximation (? dependence, no radial
dependence)
Rely on simulation for better accuracy than
conventional treatment planning software
Longitudinal axis of the source Difficult to make
direct measurements
Transverse axis of the source Comparison with
experimental data
28Modeling the patient
Modeling a phantom
Modeling geometry and materials from CT data
of any material (water, tissue, bone, muscle
etc.) thanks to the flexibility of Geant4
materials package
29 DICOM
Digital Imaging and COmunication in Medicine
Computerized Tomography allows to reproduce the
real 3D geometry of the patient
3D patient anatomy
Acquisition of CT image
file
Pixels grey tone proportional to material density
DICOM is the universal standard for sharing
resources between heterogeneous and multi-vendor
equipment
30Geant4-DICOM interface
- Developed by L. Archambault, L. Beaulieu, V.-H.
Tremblay (Univ. Laval and l'Hôtel-Dieu, Québec) - Donated to Geant4 for the common profit of the
scientific community - under the condition that further improvements and
developments are made publicly available to the
community - Released with Geant4 5.2, June 2003 in an
extended example - with some software improvement by S. Guatelli and
M.G. Pia - First implementation, further improvements
foreseen
31User-friendly interface to facilitate the usage
in hospitals
AIDA Anaphe
Dosimetric analysis
Store simulation information in histograms and
ntuples Graphic visualisation of dose
distributions
Web interface
Application configuration Job submission
32Dosimetry
Simulation of energy deposit through Geant4 Low
Energy Electromagnetic package to obtain accurate
dose distribution
Production threshold 100 mm
AIDA Anaphe
for analysis
33Data Analysis
AIDA
Histograms Ntuples Data vectors Fit Visualisation
of results
Abstract Interfaces for Data Analysis
Energy deposit (2D histogram)
Primary particles Energy Spectrum (1D histogram)
http//aida.freehep.org
34Dosimetry
Interstitial brachytherapy
Bebig Isoseed I-125 source
Superficial brachytherapy
MicroSelectron-HDR source
Endocavitary Brachytherapy
Leipzig applicator
35Application configuration
Fully configurable from the web
- Run modes
- demo
- parallel on a cluster
- (under test)
- on the GRID
- (under development)
Type of source
Phantom configuration
events
36Speed adequate for clinic use
Parallelisation
Transparent configuration in sequential or
parallel mode
Access to distributed computing resources
Transparent access to the GRID through an
intermediate software layer
37Performance
Endocavitary brachytherapy
1M events 61 minutes
Superficial brachytherapy
1M events 65 minutes
Interstitial brachytherapy
1M events 67 minutes
on an average PIII machine, as an average
hospital may own
Monte Carlo simulation is not practically
conceivable for clinical application, even if
more precise
38Performance parallel mode
preliminary further optimisation in progress
1M events 4 minutes 34
Endocavitary brachytherapy
1M events 4 minutes 25
Superficial brachytherapy
1M events 4 minutes 36
Interstitial brachytherapy
Diane has been developed by J. Moscicki E-mail
jakub.moscicki_at_cern.ch http//www.cern.ch/diane
on up to 50 workers, LSF at CERN, PIII machine,
500-1000 MHz
Performance adequate for clinical application,
but
it is not realistic to expect any hospital to own
and maintain a PC farm
39Running on the GRID
- Via DIANE
- Same application code as running on a sequential
machine or on a dedicated cluster - completely transparent to the user
Distributed Geant4 application
A hospital is not required to own and maintain
extensive computing resources to exploit the
scientific advantages of Monte Carlo simulation
for radiotherapy
Any hospital even small ones, or in less
wealthy countries, that cannot afford expensive
commercial software systems may have access to
advanced software technologies and tools for
radiotherapy
40Traceback from a run on CrossGrid testbed
Resource broker running in Portugal
matchmaking CrossGrid computing elements
41Summary
- A precise dosimetric system, based on Geant4
- Accurate physics, geometry and material modeling,
CT interface - Full dosimetric analysis
- AIDA Anaphe
- Simple interface
- configuration from WWW
- Fast performance
- parallel processing
- Access to distributed computing resources
- GRID
Beware RD prototype!
42General dosimetric system for radiotherapy
- The system was developed for endocavitary
brachytherapy - It has been extended to all the brachytherapic
techniques - It is possible to generalise the system to other
radiotherapic techniques
Thanks to Object Oriented technique
Plug-in system under development
43Run Geant4 brachytherapy advanced example
44Structure of the brachytherapy example
- Brachytherapy example
- header files in include/.hh, source code in src/
.cc - main in Brachy.cc
- macro VisualisationMacro.mac
- Classes
- BrachyAnalysisManager
- BrachyDetectorConstruction
- BrachyDetectorMessenger
- BrachyEventAction
- BrachyMaterial
- BrachyPhantomHit
- BrachyPhantomROGeometry
- BrachyPhantomSD
- BrachyPrimaryGeneratorAction
- BrachyPhysicsList
- BrachyRunAction
- BrachyEventAction
- BrachyVisManager
45How to run
Define necessary environment variables source
geant4/env.csh How to compile and
link gmake How to run G4WORKDIR/bin/Linux-g/Br
achy
46Details on the brachytherapy advanced example
implementation
47Mandatory user classes
Primary events
Physics
Detector
48Abstract Factories
- Configuration of
- any brachytherapy technique
- any source type
- through an Abstract Factory
- to define geometry, primary spectrum
49Model of a I-125 brachytherapic sourcegeometry
and materials
BrachyDetectorConstruction
Iodium core
Air
Golden marker
Titanium capsule tips Titanium tube
Iodium core Inner radius 0 Outer radius
0.30mm Half length1.75mm
Titanium tube Outer radius0.40mm Half
length1.84mm
Air Outer radius0.35mm half length1.84mm
Golden marker Inner radius 0 Outer radius
0.085 mm Half length1.75mm
Titanium capsule tip Semisphere radius0.40mm
50BrachyDetectorConstructionBrachyDetectorConstruc
tion
BrachyDetectorConstruction
BrachyDetectorConstructionBrachyDetectorConstr
uction
G4VPhysicalVolume BrachyDetectorConstructionCon
struct() pMaterial-gt DefineMaterials()
ConstructSource() ConstructPhantom()
ConstructSensitiveDetector() return
WorldPhys
51ConstructSource()
// source Bebig Isoseed I-125 ...
. construct iodium core and golden marker
Air
the mother volume is an air tube
// Iodium core iodiumCore new
G4Tubs("ICore",0.085mm,0.35mm,1.75mm,0.deg,360
.deg) iodiumCoreLog new G4LogicalVolume(iodi
umCore,iodium,"iodiumCoreLog") iodiumCorePhys
new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
"iodiumCorePhys", iodiumCoreLog,
defaultTubPhys, false, 0) // Golden marker
marker new G4Tubs("GoldenMarker",0.mm,0.085mm,
1.75mm,0.deg,360.deg) markerLog new
G4LogicalVolume(marker,gold,"MarkerLog")
markerPhys new G4PVPlacement(0,
G4ThreeVector(0.,0.,0.), "MarkerPhys",
markerLog,
defaultTubPhys, false, 0)
52BrachyPhysicsList
void BrachyPhysicsListConstructProcess()
AddTransportation() ConstructEM()
BrachyPhysicsListBrachyPhysicsList()
G4VUserPhysicsList() defaultCutValue
0.1mm .. BrachyPhysicsListBrachyPhysicsList
()
void BrachyPhysicsListConstructParticle()
ConstructBosons() ConstructLeptons()
void BrachyPhysicsListConstructBosons()
G4GammaGammaDefinition() void
BrachyPhysicsListConstructLeptons()
G4ElectronElectronDefinition()
G4PositronPositronDefinition()
53BrachyPhysicsList Set the EM processes
void BrachyPhysicsListConstructEM()
theParticleIterator-gtreset() while(
(theParticleIterator)() )
G4ParticleDefinition particle
theParticleIterator-gtvalue()
G4ProcessManager pmanager particle-gtGetProcessM
anager() G4String particleName
particle-gtGetParticleName() if (particleName
"gamma") lowePhot new
G4LowEnergyPhotoElectric("LowEnPhotoElec")
pmanager-gtAddDiscreteProcess(new
G4LowEnergyRayleigh) pmanager-gtAddDiscreteP
rocess(lowePhot) pmanager-gtAddDiscreteProce
ss(new G4LowEnergyCompton)
pmanager-gtAddDiscreteProcess(new
G4LowEnergyGammaConversion) else if
(particleName "e-") loweIon new
G4LowEnergyIonisation("LowEnergyIoni")
loweBrem new G4LowEnergyBremsstrahlung("LowEnBre
m") pmanager-gtAddProcess(new
G4MultipleScattering, -1, 1,1)
pmanager-gtAddProcess(loweIon, -1, 2,2)
pmanager-gtAddProcess(loweBrem, -1,-1,3)
else if (particleName "e")
Set EM processes for e-, e, gamma
54BrachyPrimaryGeneratorAction
- I-125 delivers gamma
- Gamma Energy Spectrum
- Random direction
- Random position inside the iodium core
Energy(keV) Probability
27.4 0.783913
31.4 0.170416
35.5 0.045671
void BrachyPrimaryGeneratorActionGeneratePrimari
es(G4Event anEvent)
.. particleGun-gtSetParticlePosition(position)
particleGun -gt SetParticleDirection(direction) pa
rticleGun -gt SetParticleEnergy(energy) particleGu
n-gtGeneratePrimaryVertex(anEvent)
55Energy deposit
How to retrieve the energy deposit in the phantom
- Concepts
- Sensitive Detector
- Readout Geometry
- Hits
56Set Sensitive Detector and RO Geometry
void BrachyDetectorConstructionConstructSensiti
veDetector() G4SDManager pSDManager
G4SDManagerGetSDMpointer() if(!phantomSD)
phantomSD new BrachyPhantomSD(sensitiveDetecto
rName,numberOfVoxelsAlongX,
numberOfVoxelsAlongZ) G4String
ROGeometryName "PhantomROGeometry"
phantomROGeometry newBrachyPhantomROGeometry(ROG
eometryName, phantomDimensionX,phantomDimens
ionZ,numberOfVoxelsAlongX,numberOfVoxelsAlongZ)
phantomROGeometry-gtBuildROGeometry()
phantomSD-gtSetROgeometry(phantomROGeometry)
pSDManager-gtAddNewDetector(phantomSD)
PhantomLog-gtSetSensitiveDetector(phantomSD)
57Readout Geometry
BrachyPhantomROGeometryBrachyPhantomROGeometry(
) BrachyROGeometryBrachyROGeometry()
G4VPhysicalVolume BrachyPhantomROGeometry
Build() // example X division
ROPhantomXDivision new G4Box( .)
ROPhantomXDivisionLog newG4LogicalVolume(.)
ROPhantomXDivisionPhys new G4PVReplica(.) ..
x
58Sensitive Detector
G4bool BrachyPhantomSDProcessHits (G4Step
aStep, G4TouchableHistory ROhist) . G4double
energyDeposit aStep-gtGetTotalEnergyDeposit() .
G4VPhysicalVolume physVol ROhist-gtGetVolume()
// Read Voxel indexes i is the x index, k is
the z index G4int k ROhist-gtGetReplicaNumber(1
) G4int i ROhist-gtGetReplicaNumber(2)
G4int j ROhist-gtGetReplicaNumber() ..
BrachyPhantomHit PhantomHit new
BrachyPhantomHit(
physVol -gtGetLogicalVolume(),
i,j,k) PhantomHit-gtSetEdep(energyDeposit)
PhantomHit-gtSetPos(physVol-gtGetTranslation(
))
Store the energy deposit in one hit
59Hits
- Hit is a user-defined class derived from G4VHit
- You can store various types information by
implementing your own concrete Hit class - position and time of the step
- momentum and energy of the track
- energy deposit of the step
- geometrical information
- etc.
- Hit objects of a concrete hit class must be
stored in a dedicated collection, which is
instantiated from G4THitsCollection template
class
60BrachyPhantomHit (header file)
class BrachyPhantomHit public G4VHit public
BrachyPhantomHit(G4LogicalVolume ,G4int ,G4int
,G4int ) BrachyPhantomHit() .. inline void
SetCellID(G4int XID,G4int YID,G4int ZID) // Set
Hit position xHitPosition XID zHitPosition
ZID yHitPosition YID inline void
SetEdep(G4double edep) energyDeposit edep
//Set hit energy deposit inline void
SetPos(G4ThreeVector xyz) hitPosition xyz //
Set hit position inline G4int GetXID() return
xHitPosition //Get hit x coordinate inline
G4int GetZID() return zHitPosition // Get hit
z coordinate inline G4int GetYID() return
yHitPosition // Get hit y coordinate
inline G4double GetEdep() return
energyDeposit // Get energy deposit .
61BrachyEventAction
void BrachyEventActionEndOfEventAction(const
G4Event evt) . G4HCofThisEvent HCE
evt-gtGetHCofThisEvent() BrachyPhantomHitsCollec
tion CHC NULL if(HCE) CHC
(BrachyPhantomHitsCollection)(HCE-gtGetHC(hitsColl
ectionID)) if(CHC) G4int hitCount
CHC-gtentries() for (G4int h 0 h lt
hitCount h) G4int
i((CHC)h)-gtGetZID() G4int
k((CHC)h)-gtGetXID() G4int
j((CHC)h)-gtGetYID() G4double
EnergyDep((CHC)h-gtGetEdep())
Retrieve energy deposit in the phantom
62Initialisation
Describe the geometrical set-up
Activate electromagnetic/hadronic processes
appropriate to the energy range of the experiment
63Beam On
Generate primary events
64Event processing
Record the energy deposit and the position
associated
65- How to produce
- 1D histograms
- 2D histograms
- Ntuple
- Analysis Tool
- AIDA 3.0
- Anaphe 5.0.5
66BrachyAnalysisManager
BrachyAnalysisManagerBrachyAnalysisManager()
. //build up the factories aFact
AIDA_createAnalysisFactory() AIDAITreeFactory
treeFact aFact-gtcreateTreeFactory() theTree
treeFact-gtcreate(fileName,"hbook",false, true)
. histFact aFact-gtcreateHistogramFactory(
theTree ) tupFact aFact-gtcreateTupleFactory
( theTree ) void BrachyAnalysisManagerfi
nish() theTree-gtcommit() // write all
histograms to file ... theTree-gtclose() // close
(will again commit) ...
Create the .hbk file Close the .hbk file
67BrachyAnalysisManager
- void BrachyAnalysisManagerbook()
-
- //creating a 2D histogram ...
- h1 histFact-gtcreateHistogram2D("10","Energy,
pos", - 300
,-150.,150., //bins'number,xmin,xmax -
300,-150.,150. )//bins'number,ymin,ymax -
- //creating a 1D histogram ...
- h2 histFact-gtcreateHistogram1D("20","Initial
Energy", 500,0.,50.) - //creating a ntuple ...
- if (tupFact) ntuple tupFact-gtcreate("1","1",col
umnNames, options) - .
68BrachyAnalysisManager
How to fill histograms.
void BrachyAnalysisManagerFillHistogramWithEnerg
y (G4double x, G4double z, G4float
energyDeposit) //2DHistogram energy deposit
in a voxel which center is fixed in position
(x,z) h1-gtfill(x,z,energyDeposit) void
BrachyAnalysisManagerPrimaryParticleEnergySpectr
um (G4double primaryParticleEnergy)
//1DHisotgram energy spectrum of primary
particles h2-gtfill(primaryParticleEnergy)
69BrachyAnalysisManager
How to fill Ntuples.
void BrachyAnalysisManagerFillNtupleWithEnergy(G
4double xx,G4double yy,
G4double zz, G4float en) .. G4int indexX
ntuple-gtfindColumn( "x" ) G4int indexY
ntuple-gtfindColumn( "y" ) G4int indexZ
ntuple-gtfindColumn( "z" ) G4int indexEnergy
ntuple-gtfindColumn( "energy" )
ntuple-gtfill(indexEnergy, en)
ntuple-gtfill(indexX, xx) ntuple-gtfill(indexY,
yy) ntuple-gtfill(indexZ, zz) ntuple
-gtaddRow()
70Analysis management
void BrachyRunActionBeginOfRunAction(const
G4Run) . BrachyAnalysisManager analysis
BrachyAnalysisManagergetInstance()
analysis-gtbook() . void BrachyRunActionEndOf
RunAction(const G4Run aRun) ..
BrachyAnalysisManager analysis
BrachyAnalysisManagergetInstance() ..
analysis-gtfinish() .
Booking histograms and ntuple Closing
the hbook file
In the BrachyRunAction
71Energy deposit
void BrachyEventActionEndOfEventAction(const
G4Event evt) . // here the energy deposit
information is retrieved //Store information
about energy deposit in a 2DHistogram and in a
ntuple ... BrachyAnalysisManager analysis
BrachyAnalysisManagergetInstance
analysis-gtFillHistogramWithEnergy(x,z,EnergyDep/Me
V) analysis-gtFillNtupleWithEnergy(x,y,z,Energy
Dep/MeV)
In the BrachyEventAction
72Gamma energy spectrum
BrachyPrimaryGeneratorAction GeneratePrimaries(G
4Event anEvent) //Store the initial energy
in a 1D histogram analysis-gt PrimaryParticleEner
gySpectrum(primaryParticleEnergy/keV) //
generate primary particle
In the BrachyPrimaryGeneratorAction
73Analysis dynamic flow
74Some Results
Primary particles Energy Spectrum (1D histogram)
Energy deposit (2D histogram)
75Control, monitor the simulation
76BrachyDetectorMessenger
BrachyDetectorMessengerBrachyDetectorMessenger(
BrachyDetectorConstruction Det) detector(Det)
detectorDir new G4UIdirectory("/phantom/")
detectorDir-gtSetGuidance(" phantom control.")
phantomMaterialCmd new G4UIcmdWithAString("/phan
tom/selectMaterial",this) phantomMaterialCmd-gtS
etGuidance("Select Material of the detector.")
phantomMaterialCmd-gtSetParameterName("choice",fals
e) phantomMaterialCmd-gtAvailableForStates(G4Sta
te_Idle)
void BrachyDetectorMessengerSetNewValue(G4UIcomm
and command,G4String newValue) if( command
phantomMaterialCmd ) detector-gtSetPhantomM
aterial(newValue)
77(G)UI
How to change the phantom absorber material
- Run G4WORKDIR/bin/Linux-g/Brachy
- (G)UI session interactive session
- Type /phantom/selectMaterial Lead
The phantom absorber material now is lead
78Macro
- A macro is an ASCII file containing UI commands
- All commands must be given with their full-path
directories
/control/verbose 1 /run/verbose 1 /event /verbose
1 /phantom/selectMaterial Lead run 10
events /run/beamOn 10
- A macro can be executed by
- /control/execute
- /control/loop
- /control/foreach
- in UI session
A macro can be executed also typing
G4WORKDIR/bin/Linux-g/Brachy macro.mac
79Visualisation
Macro file for the visualisation create
empty scene /vis/scene/create /vis/open
OGLIX /vis/open DAWN /vis/viewer/flush for
drawing the tracks /tracking/storeTrajectory
1 /vis/scene/endOfEventAction accumulate /vis/view
er/update /run/initialize /run/beamOn 10
- Control of several kinds
- of visualisation
- detector geometry
- particle trajectories
- hits in the detectors
- In the Brachytherapy Example
- OGLIX, DAWN
- VisualisationMacro.mac