Starting with an example PART I Set your environment up and get a Geant4 example.

Slides:



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

LC Calorimeter Testbeam Requirements Sufficient data for Energy Flow algorithm development Provide data for calorimeter tracking algorithms  Help setting.
User Documents and Examples II KOI, Tatsumi Geant4 V9.4.p01Geant4 Tutorial at ORNL 10-March
Introduction of Simulation by GEANT4 Jeng-Lun, Chiu Institute of Physics, NTHU 2006/06/22.
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)
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 ( )
Summary of Work Zhang Qiwei INFN - CIAE. Validation of Geant4 EM physics for gamma rays against the SANDIA, EPDL97 and NIST databases.
SimpleGeo render plugins Chris Theis. SimpleGeo architecture GUI Graphical user interface CSG – Engine B-Rep - Kernel Importer/ Exporter Command manager.
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.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial Plug-in’s Exercises Pedro Arce Dubois CIEMAT
March 2, 2005Wah-kai Ngai1 Installation of Geant4 1st HK Simulation Meeting.
User Documents and Examples II Geant4 Tutorial at Marshall Space Flight Center 18 April 2012 Dennis Wright (SLAC) Geant4 V9.5.
S. Guatelli, M.G Pia, INFN Genova G. Cosmo, S. Guatelli, M.G Pia Salamanca, July 2002
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.
Status of particle_hp Pedro Arce Emilio Mendoza Daniel Cano-Ott (CIEMAT, Madrid)
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.
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.
Hands On #1. Overview Part 1 : Starting and familiarizing Where is your installation ? Getting the example programs Running novice examples : N01, N03,
Documentation Gunter Folger / CERN Geant4 School, Annecy 2008.
Validation of EM Part of Geant4
Status of particle_hp Pedro Arce Emilio Mendoza Daniel Cano-Ott (CIEMAT, Madrid)
Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN.
Upgrade of G4Penelope models Luciano Pandola INFN – LNGS for the Geant4 EM Working Groups 15 th Geant4 Workshop, ESTEC, October 4 th -8 th, 2010.
Geant4 CPU performance : an update Geant4 Technical Forum, CERN, 07 November 2007 J.Apostolakis, G.Cooperman, G.Cosmo, V.Ivanchenko, I.Mclaren, T.Nikitina,
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
Radiation study of the TPC electronics Georgios Tsiledakis, GSI.
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
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 국립암센터 박 세 준 연구원.
Gunter Folger / CERN MC-PAD, DESY/Hamburg Jan 2010
Starting with an example
GAMOS tutorial PET Exercises
CPU Benchmarks Parallel Session Summary
User Documents and Examples I
(CMS GEANT4 simulation)
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Testing Geant4 with a simplified calorimeter setup
Software Installation
Hadronic Physics in Geant4
The Hadrontherapy Geant4 advanced example
Use of Geant4 in experiment interactive frameworks AliRoot
Detector Optimization using Particle Flow Algorithm
Geant4 in HARP V.Ivanchenko For the HARP Collaboration
GAMOS tutorial Plug-in’s Exercises
Geant4 course - exercices
Marc Verderi GEANT4 collaboration meeting 01/10/2002
Software Installation, release 4.0
The Geant4 Hadrontherapy Advanced Example
Physics event timing Use Pythia to generate hadronic decays at 125 GeV
LC Calorimeter Testbeam Requirements
Presentation transcript:

Starting with an example

PART I Set your environment up and get a Geant4 example

3 Getting started First, you have to access the common PC where Geant4 is installed, and set the environment variables up: from your laptop, open a ssh connection to the IP address (be sure to have your X-server on, e.g. by Xming, to open graphic windows). UserID and password are given to each student. since the script for setting the environment up works for tc-shell, give the command tcsh run the script to set the system up : source /course/env.sh

4 Set environment variables (1) setenv G4SYSTEM Linux-g++ setenv G4INSTALL /.../geant4/geant4.9.1 setenv G4INCLUDE $G4WORKDIR/include setenv G4LIB $G4INSTALL/lib/ setenv G4WORKDIR $HOME setenv CLHEP_BASE_DIR /.../CLHEP/.../2.0.x.x setenv LD_LIBRARY_PATH "$CLHEP_BASE_DIR/lib:$LD_LIBRARY_PATH" Libraries and system settings Geant4 installation info User’s working directory (libs and bins) CLHEP installation directory and libraries

5 Set environment variables (2) setenv G4LEVELGAMMADATA /.../PhotonEvaporation  Directory with the DB of Nuclear Levels setenv G4RADIOACTIVEDATA /.../RadioactiveDecay3.2  Directory with the DB of Radioactive Decay setenv G4LEDATA /.../G4EMLOW5.1  Directory with the DB of LowEnergy EM physics setenv G4NEUTRONHPDATA /.../G4NDL3.12  Directory with the DB for low-energy neutrons (cross sections and final states), from thermal to 20 MeV setenv G4ELASTICDATA /.../G4ELASTIC1.1  Directory with the DB for hadron elastic scattering setenv G4ABLADATA /.../G4ABLA3.0  Directory with the DB for Ablation hadronic models Geant4 databases

6 Get an example to run (1) cd $G4INSTALL/examples A number of ready-for-the-use examples are released with the Geant4 code Three classes of examples: - novice : show basic functionalities of Geant4 - extended : show in more details specific functionality of Geant4 (e.g. biasing, electromagnetic or optical physics, magnetic fields,...) - advanced : full simulation of a realistic experimental use case (medical physics, underground physics, calorimetry,...)

7 Get an example to run (2) cd $G4INSTALL/examples/novice cp –r N03 $G4WORKDIR Let’s try a novice example (N03). Copy the source code in your working directory What’s N03 about? Read the file called README in the N03 directory for basic information: “This example simulates a simple Sampling Calorimeter setup”. A more detailed description of the functionalities is also included in the README

8 Compile the example cd $G4WORKDIR/N03 gmake Now, compile the example and get an executable to run Making dependency for file exampleN03.cc... Making dependency for file src/ExN03SteppingVerbose.cc... [...] Compiling ExN03DetectorConstruction.cc... Compiling ExN03DetectorMessenger.cc... Compiling ExN03EventAction.cc... [...] Creating/replacing object files in /exampleN03/libexampleN03.a... Compiling exampleN03.cc... Using granular libraries... Linking exampleN Done!

9 Eventually, the executable $G4WORKDIR/bin/Linux-g++/exampleN03 When compilation and linking are successfully completed, you get an executable file to be run Warning: to run the executable your environment variables must be set: shared libraries are used. Furthermore, the program needs the environment variables pointing to the Geant4 databases (if they are not found, the program might crash)

PART II Run the Geant4 example

11 Run without macros (1) $G4WORKDIR/bin/Linux-g++/exampleN03 No argument given after the executable name: ************************************************************* 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>

12 Run without macros (2) What did it happen? 1) the run is initialized (define materials, build geometry, set physics and production cuts,...) 2) the macro vis.mac is automatically executed to register the visualization drivers (default: OGLIX), the set-up is shown on a graphic window (OpenGL) 3) eventually you get the Idle> prompt where you can give commands interactively e.g. change geometry, decide which particle to shoot, which energy, execute an other macro, shoot a particle,..

13 The default geometry Visualization of the setup using the VRML2FILE driver Default geometry: 10 layers, 10 mm Lead + 5 mm Liquid Argon, no magnetic field

14 Run without macros (3) Let’s try to shoot a particle: Idle> /run/beamOn 1 By default it is a 50 MeV e - 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 Initialization of physics tables Calculation of energy cuts

15 Run without macros (4) > End of event: 0 Absorber: total energy: MeV total track length: cm Gap: total energy: keV total track length: um =========================================== [...] End of Run mean Energy in Absorber : MeV +- 0 eV mean Energy in Gap : keV +- 0 eV mean trackLength in Absorber : cm +- 0 fm mean trackLength in Gap : um fm Event summary Run summary

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

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 Run with a macro (1) $G4WORKDIR/bin/Linux-g++/exampleN03 run1.mac The argument following the executable name is taken as a macro name Shoot 3  + of energy 300 MeV

18 Run with a macro (2) ---> End of event: 2 Absorber: total energy: MeV total track length: cm Gap: total energy: MeV total track length: cm End of Run mean Energy in Absorber : MeV keV mean Energy in Gap : MeV keV mean trackLength in Absorber : cm um mean trackLength in Gap : cm mm Summary of event #2 (the 3 rd one!) Summary of the full run

19 Run with a macro (3) primary  + gamma-rays delta-ray Screenshot of the 3 events:

20 Run with a macro (4) $G4WORKDIR/bin/Linux-g++/exampleN03 run1.mac Notice: is equivalent to $G4WORKDIR/bin/Linux-g++/exampleN03 [...] Idle> /control/execute run1.mac command to run an external macro (but in the second case you get the Idle> prompt back)

21 Change geometry on-the-fly (1) $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 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 The second macro shoots the MeV  +, as before

22 Change geometry on-the-fly (2) primary  +  B B  B B Geometry, materials, magnetic field and primary particles can be tuned by ASCII macros, without need to recompile the code x y

PART III Summary

24 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 the need to recompile the code