1 / 30

Detector Simulation and Geant4

Detector Simulation and Geant4. Introductions to Gauss and GEANT4 in previous lectures Goal: To simulate the performance of the real detector Simulation involves: Creating the Geometry and material descriptions in the Database

ellard
Download Presentation

Detector Simulation and Geant4

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. Detector Simulation and Geant4

  2. Introductions to Gauss and GEANT4 in previous lectures • Goal: To simulate the performance of the real detector • Simulation involves: • Creating the Geometry and material descriptions in the Database • Implementing any further attributes and physics processes as appropriate • Particle transport using particles from the ‘generators’, hits creation • Collect the hits and convert hits into the classes of the LHCb event model • Simulation of the Digitization • One may also reconstruct the simulated data and do further analysis Detector Simulation

  3. General Overview of detector Description Concept of Volumes and Detector Elements Geometry visualization Considerations for Design Outline: Lecture1

  4. Converter Converter Application Manager Converter Event Selector Transient Event Store Data Files Message Service Persistency Service Event Data Service JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service Detector Description Architecture • Sub-Architecture of Gaudi • Same principles • Transient/Persistent representations • Focus on the “Physics Algorithm” • Access to Detector Transient Store • Coherent access to “all” detector data • Geometry, Calibration, Slow Control, etc. Gaudi Architecture Geant4 Service (GiGa)

  5. Detector Description • Logical Structure : Gaudi (LHCb) • Breakdown of detectors • Identification • Geometry Structure : Gaudi(LHCb) and GEANT4 • Hierarchy of geometrical volumes • LogicalVolumes (unplaced dimensioned shape) • PhysicalVolumes (placed volume) • Other detector data : Gaudi (LHCb) • Calibration, Alignment, Readout maps, Slow control, etc.

  6. HCALModule Experiment HCAL RICH ECAL Tracking Module2 Module1 HCAL LHCb LHCb ECAL Calo DetElement PVolume LVolume DetElement LVolume DetElement DetElement DetElement DetElement LVolume DetElement DetElement PVolume LVolume PVolume LVolume PVolume PVolume Two Hierarchies Logical structure Geometry structure Detector Description Geometry

  7. Volumes • Logical Volume: Contains the info of the Shape and Material of a Volume • Physical Volume : Contains the info of the Logical Volume and the Physical • location and orientation of a Volume. • Logical Volume also has • (a ) the information regarding • which other physical volumes are contained in that Volume. • (b ) the graphics attributes needed for visualization. • ( c ) user defined parameters • needed for tracking, electromagnetic field. • ( d ) flags to indicate if the volume is a sensitive detector • ( to create hits) • The syntax for creating these objects in the DB : Definition in DTD files, • Examples from existing DB More info: LHCb-2004-020

  8. Shapes: Attributes to Volumes Shapes: CSG (Constructed Solid Geometry) Solids, BREPS (Boundary Represented Solids) , Tessellated Solids Simple shapes,. Easy to use and gives better performance compared to other Types. A subset of those in GEANT4 is available in LHCb. These are the ones we use in LHCb Examples: (G4)Box, (G4)Tubs, (G4) Cons, G4(Trd) , (G4)Sphere etc. CSG Solids: Volumes defined by the description of their boundaries BREPS: Tessellated Solids: Volumes defined by a number of facets. Useful for importing complex shapes created by CAD systems. Boolean operations: Combination of two solids. (Subtraction, intersection ,union etc). For performance reasons unions are avoided in general. Also Boolean operations with disjoint solids or those that share the surfaces to be avoided. More Info: http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch04.html LHCb-2004-018 This tutorial: CSG solids , Boolean operations . Use shapes available in LHCb.

  9. Logical Structure • The basic object is a Detector Element • Identification • Navigation (tree-like) • DetectorElementis an information center • Be able to answer any detector related question • E.g. global position of strip#, temperature of detector, absolute channel gain, etc. • Placeholder for specific code • The specific answers can be coded by “Physicists” • DetectorElement objects are shared by all Algorithms DetElement * MyDetector

  10. MuonStation DetElement ReadOut Algorithm Accessing Detector Data • Manages store • Synchronization updates beginEvent DetectorData Service Persistency Service request request: get, update Transient Detector Store Geometry Conversion Service IDetElement IGeometryInfo GeometryInfo Algorithm ICalibration Conditions DB Calibration Conversion Service IReadOut reference Other DBs Conversion Service • More about detector elements in the later part of the lecture

  11. GiGa Service Persistency Service Geant4 Transient Detector Store GiGa Geometry Conversion Service condition DB geo DB LHCb Geometry and Geant4 Geometry Converters and Service GiGaGeo G4 geometry “Geo” (Gaudi Algorithm) list of detectors (trees) to convert Geo.StreamItems += ["/dd/Structure/LHCb/BeforeMagnetRegion/Velo“] Geo.StreamItems += ["/dd/Structure/LHCb/BeforeMagnetRegion/Rich1“] Geo.StreamItems += ["/dd/Geometry/BeforeMagnetRegion/Rich1/Rich1Surfaces“] ... The list controllable for default LHCb detector via a simple Gauss configuration

  12. Persistency Service Data Files Kine ‘Convertion’ Algorithms Transient Event Store G4 Kine Hits ‘Conversion’ Algorithms G4 Hits GiGa Service Geant4 GiGaGeom Conversion Service Transient Detector Store Action Action G4 Geom Persistency Service Data Files Detector Data Transfer and GiGa Event Loop controlled by Gaudi Gauss (Gaudi) GiGa(a) Embedded Geant4, Geant4 control and Configuration Dynamic loading of physics (sub-)lists The same Data base is used for all applications (Gauss, Boole, Brunel etc ).

  13. Transient Store Organization • Standard Gaudi Transient Store • “Catalogs” of Logical Volumes and Materials • “Structure” as a tree • All elements identified with names of the form: /xxx/yyy/zzzz

  14. Persistency based on XML files • XML is used as persistent representation of the Structure, Geometry and Materials • Why XML? • Instead of inventing our own format use a standard one (extendible) • Many available Parsers and Tools • Considered as Strategic technology a decade ago.

  15. The data is accessed from an SQLITE or ORACLE database when running the applications. Data created is converted into these formats during DB updates. • The DB creation is normally done by creating text files which are in XML format. One can also run from a ‘DB slice’ which is in XML format. • The tags to use in these XML files are defined in the ‘DTD’ files. One needs to create the DB using the syntax specified by the DTD files. • In this tutorial, few examples of this , would be discussed. • GDML: new technology similar to XML, to interface with Geant4 directly But no data access by Gaudi (LHCb) Algorithms. Data Base technology: data access and creation

  16. The LHCb Detector XML/DTD • Divided into 3 main parts • structure • geometry • material • All these defined by the DTD files

  17. Some Examples of XML • Expressions evaluator – units & functions known • 12.2*mm + .17*m / tan (34*degree) • parameter : a kind of macro <parameter name="InCell" value="40.6667*mm"/> <parameter name="MidCell" value="1.5*InCell"/> • References : element + “ref” <detelemref href="LHCb/structure.xml#LHCb"/>

  18. Example of a Volume : Small Simple Box (SSB) <parameter name="TexSSBXSize" value= "70*mm" /> <parameter name="TexSSBYSize" value= "120*mm" /> <parameter name="TexSSBZSize" value= "90*mm" /> <logvol name="lvTexSSBBasic“ material="IT/G10"> <box name="TutorialExampleSSBBasicBox" sizeX="TexSSBXSize" sizeY="TexSSBYSize" sizeZ="TexSSBZSize" /> </logvol> • This Logical Volume has also the • Visualization attribute (color)

  19. Example of a Boolean Solid: SSB with a hole <logvol name="lvTexSSBTypeA" material="IT/G10"> <subtraction name="TutorialSSBTypeASub" > <box name="TutorialExampleSSBTypeAWithSubBox" sizeX="TexSSBXSize" sizeY="TexSSBYSize" sizeZ="TexSSBZSize" /> <tubs name="TutorialSSBTypeAHoleCyl" sizeZ="TexSSBZHoleLargeZSize" outerRadius="TexSSBZHoleRadius" /> <posXYZ x="TexSSBZHoleAXLocation" y="TexSSBZHoleAYLocation" /> </subtraction> </logvol>

  20. Geometry Elements :Examples • DDDB : the root • catalog : a list • logvol : logical volume • physvol : physical volume • paramphysvol(2D)(3D) : replication of physical volumes • tabproperty : tabulated properties <DDDB> <catalog name=“…”> <logvol material=“…” name=“…”> <physvol logvol=“…” name=“…”/> </logvol> <logvol name=“…”> <paramphysvol number="5"> <physvol logvol=“…” name=“…”/> <posXYZ z="20*cm"/> </paramphysvol> </logvol> </catalog> </DDDB>

  21. Geometry Elements(2) • posXYZ, posRPhiZ, posRThPhi : translations • rotXYZ, rotAxis : rotations • transformation : composition of transformations • box, trd, trap, cons, tub, sphere • union, intersection, subtraction : boolean solids • surface <subtraction name="sub2"> <box name="box3“ sizeX="1*m“ sizeY="1*m“ sizeZ="15*cm"/> <tubs name="tub2“ outerRadius="15*cm“ sizeZ="25*cm"/> </subtraction> <posXYZ z="-40*cm"/> <rotXYZ rotX=“90*degree”/>

  22. Material Elements: Examples <isotope A="11*g/mole“ name="Bor_11“ …/> <element name="Boron“ symbol="B“ …> <isotoperef href="#Bor_10“ fractionmass="0.20"/> <isotoperef href="#Bor_11“ fractionmass="0.80"/> </element> <element name="Oxygen“ symbol="O“ …> <atom A="16*g/mole“ Zeff="8.0000"/> </element> <material name="CO2“ …> <component name="Carbon“ natoms="1"/> <component name="Oxygen“ natoms="2"/> </material> • materials : the root • catalog : a list • tabproperty: tabulated properties • atom • isotope • element : a mixture of isotopes • material : mixtures of elements or materials

  23. Structure Elements:Examples <DDDB> <catalog name=“…"> <detelem name=“…"> <geometryinfo lvname=“…” npath=“…” support=“…”/> <userParameter comment=“…” name=“…” type="string"> … </userParameter> <specific> … </specific> </detelem> </catalog> </DDDB> • DDDB : the root • catalog : a list • detelem : a detector element • geometryInfo : connection to the geometry • userParameter(Vector) : hook for adding parameters • specific : hook for extending the DTD

  24. Designing the DB • First find what all parts need to be simulated. • Discuss the design with colleagues. • When designing: Everything should be made as simple as possible, but not simpler. A. Einstein • Check with graphics to see what you created is OK. • Test for overlaps • Run particles through to see if it gives the hits as intended • Test with full b-event simulation • Create the detector elements as needed. • Write events out and then run through the reconstruction for verification.

  25. In LHCb, the transport is done using the Transport service. • In Geant4, this is done using the G4TransportManager with the help of G4Navigator. • The overlap checks are done using these. • In Geant4 the transport is done through steps. Particle Transport

  26. Particle Transport in Simulation G4Step: Contains the transient information of a step. This includes the G4StepPoint for the PreStepPoint and PostStepPoint , which contain the information of the coordinates of these points and of the volumescontaining them. It also stores the change in track properties between these points. G4Track: Keeps the track info at the end of a step. (It has the info of the previous step until the completion of the AlongStepDoItfor the current step. It is also updated after the PostStepDoIt. G4Trajectory : Contains the G4TrajectoryPoints along the entire trajectory of a particle. The first point being the original vertex and the others are appended at every step. This has fewer information than the transient G4Step. The user can add extra info to this with the G4VUserTrackInformation.

  27. Particle Transport in Simulation • To probe the particle transport and other features: • UserSteppingAction: At the end of a step • UserTrackingAction: At the beginning and end of a track • UserEventAction: At the beginning and end of an Event • UserRunAction: At the beginning and end of a Run • These are available in Gauss via the GiGa Interface. • Examples of using UserSteppingActionin this tutorial

  28. The concept of Volumes and detector elements are introduced • Brief introduction to particle transport made. • Practical examples and exercises in the next part. Summary

  29. Extra slides

  30. Particles through the detector: Simulation • Particle source: • Particle Gun : Particle(s) properties defined by the user • B-Events from Pythia • Managing Particle Transport : • One can specify which all physics processes each particle is subjected to. • Normally this is all taken care of, in a standard way. • eg: Use a ‘Physics list.’ • The transport of the particles happens depending on the physics specifications. • Every particle has G4Transportation as a ‘process’ • Particle Transport happens in steps . The length and direction of each step • is defined by the physics processes acting at that step: • AlongStepProcess, PostStepProcess , AtRestProcess

More Related