Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN.

Slides:



Advertisements
Similar presentations
User Interface I Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.3.
Advertisements

Geant4 User Interface Overview Geant4 Mini-Tutorial Hebden Bridge 15 September 2007 Joseph Perl, SLAC (mostly stolen from a talk by Makoto Asai)
10 January 2011 Geant4 Tutorial Introduction J. Perl 1 Geant4 Winter Course Tutorial Texas A&M University January 2011 A five day hands-on course.
Geant4 v9.4 User Interface I Makoto Asai (SLAC) Geant4 Tutorial Course.
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
Highlights of latest developments ESA/ESTEC Makoto Asai (SLAC)
14 Overview of Geant4 Examples 2 nd Finnish Geant4 Workshop 6-7 June 2005 Dennis Wright (SLAC)
14 User Documents and Examples II SLAC Geant4 Tutorial 17 May 2007 Dennis Wright Geant4 V8.3.
Software Installation, release 4.0 Geant4 Users’ Workshop Tutorial SLAC February 18-22, 2002 Takashi Sasaki, Gabriele Cosmo,
Particle Detector Simulation (I) Using Geant4 Ahmed Sayed Hamed (master student)
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
Software Installation The full set of lecture notes of this Geant4 Course is available at
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Japan.
Hands On #1. Overview Part 1 : Starting and familiarizing Where is your installation ? Getting the example programs Running novice examples : N01, N03,
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
14 Overview of Geant4 Examples Geant4 Tutorial 8-10 March 2004 Dennis Wright (SLAC)
Gamma calorimeter for R3B: first simulation results INDEX ● The calGamma Geant4 simulation ( a short introduction ) ● Crystal and geometry selection: –
R 3 B Gamma Calorimeter Agenda. ● Introduction ● Short presentation on the first ● Task definition for R&D period ( )
St. Petersburg State University. Department of Physics. Division of Computational Physics. COMPUTER SIMULATION OF CURRENT PRODUCED BY PULSE OF HARD RADIATION.
Summary of Work Zhang Qiwei INFN - CIAE. Validation of Geant4 EM physics for gamma rays against the SANDIA, EPDL97 and NIST databases.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
Geant4 Acceptance Suite for Key Observables CHEP06, T.I.F.R. Mumbai, February 2006 J. Apostolakis, I. MacLaren, J. Apostolakis, I. MacLaren, P. Mendez.
Hosted Virtualization Lab Last Update Copyright Kenneth M. Chipps Ph.D.
S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January Brachytherapy exercise.
As of 28 Juni 2005Getting Starged with GEM - Shuei Yamada 1 Getting Started with GEM Shuei YAMADA ICEPP, University of Tokyo What is GEM? Before you start.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial Plug-in’s Exercises Pedro Arce Dubois CIEMAT
User Documents and Examples II Geant4 Tutorial at Marshall Space Flight Center 18 April 2012 Dennis Wright (SLAC) Geant4 V9.5.
BeamCal Simulations with Mokka Madalina Stanescu-Bellu West University Timisoara, Romania Desy, Zeuthen 30 Jun 2009 – FCAL Meeting.
6th April 2005Wah-kai Ngai1 First Example in Geant4 3rd HK simulation group meeting.
RICH SIMULATION USING GEANT4 S.EASO, RAL OBJECTIVES OF THE SIMULATION. CURRENT STATUS AND PLANS. INTEGRATION WITH LHCb SOFTWARE. SUMMARY.
Monte Carlo /12/07. What is Geant ? Monte Carlo simulation tool for nuclear and particle physics Set up detectors –Sensitive detector which returns.
7 June 2005 Visualization & GGE Demo J. Perl 1 HepRep/WIRED DAWN OpenGL Geant4 Visualization & GGE Demo Joseph Perl, SLAC.
Detector Simulation Presentation # 3 Nafisa Tasneem CHEP,KNU  How to do HEP experiment  What is detector simulation?
Paris package: practical aspects Installation / presentation To run a simulation Analysis To add a new module to Paris Installation / presentation To run.
1 Performance of a Magnetised Scintillating Detector for a Neutrino Factory Scoping Study Meeting Rutherford Appleton Lab Tuesday 25 th April 2006 M. Ellis.
Hands On #1. Overview Part 1 : Starting and familiarizing Where is your installation ? Getting the example programs Running novice examples : N01, N03,
4th Workshop on Geant4 Bio-medical Developments and Geant4 Physics Validation Riccardo Capra 1 Physics processes Software process and OOAD.
Documentation Gunter Folger / CERN Geant4 School, Annecy 2008.
SoLID simulation with GEMC Zhiwen Zhao 2015/03/26.
Demonstration of EGS5 (KEK) Y. Namito, Y. Kirihara, M. Hagiwara, H. Iwase Last modified on Japan-Korea Joint Summer School on Radiation Science.
Postgraduate Computing Lectures PAW 1 PAW: Physicist Analysis Workstation What is PAW? –A tool to display and manipulate data. Learning PAW –See ref. in.
Makoto Asai (SLAC) Getting Started MGP: added class diagram of basic user application.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial RadioTherapy Exercises Pedro Arce Dubois CIEMAT
M. Oldenburg GridPP Metadata Workshop — July 4–7 2006, Oxford University 1 Markus Oldenburg GridPP Metadata Workshop July 4–7 2006, Oxford University ALICE.
Maria Grazia Pia, INFN Genova and CERN1 Geant4 highlights of relevance for medical physics applications Maria Grazia Pia INFN Genova and CERN.
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
Experiences on Grid production for Geant4 EGEE User Forum, CERN, 1st March 2006 P. Mendez Lorenzo, A. Ribon CERN CERN.
2011 Development Plan Makoto Asai (SLAC PPA/SCA) on behalf of the Geant4 Collaboration March 3 rd, Geant4 Technical Forum.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
New approach of Geant4 Low Energy EM models (from version 9.3) Luciano Pandola INFN, Laboratori del Gran Sasso MaGe Joint Workshop, Munich, January 2010.
GATE application example using SuperComputer 국립암센터 박 세 준 연구원.
Starting with an example PART I Set your environment up and get a Geant4 example.
Gunter Folger / CERN MC-PAD, DESY/Hamburg Jan 2010
Starting with an example
L. Pandola INFN, Gran Sasso National Laboratories
Overview of GERDA simulation activities with MaGe
CPU Benchmarks Parallel Session Summary
User Documents and Examples I
Testing Geant4 with a simplified calorimeter setup
Makoto Asai (SLAC) Geant4 Tutorial Course
Software Installation
Short Course Siena, 5-6 October 2006
The Hadrontherapy Geant4 advanced example
Use of Geant4 in experiment interactive frameworks AliRoot
Introductory Course ORNL, May 2008
GAMOS tutorial Plug-in’s Exercises
Geant4 course - exercices
Software Installation, release 4.0
The Geant4 Hadrontherapy Advanced Example
Physics event timing Use Pythia to generate hadronic decays at 125 GeV
Presentation transcript:

Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN

PART 1 Setting up your Geant4 environment

3 Getting started (1/2) We assume you have downloaded the Geant4 files for Vmware (Player for Windows users, Fusion for Mac users), from the web site Start the Vmware Player/Fusion software Open the Geant4 files Make sure to activate file exchange between Windows/Mac and the Vmware environment

4 Getting started (2/2) Log in Username : local1 Password : local1 Environment variables for Geant4 and associated tools are automatically defined when you open your session, from the file /usr/local/env/Cshrc You can define Geant4 user environment variables in your /home/local1/.ucshrc file

5 Environment variables (1/2) Already set when you when you log in Variables are defined using the command setenv VARIABLE value You can access the value of the variable using echo $VARIABLE For Geant4 system $G4INSTALL Directory where Geant4 is installed Value is $G4SYSTEM Operating system Value is Linux-g++ $G4WORKDIR Directory where executable code will be stored Value is

6 Environment variables (2/2) For data libraries $G4LEVELGAMMADATA Directory with the database of nuclear levels Value is $G4RADIOACTIVEDATA Directory with the databse of radioactive decay Value is $G4LEDATA Directory with the databse of low energy EM Physics Value is $G4NEUTRONHPDATA Directory with the databse of low energy neutrons (thermal-20 MeV) Value is $G4ELASTICDATA Directory with the databse of hadronic elastic scattering Value is $G4ABLADATA Directory with the databse of hadronic ablation models Value is

7 Geant4 examples A number of ready-to-use examples are available in Geant4 Located in $G4INSTALL/examples Three categories Novice : basic functionalities of Geant4 Extended : specific functionalities (specific Physics processes, biasing, magnetic fields…) Advanced : full simulation of realistic use cases (medical physics, space, calorimetry…)

PART 2 Running N03 without macros with macros

9 Let’s try example N03 Copy N03 to your home : cd cp –R $G4INSTALL/examples/novice/N03. cd N03 Read at the README file : simulation of a simple sampling calorimeter… Compile & link the example gmake Warning : environment variables must always be set before compiling & running an executable file.

10 Running without macros Once compiled and linked, you can run the executable using simply : $G4WORKDIR/bin/Linux-g++/exampleN03 Use your Tab key for faster recognition of existing directories You get the following screen output No argument after executable name

11 ************************************************************* Geant4 version Name: geant patch-01 (25-January-2008) Copyright : Geant4 Collaboration Reference : NIM A 506 (2003), WWW : ************************************************************* ***** Table : Nb of materials = 13 ***** [...] > The calorimeter is 10 layers of: [ 10mm of Lead + 5mm of liquidArgon ] [...] You have successfully registered the following graphics systems. Current available graphics systems are: ASCIITree (ATree) [...] Idle> ************************************************************* Geant4 version Name: geant patch-01 (25-January-2008) Copyright : Geant4 Collaboration Reference : NIM A 506 (2003), WWW : ************************************************************* ***** Table : Nb of materials = 13 ***** [...] > The calorimeter is 10 layers of: [ 10mm of Lead + 5mm of liquidArgon ] [...] You have successfully registered the following graphics systems. Current available graphics systems are: ASCIITree (ATree) [...] Idle> Running without macros

12 What happened ? 1.the run is initialized 1.definition of materials, 2.build of geometry 3.set physics processes 4.set production cuts a macro file vis.mac is automatically read to register the visualization drivers (default OGLIX) and the set-up is shown on a graphic window (OpenGL) 3.you get the Idle> prompt where you can enter commands interactively e.g. change geometry, decide which particle to shoot, which energy, execute another macro, shoot a particle,.. Running without macros

13  10 layers : 10 mm Lead + 5 mm Liquid Argon  no magnetic field The default geometry What you get with the VRMLFILE visualization driver

14 Let’s try to shoot a particle: Idle> /run/beamOn 1 By default, a 50 MeV e - is shot impinging perpendicularly on the calorimeter phot: Total cross sections from Sandia parametrisation. Sampling according PhotoElectric model [...] ========= Table of registered couples ======================== Index : 1 used in the geometry : Yes recalculation needed : No Material : Lead cuts : gamma 1 mm e- 1 mm e+ 1 mm Energy thresholds : gamma keV e MeV e MeV Region(s) which use this couple : DefaultRegionForTheWorld phot: Total cross sections from Sandia parametrisation. Sampling according PhotoElectric model [...] ========= Table of registered couples ======================== Index : 1 used in the geometry : Yes recalculation needed : No Material : Lead cuts : gamma 1 mm e- 1 mm e+ 1 mm Energy thresholds : gamma keV e MeV e MeV Region(s) which use this couple : DefaultRegionForTheWorld Initialization of physics tables Calculation of energy cuts Running without macros

15 Running without macros > End of event: 0 Absorber: total energy: MeV total track length: cm Gap: total energy: keV total track length: mm Run terminated. Run Summary Number of events processed : 1 User=0.01s Real=0.35s Sys=0.09s End of Run mean Energy in Absorber : MeV eV mean Energy in Gap : keV eV mean trackLength in Absorber : cm Ang mean trackLength in Gap : mm +- 0 fm > End of event: 0 Absorber: total energy: MeV total track length: cm Gap: total energy: keV total track length: mm Run terminated. Run Summary Number of events processed : 1 User=0.01s Real=0.35s Sys=0.09s End of Run mean Energy in Absorber : MeV eV mean Energy in Gap : keV eV mean trackLength in Absorber : cm Ang mean trackLength in Gap : mm +- 0 fm Event summary Run summary

16 You also get a visualization of the event you have just shot (50 MeV e - ) primary e - gamma-rays Default color code: red = negative charge blue = positive charge green = neutral Running without macros What you get with the DAWNFILE visualization driver

17 Geant4 macros are ASCII files containing a sequence of Geant4 commands: # /run/verbose 2 /event/verbose 0 /tracking/verbose 1 # /gun/particle mu+ /gun/energy 300 MeV /run/beamOn 3 $G4WORKDIR/bin/Linux-g++/exampleN03 run1.mac The argument following the executable name is taken as a macro name, e.g. run1.mac Shoot 3  + of energy 300 MeV Running with macros

18 ---> End of event: 2 Absorber: total energy: MeV total track length: cm Gap: total energy: MeV total track length: cm Run terminated. Run Summary Number of events processed : 3 User=0.01s Real=3.78s Sys=0.06s End of Run mean Energy in Absorber : MeV MeV mean Energy in Gap : MeV keV mean trackLength in Absorber : cm mm mean trackLength in Gap : cm um > End of event: 2 Absorber: total energy: MeV total track length: cm Gap: total energy: MeV total track length: cm Run terminated. Run Summary Number of events processed : 3 User=0.01s Real=3.78s Sys=0.06s End of Run mean Energy in Absorber : MeV MeV mean Energy in Gap : MeV keV mean trackLength in Absorber : cm mm mean trackLength in Gap : cm um Summary of event #2 (the 3 rd one!) Summary of the full run Running with macros

19 primary  + gamma-rays delta-ray Screenshot of the 3 events Running with macros What you get with the DAWNFILE visualization driver

20 $G4WORKDIR/bin/Linux-g++/exampleN03 run1.mac Note that is equivalent to $G4WORKDIR/bin/Linux-g++/exampleN03 [...] Idle> /control/execute run1.mac $G4WORKDIR/bin/Linux-g++/exampleN03 [...] Idle> /control/execute run1.mac command to run an external macro (but in the second case you will get the Idle> prompt back) Running with macros

21 $G4WORKDIR/bin/Linux-g++/exampleN03 Idle> /control/execute newgeom.mac Idle> /control/execute run1.mac $G4WORKDIR/bin/Linux-g++/exampleN03 Idle> /control/execute newgeom.mac Idle> /control/execute run1.mac /N03/det/setNbOfLayers 1 /N03/det/setAbsMat Water /N03/det/setAbsThick 40 cm /N03/det/setGapMat Air /N03/det/setGapThick 0 cm /N03/det/setSizeYZ 40 cm /N03/det/setField 3 tesla /N03/det/update 1) First macro changes geometry: only one layer of absorber (40 cm of water), no gap (thickness = 0 cm)  practically a solid block of water Change transverse dimensions, set a 3 T magnetic field 2) Second macro shoots the MeV  +, as before Change geometry on-the-fly

22 primary  +  B B  B B Geometry, materials, magnetic field and primary particles can be tuned by ASCII macros, without recompiling the code ! x y What you get with the DAWNFILE visualization driver Change geometry on-the-fly

23 Summary Geant4 provides several examples to show basic and advanced functionalities (novice/extended) and full- scale realistic applications (advanced). Environmental variables should be properly set to compile and run Geant4 applications. Geant4 applications can be run interactively (namely, giving commands by keyboard) or by macros. A few macros are distributed with the examples. Simulation parameters (geometry, visualization, primary particles, materials) can be tuned without recompiling the code.