Geant4 course - exercices

Slides:



Advertisements
Similar presentations
Use of G EANT 4 in CMS AIHENP’99 Crete, April 1999 Véronique Lefébure CERN EP/CMC.
Advertisements

User Interface I Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.3.
Geant4 User Interface Overview Geant4 Mini-Tutorial Hebden Bridge 15 September 2007 Joseph Perl, SLAC (mostly stolen from a talk by Makoto Asai)
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.
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.
Particle Detector Simulation (I) Using Geant4 Ahmed Sayed Hamed (master student)
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,
Workshop on Physics on Nuclei at Extremes, Tokyo Institute of Technology, Institute for Nuclear Research and Nuclear Energy Bulgarian Academy.
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 ( )
The PEPPo e - & e + polarization measurements E. Fanchini On behalf of the PEPPo collaboration POSIPOL 2012 Zeuthen 4-6 September E. Fanchini -Posipol.
Validation and TestEm series Michel Maire for the Standard EM group LAPP (Annecy) July 2006.
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.
S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January Brachytherapy exercise.
The Forward Liquid Argon Calorimeter of the ATLAS Detector Geant4 Workshop' September. Triumf, Vancouver Patricia Méndez Lorenzo. CERN EP/SFT 1.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial Plug-in’s Exercises Pedro Arce Dubois CIEMAT
S. Guatelli, M.G Pia, INFN Genova G. Cosmo, S. Guatelli, M.G Pia Salamanca, July 2002
6th April 2005Wah-kai Ngai1 First Example in Geant4 3rd HK simulation group meeting.
CHEP06, Mumbai-India, Feb 2006V. Daniel Elvira 1 The CMS Simulation Validation Suite V. Daniel Elvira (Fermilab) for the CMS Collaboration.
Hadronic Interaction Studies for LHCb Nigel Watson/Birmingham [Thanks to Silvia M., Jeroen v T.]
Monte Carlo /12/07. What is Geant ? Monte Carlo simulation tool for nuclear and particle physics Set up detectors –Sensitive detector which returns.
1 Status and Plans for Geant4 Physics Linear Collider Simulation Workshop III 2-5 June 2004 Dennis Wright (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 Calorimeter in G4MICE Berkeley 10 Feb 2005 Rikard Sandström Geneva University.
Release Validation J. Apostolakis, M. Asai, G. Cosmo, S. Incerti, V. Ivantchenko, D. Wright for Geant4 12 January 2009.
The ATLAS detector. High energy particle physics Typical detector layout Tracking chamber ElectroMagnetic calorimeter Hadronic calorimeter Muon chamber.
Hands On #1. Overview Part 1 : Starting and familiarizing Where is your installation ? Getting the example programs Running novice examples : N01, N03,
1 Background radiation studies in LHCb with GAUSS/Geant4 Giuseppe G. Daquino PH/SFT.
Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN.
Geant4 CPU performance : an update Geant4 Technical Forum, CERN, 07 November 2007 J.Apostolakis, G.Cooperman, G.Cosmo, V.Ivanchenko, I.Mclaren, T.Nikitina,
Notes About MARS background simulations for BTeV A Summary of how far we’ve come and how far we have to go. By DJ Wagner 9/12/98 Vanderbilt University.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial RadioTherapy Exercises Pedro Arce Dubois CIEMAT
Update G4builder issues Talk written almost entirely by Stan Bentvelsen with a few updates from Christopher Lester ATLAS G4 Workshop December 2000 CAMBRIDGE.
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
A. SarratILC TPC meeting, DESY, 15/02/06 Simulation Of a TPC For T2K Near Detector Using Geant 4 Antony Sarrat CEA Saclay, Dapnia.
Study of Calorimeter performance using the LC full simulator The 8th ACFA Workshop Yoshihiro Yamaguchi (Tsukuba U.) M. -C. Chang (RCNS, Tohoku U.) K. Fujii.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
A Short Course on Geant4 Simulation Toolkit Introduction
Geant4 for (Medical) Education “ Geant4 for (Medical) Education ” Toolkit and Courseware Geant4 Medical Workshop in Lyon 21 July 2006 Universite-Lyon I.
Starting with an example PART I Set your environment up and get a Geant4 example.
Monte Carlo methods in spallation experiments Defense of the phD thesis Mitja Majerle “Phasotron” and “Energy Plus Transmutation” setups (schematic drawings)
Background simulations: update and simulations of absorbed dose
Starting with an example
Simulation Tools for Test Beam
Examples of a gamma ray detector
Methods of Experimental Particle Physics
User Documents and Examples I
Introduction Goal: Can we reconstruct the energy depositions of the proton in the brain if we are able to reconstruct the photons produced during this.
GPAMELA Alessandro Bruno.
CMS requirements for G4 TF on
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Testing Geant4 with a simplified calorimeter setup
Makoto Asai (SLAC) Geant4 Tutorial Course
The Hadrontherapy Geant4 advanced example
Higgs Factory Backgrounds
A Short Course on Geant4 Simulation Toolkit Introduction
Detector Optimization using Particle Flow Algorithm
Geant4 in HARP V.Ivanchenko For the HARP Collaboration
GAMOS tutorial Plug-in’s Exercises
The Geant4 Hadrontherapy Advanced Example
Physics event timing Use Pythia to generate hadronic decays at 125 GeV
LC Calorimeter Testbeam Requirements
Simulation in Experiments searching for rare events
Presentation transcript:

Geant4 course - exercices Overview Part I – Starting and familiarising Where is your installation ? Getting the example programs Running examples Part II – Looking into Geant4, trying it out with exercises Play with basic UI commands Examine cross sections Compute photon attenuation coefficient Simulate depth dose curve Compute and plot Bragg curve Hadronic physics list Addenda: other examples, histogramming 07/04/2019 Geant4 course - exercices

Geant4 course - exercices Part I Starting, first trials Find your installation Copy example programs into your area Compile and run examples 07/04/2019 Geant4 course - exercices

Copy selected Geant4 examples The Geant4 system (source and libraries) is already installed on your computer find it at $G4INSTALL (= /cern/2007/geant4.8.2 ) prompt> cd $HOME  get a copy of g4env.csh (or g4env.sh) prompt> source g4env.csh (or prompt> ./*g4env.sh) $G4WORKDIR is $HOME/geant4 prompt> env |grep G4 prompt> mkdir geant4 prompt> cd geant4 Copy following examples prompt> mkdir examples prompt> cp –r $G4INSTALL/examples/novice $G4WORKDIR/examples prompt> cp –r $G4INSTALL/examples/extended $G4WORKDIR/examples prompt> cd examples 07/04/2019 Geant4 course - exercices

Compile and run first example Compile and run N01 (in batch mode) prompt> cd $G4WORKDIR/examples/novice/N01 see README prompt> gmake compile and link – create the executable called ‘exampleN01’ uses the recipe how to do this in GNUmakefile prompt> rehash (on tcsh only) make the new executable visible for the next command prompt> exampleN01 runs Geant4 for simple setup, gives you some output When you are done prompt> gmake clean this deletes the executable – as exampleN01 is very limited 07/04/2019 Geant4 course - exercices

Geant4 course - exercices User Classes examine N03 prompt> cd $G4WORKDIR/examples/novice/N03 see README (in particular : how to start ? ) prompt> nedit exampleN03.cc& main() The toolkit does not provide main(). There are more 70 examples initialization classes Detector Construction Physics List action classes Invoked during an event loop Primary Generator Action Run Action Event Action Tracking Action Stepping Action Stacking Action you can define VisManager, (G)UI session, optional user action classes, and/or your persistency manager in your main(). Note : classes written in red are mandatory. 07/04/2019 Geant4 course - exercices

Compile and run novice example prompt> cd $G4WORKDIR/examples/novice/N03 see README (in particular : how to start ? ) prompt> unsetenv G4UI_USE_XM prompt> gmake prompt> rehash execute N03 in batch mode ( see README. Look at the macro file “run1.mac” ) prompt> exampleN03 run1.mac execute N03 in interactive mode prompt> exampleN03 try the commands you see in run1.mac have a look at the macro newgeom.mac Idle> control/execute newgeom.mac Idle> exit prompt> gmake clean 07/04/2019 Geant4 course - exercices

Looking into Geant4, trying it out with exercises Part II Looking into Geant4, trying it out with exercises Proton stopping Muon physics EM shower Production thresholds Magnetic field Examine cross sections Compute photon attenuation coefficient Simulate depth dose curve – and plot it Compute and plot Bragg curve Hadronic physics list 07/04/2019 Geant4 course - exercices

electromagnetic/TestEm3 examine TestEm3 prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm3 see README see TestEm3.cc prompt> ls src visualize few events interactively prompt> gmake prompt> rehash prompt> TestEm3 PreInit> control/execute vis.mac Idle> run/beamOn Idle> run/beamOn 5 Idle> exit Note: the commands above are common for Geant4 interactive programs Some parameters can change (eg vis.mac, the name of an input file) execute TestEm3 in batch mode prompt> TestEm3 TestEm3.in |tee result.out prompt> nedit result.out& 07/04/2019 Geant4 course - exercices

exercise 1 : proton stopping start TestEm3 in interactive session prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm3 prompt> nedit emtutor.mac & prompt> TestEm3 Idle> control/execute emtutor.mac Idle> gun/particle proton Idle> gun/energy 1 GeV Idle> run/beamOn Idle> run/beamOn 10 Idle> gun/energy 200 MeV Question : estimate energy below which protons stop …………… Idle> exit 07/04/2019 Geant4 course - exercices

exercise 2 : muon physics start TestEm3 in interactive session prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm3 prompt> nedit emtutor.mac & prompt> TestEm3 Idle> control/execute emtutor.mac Idle> gun/particle mu+ Idle> gun/energy 1 GeV Idle> run/beamOn 10 Idle> gun/energy 10 GeV Idle> gun/energy 100 GeV Idle> gun/energy 50 MeV Idle> run/beamOn 1 Question : explain the last event Idle> tracking/verbose 2 can help Idle> run/beamOn …………………… Idle> exit 07/04/2019 Geant4 course - exercices

Geant4 course - exercices exercise 3 : EM shower TestEm3 was created for simulation of sampling calorimeters. There are number of macro files for differents configurations. start TestEm3 in interactive session prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm3 prompt> TestEm3 Idle> control/execute emtutor.mac Idle> gun/particle gamma Idle> gun/energy 1 GeV Idle> run/beamOn 1 Idle> run/beamOn 10 Idle> gun/particle e- Idle> gun/energy 500 MeV Question : estimate energy below which e- shower will not be developed …………………… Idle> exit 07/04/2019 Geant4 course - exercices

exercise 4 : production threshold start TestEm3 in interactive session prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm3 prompt> TestEm3 Idle> control/execute emtutor.mac Idle> gun/particle e- Idle> gun/energy 200 MeV Idle> run/beamOn 10 Idle> ls /testem/phys ls and also tab can be used to see available UI commands Idle> testem/phys/setCuts 1 mm Idle> testem/phys/setCuts 1 cm Idle> testem/phys/setCuts 10 cm Question : estimate cut for which no secondary particles will be produced …………………… Idle> exit 07/04/2019 Geant4 course - exercices

Geant4 course - exercices exercise 5 : UI commands start TestEm3 in interactive session prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm3 prompt> TestEm3 Idle> control/execute emtutor.mac Idle> ls /material Idle> material/g4/printMaterial Water material is defined via its elements and isotopes Idle> material/nist/listMaterials about 300 predifined materials Idle> particle/list shows particles defined in current physics list Idle> process/list shows processes defined in current physics list Question : which processes are defined for pi+ ? Gamma ? …………………… Idle> exit 07/04/2019 Geant4 course - exercices

exercise 6 : magnetic field start TestEm3 in interactive session prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm3 prompt> TestEm3 Idle> control/execute emtutor.mac Idle> testem/det/setField 1 tesla Idle> gun/particle proton Idle> gun/energy 200 MeV Idle> run/beamOn 10 Idle> testem/det/setField 5 tesla Play with magnetic field for different particles at different energies …………………… Idle> exit 07/04/2019 Geant4 course - exercices

TestEm0 : read cross sections access cross sections and others data with TestEm0 prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm0 see README prompt> gmake prompt> rehash in batch : prompt> TestEm0 TestEm0.in interactively : prompt> TestEm0 Idle> ……… Idle> exit prompt> gmake clean 07/04/2019 Geant4 course - exercices

TestEm13 : attenuation of photon beam -1 evaluate attenuation coefficient from transmission ratio prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm13 see README prompt> gmake prompt> rehash visualize few events interactively (by default TestEm13 shoots 1 MeV gamma through 1cm of Water) prompt> TestEm13 PreInit> control/execute vis.mac Idle> gun/energy 100 keV Idle> run/beamOn 10 Question : count transmitted gamma and evaluate attenuation coefficient …………………………. Idle> exit 07/04/2019 Geant4 course - exercices

TestEm13 : attenuation of photon beam -2 evaluate attenuation coefficient from transmission ratio prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm13 run high statistic in batch prompt> nedit gamma.mac& prompt> TestEm13 gamma.mac |tee result.out Question : evaluate attenuation coefficient from run2 and compare with run1 Question : compute attenuation coefficient for gamma 1 MeV in Be, Fe, Pb 07/04/2019 Geant4 course - exercices

TestEm11 : depth dose didtribution - 1 Compute and plot depth dose curve with TestEm11 prompt> cd $G4WORKDIR/examples/extended/electromagnetic/TestEm11 see README prompt> gmake prompt> rehash Visualize few events interactively (by default TestEm11 fires 500 keV e- onto 1mm Silicon) prompt> TestEm11 PreInit> control/execute vis.mac Idle> run/beamOn Idle> run/beamOn 50 Idle> exit Note: the commands above are common for Geant4 interactive programs Some parameters can change (eg vis.mac, the name of an input file) 07/04/2019 Geant4 course - exercices

Geant4 course - exercices TestEm11 - 2 Make histogram of the depth dose distribution (see README and slide : histograms management) to force the recompilation of the class HistoManager : uncomment G4ANALYSIS_USE in GNUmakefile (take out the #) prompt> gmake histclean prompt> gmake run the macro TestEm11.in (have a look in it) prompt> Testem11 TestEm11.in The program produces an histogram file (testem11.hbook) which can be viewed with a specific tool, called PAW prompt> paw PAW > h/file 1 testem11.hbook PAW > h/list PAW > h/plot 1 PAW > h/plot 3 PAW > h/plot 5 PAW > option logy PAW > exit 07/04/2019 Geant4 course - exercices

Geant4 course - exercices TestEm11 - 3 Exercise : write a macro to compute and plot the depth dose curve of 5 MeV e- in water 07/04/2019 Geant4 course - exercices

Geant4 course - exercices TestEm7 : Bragg curve - 1 Compute and plot Bragg curve with TestEm7 cd $G4WORKDIR/examples/extended/electromagnetic/TestEm7 see README prompt> gmake prompt> rehash Visualize few events interactively (by default TestEm7 is proton beam, 160 MeV, in 20 cm of water) prompt> TestEm7 PreInit> control/execute vis.mac Idle> run/beamOn Idle> run/beamOn 50 Idle> process/inactivate msc Idle> exit 07/04/2019 Geant4 course - exercices

Geant4 course - exercices TestEm7 - 2 Make histogram of the Bragg curve (see README and slide : histograms management) to force the recompilation of HistoManager : uncomment G4ANALYSIS_USE in GNUmakefile prompt> gmake histclean prompt> gmake run the macro tallies.mac (have a look in it) prompt> Testem7 tallies.mac The program produces an histogram file (testem7.hbook) which can be viewed with a specific tool, called PAW prompt> paw PAW > h/file 1 testem7.hbook PAW > h/list PAW > h/plot 1 PAW > exit 07/04/2019 Geant4 course - exercices

Hadr01 : hadronic physics This example shows hadronic beam interaction with a target prompt> cd $G4WORKDIR/examples/extended/hadronic/Hadr01 see README prompt> gmake prompt> rehash visualize few events interactively prompt> hadr01 PreInit> control/execute vis.mac Idle> /testhadr/Physics QGSP Idle> gun/particle proton Idle> gun/energy 1 GeV Idle> run/beamOn 1 Idle> run/beamOn 10 Question : compare proton and e- showers for different energies and targets Idle> ………………… Idle> exit Note : to change predefined physics list you must exit and start new session 07/04/2019 Geant4 course - exercices

Hadr01 : hadronic physics visualize few events interactively prompt> hadr01 PreInit> control/execute vis.mac Idle> /testhadr/Physics QGSP_BERT Idle> gun/particle pi+ Idle> gun/energy 10 GeV Idle> run/beamOn 10 Idle> gun/particle proton Question : compare proton and pi+ interaction for different energies and targets, estimate nuclear interaction length Idle> ………………… Idle> exit Note : to change predefined physics list you must exit and start new session 07/04/2019 Geant4 course - exercices

Verifying other interactions More global verifications Histogramming Addenda Verifying other interactions More global verifications Histogramming 07/04/2019 Geant4 course - exercices

Photon interactions Total cross sections, mean free paths … Unpolarized, no fluorescence Total cross sections, mean free paths … Em0, Em13, Em14 DCS Final state : energy spectra angular distributions Em14 07/04/2019 Geant4 course - exercices

Charged particle interactions Unpolarized, no fluorescence Total cross sections, mean free paths … Em0, Em13, Em14 DCS Stopping power, range … Em1, Em5, Em11, Em12 Final state : energy spectra angular distributions Em14 With cuts 07/04/2019 Geant4 course - exercices

More global verifications Single layer : transmission, absorption, reflexion Em5 Depth dose distribution, tallies Bragg curve Em11, Em12 Em7 Shower shapes, Moliere radius Em2 Sampling calorimeters, energy flow Em3 Crystal calorimeters Em9 07/04/2019 Geant4 course - exercices

Histograms management Creating histograms is always optional, under the control of G4ANALYSIS_USE  need at least one AIDA implementation A set of 1D histograms is predefined in an HistoManager class  only 1D histograms; no ntuples, no hits structures. Booking, Filling a given histogram is selected and booked via UI command his binning is defined via UI command Output the name of the file and its format are defined via UI command  xml, root, hbook 07/04/2019 Geant4 course - exercices