Maria Grazia Pia INFN Genova Salamanca, 15-19 July 2002

Slides:



Advertisements
Similar presentations
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Advertisements

through an application example
Geant4 v9.2p02 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 20th, 2002 Stack management, Digitization and Pile-up.
Introduction and Getting Started ESA/ESTEC Makoto Asai (SLAC)
Makoto Asai (SLAC) Geant4 Users CERN Nov. 15 th, 2002 Customizing Run Management.
Geant4 v9.4 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11 th, 2002 Getting Started.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Highlights of latest developments ESA/ESTEC Makoto Asai (SLAC)
Geant4 v9.3p01 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 20th, 2002 Stack management, Digitization and Pile-up.
S. Guatelli, M.G Pia, INFN Genova S. Guatelli ( CERN, INFN Genova ) CERN, 13 November 2002 Users Workshop Where to put analysis in Geant4 Applications.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 13th, 2002 Stack management, Digitization and Pile-up.
Geant4 application to X and Gamma-ray Telescopes B.Ferrero Merlino 1, D.Favretto 2, R. Giannitrapani 2, F.Longo 2, R.Nartallo 3, P.Nieminen 3, A.Pfeiffer.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Japan.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
A introduction Luciano Pandola INFN-LNGS Partially based on a presentation by G.A.P. Cirrone (INFN-LNS) and M.G. Pia (INFN-Ge) Queen’s University, Belfast.
parameterisation The aim of the exercise is again to build a lead-scintillator calorimeter, this time though the calorimeter will be a trapezoid.
1 Primary particles Geant4 User's Tutorial CERN, February 2010 Talk from previous tutorial by Giovanni Santin Ecole Geant4, Annecy 2008.
Susanna Guatelli Cern Geneve,INFN Genova Alenia Spazio, through an application.
Geant4 Training 2003 Basic structure of the Geant4 Simulation Toolkit The full set of lecture notes of this Geant4 Course is available.
Introduction to Geant4 Makoto Asai (SLAC) Geant4 Tutorial CERN May 25-27, 2005 May 2005, Geant4 v7.0p01.
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Basic Structure of the Geant4 Simulation Toolkit
Primary particle Giovanni Santin ESA / ESTEC and RheaTech Ltd On behalf of the Geant4 collaboration Ecole Geant4 Annecy, and Nov 2008 With.
7th December 2007Geant4 Manchester Seminar1 Geant4 A simulation toolkit Geometry and tracking 4th incarnation.
Geant4 internal Classes and Objects Gunter Folger / CERN Geant4 course, Annecy 2008 User Action & Information Classes.
User Application Toolkit + User application toolkit Geant4 is a toolkit –i.e. you cannot “run” it out of the box –You must write.
User Application Luciano Pandola INFN-LNGS Partially based on a presentation by Maria Grazia Pia (INFN-Ge)
Geant4 internal Classes and Objects Geant4 Users’ Tutorial February 2010 Gunter Folger / CERN User Action & Information Classes.
Susanna Guatelli 12th January 2004, CPS Innovations, Knoxville.
Run and Event G4Run and G4RunManager In Geant4, the Run is the largest unit of simulation and it consist of a series of events Within a Run, the detector.
Geant4 Training 2006 Short Course Katsuya Amako (KEK) Gabriele Cosmo (CERN) Susanna Guatelli (INFN Genova) Aatos Heikkinen (Helsinki Institute of Physics)
Maria Grazia Pia INFN Genova Gran Sasso Laboratory, 2 July 2002
Maria Grazia Pia Hands-on exercises Unit 2 Modelling the experimental set-up.
Makoto Asai (SLAC) Getting Started MGP: added class diagram of basic user application.
Geant4 internal Classes and Objects Gunter Folger / CERN MC-PAD, DESY/Hamburg January 2010 User Action & Information Classes.
Maria Grazia Pia, INFN Genova Maria Grazia Pia INFN Genova Salamanca, July 2002
Geant4 Training 2004 Short Course Katsuya Amako (KEK) Gabriele Cosmo (CERN) Giuseppe Daquino (CERN) Susanna Guatelli (INFN Genova) Aatos Heikkinen (Helsinki.
Maria Grazia Pia Retrieving information from kernel Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Interaction with the Geant4 kernel
Pablo Cirrone INFN-LNS
Geant4 Simulation Toolkit An Introduction
Pablo Cirrone INFN-LNS
Makoto Asai (SLAC) Geant4 Tutorial Course
Interaction with the Geant4 kernel
Basics of a user application
Geant4:User Actions and Analysis
Introduction to Geant4 Makoto Asai (SLAC Computing Services)
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11th, 2002
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Makoto Asai (SLAC) Geant4 Tutorial Course
The n-3He Simulation Using Geant4
Introductory Course PTB, Braunschweig, June 2009
Short Course Siena, 5-6 October 2006
The Hadrontherapy Geant4 advanced example
User Application
Introductory Course ORNL, May 2008
The n-3He Simulation Using Geant4
User Application
User Application
The full set of lecture notes of this Geant4 Course is available at
Customizing Run Management
The full set of lecture notes of this Geant4 Course is available at
The full set of lecture notes of this Geant4 Course is available at
The Geant4 Hadrontherapy Advanced Example
Visualisation and (G)UI
Simulation in Experiments searching for rare events
Presentation transcript:

Maria Grazia Pia INFN Genova Salamanca, July Basics of a user application

Maria Grazia Pia

The main program Geant4 does not provide the main() In his/her main(), the user must –construct G4RunManager (or his/her own derived class) –notify the mandatory user classes to G4RunManager G4VUserDetectorConstruction G4VUserPhysicsList G4VUserPrimaryGeneratorAction The user can define –VisManager, (G)UI session, optional user action classes, one’s own persistency manager, an AnalysisManager… in his/her main()

Maria Grazia Pia User classes Initialization classes Invoked at the initialization G4VUserDetectorConstruction G4VUserPhysicsList Action classes Invoked during the execution loop G4VUserPrimaryGeneratorAction G4UserRunAction G4UserEventAction G4UserStackingAction G4UserTrackingAction G4UserSteppingAction Mandatory classes: G4VUserDetectorConstruction describe the experimental set-up G4VUserPhysicsList select the physics you want to activate G4VUserPrimaryGeneratorAction generate primary events

Maria Grazia Pia Describe the experimental set-up Derive your own concrete class from the G4VUserDetectorConstruction abstract base class Implement the Construct() method (modularise it according to each detector component or sub-detector) materials –construct all necessary materials shapes/solids –define shapes/solids required to describe the geometry volumes –construct and place volumes of your detector geometry sensitive detectors –define sensitive detectors and identify detector volumes to associate them to magnetic field –associate magnetic field to detector regions visualisation attributes –define visualisation attributes for the detector elements

Maria Grazia Pia Select physics processes Geant4 does not have any default particles or processes –even for the particle transportation, one has to define it explicitly Derive your own concrete class from the G4VUserPhysicsList abstract base class particles –define all necessary particles processes –define all necessary processes and assign them to proper particles production thresholds –define production thresholds (in terms of range) Read the Physics Reference Manual first! The Advanced Examples offer a guidance for various typical experimental domains

Maria Grazia Pia Generate primary events Derive your concrete class from the G4VUserPrimaryGeneratorAction abstract base class Pass a G4Event object to one or more primary generator concrete class objects, which generate primary vertices and primary particles The user can implement or interface his/her own generator –specific to a physics domain or to an experiment

Maria Grazia Pia Optional user action classes G4UserRunAction BeginOfRunAction BeginOfRunAction (const G4Run*) –example: book histograms EndOfRunAction EndOfRunAction (const G4Run*) –example: store histograms G4UserEventAction BeginOfEventAction BeginOfEventAction (const G4Event*) –example: event selection EndOfEventAction EndOfEventAction (const G4Event*) –example: analyse the event G4UserTrackingAction PreUserTrackingAction PreUserTrackingAction (const G4Track*) –example: decide whether a trajectory should be stored or not PostUserTrackingAction PostUserTrackingAction (const G4Track*) G4UserSteppingAction UserSteppingAction UserSteppingAction (const G4Step*) –example: kill, suspend, postpone the trackG4UserStackingAction PrepareNewEvent PrepareNewEvent() –reset priority control ClassifyNewTrack ClassifyNewTrack(const G4Track*) –Invoked every time a new track is pushed –Classify a new track (priority control) Urgent, Waiting, PostponeToNextEvent, KillNewStage() –invoked when the Urgent stack becomes empty –change the classification criteria –event filtering (event abortion)

Maria Grazia Pia Select (G)UI and visualisation In your main(), taking into account your computer environment, construct a G4UIsession concrete class provided by Geant4 and invoke its sessionStart() method Geant4 provides: –G4UIterminal csh or tcsh like character terminal –G4GAG tcl/tk or Java PVM based GUI –G4Wo Opacs –G4UIBatch batch job with macro file –etc… Derive your own concrete class from G4VVisManager, according to your computer environment Geant4 provides interfaces to various graphics drivers: –DAWN Fukui renderer –WIRED –RayTracer ray tracing by Geant4 tracking –OPACS –OpenGL –OpenInventor –VRML

Maria Grazia Pia Initialisation Describe a geometrical set-up : a Si-W tracker, a CsI calorimeter and an anti-coincidence system made out of plastic scintillators. Activate electromagnetic/hadronic processes appropriate to the energy range of the experiment

Maria Grazia Pia Beam On Generate primary events according to various distributions relevant to gamma astrophysics

Maria Grazia Pia Event processing Record the coordinates of impact of tracks in the tracker layers Record the energy deposited in each element of the calorimeter at every event