Makoto Asai (SLAC) Geant4 Users CERN Nov. 13th, 2002 Stack management, Digitization and Pile-up.

Slides:



Advertisements
Similar presentations
The Geant4 Kernel: Status and Recent Developments John Apostolakis, Gabriele Cosmo – CERN / PH Makoto Asai – SLAC On behalf the Geant4 collaboration April.
Advertisements

Geant4 v9.2p02 Speed up Makoto Asai (SLAC) Geant4 Tutorial Course.
Geant4 v9.2p02 Kernel II Makoto Asai (SLAC) Geant4 Tutorial Course.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Geant4 v9.2p02 Particle Gun Makoto Asai (SLAC) Geant4 Tutorial Course.
Geant4 v9.2p02 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Welcome to Geant4 Users ’ Workshop Makoto Asai (SLAC) Feb. 18 th – 22 th, 2002.
Primary particle generation Makoto Asai (SLAC) Geant4 Users CERN Nov. 12 th, 2002.
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.
Primary particle generation Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 15 th, 2002 Customizing Run Management.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 12 th, 2002 Detector Sensitivity.
Geant4 v9.4 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Detector Sensitivity.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11 th, 2002 Getting Started.
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Stack management, digitization and pile-up 浅井 慎 ( SLAC )
Scoring II Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
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.
14 Overview of Geant4 Examples 2 nd Finnish Geant4 Workshop 6-7 June 2005 Dennis Wright (SLAC)
Geant4 v9.3 Scoring II Makoto Asai (SLAC) Geant4 Tutorial Course.
Primary particle generation Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002.
Some tips for geometries of medical applications Makoto Asai (SLAC)
INPUT/OUTPUT ORGANIZATION INTERRUPTS CS147 Summer 2001 Professor: Sin-Min Lee Presented by: Jing Chen.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Japan.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
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.
Geant4 internal Classes and Objects Gunter Folger / CERN Geant4 course, Annecy 2008 User Action & Information Classes.
Computing Performance Recommendations #13, #14. Recommendation #13 (1/3) We recommend providing a simple mechanism for users to turn off “irrelevant”
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.
Maria Grazia Pia INFN Genova Salamanca, July 2002
CBM Software Meeting 1 CBM Simulation & Analysis Framework Geant3 / Gean4 configuration M. Al-Turany, D. Bertini.
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.
Masterclass Introduction to hands-on Exercise Aim of the exercise  Identify electrons, muons, neutrinos in the ATLAS detector  Types of Events.
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.
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
Read-out and detector response
Interaction with the Geant4 kernel
J. Apostolakis, M. Asai, G. Cosmo, A. Howard
Makoto Asai (SLAC) Geant4 Tutorial Course
Interaction with the Geant4 kernel
Basics of a user application
Geant4:User Actions and Analysis
Geant4 introduction 2008/03/18 Nobu Katayama KEK
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11th, 2002
Read-out and detector response
Detector sensitivity Makoto Asai (SLAC Computing Services)
A shortcut to the tracking
Makoto Asai (SLAC) Geant4 Tutorial Course
Read-out and detector response
User Application
Marc Verderi GEANT4 collaboration meeting 01/10/2002
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
Kernel Author: Makoto Asai.
Primary particle Makoto Asai (SLAC Computing Services)
The full set of lecture notes of this Geant4 Course is available at
Geant4: Detector description module
Simulation in Experiments searching for rare events
Presentation transcript:

Makoto Asai (SLAC) Geant4 Users CERN Nov. 13th, 2002 Stack management, Digitization and Pile-up

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)2Introduction  This tutorial covers the features of –Stack management –Digitization –Multiple events handling and pile-up  These features are not necessary for naïve simulation. But by utilizing them, you can make your simulation program more flexible and efficient.

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)3 Stack management  By default, Geant4 has three track stacks. –“Urgent”, “Waiting”, “PostponeToNextEvent” –Each stack is a simple Last-in-First-out stack. –Tracks are popped out only from Urgent stack. –Once Urgent stack becomes empty, tracks in Waiting stack are moved to Urgent stack. –UserStackingAction class classifies each track which stack to be pushed in (or killed). –By utilizing stacks, you can manage priorities of the tracks without achieving “highest priority scan”. –You can add stacks for more intelligent stack management.  Proper stack management and selection/abortion of event gives you better performance of your simulation.

Stack management Event Manager Tracking Manager Stacking Manager User Stacking Action Urgent Stack Waiting Stack Postpone To Next Event Stack Push Pop Push Pop Classify secondary or suspended tracks Process One Track primary tracks

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)5G4UserStackingAction  G4UserStackingAction class has three methods.  void NewStage() –Invoked when Urgent stack becomes empty –Invoked after tracks in Waiting stack had moved to Urgent stack –You can issue stackManager->ReClassify() thus all tracks in Urgent stack will be re-examined by ClassifyNewTrack method  G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*) –Invoked every time a new track is pushed in –Classification fUrgent // pushed into Urgent stack fWaiting // pushed into Waiting stack fPostpone // pushed into PostponeToNextEevnt fKill // killed  void PrepareNewEvent() –Invoked at the beginning of new event

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)6G4UserStackingAction ExampleN04 gives you a good example of stack management.  This example has a simplified collider detector geometry and event sample of Higgs particle decays into muons via Zs.  At the beginning of an event, only primary muons are pushed into Urgent stack and others to Waiting stack.  Hits in muon counters are examined when Urgent stack becomes empty –Event is aborted if reasonable number of hits are NOT found in the muon counters, otherwise proceed to next stage.

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)7G4UserStackingAction  Only primary charged tracks are pushed into Urgent stack –Each track is traced in the tracking region and then suspended and pushed back to Waiting Stack once it reaches to calorimeter.  Hits in tracking chambers are examined –Event is aborted if reasonable numbers of isolated muons are NOT found.  Only tracks (both primary and secondary) in “Region of Interest” are pushed into Urgent stack and traced. –I.e. Shower is simulated only inside of RoI.

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)8Digitization  Digit represents a detector output (e.g. ADC/TDC count, trigger signal).  Digit is created with one or more hits and/or other digits by a concrete implementation derived from G4VDigitizerModule.  In contradiction to the Hit which is generated at tracking time automatically, the digitize() method of each G4VDigitizerModule must be explicitly invoked by the user’s code (typically at EndOfEventAction).

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)9Digitization  The usages of methods in G4VDigitizerModule is quite similar to those of G4VSensitiveDetector. –Constructor Registration of digits collection name(s) –Digitize() method Get hits from proper hits collections and/or digits from proper digits collections Generate digit(s) and store to dedicated digits collection(s) Set created digits collection(s) to G4DCofThisEvent

Stack Management, Digitization and Pile-up - M.Asai (SLAC) - Geant4 Users CERN (Nov/13/2002)10 Multi-event treatment and pile-up  By design, G4EventManager cannot handle more than one events. –UserEventAction neither  Only at the “Run” level, you can handle more than one events. –Create your own RunManager deriving from G4RunManager. –Implement your own AnalyzeEvent() method. Here you have access to more than one G4Event objects. GetPreviousEvent(G4int) method Don’t forget to invoke SetNumberOfEventsToBeStored() method before starting an event loop. –You can invoke your Digitizer to generate digits / digits- collection.