geant4.ciemat-051122
TRANSCRIPT
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 1/54
Pedro Arce Introducción a GEANT4 1
Introducción a GEANT4:
componentes
http://geant4.cern.ch
Pedro Arce Dubois
CIEMAT, Madrid
- -
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 2/54
Pedro Arce Introducción a GEANT4 2
Outline
Geometry
Magnetic field
Particle generator
G4Run/G4Event/G4Track/G4Step /G4Trajectory
Sensitive detector
Electromagnetic physics: standard
Electromagnetic physics: low energy (J.M. Pérez)
Production cuts
User interface
Visualisation
Hadronic physics
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 3/54
Pedro Arce Introducción a GEANT4 3
Geometry
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 4/54
Pedro Arce Introducción a GEANT4 4
G4VSolid
= solid shape + dimensions
CSG (Constructed Solid Geometry): G4Box,
G4Cons, G4Trap, G4Sphere, G4Polycone, etc.
BREP (Boundary REPresented):
G4BREPSolidPolycone, G4BSplineSurface, etc. (muchslower navigation)
BOOLEAN: a solid is made adding, substracting or
intersecting two
STEP interface: to import BREPs from CAD
systems
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 5/54
Pedro Arce Introducción a GEANT4 5
G4LogicalVolume
Contains all information of a detector element exceptposition
Minimum: solid + material
Sensitive detector
Visualisation
Magnetic field
User limits
Parameterisations of physics
...
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 6/54
Pedro Arce Introducción a GEANT4 6
G4VPhysicalVolume
Information about placement of a volume
Several times of placement: G4PVPlacement
• Is is a volume instance positioned once in a mother
G4PVParameterized
• Parameterized by the copy number
• Shape, size, material, position and rotation can be parameterized
G4PVReplica
• Slicing a volume into smaller pieces (if it has a symmetry)
G4PVDivision
• Slicing a volume into smaller pieces (if it has a symmetry)
• Internally implemented as parameterization (no G4ReplicaNavigation)
• Allows offset
• Allows constructor with only number of divisions or size of division
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 7/54Pedro Arce Introducción a GEANT4 7
Individual copies of a volume
How to identify a volume uniquely?
Example:- one LV A placed in 5 positions (5 PV) inside World- one LV B placed in 12 positions (12 PV) inside A
GEANT4 constructs 5+12 PV, not 5 PV of A and 5x12=60 PV of B
And even a PV can represent multiple copies (Parameterisations orReplicas)
- How can I have access to the 60 different copies of B (forexample, for finding where is a hit)?
ANSWER:
each of the 60 volumes B will be a distinct G4VTouchable
But, for efficiency reasons, G4VTouchable´s are only created attracking time, when a particle enters the corresponding volume
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 8/54Pedro Arce Introducción a GEANT4 8
How to use touchables: (from GEANT4 example novice/N02)
• G4TouchableHistory (:public G4VTouchable) has the information of thevolume hierarchy at each of the two points of the current step
Individual copies of a volume
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 9/54Pedro Arce Introducción a GEANT4 9
Magnetic Field
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 10/54Pedro Arce Introducción a GEANT4 10
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 11/54Pedro Arce Introducción a GEANT4 11
Magnetic field: chords
The path is calculated using the chosen integration method and then
it is broken into linear chord segments that closely approximate the
curved path
The chords are used to interrogate the Navigator, to see whether the
track has crossed a volume boundary
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 12/54Pedro Arce Introducción a GEANT4 12
Particle Generator
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 13/54Pedro Arce Introducción a GEANT4 13
Primary Generator
G4Event has a list of G4PrimaryVertex’s
• G4double X0, Y0, Z0;• G4double T0;
• G4double Weight0;
G4PrimaryVertex has a list of G4PrimaryParticle’s • G4int PDGcode;• G4ParticleDefinition * G4code;
• G4double Px, Py, Pz;• G4int trackID;• G4double charge;• G4double polX, polY, polZ;• G4double Weight0;• G4double properTime;
Geant4 provides some concrete implementations ofG4VPrimaryGenerator
G4ParticleGun: one particle G4HEPEvtInterface: reading event particles from text files
G4GeneralParticleSource: big flexibility
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 14/54Pedro Arce Introducción a GEANT4 14
G4HEPEvtInterface
A concrete implementation of G4VPrimaryGenerator
Suitable to /HEPEVT/ common block, which many of
(FORTRAN) HEP physics generators are compliant to.
ASCII file input A good example for experiment-specific primary
generator implementation
Another interface to HepMC class, which a few new
(C++) HEP physics generators are compliant to, isplanned.
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 15/54Pedro Arce Introducción a GEANT4 15
G4GeneralParticleSource
A concrete implementation of G4VPrimaryGenerator
Generate radioactive decay fragmentsPrimary vertex is randomly chosen within a surface of a certainvolume.
spectrum (defined in terms of energy or momentum)
angular distribution with respect to a user-defined axis or surface
normalspatial distribution of particles from 2D or 3D planar surfaces orbeam line in Gaussian profile or generated homogeneously within avolume.
It also provides the option of biasing the sampling distribution. This isadvantageous, for example, for sampling the area of a spacecraft
where greater sensitivity to radiation effects is expected (e.g. where
radiation detectors are located) or increasing the number of high-
energy particles simulated, since these may produce greater numbers
of secondaries.
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 16/54Pedro Arce Introducción a GEANT4 16
G4GeneralParticleSource
2D Surfacesources
3D Surfacesources
Volume sources Angulardistribution
Energy spectrum
circle
ellipse
square
rectangle
Gaussian beam profile
sphere
ellipsoid
cylinder
paralellapiped
(incl. cube &cuboid)
sphere
ellipsoid
cylinder
paralellapiped
(incl. cube &cuboid)
isotropic
cosine-law
user-defined
(through
histograms)
mono-energetic
Gaussian
Linear
Exponential
power-law bremsstrahlung
black-body
CR diffuse
user-defined
(through
histograms or point-wise data)
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 17/54Pedro Arce Introducción a GEANT4 17
G4Run /G4Event / G4Track / G4Step
G4Trajectory
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 18/54Pedro Arce Introducción a GEANT4 18
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 19/54Pedro Arce Introducción a GEANT4 19
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 20/54Pedro Arce Introducción a GEANT4 20
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 21/54Pedro Arce Introducción a GEANT4 21
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 22/54Pedro Arce Introducción a GEANT4 22
Step
• Step has two points and also ´delta´information of a particle (energy loss
on the step, time-of-flight spent in the step, etc.)
• Each point knows the volume. In case a step is limited by a volume
boundary, the end point physically stands on the boundary, and it
logically belongs to the next volume
Current volume: G4Track::GetNextVolume(); =G4Step::GetPostStepPoint()->GetPhysicalVolume();
Previous volume: G4Track::GetVolume(); =G4Step::GetPreStepPoint()->GetPhysicalVolume();
What you see with „/tracking/verbose 1‟ is the current volume
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 23/54
Pedro Arce Introducción a GEANT4 23
Trajectory
• Trajectory is a record of a track history. It stores some information
of all steps done by the track as objects of G4VTrajectoryPoint class
• The user can create its own trajectory class deriving from
G4VTrajectory and G4VTrajectoryPoint base classes for storing any
aditional information
• While Tracks are killed when its tracking finishes, Trajectories are
kept for an event lifetime:
• Think of your favorite application....
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 24/54
Pedro Arce Introducción a GEANT4 24
Attaching user information
Abstract classes
User can use his/her own class derived from the provided base class
G4Run, G4VHit, G4VDigit, G4VTrajectory, G4VTrajectoryPoint
Concrete classes
User can attach a user information class objectG4Event - G4VUserEventInformation
G4Track - G4VUserTrackInformation
G4PrimaryVertex - G4VUserPrimaryVertexInformation
G4PrimaryParticle - G4VUserPrimaryParticleInformation
G4Region - G4VUserRegionInformation
• User information class object is deleted when associated Geant4
class object is deleted
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 25/54
Pedro Arce Introducción a GEANT4 25
Sensitive Detector
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 26/54
Pedro Arce Introducción a GEANT4 26
Detector sensitivity
A logical volume becomes sensitive if it has a pointerto a concrete class derived from G4VSensitiveDetector.
A sensitive detector either
constructs one or more hit objects or
accumulates values to existing hitsusing information given in a G4Step object.
NOTE: you must get the volume information from the
“PreStepPoint”.
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 27/54
Pedro Arce Introducción a GEANT4 27
Sensitive detector and Hit
Each“
Logical Volume”
can have a pointer to a sensitivedetector
Hit is a snapshot of the physical interaction of a track or
an accumulation of interactions of tracks in the sensitive
region of your detector
A sensitive detector creates hit(s) using the information
given in G4Step object. The user has to provide his/her
own implementation of the detector responseHit objects, which still are the user’s class objects, are
collected in a G4Event object at the end of an event
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 28/54
Pedro Arce Introducción a GEANT4 28
Hit class
Hit is a user-defined class derived from G4VHit. You can store various types information by implementing
your own concrete Hit class.
For example:
Position and time of the step
Momentum and energy of the track
Energy deposition of the step
Geometrical information
or any combination of above
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 29/54
Pedro Arce Introducción a GEANT4 29
G4HCofThisEvent
A G4Event object has a G4HCofThisEvent object at the endof (successful) event processing. G4HCofThisEvent object
stores all hits collections made within the event.
o Pointer(s) may be NULL if collection(s) are not created in the
particular event.o Hits collections are stored by pointers of G4VHitsCollection base
class. Thus, you have to cast them to types of individual concrete
classes.
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 30/54
Pedro Arce Introducción a GEANT4 30
Electromagnetic Physics:Standard
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 31/54
Pedro Arce Introducción a GEANT4 32
Physics Process
OOD allow to implement or modify any physics processwithout affecting other parts of the software
Tracking is independent from physics processes(Transportation is also a process)
The generation of the final state is independent from theaccess and use of cross sections
Transparent access via virtual functions to•
cross sections (formulas, data sets, etc.)• models underlying physics processes
G4VProcess: base class for all processes
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 32/54
Pedro Arce Introducción a GEANT4 33
Standard e.m. Physics Processes
Cover physics from 10 keVup to PeV
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 33/54
Pedro Arce Introducción a GEANT4 34
Features of Standard e.m. processes
Multiple scattering
new model computes mean free path
length and lateral displacement
Ionisation features
optimise the generation ofd-rays near boundaries
Variety of models for ionisationand energy loss
including the PhotoAbsorption
Interaction model Differential and Integral approach
for ionisation, Bremsstrahlung,positron annihilation, energyloss and multiple scattering
Multiple scattering 6.56 MeV proton , 92.6 mm Si
J.Vincour and P.Bem Nucl.Instr.Meth. 148. (1978)
399
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 34/54
Pedro Arce Introducción a GEANT4 35
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 35/54
Pedro Arce Introducción a GEANT4 36
Ionisation energy loss distribution produced by pions, PAI model
3 GeV/c p in 1.5 cm Ar+CH4 5 GeV/c p in 20.5 mm Si
Ionisation energy loss produced by charged particles in thin layers of
absorbers
Photo Absorption Ionisation Model
Gallery of electromagnetic physics documentation and results
http://wwwinfo.cern.ch/asd/geant4/reports/gallery/
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 36/54
Pedro Arce Introducción a GEANT4 37
Electromagnetic physics:
Low energy
El t F t
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 37/54
Pedro Arce Introducción a GEANT4 38
Electrones y Fotones
Rango de validez: 250 eV – 100 GeV250 eV es un límite “sugerido”
Librerias de datos hasta 10 eV1 < Z < 100
Explota librerías de datos evaluadas (de LLNL):
EADL (Evaluated Atomic Data Library)
EEDL (Evaluated Electron Data Library)
EPDL97 (Evaluated Photon Data Library)
Para el cálculo de las secciones eficaces totales y la generacióndel estado final
Photon transmission, 1mm Pb
shell effects
GaAs linesFe lines
fluorescence Scattering Compton
Scattering RayleighEfecto fotoeléctrico
Producción de pares
Bremsstrahlung
Ionización
+ relajación atómica
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 38/54
Pedro Arce Introducción a GEANT4 39
Atenuación de fotones: comparación con datos
de NIST
Courtesy of S. Agostinelli, R. Corvo, F. Foppiano, S. Garelli, G. Sanguineti, M. Tropeano
Test y validación por IST - Natl. Inst. for Cancer Research, Genova
Polarización 2 hhh1d
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 39/54
Pedro Arce Introducción a GEANT4 40
Polarización
250 eV -100 GeV
y
O z
x
x
qa
f hnhn0
A
C
q Ángulo Polar
f Ángulo Azimuthal
Vector depolarización
fq-
nn
nn
nn
22
0
0
2
0
22
0 cossin2h
h
h
h
h
hr
2
1
d
d
•Integrar sobre f
• Muestrear q
• Relación q - Energía Energía• Muestreo de f de P(f) = a (b – c cos2 f)
More details: talk on Geant4 Low Energy
Electromagnetic Physics
Otros procesos polarizados a baja energía están bajo
desarrollo
Ncossin1sincossincos 22 fq-xfqx
fqq-ffq- cosk ˆcoscossin N
1 jˆcossinsin
N
1iˆ N 2'
||
fq-q sink ˆsinsin jˆcos N
1'
Métodos de
muestreo
Sección eficaz:
Scattered Photon Polarization
10 MeV
small
large
100 keV
small
large
1 MeV
small
large
Low Energy
Polarised Compton
P d h d i
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 40/54
Pedro Arce Introducción a GEANT4 41
Procesos de hadrones e iones
Variedad de modelos, dependiendo del rango de energía, el tipo de partícula y la carga
Modelo Bethe-Bloch de perdida de energía, E > 2MeV
5 modelos parametrizados, E < 2 MeV
- basados en las revisiones de Ziegler e ICRU
3 modelos de fluctuaciones de pérdida de energía
- Correciones de densida a alta energía
- Término de correccion de capa para
energía intermedia
- Término dependiente del espín
- Términos de Barkas y Block
- Efecto químico para materiales
compuestos
- Poder de frenado nuclear
- Modelo de carga efectiva
Hadrones cargados positivos
Iones cargados positivos
Hadrones cargados negativos
Escala:
Parametrizaciones 0.01 < < 0.05, pico de
Bragg
-basados en las revisiones de Ziegler e ICRU
< 0.01: Modelo de gas de electrón libre
Parametrización de los datos experimentales
disponibles
Modelo de Oscilador Armónico Cuántico
- Modelo original de Geant4
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 41/54
Pedro Arce Introducción a GEANT4 42
Algunos resultados: protones
Straggling
Pode de frenadoDependencia en Z a varias energías
Modelos Ziegler e ICRUZiegler e ICRU, Fe Ziegler e ICRU, Si
Poder de frenado nuclear
Pico de Bragg (con interaccioneshadrónicas)
Algunos resultados: iones y
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 42/54
Pedro Arce Introducción a GEANT4 43
Algunos resultados: iones y
antiprotones
antiprotones
protones
Perdida de energía en Silicio
Iones Ar y C
Deuterone
s
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 43/54
Pedro Arce Introducción a GEANT4 44
Ejemplos de aplicaciones
Tres ejemplos avanzados desarrollados
por el grupo de “Low energy” de GEANT4desde Diciembre de 2000
telescopio rayos g
braquiterapia
telescopio rayos X
Física subsuelo y radiación de
fondo
Fluorescencia rayos X y PIXE
Aplicaciones completas que muestra la física yfacilidades interactivas avanzadas in “set-ups” realistas
Aplicaciones de
Solar system explorations
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 44/54
Pedro Arce Introducción a GEANT4 45
Aplicaciones de
usuarios
Courtesy of S. Magni, BorexinoCourtesy of A. Howard, UKDM
ZEPLIN IIIDark Matter, Boulby mine
No hay tiempo de mencionarlas todas!
Courtesy SOHO EIT
Cosmic rays,
jovian electrons
Solar X-rays, e, p
Courtesy
P.Truscott, DERA
Courtesy of R. Nartallo, ESA
XMM X-ray telescope
-4
-2
0
2
4
- 9 0 - 8 0 - 7 0 - 6 0 - 5 0 - 4 0 - 3 0 - 2 0 - 1 0 0 1 0
Z (cm)
Y
( c m )
RGS EPIC
Brachythera
Bepi Colombo
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 45/54
Pedro Arce Introducción a GEANT4 46
M. C. Lopes1, L. Peralta2, P. Rodrigues2, A. Trindade2 1 IPOFG-CROC Coimbra Oncological Regional Center - 2 LIP - Lisbon
Cabeza y cuella con dos haces opuestos
de tamaño de campo 5x5 y 10x10
GEANT frente a
planificadores comerciales
Una dosis de profundidad “off -
axis” tomada en una de las rodajas
cerca del isocentro
PLATO falla en las cavidades deaire y estructuras óseas y no puede
predecir con exactitud la dosis en
tejido que esta rodeado de aire
Las desviaciones son de hasta 25-
30%
Plano del hazHueso craneal
Tumor
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 46/54
Pedro Arce Introducción a GEANT4 47
Production cuts
( ) ?
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 47/54
Pedro Arce Introducción a GEANT4 48
What are the (production) cuts?
- Some electromagnetic processes have diverging cross sections
at low energy Ionisation: producing delta rays
Bremsstrahlung: producing gammas
…
Need to put a cut: produce only secondaries from some
energy up
- GEANT3: cuts per energy
- GEANT4: cuts per range more uniform treatment in different materials
- But cuts are converted to energy in each material and always used in
energy
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 48/54
Pedro Arce Introducción a GEANT4 49
cut, step length and number of 2ary particles
Secondary particles are only produced above the energy cut Primary gives
the step in which it would loose enough energy to produce a secondary
GEANT4: secondaries that would live for a length above range cut
Example: Tracking of a muon with a cut of 1 mm in iron.
Energy of secondary electron/positron to live 1mm in iron: 1 GeV
Energy of secondary gamma to live 1mm in iron: 10 MeV Calculate in which step length the sum of the energies of all delta rays
produced by the muon (ionisation is in reality a „continuous‟ process =
ocurring at atomic lengths) is enough to produce an electron of 1 GeV
Same for gammas from bremmstrahlung adding up to 10 MeV
Same for e+e- from pair production adding up to 1 GeV
Choose between the three the smallest step length: make a step of this
length
Bigger cut bigger step ( logarithmically)
Oth C t i GEANT4
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 49/54
Pedro Arce Introducción a GEANT4 50
Other Cuts in GEANT4
All cuts are always set by particle type
Tracking cuts: • Not needed as in GEANT3, cross sections are calculated down to zero
energy
UserLimits / G4UserSpecialCuts ‘process’:
• Define the step length
• Kill particle if: track length too big, time of flight too big, energy too
small, range too small
• User can define other conditions
An extra process that is attached to a G4LogicalVolume
• BUT: just proposes an step, that competes with other processes
For example: if in a volume there is an small electron cut (= produce delta rays every
small step) and in the same volume a UserLimits selects a bigger step, this UserLimit
have no effect, because ionisation proposes smaller steps than UserLimits process (and
always the smallest step is chosen)
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 50/54
Pedro Arce Introducción a GEANT4 51
User Interface
GEANT4 User Interface
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 51/54
Pedro Arce Introducción a GEANT4 52
GEANT4 User Interface
Several Graphical User Interfaces (GAG, MOMO, XVT)
G4UIterminal: C-shell like character terminal
G4Utcsh: G4UItcsh: tcsh-like character terminal with
command completion, history, etc
G4UIGAG: Java based GUI
G4UIOPACS: OPACS-based GUI, command completion, etc
G4UIXm: Motif-based GUI, command completion, etc
G4UIBatch: Batch job with macro file • Reading a file with a list of commands
• Write filename as executable argument
E i t l V i bl
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 52/54
Pedro Arce Introducción a GEANT4 53
Environmental Variables
Users can select and plug in (G)UI by setting
environmental variables before compilation setenv G4UI_USE_GUINAME
Example (“G4UIterminal”, “GAG”, and Motif)
setenv G4UI_USE_TERMINAL 1
setenv G4UI_USE_GAG 1
setenv G4UI_USE_XM 1
Note that Geant4 library should be installed
with setting the corresponding environmental variable
G4VIS_BUILD_GUINAME_SESSION
to “1” beforehand
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 53/54
Pedro Arce Introducción a GEANT4 54
Useful GUI Tools Released by Geant4 Developers
GGE: Geometry editor based on Java GUI
http://erpc1.naruto-u.ac.jp/~geant4
GPE: Physics editor based on Java GUI
http://erpc1.naruto-u.ac.jp/~geant4
OpenScientist, OPACS:
Flexible analysis environments
http://www.lal.in2p3.fr/OpenScientist
http://www.lal.in2p3.fr/OPACS
GEANT4 commands
7/27/2019 GEANT4.CIEMAT-051122
http://slidepdf.com/reader/full/geant4ciemat-051122 54/54
GEANT4 commands
Commands control what your job will doo /run/initialize
o /run/beamOn
o /tracking/verbose
o /run/particle/dumpCutValues
o ...
o /control/manual prints all available commands
Usually they are put in a file and given as name to the executable: myg4prog mycommands.lis
• All commands are processed through the singleton class G4UImanager
You can apply any command at any point in your code
G4UImanager* UI = G4UImanager::GetUIpointer();UI->ApplyCommand(“run/beamOn”);
• New commands are easily created, creating a messenger and an
action (see the many examples in OSCAR)