Presentation is loading. Please wait.

Presentation is loading. Please wait.

7th December 2007Geant4 Manchester Seminar1 Geant4 A simulation toolkit Geometry and tracking 4th incarnation.

Similar presentations


Presentation on theme: "7th December 2007Geant4 Manchester Seminar1 Geant4 A simulation toolkit Geometry and tracking 4th incarnation."— Presentation transcript:

1 7th December 2007Geant4 Manchester Seminar1 Geant4 A simulation toolkit Geometry and tracking 4th incarnation

2 7th December 2007Geant4 Manchester Seminar2 Synopsis Overview –Introduction –Toolkit –Main program –Detector construction –Physics list –Generator –Analysis –Guiding Geant4 User actions Commands –CPU performance –Physics performance –Some applications –Publications –Future Demonstrations

3 7th December 2007Geant4 Manchester Seminar3 Introduction — 1 Started from two studies done independently at CERN and KEK in 1993 Became RD44, sponsored by the CERN Detector Research and Development Committee, in 1994 GEANT3’s Fortran-based technology was limiting development Mandate: modern (object oriented) techniques Early decision to use C++ 100 scientists/engineers, global

4 7th December 2007Geant4 Manchester Seminar4 Introduction — 2 After 4 years R &D, first version December 1998 Geant4 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,…)

5 7th December 2007Geant4 Manchester Seminar5 Toolkit Make your own application Open Extendable Versatile Toolkit++ –Huge range of physics –Many geometrical shapes –Many examples –Web-based documentation and code browsing

6 7th December 2007Geant4 Manchester Seminar6 Main program int main(int argc,char** argv) { G4RunManager * runManager = new G4RunManager; runManager->SetUserInitialization(new MyDetector); runManager->SetUserInitialization(new MyPhysics); runManager->SetUserAction(new MyGenerator); runManager->Initialize(); runManager->BeamOn(10); delete runManager; return 0; } MyDetector, MyPhysics and MyGenerator 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 7th December 2007Geant4 Manchester Seminar7 Detector Construction — 1 class MyDetector: public G4VUserDetectorConstruction { public: G4VPhysicalVolume* Construct(); }; G4VPhysicalVolume* MyDetector::Construct() { G4Material* Ar = new G4Material("ArgonGas",18,39.95*g/mole,1.782*mg/cm3); G4Material* Pb = new G4Material("Lead",82,207.19*g/mole,11.35*g/cm3); G4VSolid* world = new G4Box(“World”,10*m,10*m,10*m); G4LogicalVolume* world_log = new G4LogicalVolume(world,Ar,“World”,0,0,0); G4VPhysicalVolume* world_phys = new G4PVPlacement(G4Transform3D(),world_log,“World”,0,false,0); G4VSolid* detector = new G4Box(“Detector”,5*m,5*m,5*m); G4LogicalVolume* det_log = new G4LogicalVolume(detector,Pb,“Detector”,0,0,0); new G4PVPlacement(G4Transform3D(),det_log,“Detector”,world_log,false,0); … return world_phys; }

8 7th December 2007Geant4 Manchester Seminar8 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.

9 7th December 2007Geant4 Manchester Seminar9 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.)

10 7th December 2007Geant4 Manchester Seminar10 Physics list — 1 class MyPhysics: public G4VUserPhysicsList { public: void ConstructParticle(); void ConstructProcess(); void SetCuts(); }; 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

11 7th December 2007Geant4 Manchester Seminar11 Physics list — 2 Cuts apply to em processes with infra-red divergences –Cut is in range (distance) (different to GEANT3) –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)

12 7th December 2007Geant4 Manchester Seminar12 Generator class MyGenerator: public G4VUserPrimaryGeneratorAction { void GeneratePrimaries(G4Event*); }; 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

13 7th December 2007Geant4 Manchester Seminar13 Analysis Information available –At each step (UserSteppingAction) (not advised) –Your sensitive detector –Scorer Create hits (and digis) View, pick, write to file Graph, histogram –AIDA interface to HBOOK, OpenScientist, JAS,…AIDA

14 7th December 2007Geant4 Manchester Seminar14 Guiding Geant4 User actions (callbacks) Commands (scripts) Python interface

15 7th December 2007Geant4 Manchester Seminar15 User actions User actions (callbacks) –G4UserRunAction: begin and end of run –G4UserEventAction: begin and end of event –G4UserStackingAction: track-stacking selection –G4UserTrackingAction: before or after each track –G4UserSteppingAction: actions for each step Declare instances to the run manager, e.g: –runManager->SetUserAction(new MyTrackingAction); where MyTrackingAction is a sub-class of G4UserTrackingAction implementing methods Pre or PostUserTrackingAction, e.g., to abort the event if some condition prevails

16 7th December 2007Geant4 Manchester Seminar16 Stacking action Distinctive and key feature of Geant4 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 pile- up)

17 7th December 2007Geant4 Manchester Seminar17 Commands Instantiate a session (in main program) –session = new G4UIterminal(); session->SessionStart(); delete session; –Motif window and tcsh terminal also available GAG (Geant4 Adaptive GUI) (Java based)GAG (Geant4 Adaptive GUI) Typically, command line or script replaces C++ code –/run/initialize /run/beamOn 10 Large number of commands availableavailable

18 7th December 2007Geant4 Manchester Seminar18 Visualisation G4VisManager* visManager = new G4VisExecutive; visManager->initialise(); … delete visManager; Interface to multifarious graphics systems –OpenGL –OpenInventor –DAWNDAWN –HepRepHepRep –Ray Tracer (uses Geant4’s own tracking) Command driven Brilliant!!!

19 7th December 2007Geant4 Manchester Seminar19

20 7th December 2007Geant4 Manchester Seminar20 CPU performance About same as GEANT3 under comparable circumstances Many more optimisation tools –Geometry “voxelisation” –Track stacking and event abort mechanisms –Parallel geometries for event biasing and hit scoring

21 7th December 2007Geant4 Manchester Seminar21 Physics performance Under continual review Good em physics –1 keV - 100 TeV (standard) –250 eV - 100 GeV (low energy) with large database of atomic levels Hadronic physics: 21 models! –CHIPS, Bertini, parameter-driven,… –Large database of nuclear levels Physics reference manual

22 7th December 2007Geant4 Manchester Seminar22 Some applications Space Medicine Particle physics … See recent workshop, Lisbon 2006Lisbon 2006 –See timetable and presentations therein

23 7th December 2007Geant4 Manchester Seminar23 GEANT4 and set-up 5º5º 5º 5º Mars surface simulation

24 7th December 2007Geant4 Manchester Seminar24

25 7th December 2007Geant4 Manchester Seminar25 Particle Therapy

26 7th December 2007Geant4 Manchester Seminar26 Proton therapy doses

27 7th December 2007Geant4 Manchester Seminar27 Pierre Auger Fluorescence Detector

28 7th December 2007Geant4 Manchester Seminar28

29 7th December 2007Geant4 Manchester Seminar29 Publications Geant4 — a simulation toolkit, Nuclear Instruments and Methods in Physics Research A 506 (2003) 250-303Geant4 — a simulation toolkit Geant4 Development and Applications, IEEE Transactions on Nuclear Science 53 No. 1 (2006) 270-278.Geant4 Development and Applications 53 No. 1 (2006) 270-278. Numerous specialist papers –See web page, geant4.cern.chgeant4.cern.ch

30 7th December 2007Geant4 Manchester Seminar30 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

31 7th December 2007Geant4 Manchester Seminar31 Future Paper on the Visualisation System Article in Nuclear Physics News The 12th Geant4 Workshop, 13th-19th 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

32 7th December 2007Geant4 Manchester Seminar32 Demonstrations N02: Target + chambers + field N04: Pythia event, muon trigger N03 with QGSP: Pb-LiqAr calorimeter Making a movie Sections and cutaways Display by time


Download ppt "7th December 2007Geant4 Manchester Seminar1 Geant4 A simulation toolkit Geometry and tracking 4th incarnation."

Similar presentations


Ads by Google