Use of GEANT4 in CMS The OSCAR Project Isidro González (CERN/EP & IFCA, Spain) for the CMS software team CHEP 2000, Padova, Italy 7-11 February 2000
Isidro González, CERN/EP & IFCA Index Introduction GEANT3.21 to GEANT4 transition CMS geometry model using GEANT4 The geometry classes Hits and sensitive detectors User interaction Utilities Comparisons with Geant3.21 and data Conclusions 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA Introduction GEANT4 replaces and extends GEANT3.21 It is a modular toolkit Select individual parts Remodels the physics processes Better precision in prediction Object Oriented (C++) CMS has implemented the geometry First iteration GUI, hits, sensitive detectors, persistency... 9 May 2019 Isidro González, CERN/EP & IFCA
GEANT3.21 to GEANT4 Transition CMSIM: Old simulation FORTRAN77 & GEANT3.21 Only maintenance state OSCAR: New simulation OO Simulation for CMS Analysis and Reconstruction C++, Java & GEANT4 Will write simulated hits to OODB Digitisation is luminosity dependent Different package (see D. Stickland talk) 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA OSCAR Milestones Proof of Concept: Summer 1998 Functional Prototype: December 1999 Ready shortly Hits persistency: The possibility is there, but has not been implemented. Basic Monitoring? Fully Functional Prot.: June 2001 Major redesign! Production Version: December 2003 9 May 2019 Isidro González, CERN/EP & IFCA
CMS Geometry Model using GEANT4 Categories based on responsibilities Geometry categories: CMS specific, OSCAR (Geant4) & Persistent Hits categories: CMS & OSCAR User Interaction categories: User Actions, GUI Utilities: Materials, Rotation Matrices 9 May 2019 Isidro González, CERN/EP & IFCA
CMS Geometry Model: one factory - many views Different views are independent and consistent Key impact in the design CMS Tracker ECAL ... Factories Simulation Reconstruction Visualisation Avoid any external dependency within the factories 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA The Geometry classes Three categories related: CMS Geometry OSCAR Geometry Persistent Geometry (not fully implemented) Polymorphic structure One base class Each sub-detector is a different class 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA CMS Geometry Base Class: CMSDetector Common CMS behaviour Handles the physical hierarchy CMSDetector Each CMS sub-detector inherits from CMSDetector Easy interchange! CMS sub-detector A CMS sub-detector is a store of geometry information Build something fast No geometry description language ( free storage format) 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA OSCAR Geometry Base Class: G4Able Common GEANT4 behaviour Sensitive property Visualisation attributes OSCAR sub-detector Run time selection! G4 Able OSCAR sub-detector extends CMS sub-detector CMS sub-detector Complex architecture! No G4 knowledge in CMS OSCAR sub-detector inherits from G4Able and CMS sub-detector 9 May 2019 Isidro González, CERN/EP & IFCA
OSCAR Geometry: examples Barrel Pixel Barrel SVTX Preshower Forward Pixel Barrel HCAL HCAL Test-Beam 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA Persistent Geometry ASCII files exist for all sub-detectors CMS Geometry is the path to Objectivity and GEANT4 A framework to make detectors persistent exists Only few detectors have been made persistent 9 May 2019 Isidro González, CERN/EP & IFCA
Hits and Sensitive Detectors 2 type of sensitive detectors: Tracker-like Calorimeter-like which produce hits: Compatible with ORCA Stored in hits collections Base classes: 2 OSCAR sensitive detectors 2 types of CMS hits 2 types of OSCAR hits 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA User Interaction User Actions required by GEANT4: Detector construction: CMS full detector, test-beams Physics list: List of physics processes. Not trivial Needs improvement! Primary generator: Extended with... Single particle generation in random direction Possibility to read events from PYTHIA files 9 May 2019 Isidro González, CERN/EP & IFCA
Optional User Action classes in CMS Run Event Tracking Stepping Extended with action units: Independent pieces of behavior Action units can be plugged in each action Extra behavior added easily! 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA Utilities Materials Factory: Extend GEANT4 material constructors (materials composed of other materials) Avoid multiple instances Rotation Matrices Factory: Extend GEANT4 rotation matrix constructors Magnetic Field: Same model as in Geometry CMS implementation independent from GEANT4 OSCAR implementation extends CMS 9 May 2019 Isidro González, CERN/EP & IFCA
Physics Validation ECAL crystals in Geant3 and Geant4: Test of electromagnetic processes 30 GeV photons. No magnetic field 9 May 2019 Isidro González, CERN/EP & IFCA
Comparison with test-beam data HCAL Test-Beam Simulation run with no tuning at all Very preliminary analysis! More detailed comparisons on the way... 9 May 2019 Isidro González, CERN/EP & IFCA
Isidro González, CERN/EP & IFCA Conclusions A functional prototype of a GEANT4 based simulation will be ready soon An extensible and flexible model for the geometry and hits has been implemented We extended GEANT4 to our needs Tracking through the whole CMS is possible Hits are produced for most of the detectors Comparisons with data and GEANT3.21 have been started 9 May 2019 Isidro González, CERN/EP & IFCA