1 / 59

Introduction to GEANT4: Basic concepts

Introduction to GEANT4: Basic concepts. http://geant4.cern.ch. Pedro Arce Dubois CIEMAT, 5 th July 2012. Outline. Geometry Magnetic field Particle generator G4Run/G4Event/G4Track/G4Step /G4Trajectory Sensitive detector Electromagnetic physics: standard

minty
Télécharger la présentation

Introduction to GEANT4: Basic concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to GEANT4: Basic concepts • http://geant4.cern.ch Pedro Arce Dubois CIEMAT, 5th July 2012

  2. Outline • Geometry • Magnetic field • Particle generator • G4Run/G4Event/G4Track/G4Step /G4Trajectory • Sensitive detector • Electromagnetic physics: standard • Electromagnetic physics: low energy • Hadronic physics. Neutrons • Production cuts Introduction to GEANT4

  3. Geometry

  4. G4Isotope G4Element Simple (Symbol, Z, A) Mixture of isotopes G4Material Simple (Z, A, density) Mixture of elements Mixture of materials G4NistMaterialMgr Predefined list of elements and materials (accesible by name) G4NistManager::Instance()->FindOrBuildElement(name) G4NistManager::Instance()->FindOrBuildMaterial(name) All simple elements (Z=1,107) with all isotopes All simple materials (Z=1,98) Many common materials (most from medical physics domain) Materials Introduction to GEANT4

  5. = geometrical 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, subtracting or intersecting two TESSELATED: a solid is made with a set of triangular or quadrangular facets STEPinterface: to import BREPs from CAD systems G4VSolid Introduction to GEANT4

  6. Contains all information of a detector element except position Minimum: solid + material Sensitive detector Visualisation Magnetic field User limits Parameterisations of physics ... G4LogicalVolume Introduction to GEANT4

  7. G4VPhysicalVolume • Information about placement of a volume • 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 • G4PVAssembly • Assembly of volumes without a mother volume Introduction to GEANT4

  8. Individual copies of a volume Howtoidentify a volumeuniquely? Example: - one LV A placed in 5 positions (5 PV) insideWorld - one LV B placed in 12 positions (12 PV) insideA GEANT4 constructs 5+12 PV, not 5 PVs of A and 60 (=5x12) PVs of B And even a PV can representmultiple copies (Parameterisationsor Replicas) - How can I haveaccesstothe 60 different copies of B (forexample, forfindingwhereis a hit)? ANSWER: each of the 60 volumes B willbe a distinct G4VTouchable But, forefficiencyreasons, G4VTouchable´s are onlycreated at tracking time, when a particleentersthecorrespondingvolume Introduction to GEANT4

  9. Magnetic and ElectricFields

  10. Field types • Several field types can be defined in Geant4: • Electric fields • Magnetic fields • Electromagnetic fields • Gravity fields • Fields can be assigned only to a few volumes • Fields can vary with time • - In order to propagate a particle inside a field, the equation of motion of the particle in field is integrated (Runge-Kutta methods or others) Introduction to 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 Introduction to GEANT4

  12. Particle Generator

  13. Primary Particles 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 of • G4VPrimaryGenerator • G4ParticleGun: one particle • G4HEPEvtInterface: reading event particles from text files • G4GeneralParticleSource: big flexibility Introduction to GEANT4

  14. G4Run /G4Event / G4Track / G4StepG4Trajectory

  15. Introduction to GEANT4

  16. Introduction to GEANT4

  17. Introduction to GEANT4

  18. Introduction to GEANT4

  19. 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 Introduction to GEANT4

  20. 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.... Introduction to GEANT4

  21. Sensitive Detector

  22. 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”. Detector sensitivity Introduction to GEANT4

  23. 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 user’s class objects, are collected in a G4Event object at the end of an event Sensitive detector and Hit Introduction to GEANT4

  24. 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 Hit class Introduction to GEANT4

  25. Electromagnetic Physics: Standard

  26. Physics Process • OOD (Object-Oriented Design) allows 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 Introduction to GEANT4

  27. Standard e.m. Physics Processes • Common to all charged particles • ionization • Coulomb scattering from nuclei • Cerenkov effect • scintillation • transition radiation • Electrons • bremsstrahlung • nuclear interactions • Positrons • bremsstrahlung • annihilation • nuclear interactions • Muons • bremsstrahlung • e+e- pair production • nuclear interactions • Photons • gamma conversion • Compton scattering • Rayleigh scattering • photo electric effect • nuclear interactions • Optical photons • reflection and refraction • absorption • Rayleigh scattering Cover physics from 10 keV up to PeV Introduction to GEANT4

  28. Features of Standard e.m. processes Multiple scattering 6.56 MeV proton , 92.6 mm Si • Multiple scattering • several models • computes mean free path length and lateral displacement • includes single scattering • Ionisation • 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 J.Vincour and P.Bem Nucl.Instr.Meth. 148. (1978) 399 Introduction to GEANT4

  29. Introduction to GEANT4

  30. Electromagnetic physics: Low energy

  31. Validity range: 250 eV – 100 GeV 250 eV is a “suggested” limit Data library down to 10 eV 1 < Z < 100 Exploits evaluated data libraries EADL (Evaluated Atomic Data Library) EEDL (Evaluated Electron Data Library) EPDL97 (Evaluated Photon Data Library) For the calculation of total cross sections and the final state generation Photon transmission, 1mm Pb shell effects fluorescence GaAs lines Fe lines Electrons and Photons • Compton scattering • Rayleigh scattering • Photoelectric effect • Pair production • Bremsstrahlung • Ionization • + atomic relaxation Introduction to GEANT4

  32. Photon attenuation: comparison with NIST data Test and validation by IST - Natl. Inst. for Cancer Research, Genova Introduction to GEANT4 Courtesy of S. Agostinelli, R. Corvo, F. Foppiano, S. Garelli, G. Sanguineti, M. Tropeano

  33. Procesos de hadrones e iones Variety of models, depending on the energy range, particle type and charge Positively charged Hadrons • Bethe-Bloch model for energy lost, E > 2 MeV • 5 parameterized models, E < 2 MeV • based on Ziegler and ICRU revisions • 3 model of energy lost fluctuationss • Density corrections at high energy • Shell correction term for intermediate energies • Independent term for spin • Barkas and Block terms • Chemical effect for compound materials • Nuclear stopping power • Effective charged model Positively charged Ions • Scale: • Parameteritations 0.01 < b < 0.05, Bragg peak • based on Ziegler and ICRU revisions • b < 0.01: free electron gas model Negatively charged Hadrons • Parameterization of available experimental data • Quantum Harmonic Oscilator model • Modelo original de Geant4 Introduction to GEANT4

  34. Pode de frenado Dependencia en Z a varias energías Modelos Ziegler e ICRU Ziegler e ICRU, Fe Ziegler e ICRU, Si Straggling Poder de frenado nuclear Pico de Bragg (con interacciones hadrónicas) Some results: protons Introduction to GEANT4

  35. protons Energy lost in Silicon antiprotons Deuterons Some results: ions & antiprotons Ions Ar y C Introduction to GEANT4

  36. Hadronic Physics

  37. Even though there is an underlying theory (QCD), applying it is much more difficult than applying QED for EM physics We must deal with at least three energy regimes: Chiral perturbation theory (< 100 MeV) Resonance and cascade region (100 MeV – 20 GeV) QCD strings (> 20 GeV) Within each regime there are several models: Many of these are phenomenological Hadronic physics challenge Introduction to GEANT4

  38. At rest: Stopped muon, pion, kaon, anti-proton Radioactive decay Elastic: Same process for all long-lived hadrons Inelastic: Different process for each hadron Photo-nuclear Electro-nuclear Capture: Pion- and kaon- in flight Fission Hadronic process Introduction to GEANT4

  39. Default cross section sets are provided for each type of hadronic process: Fission, capture, elastic, inelastic Can be overridden or completely replaced Different types of cross section sets: Some contain only a few numbers to parameterize cross section Some represent large databases (data driven models) Cross sections Introduction to GEANT4

  40. Low energy neutrons G4NDL available as Geant4 distribution data files Available with or without thermal cross sections Neutron and proton reaction cross sections 20 MeV < E < 20 GeV Ion-nucleus reaction cross sections Good for E/A < 1 GeV Isotope production data E < 100 MeV Alternative cross sections Introduction to GEANT4

  41. Data driven models Parametrisation driven models Theory driven models Different types of hadronic shower models Introduction to GEANT4

  42. High Precision Neutron Models (and Cross Section Data Sets) G4NDL ENDF Elastic Inelastic Capture Fission NeutronHPorLEModel(s) Low energy (< 20MeV) neutrons physics Introduction to GEANT4

  43. The neutron data files for High Precision Neutron models The data are including both cross sections and final states The data are derived evaluations based on the following evaluated data libraries Brond-2.1 CENDL2.2 EFF-3 ENDF/B-VI.0, 1, 4 FENDL/E2.0 JEF2.2 JENDL-FF JENDL-3.1,2 MENDL-2 The data format is similar ENDF, however it is not equal to. G4NDL (Geant4 Neutron Data Library) Introduction to GEANT4

  44. Decay of radioactive nuclei by , -, +, electron capture and isomeric transitions The simulation model is empirical and data-driven, and uses the Evaluated Nuclear Structure Data File (ENSDF) nuclear half-lives, nuclear level structure for the parent or daughter nuclide, decay branching ratios the energy of the decay process Application of variance reduction techniques bias decays to occur within user-defined times of observations split radionuclei to increase sampling apply minimum bias limit to ensure adequate sampling of low-probability channels which have high impact Radioactive Decay Introduction to GEANT4

  45. Production cuts

  46. - 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/MCNP/EGS/Penelope: 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 What are the (production) cuts? Introduction to GEANT4

  47. 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) cut, step length and number of 2ary particles Introduction to GEANT4

  48. Other Cuts in GEANT4 • All cuts are always set by particle type • 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) Introduction to GEANT4

  49. User Commands

  50. 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 = G4UImanager::GetUIpointer(); • UI->ApplyCommand(“run/beamOn”); • New commands are easily created, creating a messenger and an action (see the many examples in OSCAR) Introduction to GEANT4

More Related