Geant4 Geometry ??(?)???????? - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Geant4 Geometry ??(?)????????

Description:

Title: Geant4 Geometry (?) Author: Makoto Asai Last modified by: Makoto Asai Created Date: 6/20/2002 10:23:30 AM Document presentation ... – PowerPoint PPT presentation

Number of Views:159
Avg rating:3.0/5.0
Slides: 21
Provided by: Mako151
Category:
Tags: geant4 | geometry | nurbs

less

Transcript and Presenter's Notes

Title: Geant4 Geometry ??(?)????????


1
Geant4 Geometry??(?)????????
  • ?? ? (SLAC)

2
??
  • Solid
  • BREP solid
  • Boolean solid
  • Physical volume
  • Parameterized volume
  • Replica
  • Assembly
  • Voxelisation
  • CAD interface

3
G4VSolid
  • G4VSolid
  • ??(????)
  • G4VSolid ? abstract class
  • ????????????

4
G4VSolid
  • Geant4?????Solid
  • CSG (Constructed Solid Geometry) solids
  • G4Box, G4Tubs, G4Cons, G4Trd,
  • Specific solids (CSG like)
  • G4Polycone, G4Polyhedra, G4Hype,
  • ????CSG??????BREP
  • BREP (Boundary REPresented) solids
  • G4BREPSolidPolycone, G4BSplineSurface,
  • Any order surface
  • Boolean solids
  • G4UnionSolid, G4SubtractionSolid,
  • STEP interface
  • BREP solid models ? CAD file ??????
  • STEP compliant solid modeler

5
G4Polycone
G4Polycone( const G4String name,
G4double phiStart,
G4double phiTotal, G4int
numZPlanes, const G4double
zPlane, const G4double
rInner, const G4double
rOuter )
  • name
  • Solid???
  • phiStart, phiTotal
  • ?????????????
  • numZPlanes
  • Z???????
  • ???????4
  • zPlane
  • Z???????
  • ???Z0
  • rInner, rOuter
  • ?????

6
G4Polyhedra
G4Polyhedra( const G4String name,
G4double phiStart,
G4double phiTotal, G4int
numSide, G4int numZPlanes,
const G4double zPlane,
const G4double rInner,
const G4double rOuter )
  • name
  • Solid???
  • phiStart, phiTotal
  • ?????????????
  • numSide
  • ????
  • numZPlanes
  • Z???????
  • ???????4
  • zPlane
  • Z???????
  • ???Z0
  • rInner, rOuter
  • ?????

7
BREP solid
  • BREP Boundary REPresented Solid
  • Solid?????????????
  • ??????????6????
  • BREP??????
  • ???2?????????
  • Splines, B-Splines,
  • NURBS (Non-Uniform B-Splines)
  • ???????BREP???????????
  • box, cons, tubs, sphere, torus, polycone,
    polyhedra
  • CAD file??????solid???BREP

8
Boolean solid
  • 2??solid?boolean operation????????
  • G4UnionSolid, G4IntersectionSolid,
    G4SubtractionSolid
  • 1???solid????2???solid?????????
  • Boolean operation????solid?????????operation???
  • Tracking????boolean solid?????????primitive
    solid????????????????track????solid???????????????
    ?????????primitive solid????????????

G4SubtractionSolid
G4UnionSolid
G4IntersectionSolid
9
G4VPhysicalVolume
  • G4VPhysicalVolume
  • G4LogicalVolume ??????
  • G4VPhysicalVolume ? abstract class
  • ????????????

10
G4VPhysicalVolume
  • G4PVPlacement 1 Placement One
    Volume
  • Logical volume?1???
  • G4PVParameterized 1 Parameterized Many
    Volumes
  • 1??physical volume?????volume???
  • CopyNo?????????????????sensitivity???????
  • ???????????????parameterised volume???volume?????
    ????
  • G4PVReplica 1 Replica Many
    Volumes
  • 1??physical volume?????volume???
  • ????????volume??volume?????????
  • ??tube,cone??R??
  • ??????
  • ?volume?placement volume?repeated
    volume????????????
  • Repeated volume?CSG solid??

11
G4PVParameterised
G4PVParameterised(const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMotherLogical,
const EAxis pAxis, const G4int
nReplicas, G4VPVParameterisation
pParam)
  • pName
  • Physical volume?
  • pLogical
  • ???logical volume
  • ??????????????????
  • pMotherLogical
  • ??logical volume
  • ??physical volume???????????????
  • pAxis
  • ????????????????
  • kXAxis,kYAxis,kZAxis
  • nReplicas
  • ?????
  • ???CopyNo?0n-1
  • ??CopyNo????????
  • pParam
  • G4VPVParameterisation

12
G4VPVParameterisation
  • ComputeTransformation
  • CopyNo????physical volume????rotation
    matrix??????
  • physVol-gtSetTranslation
  • (G4ThreeVector(x,y,z))
  • physVol-gtSetRotation(pRotM)
  • Material, sensitivity, ???logical volume
    ?attribute??????
  • physVol-gtGetLogicalVolume()-gtSet()
  • ComputeSolid
  • CopyNo????solid???
  • ComputeMaterial
  • CopyNo????material???
  • ComputeDimensions
  • ???parameterise?????????parameterise????????
  • ?????????????????????CopyNo???????????????

class G4VPVParameterisation public virtual
void ComputeTransformation (const G4int,
G4VPhysicalVolume ) const 0 virtual
G4VSolid ComputeSolid (const G4int,
G4VPhysicalVolume ) virtual G4Material
ComputeMaterial (const G4int,
G4VPhysicalVolume ) virtual void
ComputeDimensions (G4Box , const G4int,
const G4VPhysicalVolume ) const
virtual void ComputeDimensions (G4Tubs ,
const G4int, const G4VPhysicalVolume )
const
13
G4VPVParameterisation?????
  • Rotation matrix, solid????????????????????????????
    ?????????????????Navigator??????????local
    scope?????????????????????????????????????????
  • ???????????????????????????sin,
    cos????????????????????performance?????????
  • ??????????????????????????????????????????????????
    ?????
  • ???????ComputeDimensions??????base class
    virtual?????????warning message?????????????????

14
G4PVReplica
  • 1?????????????1??G4PVReplica????
  • ????volume????????????????????????solid?logical
    volume??????
  • ???parameterise??????????????????
  • pName
  • Physical volume?
  • pLogical
  • ???logical volume
  • pMotherLogical
  • ??logical volume
  • ??physical volume???????????????
  • nReplicas
  • ?????
  • ???CopyNo?0n-1

G4PVReplica( const G4String pName,
G4LogicalVolume pLogical, G4LogicalVolume
pMother, const EAxis pAxis, const G4int
nReplicas, const G4double width, const
G4double offset0 )
15
G4PVReplica pAxis, width, offset
  • pAxis?????????
  • kXAxis, kYAxis, kZAxis
  • n??????????????
  • -width(nReplicas-1)0.5nwidth
  • ??????
  • Offset??????
  • pAxis????????
  • kRho
  • n??????widthnoffset??
  • width(n1)offset???????
  • pAxis?phi?????
  • kPhi
  • n??????widthnoffset??
  • width(n1)offset???????

G4PVReplica( const G4String pName,
G4LogicalVolume pLogical, G4LogicalVolume
pMother, const EAxis pAxis, const G4int
nReplicas, const G4double width, const
G4double offset0 )
width
offset
width
offset
16
G4AssemblyVolume
  • ?????geometry??????????volume??????????????????
  • G4AssemblyVolume??????????
  • G4AssemblyVolume???physical volume????
  • ???????logical volume????????logical
    volume?????????????????
  • ???????volume?placement?????????????????????????
  • ????geometry?????parameterised volume?????

17
G4AssemblyVolume
  • G4AssemblyVolume
  • ???????
  • AddPlacedVolume
  • G4AssemblyVolume??volume???????????????logical
    volume???
  • MakeImprint
  • G4AssemblyVolume????logical volume????????????????
  • ?????(G4Transform3D)?????transform
    G4ThreeVector?rotation matrix??????????????????

class G4AssemblyVolume public
G4AssemblyVolume() void AddPlacedVolume (
G4LogicalVolume pPlacedVolume,
G4Transform3D transformation) void
MakeImprint ( G4LogicalVolume pMotherLV,
G4Transform3D transformation)
18
Voxelisation
  • Run????navigation?????????smart voxel???
  • ??????tracking????????????????????????????
  • Binary search
  • ?????1??????voxel???
  • ?????voxel???volume??????????merge???
  • ??????2???3????????voxelise??
  • ???logical volume????voxelisation????
  • Voxelisation????????????????????????????
  • ????????????????????

19
CAD interface
  • CAD file (STEP AP203 compliant)?solid?????????????
  • ???sensitivity?????????????DetectorConstruction???
    ?????
  • ???solid?1???????????
  • ??placement volume???
  • ?????detector component??CAD file??????????volume?
    ???
  • G4PlacedSolid
  • 1??STEP solid?????Geant4 solid???
  • G4Assembly
  • G4PlacedSolid???
  • G4AssemblyCreator
  • STEP file????G4Assembly?G4PlacedSolid?????????????

20
CAD interface
  • G4AssemblyCreator MyAC("tracker.stp")
  • MyAC.ReadStepFile()
  • STEPentity ent0
  • MyAC.CreateG4Geometry(ent)
  • void pl MyAC.GetCreatedObject()
  • G4Assembly assembly new G4Assembly()
  • assembly-gtSetPlacedVector((G4PlacedVector)pl)
  • G4int solids assembly-gtGetNumberOfSolids()
  • for(G4int c0 cltsolids c)
  • G4PlacedSolid ps assembly-gtGetPlacedSolid(c)
  • G4LogicalVolume lv
  • new G4LogicalVolume(ps-gtGetSolid(), Lead,
    "STEPlog")
  • G4RotationMatrix hr ps-gtGetRotation()
  • G4ThreeVector tr ps-gtGetTranslation()
  • G4VPhysicalVolume pv
  • new G4PVPlacement(hr, tr,
    ps-gtGetSolid()-gtGetName(),
  • lv, experimentalHall_phys,
    false, c)
Write a Comment
User Comments (0)
About PowerShow.com