Geometry Detector geometry A detector geometry in Geant4 is made of a number of volumes. The largest volume is called the World volume. It must contain.

Slides:



Advertisements
Similar presentations
COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
Advertisements

Computer Graphics Lecture 4 Geometry & Transformations.
Geant4 v9.2p02 Geometry I Makoto Asai (SLAC) Geant4 Tutorial Course.
Links and Joints.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
Makoto Asai (SLAC) Geant4 Tutorial Course
Parametric Shapes & Lighting Jared Jackson Stanford - CS 348b June 6, 2003.
2003 by Jim X. Chen: Introduction to Modeling Jim X. Chen George Mason University.
Geant4 v9.4 Geometry I Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Tutorial Course
Geometry I Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
Detector Description Gabriele Cosmo, Geant4 Users’ Workshop Tutorial SLAC February 18-22, 2002.
Geometry II Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
IE433 CAD/CAM Computer Aided Design and Computer Aided Manufacturing Part-4 Computer Graphics- CAD Software Industrial Engineering Program King Saud University.
INTRODUCTION TO GEOMETRIC MODELLING 20 September 2010.
3-D Modeling Concepts V part 2.
V part 2 Obtained from a Guildford County workshop- Summer, 2014.
Geometry 5 I.Hrivnacova¹, J.Apostolakis² ¹IPN, Orsay; ²CERN Cours Paris June 2007.
Geometric Solids EQ: What are the most common types of solids, what are cross sections and solids of revolution?
Detector Description – basic concepts The full set of lecture notes of this Geant4 Course is available at
Geometric Structure G.1Adevelop and awareness of the structure of a mathematical system, connecting definitions, postulates, logical reasoning and theorems.
Geant4 Geometry – building your virtual experiment
A Hands-on introduction to Geant4 Andrea Dell’Acqua CERN-EP/ATC
Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor CHEP 2000 at Padova Hajime Yoshida Naruto University of Education.
Copyright - Planchard 2012 History of Engineering Graphics Stephen H. Simmons TDR 200.
Examples Development and application of CATIA-GDML geometry builder Introduction 1- Institute for Theoretical and Experimental Physics (ITEP), Moscow,
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
COMPUTER AIDED DESIGN -(CAD)-3
TECH 104 – Technical Graphics Communication Week 13: 3D Modeling Basics.
Materials In nature, general materials (compounds, mixtures) are made by elements and elements are made by isotopes. These are the three main classes.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
Work_Geant4 Bo-Wen Shiou. #include "G4RunManager.hh“ #include "G4RunManager.hh“ #include "G4UImanager.hh" #include "G4UImanager.hh" #include "ExN01DetectorConstruction.hh“
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Monte Carlo /12/07. What is Geant ? Monte Carlo simulation tool for nuclear and particle physics Set up detectors –Sensitive detector which returns.
Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI,
Visual Computing Geometric Modelling 1 INFO410 & INFO350 S2 2015
Detector Description: Basics
Detector Description – Part I Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner
Unit 6 3D Modeling Concepts
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
Geometry 4 I.Hrivnacova IPN, Orsay Most slides thanks to M. Asai, SLAC Cours Paris June 2007.
The GeoModel Toolkit for Detector Description Joe Boudreau Vakho Tsulaia University of Pittsburgh CHEP’04 Interlaken.
BREPS & STEP what's up and coming... Gabriele Cosmo CERN - IT/ASD GEANT4 Workshop September, 20th 1999 ESTEC, Noordwijk, The Netherlands.
Constructive Solid Geometry Ray Tracing CSG Models
Geometrically Bounded Wireframe AIC (Part 510) Grouping of curves relevant for 3-dimensional wireframe modeling without topological constructs Elementary.
Outline  Developments/fixes in the last year  Introduced in release 9.6 and patches  Planned for release 10.0 and ongoing …  Currently under development.
Exercises Alberto Ribon Alberto Ribon CERN PH/SFT CERN PH/SFT Geant4 tutorial, May 2005.
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
A Hands-on introduction to Geant4 Andrea Dell’Acqua CERN-EP/ATC
Detector Description: Basics
Detector Description – basic concepts The full set of lecture notes of this Geant4 Course is available at
IT / API 1 CERN 1-Feb-16 GBLIB: classes to deal with geometrical data Evgueni Tcherniaev IT / API CLHEP workshop, January.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
Vocabulary for the Common Core Sixth Grade.  base: The side of a polygon that is perpendicular to the altitude or height. Base of this triangle Height.
COORDINATE SYSTEMS & TRANSFORMATION
TECH 104 – Technical Graphics Communication Week 12: 3D Modeling Basics.
Detector Description – Part I Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner
3D Rendering 2016, Fall.
Rendering Pipeline Fall, 2015.
3D Modeling Basics Three basic types of 3D CAD models:
A Hands-on introduction to Geant4
Sketching.
Engineering Geometry Engineering geometry is the basic geometric elements and forms used in engineering design. Engineering and technical graphics are.
Detector Description – basic concepts
Geant4: Detector description Gabriele Cosmo,
C++ for Geant4 users A collection of most useful and/or common features used in and to use Geant4 Marc Verderi LLR – Ecole polytechnique 14/11/2018 Marc.
In this chapter, you will learn the following:
GEANT4: Inner Poly Shield
Presentation transcript:

Geometry

Detector geometry A detector geometry in Geant4 is made of a number of volumes. The largest volume is called the World volume. It must contain all other volumes in the detector geometry The other volumes are created and placed inside previous volumes, including the World. Each volume is created by describing its shape and its physical characteristics and then placing it inside a containing volume. The coordinate system used to specify where the daughter volume is placed is the one of the mother.

Detector Geometry (2) Volumes cannot overlap in Geant4!!! Use boolean operations instead! Geant3 Geant4 “MANY” “ONLY”

G4VUserDetectorConstruction G4VUserDetectorConstruction is one of the three abstract classes in Geant4 the user MUST inherit from to create his/her implementation of the detector geometry An instance of a class inherited from G4VUserDetectorConstruction is passed to the G4RunManager by calling SetUserInitialization(). The Run Manager keeps a pointer to the detector geometry which the user wants to use and checks (before startup) that this pointer has indeed been set G4VUserDetectorConstruction’s method Construct() is invoked by the Run Manager to set up the detector geometry. Construct() should hence set up everything needed for the geometry definition Construct() returns a pointer the the World’s Physical Volume

Volumes To have a volume implemented in Geant4 one has to go through three steps. –A Solid is used to describe a volume’s shape. A solid is a geometrical object that has a shape and specific values for each of that shape’s dimensions –A Logical Volume is use for describing a volume’s full properties. It starts from its geometrical properties (the solid) and adds physical characteristics, like the material, the sensitivity, the magnetic field, the color… –What remains to describe is the position of the volume. For doing that, one creates a Physical volumes, which places a copy of the logical volume inside a larger, containing volume.

Solids The STEP standard supports multiple solid representations –Constructive Solid Geometry (CSG) –SWEPT solids –Boundary Represented solids (BREPs) Different representations are suitable for different purposes, applications, required complexity and levels of detail. –CSGs give superior performance and they are easy to use, but they cannot reproduce complex solids as used in CAD systems –BREPs allow to reproduce the most complex solids, thus allowing the exchange of models with CAD systems, but they are normally quite inefficient, as far as tracking is concerned

Solids To create a simple box one has simply to define its name and its dimensions along each cartesian axes: #include “G4Box.hh” …. G4double expHall_x=3.0*m; G4double expHall_y=1.0*m; G4double expHall_z=1.0*m; … G4Box* experimentalHall_box = new G4Box(“Exp. Hall box”,expHall_x,expHall_y,expHall_z);

CSG Solids CSG solids are defined directly as 3D primitives They are described by a minimal set of parameters necessary to define the shape and the size of the solid CSG solids are Boxes, Tubes and their sections, Cones and their sections, Spheres, Wedges, Toruses

G4Box The definition of a Box in Geant4 can be found in: To create a box use the constructor: G4Box(const G4String& pName, G4double pX, G4double pY, G4double pZ) where: pX:half length in X pY:half length in Y pZ:half length in Z G4Box* a_box=new G4Box(“My Box”,10*cm,0.5*m,30*cm); $G4INSTALL/source/geometry/solids/CSG/include/G4Box.hh

G4Tubs The definition of a Tube (or a section of it) is in: use the constructor: $G4INSTALL/source/geometry/solids/CSG/include/G4Tubs.hh G4Tubs(const G4String& pName, G4double pRmin, G4double pRmax, G4double pDz, G4double pSPhi, G4double pDPhi) where: pRmin:Inner Radius pRmax:Outer Radius pDZ:half length in Z pSPhi:starting phi angle pDPhi:angular span of the section G4Tubs* a_tube=new G4Tubs(“a Tube”,10*cm,30*cm,20*cm,0.,270.*deg);

G4Cons The definition of a cone (or a section of it) is in: Use the constructor: $G4INSTALL/source/geometry/solids/CSG/include/G4Cons.hh G4Cons(const G4String& pName, G4double pRmin1, G4double pRmax1, G4double pRmin2, G4double pRmax2, G4double pDz, G4double pSPhi, G4double pDPhi) where: pRmin1,pRmax1:Inner/Outer Radius at z=-pDz pRmin2,pRmax2:Inner/Outer Radius at z=pDz pDZ:half length in Z pSPhi:starting phi angle pDPhi:angular span of the section G4Cons* a_cone=new G4Cons(“a Cone”,1*cm,5*cm,10*cm,30*cm,20*cm,0.,180.*deg);

G4Trd The definition of a trapezoid is in The general constructor is: $G4INSTALL/source/geometry/solids/CSG/include/G4Trd.hh G4Trd(const G4String& pName, G4double dx1, G4double dx2, G4double dy1, G4double dy2, G4double pDz) where: dx1:Half length along x at the surface positioned at -dz dx2:Half length along x at the surface positioned at +dz dy1:Half length along y at the surface positioned at -dz dy2:Half length along y at the surface positioned at +dz dz:Half length along z axis G4Trd* a_trd=new G4Trd(“a Trd”,10*cm,20*cm,1*m,1*m,2*m);

Other CSG shapes G4Hype –an hyperbolic with curved sides parallel to the z axis G4Para –a general Parallelepiped G4Trap –a general trapezoid (possibly twisted) G4Sphere –a (section of a) sphere For additional informations about these shapes have a look in $G4INSTALL/source/geometry/solids/GSG/include

Polycone and polyhedra A polycone solid is a shape defined by a set of inner and outer conical or cylindrical surface sections and two planes perpendicular to the Z axis. Each conical surface is defined by its radius at two different planes perpendicular to the Z axis. Inner and outer conical surfaces are defined using common Z planes G4Polycone( G4String name, const G4double start_angle,// starting angle const G4double opening_angle,// opening angle const int num_z_planes,// nr. of planes const G4double z_start,// starting value of z const G4double z_values[],// z coordinate of each plane const G4double RMIN[],// inner radius of the cone at each plane const G4double RMAX[])// outer radius of the cone at each plane

Polycone and polyhedra The polyhedra solid is a shape defined by an inner and outer polygonal surface and two planes perpendicular to the Z axis. Each polygonal surface is created by linking a series of polygons created at different planes perpendicular to the Z axis. All these polygons have the same nr of sides G4Polyhedra( G4String name, const G4double start_angle,// starting angle const G4double opening_angle,// opening angle const G4int n_sides// nr. of sides const G4int num_z_planes,// nr. of planes const G4double z_start,// starting value of z const G4double z_values[],// z coordinate of each plane const G4double RMIN[],// inner radius of the cone at each plane const G4double RMAX[])// outer radius of the cone at each plane

Logical volumes To create a Logical volume one must start from a solid and a material. #include “G4LogicalVolume.hh” #include “G4Box.hh” #include “G4Material.hh” …. G4Box* a_box = new G4Box(“A box”,dx,dy,dz); G4double a=39.95*g/mole; G4double density=1.390*g/cm3; G4Material* LAr = new G4Material(name=“Liquid Argon”,z=18.,a,density); G4LogicalVolume* a_box_log = new G4LogicalVolume(a_box,LAr,”a simple box”);

Positioning a volume To position a volume, one must start with a logical volume and decide what volume (which must already exist) to place it inside, where to position it (wrt the mother’s reference system) and how to rotate it A physical volume is simply a positioned instance of a logical volume #include “G4VPhysicalVolume.hh” #include “G4PVPlacement.hh” … G4RotationMatrix *rm=new G4RotationMatrix; rm->rotateX(30*deg); G4Double aboxPosX=-1.0*m; G4VPhysicalVolume* a_box_phys= new G4PVPlacement(rm,// pointer to G4RotMatrix!! G4ThreeVector(aboxPosX,0,0),// position a_box_log,// its logical volume “a box”,// its name experimentalHall_log,// its mother false,// no boolean ops. 1);// the copy nr.

Positioning a volume (2) An exception exist to the rule that a physical volume must be placed inside a mother volume. The World volume must be created as a G4PVPlacement with a null mother pointer and be positioned unrotated at the origin of the global coordinate system #include “G4PVPlacement.hh” … G4VPhysicalVolume experimentalHall_phys =new G4PVPlacement(0, // No rotation! G4ThreeVector(0.,0.,0.), // No Translation! experimentalHall_log, // The logical volume “Experimental Hall”, // its name 0, // No mother volume! false, // no boolean operations 0); // copy number

Frame This example introduces the three mandatory classes to be implemented for a Geant4 application to run (and a visualization manager, needed for graphics applications) –have a look to the various files in the src/ and include/ directories, figure out which methods have been implemented the example, as it is, will not compile. The aim of the example is –to create the world volume. To this purpose, the FrameDetectorConstruction class contains three variables (experimentalHall_x,y,z) which can be used as dimensions for the world volume –implement elements, materials, mixtures… –create solids, logical volumes and physical volumes and position them into the world volume, try to rotate and translate them, try composite rotations to understand how the system works... Nitrogen symbol N z=7 a= dens=0.808 Lead symbol=Pb z=82 a=207.2 dens=11.35 Oxygen symbol=O z=8 a= dens= Iron symbol=Fe z=26 a= dens=7.87

Frame (2) Try and build a calorimeter (!) made of trapezoidal wedges (dimensions and nr. of wedges are provided in the program)