Docstoc

Geant4 status

Document Sample
Geant4 status Powered By Docstoc
					Computational Physics
An Introduction to the
Geant4 toolkit



z Dr. Guy Tel-Zur




                         1
An Introduction to the
Geant4 toolkit



 Many of the slides are from a presentation by:
             J. Apostolakis, CERN

                   for the Geant4 collaboration
Geant4
z Home page: http://geant4.cern.ch/
z Important paper: Geant4 – a
  simulation toolkit
z Tutorial:
  http://indico.cern.ch/conferenceOtherVie
  ws.py?view=standard&confId=58317
z Live CD:
  https://twiki.cern.ch/twiki/bin/view/Geant
  4/Geant4CernVM
                                               3
Overview
 Simulation packages/toolkits
   Key capabilities and concepts
 What it can do - highlights
   Application areas
 What is inside – lightning tour
   Brief highlights of capabilities
 Transparency of results
   Open source
 GEANT4: the collaboration

                                      4
What can a simulation
package or toolkit do ?
 A Package provides „general‟ tools to
 undertake (some or all) of the key tasks:
   tracking, and geometrical propagation
   modelling of physics interactions,
   visualization, persistency
 and enable you to describe your setup‟s
   detector geometry,
   radiation source,
   details of sensitive regions


                                             5
GEANT 4

 Detector simulation tool-kit from HEP
   full functionality: geometry, tracking, physics, I/O
   offers alternatives, allows for tailoring
 Software Engineering and OO technology
   provide the architecture & methods for maintaining it
 Requirements from:
   current and future HEP experiments
   medical and space science applications
 World-wide collaboration

                                                          6
Key Capabilities
 „Kernel‟: create, manage, move tracks
   tracking, stacks, geometry, hits, …
      Extensible, flexible
 Physics Processes X-section, final-state
   models for electromagnetic, hadronic, …
      Can be „assembled‟ for use in an application area
 Tools for faster simulation
   „Cuts‟, framework shower parameterisation
   Event biasing, variance reduction.
 Open interfaces for input/output
   User commands, visualization, persistency

                                                          7
Brief History
 Geant4 started as RD44 project (1994-98)
   Amongst first OO in HEP, 1st for simulation
   Dec 1998: 1st supported release Geant4.0.0
 First uses in production in several fields
   Space: 1999 XMM (X-ray telescope)
   HEP: 2001 BaBar, 2004 ATLAS/CMS/LHCb
 Regular public releases (1-2 per year)
   Geant4 release 9.0 (Jun 07), 9.3 (Dec 09)
   Guy: Dec. 17, 2010: new release: 9.4
                                                 8
APPLICATION AREAS


                    9
HIGH ENERGY PHYSICS


                      11
  BaBar
 BaBar at SLAC was the
 pioneer experiment in
 HEP in use of Geant4
    Started in 2000
    Simulated several x 1010
    events




Now simulating PEP beam line
as well (-9m < zIP < 9m)
                               12
                                    Courtesy of D.Wright (SLAC)
Pion longitudinal shower profile in stand-alone
       ATLAS TileCal test-beam at 90o



       Thanks to Atlas Tilecal

       Data




                                  MC within ~ ±10% up to 10 λ.




                             For Protons : -(20%-40%) at 10 λ.
                                                         13
Courtesy: CMS                                      14
                Talk of S. Banerjee, Geant4 Workshop 2009
15
Boulby Mine dark matter
search Prototype Simulation




                                   Courtesy of H. Araujo, A. Howard, IC London

                                             One High Energy event


                                          LXe                            mirror
                                          GXe




                              16                          PMT          source
  Geant4 for beam
  transportation




Courtesy of V.D.Elvira (FNAL)   17
AEROSPACE


            18
20
g astrophysics                 AGILE         GLAST


g-ray bursts




                                                     GLAST
                                GLAST
        Typical telescope:
         Tracker
         Calorimeter
         Anticoincidence
       g conversion
       electron interactions
       multiple scattering
       d-ray production
       charged particle tracking
                                        21
 Bepi Colombo: X-Ray
                                                                   Space Environments
                                                                   and Effects Section



 Mineralogical Survey of
 Mercury



                                              Alfonso Mantero, Thesis, Univ. Genova,
BepiColombo                                   2002
ESA cornerstone mission to Mercury




                                                22
               Courtesy of ESA Astrophysics
PlanetoCosmics
Geant4 simulation of Cosmic Rays
in planetary Atmo-/Magneto- spheres




                      23
MEDICAL PHYSICS


                  24
25
http://top25.sciencedirect.com/index.php?subject_area_id=21




                       26
A QUICK WALK THROUGH
GEANT4

                       27
Key Domains of the
Simulation




                     28
Top Level Category
Diagram (part 1)




                     29
Top Level Category
Diagram (part 2)




                     30
Geometry: what it does

Describes a Setup
  Hierarchy of volumes
  Many volumes repeat
    Volume & sub-tree
  Up to hundreds of
  thousands of volumes    Navigates in Detector
  Importing solids from     Locates a point
  CAD systems               Computes a step
                               Linear intersection



                                                     31
Electromagnetic physics
Gammas:
   Gamma-conversion, Compton scattering, Photo-electric effect
Leptons(e, m), charged hadrons, ions
   Energy loss (Ionisation, Bremstrahlung), Multiple scattering,
   Transition radiation, Synchrotron radiation, e+ annihilation.
Photons:
   Cerenkov, Rayleigh, Reflection, Refraction, Absorption, Scintillation
High energy muons
A choice of implementations for most processes
   “Standard”: performant when relevant physics above 1 KeV
   “Low Energy”: Extra accuracy for application delving below 1 KeV


                                                                   32
Hadronic processes
 Hadronic physics is included in Geant4
   a powerful and flexible framework and
   implementations of physics X-sections & models.
 A variety of models and cross-sections
   for each energy regime, particle type, material
   alternatives with different strengths and computing
   resource requirements
 Components can be assembled in an optimised
 way for each use case.

                                                         33
Openness and Extensibility
 As a toolkit with open-source code,
 Geant4 can be extended in many ways
   Expected/simple
     Creating a new shape (G4VSolid)
   Unusual, but predicted
     New processes, for physics or user action
   Radical extensions
     Reversing time (two ways)
     Creating „on-the-fly‟ density for a material (future)

                                                         34
Practical considerations
 Starting off: what you need
   Compatible platform
   Need CLHEP foundation class library
   One or more visualisation libraries (possibly from system, e.g.
   OpenGL)

 CLHEP is used for key common classes
   ThreeVector (G4ThreeVector is a name for CLHEP::HepThreeVector)
   FourVector
   Random Number Generators, ..

 Coding is needed – except if someone did it for you.
   Modify existing C++ „code‟ to describe your setup
   Create you own class to describe eg a magnetic field.



                                                                     35
Platforms
 What works „best‟ (used by developers, main testing)
   Scientific Linux 4 or 5 and gcc 4.3 (HEP production)
   MacOS 10.5 Leopard
 What we also support (tested + numerous users)
   Windows (XP) & Visual C++
      numerous users
 What we expect to work
   Other Linux flavours with gcc 4.1 and 4.3
      Possibly with fewer options, eg missing some visualisation
 What others „ported‟ and check
   Sun Solaris



                                                                   36
GEANT4 COLLABORATION


                       37
Geant4 Collaboration




TRIUMF




Lebedev

                            Collaborators also from non-
                            member institutions, including
                                        IHEP
                                  MEPHI Moscow
 LIP                            Jefferson Laboratory

          UK STFC
                       38
The Toolkit Examples
Three levels:




                       39
                Hands on!
• Time to get your hands on Geant4
  – Copy exercises
  – Your first run of a simple example
• To start, please look at
http://www.ifh.de/geant4/g4course2010

Else, if you have difficulty to reach that use
http://www-zeuthen.desy.de/geant4/g4course2010
                                             40
User: geant, pw: geant2010
IP = 192.168.11.128

                             41
                         Example N02
This example simulates a simplified fixed target experiment.

1- GEOMETRY DEFINITION

   The setup consists of a target followed by six chambers of increasing
   transverse size. These chambers are located in a region called Tracker
   region. Their shape are boxes, constructed as parametrised volumes
   (ChamberParametrisation class).

   The default geometry is constructed in DetectorConstruction class.
   One can change the material of the target and of the chambers
   interactively via the commands defined in the DetectorMessenger class.

   In addition a transverse uniform magnetic field can be applied (see
   N02MagneticField and DetectorMessenger classes).
                                                                            42
2- PHYSICS LIST

  The particle's type and the physic processes which will be available
  in this example are set in PhysicsList class.

  In this example, all the so called 'electromagnetic processes' are
  introduced for gamma, charged leptons, and charged hadrons (see the
  method PhysicsList::ConstructEM()).

  An important data member of this class is the defaultCutValue which
  defines the production threshold of secondary particles
  (only Ionisation and Bremsstrahlung processes are concerned by this
  CutValue).
  Notice that the CutValue must be given in unit of length, corresponding
  to the stopping range of the particle. It is automatically converted
  in energy for each material, and a table is printed in the method
  PhysicsList::SetCuts()

  In addition the build-in interactive command:
           /process/(in)activate processName
   allows to activate/inactivate the processes one by one.




                                                                            43
3- RUNS and EVENTS

   The primary kinematic consists of a single particle which hits the
   target perpendicular to the input face. The type of the particle
   and its energy are set in the PrimaryGeneratorAction class, and can
   be changed via the G4 build-in commands of ParticleGun class.

   A RUN is a set of events.

   The user has control:
    -at Begin and End of each run (class RunAction)
    -at Begin and End of each event (class EventAction)
    -at Begin and End of each track (class TrackingAction, not used here)
    -at End of each step (class SteppingAction)

    The class SteppingVerbose prints some informations step per step,
    under the control of the command: /tracking/verbose 1
    It inherits from G4SteppingVerbose, and has been setup here in order to
illustrate how to extract informations from the G4 kernel during
    the tracking of a particle.




                                                                              44
4- USER' LIMITS

  We illustrate how to introduce tracking constraints like maximum step
  length, minimum kinetic energy ..etc.., via G4UserLimits class.
  See DetectorConstruction and PhysicsList.

5- DETECTOR RESPONSE

  A HIT is a record, track per track (even step per step), of all the
  informations needed to simulate and analyse the detector response.

  In this example the Tracker chambers are considered as the detector.
  Therefore the chambers are declared 'sensitive detectors' (SD) in
  the DetectorConstruction class.

  Then, a Hit is defined as a set of 4 informations per step, inside
  the chambers, namely:
    - the track identifier (an integer),
    - the chamber number, - the total energy deposit in this step,
    - the position of the deposit.

  A given hit is an instance of the class TrackerHit which is created
  during the tracking of a particle, step by step, in the method
  TrackerSD::ProcessHits(). This hit is inserted in a HitsCollection.
  The HitsCollection is printed at the end of event (via the method             45
  TrackerSD::EndOfEvent()), under the control of the command: /hits/verbose 1
6- VISUALIZATION

   The Visualization Manager is set in the main().
   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 when running in interactive mode.

   The tracks are automatically drawn at the end of event and erased at
   the beginning of the next run.

   The visualization (with OpenGL driver) assumes two things:
     1- the visualisation & interfaces categories have been compiled
with the environment variable G4VIS_BUILD_OPENGLX_DRIVER.
     2- exampleN02.cc has been compiled with
G4VIS_USE_OPENGLX.

   (The same with DAWNFILE instead of OPENGLX)                             46
7- USER INTERFACES

  The default command interface, called G4UIterminal, is done via
  standart cin/G4cout.
  On Linux and Sun-cc on can use a smarter command interface G4UItcsh.
  It is enough to set the environment variable G4UI_USE_TCSH before
  compiling exampleN02.cc


8- HOW TO START ?

  - compile and link to generate an executable
       % cd N02
       % gmake

  - execute N02 in 'batch' mode from macro files (without visualization)
       % exampleN02 run1.mac                                               47
- execute N02 in 'interactive mode' with visualization
        % exampleN02
        ....
        Idle> type your commands. For instance:
        Idle> /run/beamOn 10
        ....
        Idle> /control/execute run2.mac
        ....
        Idle> exit




Show in editor printout of exampleN02, see file:
./geant/exampleN02_printout.txt




                                                         48
49
The END
Resources for more
information
Geant4 web site                                         Geant4 Physics WG web sites
    http://cern.ch/geant4/                                   Which can all be found at
                                                             http://cern.ch/geant4/organisatio
Geant4 Training Page                                         n/working_groups.html
    http://cern.ch/geant4/support/ and                       Geant4 Low-Energy
    follow “Training” link,                                  Electromagnetic WG web site
    Geant4 training INFN / EM „Low-                                http://www.ge.infn.it/geant4/low
                                                                   E/
    energy‟
                                                             Geant4 EM (standard) see below
          http://www.ge.infn.it/geant4/training
          /                                                  Geant4 Hadronic WG home
Geant4 Workshops and Users                              Papers on G4 and its validation
Workshops presentations                                      “Geant4: a simulation toolkit”,
                                                             Nucl Instr and Methods A 506
    Latest at the home page, previous at                     (2003), 250-303
    http://geant4.web.cern.ch/geant4/co                      “Validation of GEANT4, an object-
    llaboration/meetings_minutes.html#                       oriented MC toolkit for simulations
    G4workshops                                              in medical physics” J.F. Carrier et
                                                             al, Med Phys 32 (2004), p 484.
  Note: “Training” page is also directly accessed at
  http://cern.ch/geant4/milestones/training/training-   ElectroMagnetic (standard) WG home page is at
  milestone.html                                        http://cern.ch/geant4/working_groups/electromagnetic/
                                                        electromagneticWG.html

                                                                                                       51
      Geant4 Capabilities & Use
• Kernel: create geometry, hits, …
• Physics Processes
   – models for EM, hadronics, …
   – „assembled‟ into physics lists for application area
• Tools for faster simulation
   – Shower parameterisation & Event biasing.
• Open interfaces for input/output
   – User commands, visualization
• Verification and validation for use cases
• Using it
   – via ready applications (eg GATE)
   – by starting with examples & customising

                                                           52
          Acknowledgements
Thanks to those who have contributed
  -to creating slides for tutorials / talk, that I borrowed
Thanks to all those who have contributed
  -to the development of Geant4,
  -to its validation for these and other application areas,
   -to those who have applied it
        -particularly those who have given feedback.

Note that it is a large task to give credit to all of them
  individually.

                                                              54

				
DOCUMENT INFO