Download presentation
Presentation is loading. Please wait.
Published byAdrian Brooks Modified over 9 years ago
1
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 1 Jeremy McCormick, Ron Cassell for SLAC Simulations Group LC Detector Simulation with SLIC and LCDD
2
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 2 Talk Overview 1.Geometry Requirements 2.Framework Diagram and Outline 3.GDML/LCDD geometry system 4.LCDD XML format examples 5.Compact XML format example 6.LCDD Visualizations 7.SLIC simulations package 8.Diagnostic Histograms 9.Installation 10. Plans 11. Resources
3
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 3 Geometry System Requirements represent all current detector designs including testbeams and full detectors ideal format human-readable and editable machine friendly encapsulate the core Geant4 geometry classes solids, materials, logical volumes, physical volumes include other essential Geant4 classes for DD regions, sensitive detectors, visualization, fields volume readout unique volume identification using bit-packed IDs virtual volume segmentation, i.e. “cells”, for calorimeters avoid C++ “hard coding” of geometries or DD formats with only partial Geant4 support package a separate geometry subsystem from the simulator with minimal dependencies System should be easy to use, yet flexible and powerful.
4
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 4 LCD Simulations Framework Diagram LCDD SLICLCIO GDML LCIO Events Geant4 Stdhep Events LCDD XML reads reads / writes LCPhys XercesCLHEP Geom Converter writes Compact XML uses reads org.lcsim reads Not all connections shown.
5
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 5 Packages LCIO – widely adopted ILC IO package StdHep – binary event format read by Willy Langeveld’s lStdHep interface PackageVersionDescription CLHEP1.8.x or 1.9.xHEP class libraries Geant47.xHEP simulation toolkit LCPhysCVS headGeant4 physics list for ILC GDML2.1 RC (CVS head) XML binding to core Geant4 geometry classes Xerces2.6.0XML Parser LCIO1.4 (CVS head) Linear Collider I/O Toolkit LCDDCVS headXML extensions to GDML for DD SLICCVS headSimulator Command & Control, “Hub” Application
6
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 6 Benefits of an XML-Based System human readable and editable: comparable to HTML and other markups quick development cycle no recompilation for geometry changes constant values easily “tweaked” validating parser quickly identifies errors highly structured: enforces consistency across disparate data sources portable: easy to import/export/exchange transformable: map to/from databases, flat files, Excel spreadsheets, etc. high quality, standardized tools in C++ and Java self-descriptive with schemas (XSD) natural representation of structured hierarchies, i.e. detector geometries Internet access not required to utilize editing/display tools relatively easy to implement
7
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 7 GDML C++ binding to Geant4 constants materials solids structure: logical and physical volumes XML technology SAX parsing: fast! parsing/loading of 15k line LCDD file in ~1.5 seconds XML Schema (XSD): extensable types currently supported by… Geant4: primary binding GraXML Viewer : no constants, only doubles ROOT : VMC, import/export org.lcsim reco framework : geometry converter from compact to LCDD format LCDD : reads Momo : writes
8
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 8 LCDD extension of GDML package to complete Geant4 binding for DD: “GDML++” GDML volume element has additional elements but no additional changes to format except this. LCDDParser / LCDDDetectorConstruction: usable in any Geant4 simulator additional elements header / meta info ID dictionary physical volume identifiers mapping of individual volume IDs and segmentations to full, 32 / 64-bit IDs sensitive detectors calorimeter / tracker types virtual segmentation of volumes for readout reference to an IDing scheme regions visualization attributes fields embedded GDML element for geometry description
9
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 9 LCDD XML Structure …
10
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 10 Sensitive Detectors <calorimeter name="EcalBarrSD" hits_collection="EcalBarrHits" ecut="0.0" eunit="MeV" verbose="0"> <projective_cylinder ntheta="840" nphi="1680" /> <tracker name="VtxBarrSD" hits_collection="VtxBarrHits" ecut="0.0" eunit="MeV" verbose="0"> Example Sensitive detectors can be of type calorimeter or tracker, which determines type of LCIO hit. hits_collection is name of LCIO collection. cut on energy with ecut set verbose level idspecref for the ID scheme (none is okay) Specific type of segmentation, e.g. projective_cylinder, divides the associated volume into virtual cells using ntheta and nphi as parameters.
11
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 11 ID Dictionary <idfield label="layer" start="0" length="7" signed="false" /> <idfield label="sys" start="7" length="3" signed="false" /> Example IDs for calorimeter and tracker hits contained in iddict idfield defines a single, logical ID such as a layer number. label can reference a named physvolid or a segmentation field signed or unsigned creates a vector which is packed into the LCIO hit named idspec referenced in the sensitive_detector element to assign an ID scheme to a specific SD
12
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 12 Regions Example <region name="EcalRegion" store_secondaries="false" cut="1.0" lunit="mm" threshold="0.0" eunit="MeV" /> <region name="TrackingRegion" store_secondaries="true" cut="10.0" lunit="mm" threshold="1.0" eunit="MeV" /> corresponds to G4Region and G4UserRegionInformation set whether secondaries are stored with store_secondaries set Geant4 range cut using cut set energy threshhold for secondary storage with threshhold provides the concept of a tracking region, which is crucial to our method for creating and processing the MCParticles
13
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 13 Visualization Example <vis_attributes name="EcalVis" visible="true" show_daughters="true" line_style="unbroken" drawing_style="wireframe"> <color R="0.0" G="1.0" B="1.0" alpha="1.0" /> vis_attributes element implements all settings in class G4VisAttributes. attached to a logical volume via a reference settable visibility daughters visible line style wireframe or solid color
14
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 14 Fields Example <solenoid name="GlobalSolenoid" inner_field="solenoid_inner_field" outer_field="solenoid_outer_field" zmin="solenoid_zmin" zmax="solenoid_zmax" inner_radius="solenoid_rmin" outer_radius="solenoid_rmax" funit="tesla" lunit="mm"/> solenoid implements the virtual type field similar to LCDG4’s handling of fields global_field defines the top level field handler for the application using a fieldref. can use constants from gdml’s define block plan to allow fields maps
15
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 15 Extended GDML volume Element Example <physvolid name=“layer” value=“0” “It all comes together here.” Red elements extend the GDML volume type. Any number of physvolid elements are allowed on the physvol child tag. sdref is a named sensitive detector from the sensitive_detectors section. regionref points to a named region within regions. vis_attributesref is a named vis_attributes element from display. Note: This example is contrived to show all extension elements.
16
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 16 Compact Description <detector id="2" name="EMBarrel" type="CylindricalCalorimeter" readout="EcalBarrHits"> <dimensions inner_r = "127.0*cm" outer_z = "179.25*cm" /> <slice material = "Tungsten" width = "0.25*cm" /> <slice material = "G10" width = "0.068*cm" /> <slice material = "Silicon" width = "0.032*cm" sensitive = "yes" /> <slice material = "Air" width = "0.025*cm" /> Example Verbosity of GDML means hand coding can be tedious (but certainly possible!). Compact XML description provides higher level format for conversion to LCDD. detector systemmatics package GeomConverter in SLAC CVS also used in lcsim.org reconstruction package “gross parameters” rather than individual volumes, etc. detectors, layers, slices dimensions: inner, outer radii
17
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 17 Example Geometries all found in $SLIC_BASE/examples subsequent paths relative to this run macros for them in $SLIC_BASE/macros Geant4 visualization system DAWN, OpenGL, WIRED/HepRep No custom C++ code for any of the geometries!
18
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 18 SDJan03 Reprise
19
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 19 SiDFeb05 Detector Envelopes./sid/SiDEnvelope.lcdd toy example without real materials or layer structure polyhedra for calorimeter envelopes illustrates possibility of modelling realistic detector designs with “corners” add trapezoid-shaped readout modules with box layers Muon Coil Hcal trackers Ecal
20
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 20 Octagonal Calorimeter Barrel 2 GeV pion storing calorimeter-type hits in a region where secondaries are created magnetic field Geant4 range cut settable by region, especially useful for tweaking secondary / shower physics. Range cut is 10 mm here vs. Geant4’s 1 mm default.
21
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 21 Testbeam 2 GeV pion geometry similar to Mokka’s TB03 model store_secondaries is ON for viewing detailed shower structure.
22
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 22 MDI - BDS boolean solids polycones Visualized with dawn and dawncut. Machine Detector Interface and Beam Delivery System
23
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 23 SLIC authored by Jeremy McCormick and Ron Cassell simulator “hub” package Geant4 LCDD for the geometry description LCIO for IO command interface full command line interface maps to… macro command set (G4UIcommands) tweak LCIO behavior / flags with macros MCParticle handling based on refactored LCS ideas and code from LCDG4 (LcioHelper), Mokka (PhysicsListFactory), LCS (EndOfEventAction): Thanks, guys! additional resource directories analysis code in analysis/ geometry examples in LCDD format within examples/ scripts/ and macros/ with helpful utilities
24
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 24 Geant4 Macro Interface /lcdd/setURI./examples/sdjan03/SDJan03.lcdd /physics_list/select LHEP /stdhep/setFile stdhep_inputfile /lcio/path lcio_files /lcio/filename output_file /control/execute user_settings.mac /stdhep/skipEvents 100 /run/initialize /run/beamOn /control/interactive Example aims for simplicity and completeness LCDD has its own command directory created in that package. commands for LCIO customization Example does not show all possible commands. execute in several ways… slic macro_name (like Mokka) slic –m mac1 –m mac2 … slic –n (interactive mode)
25
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 25 Command Line Interface slic -g./examples/sdjan03/SDJan03.lcdd -l LHEP -i stdhep_inputfile -p lcio_files -o output_file -m user_settings.mac -s 100 -z -r 1 -n Example macro-based commandline interface Each switch maps to a Geant4/SLIC/LCDD macro command for consistency. arguments input and output files macro exec with switch -m run # events skip # events interactive mode initialize Ordering can be important, e.g. simulator initialization and multiple macro execution.
26
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 26 MCParticle Handling Overview HEPEVT Record Initial LCIO MCParticle G4PrimaryParticle G4Track G4TrackInformation Trajectory Final LCIO MCParticle based on refactored EndOfEventAction from LCS use track information and then trajectories to keep the track parentage intact during the simulation The actual construction of the MCParticle tree is done in post event processing using the trajectory object where possible and also information from the initial, input MCParticles and associated G4PrimaryParticles. Track ID is the main unique identifier. Current LCIO status codes are all fully implemented and have been certified against single and complex event inputs.
27
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 27 Diagnostic Histograms Java analysis codes in $SLIC_BASE/analysis authored by Ron Cassell JAS3, AIDA, LCIO All use the LCDD reimplementation of SDJan03 (LCDG4, LCS). MCParticle plots Zpole hadronic 10k events 1 entry / MCParticle to show hit associations sampling fractions Ecal: 1.2% Hcal: 6% Status Code and R vs. Z plots Muons 1-10 GeV, 2-176 theta, all phi
28
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 28 R vs. Z [histo]
29
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 29 MCParticles: EM Energy [histo] 10k Zpole hadronic (plot cutoff at 100k MCParticles)
30
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 30 MCParticles: Charged Had E [histo]
31
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 31 MCParticles: Neutral Had E [histo]
32
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 32 LCIO Hit Status Codes [histo] 7 6 5 4 3 2 1 Status Codes 1.CreatedInSimulation 2.Backscatter 3.VtxNotEndpOfParent 4.DecayedInTracker 5.DecayedInCal 6.LeftDetector 7.Stopped
33
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 33 Framework Installation first install… CLHEP Geant4 LCIO Xerces keep env vars: G4INSTALL, CLHEP_BASE_DIR, LCIO, XERCESCROOT, etc. install SLIC… export CVSROOT=:pserver:anonymous@cvs.freehep.org:/cvs/lcd cvs co slic cd slic export SLIC_BASE=`pwd`./scripts/build.sh The script walks user through setup of GDML, LCDD, LCPhys and SLIC. Please let me know if it works for you!
34
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 34 Plans remaining items on the LCDD / SLIC TODO list ($SLIC_BASE/doc/sim_TODO.rtf) event samples comparison and mutual certification of LCIO output with Mokka and LCDG4 promote SLIC at ILC simulation sites assistance for setup and usage user feedback for feature requests materials library compact converter: support realistic models possible LCDD detector-based full detectors: SiD, D09, GLD/LDC, … LCDD geometry navigator in Java geometry construction tools: editor, viewer contribute to GDML project
35
3/17/05 LCSim Workshop IV Jeremy McCormick, SLAC 35 Resources SLIC Homepage http://www.lcsim.org/software/slic LCDD Homepage http://www.lcsim.org/software/lcdd GDML Homepage http://gdml.web.cern.ch/GDML/ LinearCollider.org forum http://forum.linearcollider.org/ ILC Confluence Wiki http://confluence.slac.stanford.edu/display/ilc/Home
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.