The Geant4 Software Process

Talk given at the ATLAS Software Meeting
John Allison, 16th March 1999

History

  • Geant4 started as RD44 in 1995.
  • Re-write of Geant using object oriented techniques inside 4 years.
  • White box (open) toolkit, user responsibility
  • Introduction

  • In transition from R&D project (RD44)
  • A unique governance - experiment-like boards and Memorandum of Understanding (MoU)
  • RD44 focused on first production release of majority of promised features:
  • great achievement in 4 years (almost 106 lines of code!)
  • all particles and most resonances
  • advanced electromagnetic processes, much improved over Geant3
  • huge range of hadronic processes
  • innovative geometry design and BREPS with STEP interface
  • ...
  • Now need to focus on reliability, usability:
  • not so glamorous
  • working groups have many ideas, naturally want to implement/complete
  • some difficult reliability problems to solve
  • Design/Implement/Evaluate/Redesign...

  • An iterative process
  • The First 2 Years

  • Used design tool - Rational Rose (diagrams only)
  • Defined main categories - run, event, tracking, geometry, processes, particles, materials...
  • Appointed Category Coordinators
  • Defined interfaces
  • Chose C++, RogueWave templates, CVS
  • Minimum of coding guidelines (1 file /class, G4<class-name>, capital 1st letter of methods)
  • Trial implementations
  • Proof of principle, performance
  • Implementation

  • Design still evolving
  • Importance of "loose coupling" of categories
  • Avoid circular dependencies
  • Abstract interfaces
  • Avoid "casting"
  • Intercoms
  • Processes and Geometry sub-divided
  • Category coordinators given much independence
  • Code review
  • G4cout/G4cerr for (G)UI, environments
  • Data - (static) arrays, CVS-maintained files, external (tar) files
  • Highlights

  • Huge improvement in physics
  • Full electromagnetic
  • Multiple scattering properly treated (makes use of geometry)
  • Choice of hadronic processes - data driven, parametrised, theory driven
  • Range cuts (rather than energy cuts) (proper treatment of continuous processes)
  • Advanced tracking algorithms - voxelisation, exploitation of safety
  • Drivers for many viewers and graphical user interfaces
  • Web based documentation, problem reporting
  • Lessons

  • Be prepared for redesign
  • Modularise, couple loosely
  • Plan for "environments"
  • Early test procedures, bug tracking, code review procedures
  • Versioning of binaries
  • Exception handling