e9f2eec7dc1aaf96a1e5e1257f3cefdc.ppt
- Количество слайдов: 32
Geant 4 A simulation toolkit Geometry and tracking 4 th incarnation 7 th December 2007 Geant 4 Manchester Seminar 1
• Overview – – – – Synopsis Introduction Toolkit Main program Detector construction Physics list Generator Analysis Guiding Geant 4 • User actions • Commands CPU performance Physics performance Some applications Publications Future • Demonstrations 7 th December 2007 Geant 4 Manchester Seminar 2
Introduction — 1 • Started from two studies done independently at CERN and KEK in 1993 • Became RD 44, sponsored by the CERN Detector Research and Development Committee, in 1994 • GEANT 3’s Fortran-based technology was limiting development • Mandate: modern (object oriented) techniques • Early decision to use C++ • 100 scientists/engineers, global 7 th December 2007 Geant 4 Manchester Seminar 3
Introduction — 2 • After 4 years R &D, first version December 1998 • Geant 4 Collaboration formed January 1999 – Continue development – Provide maintenance • New Collaboration Agreement 2006 – – Open software licence 10 institutes (including PPARC) 85 members (25 FTEs) Technical Forum for users (HEP, Space, Medicine, Nuclear Physics, …) 7 th December 2007 Geant 4 Manchester Seminar 4
Toolkit • • • Make your own application Open Extendable Versatile Toolkit++ – – Huge range of physics Many geometrical shapes Many examples Web-based documentation and code browsing 7 th December 2007 Geant 4 Manchester Seminar 5
Main program int main(int argc, char** argv) { G 4 Run. Manager * run. Manager = new G 4 Run. Manager; run. Manager->Set. User. Initialization(new My. Detector); run. Manager->Set. User. Initialization(new My. Physics); run. Manager->Set. User. Action(new My. Generator); run. Manager->Initialize(); run. Manager->Beam. On(10); delete run. Manager; return 0; } My. Detector, My. Physics and My. Generator are “mandatory” classes, i. e. , instances are required by the run manager. The above will track 10 events — but will keep things to itself!!! (See later for how to get information out!!) 7 th December 2007 Geant 4 Manchester Seminar 6
Detector Construction — 1 class My. Detector: public G 4 VUser. Detector. Construction { public: G 4 VPhysical. Volume* Construct(); }; G 4 VPhysical. Volume* My. Detector: : Construct() { G 4 Material* Ar = new G 4 Material("Argon. Gas", 18, 39. 95*g/mole, 1. 782*mg/cm 3); G 4 Material* Pb = new G 4 Material("Lead", 82, 207. 19*g/mole, 11. 35*g/cm 3); G 4 VSolid* world = new G 4 Box(“World”, 10*m, 10*m); G 4 Logical. Volume* world_log = new G 4 Logical. Volume(world, Ar, “World”, 0, 0, 0); G 4 VPhysical. Volume* world_phys = new G 4 PVPlacement(G 4 Transform 3 D(), world_log, “World”, 0, false, 0); G 4 VSolid* detector = new G 4 Box(“Detector”, 5*m, 5*m); G 4 Logical. Volume* det_log = new G 4 Logical. Volume(detector, Pb, “Detector”, 0, 0, 0); new G 4 PVPlacement(G 4 Transform 3 D(), det_log, “Detector”, world_log, false, 0); … return world_phys; } 7 th December 2007 Geant 4 Manchester Seminar 7
Detector construction — 2 • Materials can be built from isotopes • Hierarchy of volumes – Each physical volume, except “world”, has a logical mother • Replicas — repetitive placements • Parametrisations – Size, placement and material have functional dependence on copy number • Boolean solids — union, intersection, subtraction • Sensitive detectors – Volumes that hold an instance of a class with a method that is messaged when a track enters • Magnetic field • Visualisation attributes — visibility, colour, etc. 7 th December 2007 Geant 4 Manchester Seminar 8
Detector construction — 3 • Optical properties – Track optical photons in scintillators, etc. • Parallel worlds – Shower parametrisation – “scoring” (energy deposition, dose, etc. ) – “event biasing” (variance reduction, weighting, importance sampling, etc. ) 7 th December 2007 Geant 4 Manchester Seminar 9
Physics list — 1 • class My. Physics: public G 4 VUser. Physics. List { public: void Construct. Particle(); void Construct. Process(); void Set. Cuts(); }; • Each particle has a process manager • 100’s of particles pre-defined – Define ions as required • Thus, each particle has a set of many processes – At rest (capture, decay) – Along step (ionisation, bremsstrahlung, …) – Post step (interaction, decay, multiple scattering) • They must be carefully ordered 7 th December 2007 Geant 4 Manchester Seminar 10
Physics list — 2 • Cuts apply to em processes with infra-red divergences – Cut is in range (distance) (different to GEANT 3) – Converted internally to energy for each material • Processes have sub-processes for different energy ranges • Many choices of process – Low energy or standard electromagnetic – Many alternative hadronic models – All particles have the transportation process • User responsibility, but “best guess” examples of physics lists are provided (some are 1000’s lines) 7 th December 2007 Geant 4 Manchester Seminar 11
Generator • class My. Generator: public G 4 VUser. Primary. Generator. Action { void Generate. Primaries(G 4 Event*); }; • Examples provided – – Particle gun Event generator, e. g. , phythia Read from file General particle source, command (script) driven • Can specify decay point and decay channel 7 th December 2007 Geant 4 Manchester Seminar 12
Analysis • Information available – At each step (User. Stepping. Action) (not advised) – Your sensitive detector – Scorer • Create hits (and digis) • View, pick, write to file • Graph, histogram – AIDA interface to HBOOK, Open. Scientist, JAS, … 7 th December 2007 Geant 4 Manchester Seminar 13
Guiding Geant 4 • User actions (callbacks) • Commands (scripts) • Python interface 7 th December 2007 Geant 4 Manchester Seminar 14
User actions • User actions (callbacks) – G 4 User. Run. Action: begin and end of run – G 4 User. Event. Action: begin and end of event – G 4 User. Stacking. Action: track-stacking selection – G 4 User. Tracking. Action: before or after each track – G 4 User. Stepping. Action: actions for each step • Declare instances to the run manager, e. g: – run. Manager->Set. User. Action(new My. Tracking. Action); where My. Tracking. Action is a sub-class of G 4 User. Tracking. Action implementing methods Pre or Post. User. Tracking. Action, e. g. , to abort the event if some condition prevails 7 th December 2007 Geant 4 Manchester Seminar 15
Stacking action • Distinctive and key feature of Geant 4 • Used to control the order of tracking – Pick out tracks potentially important for a trigger, e. g. , muons, for early tracking – Abort event early if will not trigger • avoid unnecessary em showering • huge time saving • Postpone tracks to next event (event pileup) 7 th December 2007 Geant 4 Manchester Seminar 16
Commands • Instantiate a session (in main program) – session = new G 4 UIterminal(); session->Session. Start(); delete session; – Motif window and tcsh terminal also available • GAG (Geant 4 Adaptive GUI) (Java based) • Typically, command line or script replaces C++ code – /run/initialize /run/beam. On 10 • Large number of commands available 7 th December 2007 Geant 4 Manchester Seminar 17
Visualisation • G 4 Vis. Manager* vis. Manager = new G 4 Vis. Executive; vis. Manager->initialise(); … delete vis. Manager; • Interface to multifarious graphics systems – – – Open. GL Open. Inventor DAWN Hep. Rep Ray Tracer (uses Geant 4’s own tracking) • Command driven • Brilliant!!! 7 th December 2007 Geant 4 Manchester Seminar 18
7 th December 2007 Geant 4 Manchester Seminar 19
CPU performance • About same as GEANT 3 under comparable circumstances • Many more optimisation tools – Geometry “voxelisation” – Track stacking and event abort mechanisms – Parallel geometries for event biasing and hit scoring 7 th December 2007 Geant 4 Manchester Seminar 20
Physics performance • Under continual review • Good em physics – 1 ke. V - 100 Te. V (standard) – 250 e. V - 100 Ge. V (low energy) with large database of atomic levels • Hadronic physics: 21 models! – CHIPS, Bertini, parameter-driven, … – Large database of nuclear levels • Physics reference manual 7 th December 2007 Geant 4 Manchester Seminar 21
Some applications • • • Space Medicine Particle physics … See recent workshop, Lisbon 2006 – See timetable and presentations therein 7 th December 2007 Geant 4 Manchester Seminar 22
Mars surface simulation GEANT 4 and set-up º 5 5 º 7 th December 2007 Geant 4 Manchester Seminar 23
7 th December 2007 Geant 4 Manchester Seminar 24
Particle Therapy 7 th December 2007 Geant 4 Manchester Seminar 25
Proton therapy doses 7 th December 2007 Geant 4 Manchester Seminar 26
Pierre Auger Fluorescence Detector 7 th December 2007 Geant 4 Manchester Seminar 27
7 th December 2007 Geant 4 Manchester Seminar 28
Publications • Geant 4 — a simulation toolkit, Nuclear Instruments and Methods in Physics Research A 506 (2003) 250 -303 • Geant 4 Development and Applications, IEEE Transactions on Nuclear Science 53 No. 1 (2006) 270 -278. • Numerous specialist papers – See web page, geant 4. cern. ch 7 th December 2007 Geant 4 Manchester Seminar 29
Summary • Open, extendable toolkit • Excellent physics processes – Still being developed and refined – Compare well with other codes • Wealth of geometrical shapes • Versatile user actions and commands • Many examples provided 7 th December 2007 Geant 4 Manchester Seminar 30
Future • Paper on the Visualisation System • Article in Nuclear Physics News • The 12 th Geant 4 Workshop, 13 th-19 th September 2007, organised by us, held at Hebden House Conference Centre, Hebden Bridge – Possibility of Special Interest Group meetings here (in Manchester) or Hebden Bridge. • Join us 7 th December 2007 Geant 4 Manchester Seminar 31
Demonstrations • • • N 02: Target + chambers + field N 04: Pythia event, muon trigger N 03 with QGSP: Pb-Liq. Ar calorimeter Making a movie Sections and cutaways Display by time 7 th December 2007 Geant 4 Manchester Seminar 32


