CATIA-G4/Root Geometry Builder. S. Belogurov 1,2,* ([email protected]), Yu. Berchun 2 , A. Chernogorov 1,* , P. Malzacher 3 , E. Ovcharenko 1,2,* , A. Semennikov 1 * -FRRC fellows 1- Institute for Theoretical and Experimental Physics (ITEP), Moscow, Russia 2- Bauman Moscow State Technical University, (BMSTU) Moscow, Russia 3- GSI - Helmholtzzentrum für Schwerionenforschung GmbH , Darmstadt, Germany (Helmholtz Center for Heavy Ion Research)
CATIA-G4/Root Geometry Builder. 1- Institute for Theoretical and Experimental Physics (ITEP), Moscow, Russia 2- Bauman Moscow State Technical University, (BMSTU) Moscow, Russia - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CATIA-G4/Root Geometry Builder.
S. Belogurov1,2,*([email protected]), Yu. Berchun2, A. Chernogorov1,*, P. Malzacher3, E. Ovcharenko1,2,*, A. Semennikov1
* -FRRC fellows
1- Institute for Theoretical and Experimental Physics (ITEP), Moscow, Russia
2- Bauman Moscow State Technical University, (BMSTU) Moscow, Russia
3- GSI - Helmholtzzentrum für Schwerionenforschung GmbH , Darmstadt, Germany (Helmholtz Center for Heavy Ion Research)
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk2
Outline
• Introduction • Motivation• The method • An example• Plans
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk3
CAD system
Introduction
For mechanical, thermal, and some of electromagnetic software the transfer is automated. For radiation simulation packages that’s not a case.
In some cases automated geometry transfer is possible, but result is not optimized for simulations, and computations are too slow for big assemblies and complex shapes.
simulation tools
Design optimization requires iterative exchange of geometry and material info
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk4
Introduction
The most popular software for simulation of particle interactions and propagation in matter and data analysis are GEATN4 and ROOT.
Both Geant4 and ROOT use the same geometry representation which differs a lot form one in CAD systems. Geant4/ROOT geometry can be transferred via GDML files
We are presenting a tool, which allows to facilitate creation of G4/ROOT-compatible geometry from the CAD system CATIA v.5 (used in CERN, GSI and other labs)
The work was reported at SECESA2010 and CHEP2010 conferences
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk5
Motivation
In CAD systems solid bodies are built using a wide class of surfaces and curves in advanced boundary representation (BRep).
Geometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk6
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In G4/ROOT the Constructive Solid Geometry (CSG) is used.
Building blocks are primitives. Currently 21 primitives are implemented. Some of them are shown
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk7
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In G4/ROOT the Constructive Solid Geometry (CSG) is used.
Simple solids can be combined using Boolean operations (union, subtraction, intersection)
Result of Boolean operation is a solid. It can participate in further Boolean operations
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk8
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In CAD hierarchy a minimal unit is a solid body (part).
Products (assemblies) and subproducts are only logical units – all the materials are assigned to solid bodies inside the part files or to parts
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk9
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In the G4/ROOT hierarchy there are three conceptual layers:
– G4VSolid: shape, size
– G4LogicalVolume: material, MF, sensitivity, daughter volumes, etc.
– G4VPhysicalVolume: position and rotation of an instance of the logical volume inside its mother
L1(Box1,Vacuum )
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk10
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In the G4/ROOT hierarchy there are three conceptual layers:
– G4VSolid: shape, size
– G4LogicalVolume: material, MF, sensitivity, daughter volumes, etc.
– G4VPhysicalVolume: position and rotation of an instance of the logical volume inside its mother
L1(Box1,VacuumL2(Box2, Plastic)
)
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk11
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In the G4/ROOT hierarchy there are three conceptual layers:
– G4VSolid: shape, size
– G4LogicalVolume: material, MF, sensitivity, daughter volumes, etc.
– G4VPhysicalVolume: position and rotation of an instance of the logical volume inside its mother
L1(Box1,Vacuum ,3L2)L2(Box2, Plastic)
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk12
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In the G4/ROOT hierarchy there are three conceptual layers:
– G4VSolid: shape, size
– G4LogicalVolume: material, MF, sensitivity, daughter volumes, etc.
– G4VPhysicalVolume: position and rotation of an instance of the logical volume inside its mother
L1(Box1,Vacuum
L3(Cyl1,Cu)
L4(Box3,Fe)
,3L2)L2(Box2, Plastic)
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk13
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In the G4/ROOT hierarchy there are three conceptual layers:
– G4VSolid: shape, size
– G4LogicalVolume: material, MF, sensitivity, daughter volumes, etc.
– G4VPhysicalVolume: position and rotation of an instance of the logical volume inside its mother
L1(Box1,VacuumL2(Box2, PlasticL2(Box2, Plastic
L3(Cyl1,Cu)
L4(Box3,Fe)
,3L2), L3, 2L4)L3, 2L4)
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk14
MotivationGeometry representation in CAD and G4/ROOT
The difference is twofold: in the description of solid bodies and in the hierarchy of assemblies.
In the G4/ROOT hierarchy there are three conceptual layers:
– G4VSolid: shape, size
– G4LogicalVolume: material, MF, sensitivity, daughter volumes, etc.
– G4VPhysicalVolume: position and rotation of an instance of the logical volume inside its mother
- Any logical volume is made of a material- Unlike a part in CAD systems, any logical volume may be a mother for placing smaller volumes inside. - Any intersections of volumes’ boundaries are forbidden. - The World is the biggest logical volume, it can not be positioned.
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk15
MotivationPreparing any geometry for MC simulations one has to keep in mind two issues:
1. Required Detalization
For a detector with poor position resolution, description should be less accurate than for more precise device. Choosing appropriate level of detalization, one can reduce significantly required computational time and memory.
Examples:
a threaded hole in a flange with a screw inside is equivalent for MC to a bulk piece of metal;
for peripheral equipment, sometimes, just a simple solid filled with a correct mixture of materials is sufficient.
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk16
MotivationPreparing any geometry for MC simulations one has to keep in mind two issues:
2. Optimization for simulations
A couple of tricks.
- Minimization of the number of volumes. E.g. a module of the sampling calorimeter: In CAD model – lead and scintillator plates.For G4 simulations scintillator plates are inserted into the bulk Pb mother volume.
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk17
MotivationPreparing any geometry for MC simulations one has to keep in mind two issues:
2. Optimization for simulations
A couple of tricks.
- Avoiding unions helps to accelerate simulations.
E.g. CAD and G4/ROOT representations of a section of the beampipe for CBM experiment at FAIR
(Cylinder, Sphere, Cone.No overlaps, no unions)
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk18
Motivation
Thus, our tool allows to facilitate creation of G4/ROOT-compatible geometry from the CAD system CATIA v.5.
It is targeted on scientists who understand what geometry representation and level of detalization are optimal for given simulation task.
Sacrificing automation of the geometry transfer we gain optimization
For usage of the tool one should get familiar with limited (but powerful) measurement, construction, and visualization functionality of CATIA and our plugins.
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk19
The method
Implementation of primitives as parameterized User Defined Features (UDF) in CATIA. The UDFs are placed into G4Catalog.For realization of Boolean combinations CATIA operations Add, Remove and Intersect are used.
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk20
The method
File structure for representation of a LogicalVolume.
PartBody contains a parameterized solid and material.
Unparameterized solid copy of the PartBody is published
Solids, published in files corresponding to smaller LogicalVolumes can be inserted into the tree with positioning. They represent daughter volumes
Md
dd
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk21
The method
Initially, files containing only PartBodies with material and publication should be prepared.
Then specially designed VBA macro helps to insert with positioning a copy of a LogicalVolume as a daughter PhysicalVolume into a destination part.
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk22
The method3 methods of multiple instantiation are implemented3 methods of multiple instantiation are implementedReplica - Replica - matches with matches with G4ReplicaVolG4ReplicaVolArray - Array - copied objects can be inserted into an copied objects can be inserted into an intermediate logical volumeintermediate logical volumeSimplePlacement Array - SimplePlacement Array - intermediate volume is only intermediate volume is only a convenient reference framea convenient reference frame
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk23
The method
At the end the tree is analyzed and GDML file is exported.
Import of GDML files into CATIA is implemented as well
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk24
The method
Illustration of the procedure.
a) Three Part files are loaded.
b) Slice is twice inserted and positioned inside the Cylinder
c) Cylinder is positioned inside the World (Box)
d) Geometry exported to GDML and read by ROOT
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk25
For transferring geometry, one has to load an existing CAD model first.
Then, using powerful measurement, construction, and visualization functionality of CATIA and our tool, a G4/ROOT compatible geometry can be built.
The method
Examples of measurements in CATIA
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk26
Examples
GLAD – Large Aperture SC Diplole Magnet for R3B experiment at FAIR.
Consists of 4 SS and Cu layers of complicated shapes with ribs.All transferred to G4/ROOT. One of the shells is discussed here
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk27
Examples
Cylinders, Tori, and Ellipsoids:General shape is reproduced, but the shell has slits – bad for simulations
Cylinders, Tori, and Spheres, but length and radii of cylinders are modified :General shape is violated, but no slits –good for simulations
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk28
Examples
LHCb VELO read from LHCb VELO read from GDMLGDML
LHCb VELO CAD LHCb VELO CAD modelmodel
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk29
Crystal calorimeter Crystal calorimeter for R3B. General for R3B. General and partial viewsand partial views
Examples
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk30
ExamplesCrystal calorimeter for R3B.Crystal calorimeter for R3B. G4/ROOT-like representation of a G4/ROOT-like representation of a slice of CFC boxes and entire crystal slice of CFC boxes and entire crystal arrayarray
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk31
- Enhancement of the set of implemented primitives- Improvement of the G4Materials catalog in CATIA- Implementation of checkers for CSG tree structure and volume
overlaps- Adaptation of the CATIA Digital Mockup (DMU) optimizer for
automatic fit of parameterized CSG models to existing parts- Case study and best practice elaboration
Plans for further development
S. Belogurov et al. FRRC session, Dec. 12-th, 2010, Obninsk32
- Enhancement of the set of implemented primitives- Improvement of the G4Materials catalog in CATIA- Implementation of checkers for CSG tree structure and volume
overlaps- Adaptation of the CATIA Digital Mockup (DMU) optimizer for
automatic fit of parameterized CSG models to existing parts- Case study and best practice elaboration