Detector Description – Part I Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner

Slides:



Advertisements
Similar presentations
Use of G EANT 4 in CMS AIHENP’99 Crete, April 1999 Véronique Lefébure CERN EP/CMC.
Advertisements

Geant4 v9.2p02 Geometry I Makoto Asai (SLAC) Geant4 Tutorial Course.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
Makoto Asai (SLAC) Geant4 Tutorial Course
Defining Material and Geometry Makoto Asai (SLAC) Geant4 Tutorial Course the 2nd Finnish Geant4 Workshop June , Helsinki Institute of Physics June.
Detector Description Gabriele Cosmo, Geant4 Users’ Workshop Tutorial SLAC February 18-22, 2002.
Geant4 v9.4 Material Makoto Asai (SLAC) Geant4 Tutorial Course.
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.
IE433 CAD/CAM Computer Aided Design and Computer Aided Manufacturing Part-4 Computer Graphics- CAD Software Dr. Abdulrahman M. Al-Ahmari Industrial Engineering.
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.
Defining Material Tatsumi Koi (SLAC/SCCS) (based on Makoto Asai's slides) Geant4 Tutorial Course Geant4 v8.2p01.
Detector Description - Materials
Detector Description: Materials
Computer-Aided Design & Drafting
Defining Materials Geant4 tutorial Paris, 4-8 June 2007 Giovanni Santin ESA / ESTEC Rhea System SA With material from previous tutorials by Makoto Asai.
3-D Modeling Concepts V part 2.
Geometry 5 I.Hrivnacova¹, J.Apostolakis² ¹IPN, Orsay; ²CERN Cours Paris June 2007.
Detector Description – basic concepts The full set of lecture notes of this Geant4 Course is available at
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
Geant4 Geometry – building your virtual experiment
Detector Description – advanced features The full set of lecture notes of this Geant4 Course is available at
Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor CHEP 2000 at Padova Hajime Yoshida Naruto University of Education.
In the G4/ROOT hierarchy there are three conceptual layers: - G4VSolid: shape, size - G4VSolid: shape, size - G4LogicalVolume: material, MF, sensitivity,
Materials 1 Images: Isotopic composition Molecular composition Density Pressure State Temperature.
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.
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.
Gaudi Framework Tutorial, XML The persistent world.
Work_Geant4 Bo-Wen Shiou. #include "G4RunManager.hh“ #include "G4RunManager.hh“ #include "G4UImanager.hh" #include "G4UImanager.hh" #include "ExN01DetectorConstruction.hh“
Special Topics in Nuclear Physics, JU, Second Semester, (Saed Dababneh). 1 Course web or
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.
Detector Description: Basics
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.
Material Definition University of Pennsylvania Geant4 Tutorial 15 May 2011 Dennis Wright Geant4 V9.4.
BREPS & STEP what's up and coming... Gabriele Cosmo CERN - IT/ASD GEANT4 Workshop September, 20th 1999 ESTEC, Noordwijk, The Netherlands.
Detector Description – Part III Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner.
May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.
CLHEP Components Geant4 and CLHEP Geant4 makes a rather substantial use of CLHEP components –System of units –Vector classes and matrices G4ThreeVector(typedef.
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.
Detector Description - Materials
Geometry 3 I.Hrivnacova IPN, Orsay Most slides thanks to M. Asai, SLAC Cours Paris June 2007.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
1 The Geant4 Monte Carlo toolkit Sebasten Incerti / Alfonso Mantero IN2P3/CNRS Centre d’Etudes Nucléaires de Bordeaux Gradignan France
Detector Description – Part I Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner
Geant4: Detector description module
Detector Description - Advanced
Geant4 Geometry Speed-ups
Detector Description – basic concepts
Detector Description - Advanced
Geant4: Detector description Gabriele Cosmo,
Geant4: Detector description module Authors: J.Apostolakis, G.Cosmo
Detector Description Overview
Hierarchical Modeling & Constructive Solid Geometry
Detector Description - Materials
User Application
The full set of lecture notes of this Geant4 Course is available at
The full set of lecture notes of this Geant4 Course is available at
Kernel Author: Makoto Asai.
The full set of lecture notes of this Geant4 Course is available at
GEANT4: Inner Poly Shield
Presentation transcript:

Detector Description – Part I Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner

Detector Description: Part I: the Basics - Materials - Describing a detector - Geometry hierarchy - Logical and physical volumes - Solids - Visualization of detector

Materials - The System of units & constants - Definition of elements - Materials and mixtures - Some examples …

Detector Description - Geant4 Course4 Unit system Geant4 has no default unit. To give a number, unit must be “multiplied” to the number. for example : G4double width = 12.5*m; G4double density = 2.7*g/cm3; If no unit is specified, the internal G4 unit will be used, but this is discouraged ! Almost all commonly used units are available. The user can define new units. Refer to CLHEP: SystemOfUnits.h Divide a variable by a unit you want to get. G4cout << dE / MeV << “ (MeV)” << G4endl;

Detector Description - Geant4 Course5 System of Units System of units are defined in CLHEP, based on: millimetre ( mm ), nanosecond ( ns ), Mega eV ( MeV ), positron charge ( eplus ) degree Kelvin ( kelvin ), the amount of substance ( mole ), luminous intensity ( candela ), radian ( radian ), steradian ( steradian ) ‏ All other units are computed from the basic ones. In output, Geant4 can choose the most appropriate unit to use. Just specify the category for the data ( Length, Time, Energy, etc…): G4cout << G4BestUnit(stepSize, “Length”); stepSize will be printed in km, m, mm or … fermi, depending on its value

Detector Description - Geant4 Course6 Defining new units New units can be defined directly as constants, or (suggested way) via G4UnitDefinition. G4UnitDefinition ( name, symbol, category, value )‏ Example (mass thickness): G4UnitDefinition (“grammpercm2”, “g/cm2”, “MassThickness”, g/cm2); The new category “ MassThickness” will be registered in the kernel in G4UnitsTable To print the list of units: From the code G4 UnitDefinition::PrintUnitsTable(); At run-time, as UI command: Idle> /units/list

Detector Description - Geant4 Course7 Definition of Materials Different kinds of materials can be defined: isotopes<>G4Isotope elements<>G4Element molecules<>G4Material compounds and mixtures <> G4Material Attributes associated: temperature, pressure, state, density

Detector Description - Geant4 Course8 Isotopes, Elements and Materials G4Isotope and G4Element describe the properties of the atoms: Atomic number, number of nucleons, mass of a mole, shell energies Cross-sections per atoms, etc… G4Material describes the macroscopic properties of the matter: temperature, pressure, state, density Radiation length, absorption length, etc…

Detector Description - Geant4 Course9 Elements Element can be defined by name, symbol, atomic number and mass of mole: a = 1.01*g/mole; G4Element* elH = new G4Element("Hydrogen",symbol="H",z=1.,a); a = 16.00*g/mole; G4Element* elO = new G4Element("Oxygen",symbol="O",z=8.,a);

Detector Description - Geant4 Course10 Elements & Isotopes When necessary, elements can be built from pre-defined isotopes: G4Isotope (const G4String& name, G4int z, // atomic number G4int n, // number of nucleons G4double a ); // mass of mole … as follows: G4Element (const G4String& name, const G4String& symbol, // element symbol G4int nIso ); // # of isotopes G4Element::AddIsotope(G4Isotope* iso, // isotope G4double relAbund); // fraction of atoms // per volume

Detector Description - Geant4 Course11 Material of one element Single element material G4double density = 1.390*g/cm3; G4double a = 39.95*g/mole; G4Material* lAr = new G4Material("liquidArgon",z=18.,a,density); Avoid “effective” average A, Z with hadronic physics ! Cross-section are not a function of material properties, but a function of nuclear properties.  At least correct set of elements is needed Prefer low-density material to vacuum

Detector Description - Geant4 Course12 Material: molecule A Molecule is made of several elements (composition by number of atoms): a = 1.01*g/mole; G4Element* elH = new G4Element("Hydrogen", symbol="H", z=1., a); a = 16.00*g/mole; G4Element* elO = new G4Element("Oxygen", symbol="O", z=8., a); density = 1.000*g/cm3; G4Material* H2O = new G4Material("Water", density, ncomp=2); H2O->AddElement(elH, natoms=2); H2O->AddElement(elO, natoms=1);

Detector Description - Geant4 Course13 Material: compound Compound: composition by fraction of mass a = 14.01*g/mole; G4Element* elN = new G4Element(name="Nitrogen", symbol="N", z= 7., a); a = 16.00*g/mole; G4Element* elO = new G4Element(name="Oxygen", symbol="O", z= 8., a); density = 1.290*mg/cm3; G4Material* Air = new G4Material(name="Air", density, ncomponents=2); Air->AddElement(elN, 70.0*perCent); Air->AddElement(elO, 30.0*perCent);

Detector Description - Geant4 Course14 Material: mixture Composition of compound materials G4Element* elC = …; // define “carbon” element G4Material* SiO2 = …; // define “quartz” material G4Material* H2O = …; // define “water” material density = 0.200*g/cm3; G4Material* Aerog = new G4Material("Aerogel", density, ncomponents=3); Aerog->AddMaterial(SiO2, fractionmass=62.5*perCent); Aerog->AddMaterial(H2O, fractionmass=37.4*perCent); Aerog->AddElement (elC, fractionmass= 0.1*perCent);

Detector Description - Geant4 Course15 Example: gas It may be necessary to specify temperature and pressure (dE/dx computation affected) ‏ G4double density = 27.*mg/cm3; G4double temperature = 325.*kelvin; G4double pressure = 50.*atmosphere; G4Material* CO2 = new G4Material(“CarbonicGas", density, ncomponents=2, kStateGas, temperature, pressure); CO2->AddElement(C, natoms = 1); CO2->AddElement(O, natoms = 2);

Detector Description - Geant4 Course16 Example: vacuum Absolute vacuum does not exist. It is a gas at very low density ! Cannot define materials composed of multiple elements through Z or A, or with  = 0. G4double atomicNumber = 1.; G4double massOfMole = 1.008*g/mole; G4double density = 1.e-25*g/cm3; G4double temperature = 2.73*kelvin; G4double pressure = 3.e-18*pascal; G4Material* Vacuum = new G4Material(“interGalactic", atomicNumber, massOfMole, density, kStateGas, temperature, pressure);

Detector Description - Geant4 Course17 NIST Database NIST database: Guarantees accuracy in major parameters: Density, Mean excitation potential,... Imported inside Geant4 =================================== #Compound Materials from the NIST Data Base ============================================ N Name ChFormula density(g/cm^3) I(eV) ============================================ 4 G4_Air

Detector Description - Geant4 Course18 NIST Database Natural isotope composition: More than 3000 isotope masses are used for elements definition NIST Elementary materials: H -> Cf ( Z = 1 -> 98 ) ‏ NIST compounds: E.g. “G4_ADIPOSE_TISSUE_ICRP” HEP and Nuclear materials: E.g. Liquid Ar, PbWO It is possible to build mixtures of NIST and user- defined materials

Detector Description - Geant4 Course19 Example: material from NIST Material is retrieved from Geant4 material database By its name G4NistManager* man = G4NistManager::Instance(); G4Material* H2O = man->FindOrBuildMaterial("G4_WATER"); G4Material* Air = man->FindOrBuildMaterial("G4_AIR"); The list of currently available material names can be found in the Geant4 User's Guide for Application Developers Appendix 8: Geant4 Material Database The list is permanently being extended

Describing a detector - Detector geometry modeling - Volumes hierarchy

Detector Description - Geant4 Course21 Describe your detector Derive your own concrete class from G4VUserDetectorConstruction abstract base class. Implementing the method Construct() : Modularize it according to each detector component or sub-detector: Construct all necessary materials Define shapes/solids required to describe the geometry Construct and place volumes of your detector geometry  Define sensitive detectors and identify detector volumes which to associate them  Associate magnetic field to detector regions  Define visualization attributes for the detector elements

Detector Description - Geant4 Course22 Creating a Detector Volume Start with its Shape & Size Box 3x5x7 cm, sphere R=8m Add properties: material B/E field, make it sensitive Place it in another volume in one place repeatedly using a function Solid Logical volume Physical volume

Detector Description - Geant4 Course23 Define detector geometry G4Box G4Tubs G4VSolid G4VPhysicalVolume G4Material G4VSensitiveDetector G4PVPlacement G4PVParameterised G4VisAttributes G4LogicalVolume Three conceptual layers G4VSolid -- shape, size G4LogicalVolume -- daughter physical volumes, material, sensitivity, user limits, etc. G4VPhysicalVolume -- position, rotation

Detector Description - Geant4 Course 24 Define detector geometry Basic strategy G4VSolid* pBoxSolid = new G4Box(“aBoxSolid”, 1.*m, 2.*m, 3.*m); G4LogicalVolume* pBoxLog = new G4LogicalVolume( pBoxSolid, pBoxMaterial, “aBoxLog”, 0, 0, 0); G4VPhysicalVolume* aBoxPhys = new G4PVPlacement(pRotation, G4ThreeVector(posX, posY, posZ), pBoxLog, “aBoxPhys”, pMotherLog, 0, copyNo); A unique physical volume which represents the experimental area must exist and fully contains all other components  The world volume Step 1. Create the geom. object : box Step 2. Assign properties to object : material Step3. Place it in the coordinate system of mother volume

Detector Description - Geant4 Course25 G4LogicalVolume Contains all information of volume except position: Shape and dimension (G4VSolid) ‏ Material, sensitivity, visualization attributes Position of daughter volumes Magnetic field, User limits Shower parameterisation Region Physical volumes of same type can share a logical volume

Detector Description - Geant4 Course26 G4LogicalVolume To create a logical volume for a given material and solid, the user must instantiate G4LogicalVolume: G4LogicalVolume(G4VSolid* pSolid, G4Material* pMaterial, const G4String& name, G4FieldManager* pFieldMgr=0, G4VSensitiveDetector* pSDetector=0, G4UserLimits* pULimits=0, G4bool optimise=true); Note: The pointers to solid and material must be NOT null Once created it is automatically entered in the LV store It is not meant to act as a base class

Detector Description - Geant4 Course27 Geometrical hierarchy Mother and daughter volumes A volume is placed in its mother volume Position and rotation of the daughter volume is described with respect to the local coordinate system of the mother volume The origin of the mother's local coordinate system is at the center of the mother volume Daughter volumes cannot protrude from the mother volume Daughter volumes cannot overlap One or more volumes can be placed to mother volume

Detector Description - Geant4 Course28 Geometrical hierarchy Mother and daughter volumes (cont.) ‏ The logical volume of mother knows the physical volumes it contains It is uniquely defined to be their mother volume If the logical volume of the mother is placed more than once, all daughters appear by definition in all these physical instances of the mother World volume = root volume of the hierarchy The world volume must be a unique physical volume which fully contains all other volumes The world defines the global coordinate system The origin of the global coordinate system is at the center of the world volume Should not share any surface with contained geometry

Detector Description - Geant4 Course29 Physical Volumes repeated placement Placement: it is one positioned volume Represents one “real” volume Repeated: a volume placed many times can represent any number of volumes reduces use of memory. Replica and Division simple repetition along one axis Parameterised Repetition with respect to copy number A mother volume can contain either many placement volumes OR one repeated volume

Detector Description - Geant4 Course30 G4VPhysicalVolume G4VPhysicalVolume is the base class of physical volumes Like G4VSolid, it as an abstract class Use the inherited classes to place your logical volumes G4VPhysicalVolume implementations: G4PVPlacement G4PVParameterised G4PVReplica G4PVDivision

Detector Description - Geant4 Course31 G4VPhysicalVolume G4PVPlacement 1 Placement = One Volume A volume instance positioned once in a mother volume G4PVParameterised 1 Parameterised = Many Volumes Parameterised by the copy number Shape, size, material, position and rotation can be parameterised, by implementing a concrete class of G4VPVParameterisation. Reduction of memory consumption Currently: parameterisation can be used only for volumes that either a) have no further daughters or b) are identical in size & shape. G4PVReplica, G4PVDivision 1 Replica = Many Volumes Slicing a volume into smaller pieces (if it has a symmetry) ‏

Detector Description - Geant4 Course32 G4PVPlacement G4PVPlacement(G4RotationMatrix* pRot, // rotation const G4ThreeVector& tlate, // translation G4LogicalVolume* pCurrentLogical, // volume being placed const G4String& pName, // phys. Volume name G4LogicalVolume* pMotherLogical, // mother logical volume G4bool pMany, // not used G4int pCopyNo, // position (copy) number G4bool pSurfChk=false); // activate overlap checking Single volume positioned relatively to the mother volume In a frame rotated and translated relative to the coordinate system of the mother volume Three additional constructors: A simple variation: specifying the mother volume as a pointer to its physical volume instead of its logical volume. Using G4Transform3D to represent the direct (object) rotation and translation of the solid instead of the frame The combination of the two variants above

Detector Description - Geant4 Course33 Example G4ThreeVector boxPosition(100.*cm, 80.*cm, 0.*cm); G4RotationMatrix* boxRotation = new G4RotationMatrix; boxRotation->rotateZ(30.*deg); //Rotate around Z-axis //Other Rotations : rotateX(angle), rotateY(angle)‏ G4VPhysicalVolume* boxPhys = new G4PVPlacement( boxRotation, Mother Volume boxPosition, boxLog, “myBoxPhys”, motherLogical, false, 1); rotation translation in rotated frame X Y

Solids - G4VSolid base class - Available solids in Geant4 - Examples of simple solids definitions - Boolean solids

Detector Description - Geant4 Course35 Solids Solids defined in Geant4: CSG (Constructed Solid Geometry) solids G4Box, G4Tubs, G4Cons, G4Trd, … Analogous to simple GEANT3 CSG solids Specific solids (CSG like) ‏ G4Polycone, G4Polyhedra, G4Hype, … G4TwistedTubs, G4TwistedTrap, … BREP (Boundary REPresented) solids G4BREPSolidPolycone, G4BSplineSurface, … Any order surface Boolean solids G4UnionSolid, G4SubtractionSolid, …

Detector Description - Geant4 Course36 G4VSolid Abstract class. All solids in Geant4 derive from it Defines but does not implement all functions required to: compute distances to/from the shape check whether a point is inside the shape compute the extent of the shape compute the surface normal to the shape at a given point Once constructed, each solid is automatically registered in a specific solid store

Detector Description - Geant4 Course37 CSG: G4Box, G4Tubs, G4Trd G4Box( const G4String& pname, // name G4double pX, // X half length G4double pY, // Y half length G4double pZ); // Z half length G4Tubs(const G4String& pname, // name G4double pRmin, // inner radius G4double pRmax, // outer radius G4double pDz, // Z half length G4double pSphi, // starting Phi G4double pDphi); // segment angle G4Trd( const G4String& pname, // name G4double dx1, // X half length at -dz G4double dx2, // X half length at +dz G4double dy1, // Y half length at -dz G4double dy2, // Y half length at +dz G4double dz); // segment angle

Detector Description - Geant4 Course38 Specific CSG Solids: G4Polycone G4Polycone(const G4String& pName, G4double phiStart, G4double phiTotal, G4int numRZ, const G4double r[], const G4double z[]); numRZ - numbers of corners in the r,z space r, z - coordinates of corners Additional constructor using planes

Detector Description - Geant4 Course39 BREP Solids BREP = Boundary REPresented Solid Listing all its surfaces specifies a solid e.g. 6 squares for a cube Surfaces can be planar, 2 nd or higher order elementary BREPS Splines, B-Splines NURBS (Non-Uniform B-Splines) ‏ advanced BREPS Few elementary BREPS pre-defined box, cons, tubs, sphere, torus, polycone, polyhedra Advanced BREPS built through CAD systems

Detector Description - Geant4 Course40 Boolean Solids Solids can be combined using boolean operations: G4UnionSolid, G4SubtractionSolid, G4IntersectionSolid Requires: 2 solids, 1 boolean operation, and an (optional) transformation for the 2 nd solid (displacement) ‏ 2 nd solid is positioned relative to the coordinate system of the 1 st solid Solids can be either CSG or other Boolean solids Note: tracking cost for the navigation in a complex Boolean solid is proportional to the number of constituent solids G4UnionSolidG4IntersectionSolid G4SubtractionSolid

Detector Description - Geant4 Course41 Boolean Solids - Example G4Box* box = new G4Box(“Box", 20, 30, 40); G4Tubs* cylinder = new G4Tubs(“Cylinder”, 0, 50, 50, 0, 2*M_PI); G4UnionSolid* union = new G4UnionSolid("Box+Cylinder", box, cylinder)); G4IntersectionSolid* intersect = new G4IntersectionSolid("Box*Cylinder", box, cylinder, 0, G4ThreeVector(30, 20, 0)); G4SubtractionSolid* subtract = new G4SubtractionSolid("Box-Cylinder", box, cylinder, 0, G4ThreeVector(30, 20, 0)); G4UnionSolidG4IntersectionSolid G4SubtractionSolid

Detector Description - Geant4 Course42 Computing volumes and masses Geometrical volume of a generic solid or boolean composition can be computed from the solid: G4double GetCubicVolume(); Overall mass of a geometry setup (subdetector) can be computed from the logical volume: G4double GetMass(G4Bool forced=false, G4Material* parameterisedMaterial=0);

Visualization of detector - Visualization attributes - Detector geometry tree - GGE (Graphical Geometry Editor) ‏

Detector Description - Geant4 Course44 Visualization of Detector Each logical volume can have associated a G4VisAttributes object Visibility, visibility of daughter volumes Color, line style, line width Force flag to wire-frame or solid-style mode For parameterised volumes, attributes can be dynamically assigned to the logical volume Lifetime of visualization attributes must be at least as long as the objects they’re assigned to

Detector Description - Geant4 Course45 Visualization of Detector Example:... G4LogicalVolume* pBoxLog = new G4LogicalVolume( pBoxSolid, pBoxMaterial, “aBoxLog”, 0, 0, 0);... G4VisAttributes* pBoxVisAtt = new G4VisAttributes(G4Colour(1.0,0.0,0.0)); // RGB values pBoxVisAtt->SetVisibility(true); pBoxLog->SetVisAttributes(pBoxVisAtt);

Detector Description - Geant4 Course46 Visualizing detector geometry tree Built-in commands defined to display the hierarchical geometry tree As simple ASCII text structure Graphical through GUI (combined with GAG) ‏ As XML exportable format Implemented in the visualization module As an additional graphics driver

Detector Description - Geant4 Course47 GGE (Graphical Geometry Editor) ‏ Implemented in JAVA, GGE is a graphical geometry editor compliant to Geant4. It allows to: Describe a detector geometry including: materials, solids, logical volumes, placements Graphically visualize the detector geometry using a Geant4 supported visualization system, e.g. DAWN Store persistently the detector description Generate the C++ code according to the Geant4 specifications GGE can be downloaded from Web as a separate tool: 

Detector Description - Geant4 Course48