1 / 73

Usage and results

Budker Inst. of Physics IHEP Protvino MEPHI Moscow Pittsburg University. Usage and results. http://cern.ch/geant4/geant4.html http://www.ge.infn.it/geant4/. Maria Grazia Pia INFN Genova Maria.Grazia.Pia@cern.ch. http://www.ge.infn.it/geant4/training/. A real-life example

martindavid
Download Presentation

Usage and results

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Budker Inst. of Physics IHEP Protvino MEPHI Moscow Pittsburg University Usage and results http://cern.ch/geant4/geant4.html http://www.ge.infn.it/geant4/ Maria Grazia Pia INFN Genova Maria.Grazia.Pia@cern.ch http://www.ge.infn.it/geant4/training/

  2. A real-life example simulation + analysis in a simple experimental set-up By-products an overview of Geant4 an overview of OO Analysis Tools a practical example how to use Geant4 and AIDA/Anaphe an introduction to software process an introduction to basics concepts of OO technology Applications and results of Geant4 large-scale HEP experiments small-scale HEP experiments astroparticle experiments space science radiotherapy Discussion Tomorrow’s lecture Today’s exercise

  3. Budker Inst. of Physics IHEP Protvino MEPHI Moscow Pittsburg University through a real-life simulation + analysis and AIDA+Anaphe http://cern.ch/geant4/ http://www.ge.infn.it/geant4/ http://cern.ch/anaphe/ Maria Grazia Pia INFN Genova Maria.Grazia.Pia@cern.ch

  4. The experimental set-up of our exercise A simple configuration, consisting of • a tracking detector • an electromagnetic calorimeter • a system of anti-coincidences What happens in our detectors • incident particles interact in the experimental set-up • secondary particles may be generated and interact too • detectors and their read-out electronics record the effects produced by primary and secondary particles

  5. What shall we do now? Sit in front of a PC and start writing code… Wonder what we want to do… Ask our boss what he wants us to do… Chat with collaborators in the experiment… Askandthink and plan and analyse and design and develop and testand get feedback and ask and think and plan and analyse and design and develop and test and get feedback and ask and think and… Software process

  6. Complexity is never overwhelming only tackle small bits at a time Early feedback from using the software provides input to the analysis of subsequent iterations Developers’ skills can grow with the project don’t need to apply latest techniques/technology at the start Requirements can be modified each iteration is a mini-project (analysis, design…) The software life-cycle • A software process • provides guidance to a team’s activities • specifies which work products should be produced and when • offers criteria for monitoring and measuring the project’s products andactivities Advantages of iterative and incremental development

  7. Software Process SEI’s definition: A set of activities, methods, practices and transformations that people use to develop and maintain software and associated products Three key components: the peopleinvolved the organization of the development process the technology used Reference for guidance and assessment Capability Maturity Model (CMM) SPICE/ISO 15504 Various software process models USDP / RUP OPEN OOSP XP, Agile etc. waterfall USDP

  8. Best practices • The goal: • to ensure the production of high-quality software • that meets theneeds of its end users • within a predictable schedule and budget • The way to progress is to study and improve the way software is produced • better technology only helps once the organizational framework is set • there is evidence that going for new technology instead of improving the process can make things worst • A set of “best practices” for software development teams • considered conventional wisdom by methodology pratictioners

  9. Capture User Requirements Select a simulation framework Identify a candidate architecture The inception phase • Formulating the scope of the project • capturing the context and the most important requirements and constraints • Planning • project plan, risk management, staffing etc. • Synthesizing a candidate architecture • to demonstrate feasibility through some kind of proof of concept • Preparing the environment for the project

  10. Capture User Requirements Define the scope of the software system to be built (“what it should do”)

  11. User Requirements

  12. Select a simulation framework

  13. Lifetime of LHC software = 25 yrs WWW Thanks to Dino Ferrero Merlino(IT)

  14. The zoo DPM EA-MC FLUKA GEM HERMES LAHET MCBEND MCU MF3D NMTC MONK MORSE RTS&T-2000 SCALE TRAX VMC++ EGS4, EGS5, EGSnrc Geant3, Geant4 MARS MCNP, MCNPX, A3MCNP, MCNP-DSP, MCNP4B MVP, MVP-BURN Penelope Peregrine Tripoli-3, Tripoli-3 A, Tripoli-4 ...and I probably forgot some more Many codes not publicly distributed A lot of business around MC Monte Carlo codes presented at the MC200 Conference, Lisbon, October 2000

  15. What is ? OO Toolkit for the simulation of next generation HEP detectors • ...of the current generation too • ...not only of HEP detectors • already used also in nuclear physics, medical physics, space applications, radiation background studies etc. • Geant4 provides a general infrastructure for • modeling geometry and materials • particle transport and interactions with matter • describing detector response • visualisation of geometries, tracks and hits • The user develops specific code for • the primary event generator • the geometrical description of the set-up • the digitisation of the detector response

  16. The Toolkit approach A toolkit is a set of compatible components • each component is specialised for a specific functionality • each component can be refinedindependently to a great detail • components can be integrated at any degree of complexity • it is easy to provide (and use) alternativecomponents • the simulation application can be customisedby the user according to his/her needs • maintenance and evolution- both of the components and of the user application - is greatly facilitated ...but what is the price to pay? • the user is invested of a greater responsibility • he/she must critically evaluate what he/she needs and wants to use

  17. Geant4 architecture Domain decomposition hierarchical structure of sub-domains Uni-directional flow of dependencies Software Engineering plays a fundamental role in Geant4 • formally collected • systematically updated • PSS-05 standard Interface to external products w/o dependencies User Requirements Software Process • spiral iterative approach • regular assessments and improvements (SPI process) • monitored following the ISO 15504 model Object Oriented methods • OOAD • use of CASE tools • openness to extension and evolution • contribute to the transparency of physics • interface to external software without dependencies • commercial tools • code inspections • automatic checks of coding guidelines • testing procedures at unit and integration level • dedicated testing team Quality Assurance Use of Standards • de jure and de facto

  18. Identify a candidate architecture

  19. Use case realizations Architecture (based on the Geant4 framework) Priorities of requirements: plan iterations The elaboration • Refining the vision • a solidunderstanding of the most critical use cases • Defining, validating and refining the architecture • Iteration plans for the construction phase • Putting in place the development environment

  20. Physics Detector description Management Detector response Visualisation Primary event generation Analysis Architecture

  21. 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

  22. Beam On Generate primary events according to various distributions relevant to gamma astrophysics

  23. Event processing Record the coordinates of impact of tracks in the tracker layers Record theenergy deposited in each element of the calorimeterat every event

  24. Run and event multiple events possibility to handle the pile-up multiple runs in the same job with different geometries, materials etc. powerful stacking mechanism three levels by default: handle trigger studies, loopers etc. Tracking decoupled from physics: all processes handled through the same abstract interface tracking is independent from particle type it is possible to add new physics processes without affecting the tracking The kernel • Geant4 has only production thresholds, no tracking cuts • all particles are tracked down to zero range • energy, TOF ... cuts can be defined by the user

  25. The construction Completing the • analysis • design • development • testing of all required functionality

  26. Detailing the design

  27. Describe a geometrical set-up: a Si-W tracker, a CsI calorimeter and an anti-coincidence system made out of plastic scintillators. Materials • Different kinds of materials can be defined • isotopes G4Isotope • elements G4Element • molecules G4Material • compounds and mixtures G4Material • Attributes associated: • temperature • pressure • state • density

  28. Chandra ATLAS BaBar ATLAS Borexino CMS Geometry Role: detailed detector description and efficient navigation Multiple representations (same abstract interface) • CSG(Constructed Solid Geometries) • - simple solids • STEP extensions • - polyhedra,, spheres, cylinders, cones, toroids, etc. • BREPS(Boundary REPresented Solids) • - volumes defined by boundary surfaces • - include solids defined by NURBS(Non-Uniform Rational B-Splines) CAD exchange:ISO STEP interface Fields:of variable non-uniformity and differentiability External tool for g3tog4 geometry conversion

  29. placement repeated How to define detector geometry • Three conceptual layers • G4VSolid:shape, size • G4LogicalVolume:daughter volumes, material, sensitivity etc. • G4VPhysicalVolume:position, rotation • Placement: one positioned volume • Repeated: a volume placed many times • reduces use of memory • Replica: simple repetition (e.g. divisions) • Parameterised

  30. Read-out Geometry Readout geometry is a virtual and artificial geometry • it is associated to a sensitive detector • can be defined in parallel to the real detector geometry • helps optimising the performance

  31. DetectorConstruction // Calorimeter Structure(CALLayerX + CALLayerY) // Solid solidCALLayerX = new G4Box("CALLayerX",CALSizeXY/2,CALSizeXY/2,CALBarThickness/2); // Logical volume logicCALLayerX = new G4LogicalVolume(solidCALLayerX,CALMaterial, "CALLayerX"); // Physical volume for (G4int i = 0; i < NbOfCALLayers; i++) { physiCALLayerY = new G4PVPlacement(…); physiCALLayerX = new G4PVPlacement(…); … }

  32. A sensitive detector creates hits using the information provided by G4Step One can store various types of information in a hit position and time of the step momentum and energy of the track energy deposition of the step geometrical information etc. A Digi represents a detector output e.g. ADC/TDC count, trigger signal A Digi is created with one or more hits and/or other digits Hits collections are accessible through G4Event at the end of an event through G4SDManager during processing an event The digitise() method of each G4VDigitizerModule must be explicitly invoked by the user’s code e.g. in the UserEventAction Record the coordinates of impact of tracks in the layers of the tracker. Record the energy deposited in each element of the calorimeter at every event. Hits and Digis

  33. Hits and Digis

  34. Hits in our example Each tracker hit contains the following information: • ID of the event (this is important for multiple events run) • Energy deposition of the particle in the strip • Number of the strip • Number of the plane • Type of the plane • Position of the hit (x,y,z) in the reference frame of the payload

  35. Generate primary events according to various distributions relevant to  astrophysics Generating primary particles • Interface to Event Generators • through ASCII file for generators supporting /HEPEVT/ • abstract interface to Lund++ • Various utilities provided within the Geant4 Toolkit • ParticleGun • beam of selectable particle type, energy etc. • GeneralParticleSource • provides sophisticated facilities to model a particle source • used to model space radiation environments, sources of radioactivity in underground experiments etc. • you can write your own, inheriting from G4VUserPrimaryGeneratorAction • Particles • all PDG data • and more, for specific Geant4 use, like ions

  36. Primary generator in our example • GammaRayTelParticleGenerationAction and its Messenger are responsible for the generation of primary particles and the related configuration through the UI • Define the incident flux of particles: • from a specific direction • or from an isotropic background • Choose also between two spectral options: • monochromatic • or with a power-law dependence • The particle generator parameters are accessible through the UI • /gun/ tree

  37. Activate electromagnetic and hadronic processes appropriate to the energy range of the experiment Physics From the Minutes of LCB (LHCC Computing Board) meeting on 21 October, 1997: “It was noted that experiments have requirements for independent, alternative physics models. In Geant4 these models, differently from the concept of packages, allow the user to understand how the results are produced, and hence improve the physics validation. Geant4 is developed with a modular architecture and is the ideal framework where existing components are integrated and new models continue to be developed.”

  38. Physics: general features • Ample variety of physics functionalities • Modular design, at a fine granularity, to expose the physics • Uniform treatment of electromagnetic and hadronic processes • Abstract interface to physics processes • tracking independent from physics • Distinction between processes and models • often multiple models for the same physics process (complementary/alternative) • Transparency (supported by encapsulation and polymorfism) • calculation of cross-sections independent from the way they are accessed (data files, analytical formulae etc.) • distinction between the calculation of cross sections and their use • calculation of the final state independent from tracking • Open system • users can easily create and use their own models

  39. Data libraries • Systematic collection and evaluation of experimental data from many sources worldwide • Databases • ENDF/B, JENDL, FENDL, CENDL, ENSDF,JEF, BROND, EFF, MENDL, IRDF, SAID, EPDL, EEDL, EADL, SANDIA, ICRU etc. • Collaborating distribution centres • NEA, LLNL, BNL, KEK, IAEA, IHEP, TRIUMF, FNAL, Helsinki, Durham, Japan etc. • The use of evaluated data is important for the validation of physics results of the experiments 41

  40. Processes • Processes describe how particles interact with material or with a volume • Three basic types • At rest process • (eg. decay at rest) • Continuous process • (eg. ionization) • Discrete process • (eg. decay in flight) • Transportation is a process • interacting with volume boundary • A process which requires the shortest interaction length limits the step

  41. Multiple scattering Bremsstrahlung Ionisation Annihilation Photoelectric effect Compton scattering Rayleigh effect g conversion e+e- pair production Synchrotron radiation Transition radiation Cherenkov Refraction Reflection Absorption Scintillation Fluorescence Auger(in progress) High energy extensions needed for LHC experiments, cosmic ray experiments… Low energy extensions fundamental for space and medical applications, dark matter and n experiments, antimatter spectroscopy etc. Alternative models for the same process Electromagnetic physics • electrons and positrons • g, X-ray and optical photons • muons • charged hadrons • ions energy loss Comparable to Geant3 already in the a release (1997) Further extensions (facilitated by the OO technology) All obeying to the same abstract Process interfacetransparent to tracking

  42. Geant4 Geant3 data Standard electromagnetic processes 1 keV up to O(100 TeV) Multiple scattering 6.56 MeV proton , 92.6 mm Si • Multiple scattering • new model (by L. Urbán) • computes mean free path length and lateral displacement • New energy loss algorithm • optimises the generation of d rays near boundaries • Variety of models for ionisation and energy loss • including PhotoAbsorption Interaction model (for thin layers) • Many optimised features • Secondaries produced only when needed • Sub-threshold production Old plot, further improvements with a new model J.Vincour and P.Bem Nucl.Instr.Meth. 148. (1978) 399

  43. Low Energy electromagnetic Processes: e,g

  44. Low energy e.m. extensions shell effects Fundamental for neutrino/dark matter experiments, space and medical applications, antimatter spectroscopy etc. Bragg peak e, down to 250 eV (EGS4, ITS to 1 keV, Geant3 to 10 keV) Hadron and ionmodels based on Ziegler and ICRU data and parameterisations Based on EPDL97, EEDL and EADL evaluated data libraries Barkas effect (charge dependence) models for negative hadrons Photon attenuation ions protons antiprotons

  45. GammaRayTelPhysicsList … if (particleName == "gamma") { // gamma pManager->AddDiscreteProcess(new G4PhotoElectricEffect()); pManager->AddDiscreteProcess(new G4ComptonScattering()); pManager->AddDiscreteProcess(new G4GammaConversion()); } else if (particleName == "e-") { // electron pManager->AddProcess(new G4MultipleScattering(),-1, 1,1); pManager->AddProcess(new G4eIonisation(), -1, 2,2); pManager->AddProcess(new G4eBremsstrahlung(), -1,-1,3); } else if (particleName == "e+") { // positron pManager->AddProcess(new G4MultipleScattering(),-1, 1,1); pManager->AddProcess(new G4eIonisation(), -1, 2,2); pManager->AddProcess(new G4eBremsstrahlung(), -1,-1,3); pManager->AddProcess(new G4eplusAnnihilation(), 0,-1,4); … SetCutValue(cutForGamma, "gamma");SetCutValue(cutForElectron, "e-");SetCutValue(cutForElectron, "e+"); select physics processes to be activated for each particle type set production thresholds

  46. Highlights of Geant4 Hadronic Physics and more about Electromagnetic Physics in tomorrow’s lecture …

  47. Now we can run our simulation, track particles, produce showers and record the effects in the detectors… …but our job is not limited to simulation only

  48. Collaborating Frameworks • Simulation • to model the experimental setup and generate effects from particle interactions • User Interface • to control configuration and flow of execution • Visualisation • detector geometry, particle tracks, hits etc. • Analysis • histogramming of physics quantities In our application:

More Related