Presentation is loading. Please wait.

Presentation is loading. Please wait.

LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e Detector Simulation and Geant4.

Similar presentations


Presentation on theme: "LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e Detector Simulation and Geant4."— Presentation transcript:

1 LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e Detector Simulation and Geant4

2 Detector Simulation 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 2 Simulation Tutorial - Feb. 2012

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

4 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. Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Transient Event Store Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Gaudi Architecture Geant4 Service (GiGa) Simulation Tutorial - Feb. 2012 4

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. Simulation Tutorial - Feb. 2012 5

6 Two Hierarchies DetElement LHCb Detector DescriptionGeometry DetElement LHCb DetElement Tracking DetElement Calo DetElement HCAL DetElement ECAL DetElement Module2 DetElement Module1 LVolume Experiment PVolume LVolume ECAL LVolume HCAL LVolume RICH PVolume LVolume HCALModule Logical structureGeometry structure Simulation Tutorial - Feb. 2012 - 6

7  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) More info: LHCb-2004-020  The syntax for creating these objects in the DB : Definition in DTD files, Examples from existing DB Volumes 7 Simulation Tutorial - Feb. 2012

8 Shapes: http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch04.html LHCb-2004-018 CSG (Constructed Solid Geometry) Solids, BREPS (Boundary Represented Solids), Tessellated Solids CSG 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. BREPS: Volumes defined by the description of their boundaries Tessellated Solids: Volumes defined by a number of facets. Useful for importing complex shapes created by CAD systems. More Info: 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. This tutorial: CSG solids, Boolean operations. Use shapes available in LHCb. Shapes: Attributes to Volumes 8 Simulation Tutorial - Feb. 2012

9 Logical Structure The basic object is a Detector Element Identification Navigation (tree-like) DetectorElement is 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 Simulation Tutorial - Feb. 2012 9

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

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

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

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 Simulation Tutorial - Feb. 2012 13

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. Simulation Tutorial - Feb. 2012 14

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. - 15 Data Base technology: data access and creation Simulation Tutorial - Feb. 2012

16 The LHCb Detector XML/DTD Divided into 3 main parts structure geometry material  All these defined by the DTD files Simulation Tutorial - Feb. 2012 16

17 Some Examples of XML Expressions evaluator – units & functions known 12.2*mm +.17*m / tan (34*degree) parameter : a kind of macro References : element + “ref” Simulation Tutorial - Feb. 2012 17

18 <box name="TutorialExampleSSBBasicBox" sizeX="TexSSBXSize" sizeY="TexSSBYSize" sizeZ="TexSSBZSize" /> This Logical Volume has also the Visualization attribute (color) Example of a Volume : Small Simple Box (SSB) 18 Simulation Tutorial - Feb. 2012

19 19 <box name="TutorialExampleSSBTypeAWithSubBox" sizeX="TexSSBXSize" sizeY="TexSSBYSize" sizeZ="TexSSBZSize" /> <tubs name="TutorialSSBTypeAHoleCyl" sizeZ="TexSSBZHoleLargeZSize" outerRadius="TexSSBZHoleRadius" /> <posXYZ x="TexSSBZHoleAXLocation" y="TexSSBZHoleAYLocation" /> Example of a Boolean Solid: SSB with a hole Simulation Tutorial - Feb. 2012

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 <logvol material=“…” name=“…”> <physvol logvol=“…” name=“…”/> <physvol logvol=“…” name=“…”/> <logvol material=“…” name=“…”> <physvol logvol=“…” name=“…”/> <physvol logvol=“…” name=“…”/> Simulation Tutorial - Feb. 2012 20

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 <box name="box3“ sizeX="1*m“ sizeY="1*m“ sizeZ="15*cm"/> <tubs name="tub2“ outerRadius="15*cm“ sizeZ="25*cm"/> <box name="box3“ sizeX="1*m“ sizeY="1*m“ sizeZ="15*cm"/> <tubs name="tub2“ outerRadius="15*cm“ sizeZ="25*cm"/> Simulation Tutorial - Feb. 2012 21

22 Material Elements: Examples materials : the root catalog : a list tabproperty : tabulated properties atom isotope element : a mixture of isotopes material : mixtures of elements or materials <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 name="Oxygen“ symbol="O“ …> <atom A="16*g/mole“ Zeff="8.0000"/> <component name="Carbon“ natoms="1"/> <component name="Oxygen“ natoms="2"/> <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 name="Oxygen“ symbol="O“ …> <atom A="16*g/mole“ Zeff="8.0000"/> <component name="Carbon“ natoms="1"/> <component name="Oxygen“ natoms="2"/> Simulation Tutorial - Feb. 2012 22

23 Structure Elements:Examples 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 <geometryinfo lvname=“…” npath=“…” support=“…”/> <userParameter comment=“…” name=“…” type="string"> … … <geometryinfo lvname=“…” npath=“…” support=“…”/> <userParameter comment=“…” name=“…” type="string"> … … Simulation Tutorial - Feb. 2012 23

24 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. Designing the DB 24 Simulation Tutorial - Feb. 2012

25 Particle Transport 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. 25 Simulation Tutorial - Feb. 2012

26 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 volumes containing 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 AlongStepDoIt for 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. Particle Transport in Simulation 26 Simulation Tutorial - Feb. 2012

27  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 UserSteppingAction in this tutorial Particle Transport in Simulation Simulation Tutorial - Feb. 2012 27

28 Summary The concept of Volumes and detector elements are introduced  Brief introduction to particle transport made.  Practical examples and exercises in the next part. 28 Simulation Tutorial - Feb. 2012

29 Extra slides 29 Simulation Tutorial - Feb. 2012

30 30 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 Particles through the detector: Simulation Simulation Tutorial - Feb. 2012


Download ppt "LHCb Simulation Tutorial CERN, 21 st -22 nd February 2012 01 10 100 111 01 1 01 01 00 01 01 010 10 11 01 00 B 00 l e Detector Simulation and Geant4."

Similar presentations


Ads by Google