Introduccin a GEANT4: componentes - PowerPoint PPT Presentation

Loading...

PPT – Introduccin a GEANT4: componentes PowerPoint presentation | free to view - id: c8c0-MTA0N



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Introduccin a GEANT4: componentes

Description:

CSG (Constructed Solid Geometry): G4Box, G4Cons, G4Trap, G4Sphere, G4Polycone, etc. ... http://erpc1.naruto-u.ac.jp/~geant4. GPE: Physics editor based on Java GUI ... – PowerPoint PPT presentation

Number of Views:331
Avg rating:3.0/5.0
Slides: 46
Provided by: din1
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Introduccin a GEANT4: componentes


1
Introducción a GEANT4 componentes
  • http//geant4.cern.ch

Pedro Arce Dubois CIEMAT Curso Método de
MonteCarlo CIEMAT - 22 Nov 2005
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

3
Geometry
4
G4VSolid
  • solid shape dimensions
  • CSG (Constructed Solid Geometry) G4Box, G4Cons,
    G4Trap, G4Sphere, G4Polycone, etc.
  • BREP (Boundary REPresented) G4BREPSolidPolycone,
    G4BSplineSurface, etc. (much slower navigation)
  • BOOLEAN a solid is made adding, substracting or
    intersecting two
  • STEP interface to import BREPs from CAD systems

5
G4LogicalVolume
  • Contains all information of a detector element
    except position
  • Minimum solid material
  • Sensitive detector
  • Visualisation
  • Magnetic field
  • User limits
  • Parameterisations of physics
  • ...

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
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 512 PV, not 5 PV of A
and 5x1260 PV of B And even a PV can represent
multiple copies (Parameterisations or
Replicas) - How can I have access to the 60
different copies of B (for example, for finding
where is a hit)? ANSWER each of the 60
volumes B will be a distinct G4VTouchable But,
for efficiency reasons, G4VTouchables are only
created at tracking time, when a particle enters
the corresponding volume
8
Individual copies of a volume
  • How to use touchables (from GEANT4 example
    novice/N02)
  • G4TouchableHistory (public G4VTouchable) has
    the information of the volume hierarchy at each
    of the two points of the current step

9
Magnetic Field
10
(No Transcript)
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
12
Particle Generator
13
Primary Generator
  • G4Event has a list of G4PrimaryVertexs
  • G4double X0, Y0, Z0
  • G4double T0
  • G4double Weight0
  • G4PrimaryVertex has a list of G4PrimaryParticles
  • 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 of
  • G4VPrimaryGenerator
  • G4ParticleGun one particle
  • G4HEPEvtInterface reading event particles from
    text files
  • G4GeneralParticleSource big flexibility

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, is
    planned.

15
G4GeneralParticleSource
  • A concrete implementation of G4VPrimaryGenerator
  • Generate radioactive decay fragments
  • Primary vertex is randomly chosen within a
    surface of a certain volume.
  • spectrum (defined in terms of energy or momentum)
  • angular distribution with respect to a
    user-defined axis or surface normal
  • spatial distribution of particles from 2D or 3D
    planar surfaces or beam line in Gaussian profile
    or generated homogeneously within a volume.
  • It also provides the option of biasing the
    sampling distribution. This is advantageous, 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.

16
G4GeneralParticleSource
17
G4Run /G4Event / G4Track / G4StepG4Trajectory
18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
  • Step
  • Step has two points and also deltainformation
    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 G4TrackGetNextVolume()
  • G4StepGetPostStepPoint()-GetPhysicalVolume()
  • Previous volume G4TrackGetVolume()
  • G4StepGetPreStepPoint()-GetPhysicalVolume()
  • What you see with /tracking/verbose 1 is the
    current volume

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....

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 object
  • G4Event - G4VUserEventInformation
  • G4Track - G4VUserTrackInformation
  • G4PrimaryVertex - G4VUserPrimaryVertexInformation
  • G4PrimaryParticle - G4VUserPrimaryParticleInformat
    ion
  • G4Region - G4VUserRegionInformation
  • User information class object is deleted when
    associated Geant4 class object is deleted

25
Sensitive Detector
26
Detector sensitivity
  • A logical volume becomes sensitive if it has a
    pointer to a concrete class derived from
    G4VSensitiveDetector.
  • A sensitive detector either
  • constructs one or more hit objects or
  • accumulates values to existing hits
  • using information given in a G4Step object.
  • NOTE you must get the volume information from
    the PreStepPoint.

27
Sensitive detector and Hit
  • Each Logical Volume can have a pointer to a
    sensitive detector
  • 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 response
  • Hit objects, which still are the users class
    objects, are collected in a G4Event object at the
    end of an event

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

29
G4HCofThisEvent
  • A G4Event object has a G4HCofThisEvent object at
    the end of (successful) event processing.
    G4HCofThisEvent object stores all hits
    collections made within the event.
  • Pointer(s) may be NULL if collection(s) are not
    created in the particular event.
  • Hits collections are stored by pointers of
    G4VHitsCollection base class. Thus, you have to
    cast them to types of individual concrete classes.

30
Electromagnetic Physics Standard
31
Physics in Geant4
  • Geant4 provides sets of alternative physics
    models so that the user can freely choose
    appropriate models according to the type of
    his/her application.
  • For example, some models are coarse but fast,
    while alternatives are most precise.
  • Each cross-section table or physics model (final
    state generation) has its own applicable energy
    range
  • Combining more than one tables / models, one
    physics process can have enough coverage of
    energy range for wide variety of simulation
    applications.
  • Several individual universities / physicists
    groups are contributing their physics models to
    Geant4. Given the modular structure of Geant4,
    contribution of each physics model are well
    recognized and credited.

32
Physics Process
  • OOD allow to implement or modify any physics
    process without 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 the access 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

33
Standard e.m. Physics Processes
Cover physics from 10 keV up to PeV
34
Features of Standard e.m. processes
  • Multiple scattering
  • new model
  • computes mean free path length and lateral
    displacement
  • Ionisation features
  • optimise the generation of d-rays near boundaries
  • Variety of models for ionisation and energy loss
  • including the PhotoAbsorption Interaction model
  • Differential and Integral approach
  • for ionisation, Bremsstrahlung, positron
    annihilation, energy loss and multiple scattering

Multiple scattering 6.56 MeV proton , 92.6 mm Si
J.Vincour and P.Bem Nucl.Instr.Meth. 148. (1978)
399
35
(No Transcript)
36
Photo Absorption Ionisation Model
Ionisation energy loss produced by charged
particles in thin layers of absorbers
3 GeV/c p in 1.5 cm ArCH4
5 GeV/c p in 20.5 mm Si
  • Ionisation energy loss distribution produced by
    pions, PAI model
  • Gallery of electromagnetic physics documentation
    and results
  • http//wwwinfo.cern.ch/asd/geant4/reports/gallery/

37
Electromagnetic physics Low energy(ver
charla de J.M. Perez Morales)
38
Production cuts
39
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

40
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 ee- 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)

41
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)

42
User Interface
43
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

44
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

45
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

46
GEANT4 commands
  • Commands control what your job will do
  • /run/initialize
  • /run/beamOn
  • /tracking/verbose
  • /run/particle/dumpCutValues
  • ...
  • /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 G4UImanagerGetUIpointer()
  • UI-ApplyCommand(run/beamOn)
  • New commands are easily created, creating a
    messenger and an action (see the many examples in
    OSCAR)
About PowerShow.com