darmstadt, 15. november 2015 tobias stockmanns, fz jülich1 a step to root converter for the...
TRANSCRIPT
![Page 1: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/1.jpg)
Darmstadt, 20. April 2023Tobias Stockmanns, FZ Jülich 1
A STEP to ROOT converter for theFairRoot framework
ALICE-FAIR Computing Meeting, GSI, 28.4.2008
•Motivation
•From CAD to GEANT
•Results
•Summary and Outlook
![Page 2: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/2.jpg)
Tobias Stockmanns, FZ Jülich 2
Motivation
• The design of a complex detector is usually done in CAD programs by engineers in a Windows environment while the simulation of the geometry is performed by physicists in a linux environment with GEANT as particle propagation tool
• The way both handle geometries is fundamentally different and there is no (as far as I know) working converter between both environments
• This implies that the design of the geometry of a detector has to be done twice, often from different people with all kind of problems connected with this
• For me the first and most important (and most complicated) step was to write a program which would help me to translate a CAD file into a geometry for simulation.
• As an input file format STEP was chosen because it is the de facto standard for the exchange of CAD files between different CAD programs
Darmstadt, 20. April 2023
![Page 3: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/3.jpg)
Tobias Stockmanns, FZ Jülich 3
General structure
Storage for:Pointer to object and location
Solid part
Pointer to object
CAD GEANTTop assembly World volume
Assembly Logical volume
Part Solid
Darmstadt, 20. April 2023
![Page 4: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/4.jpg)
Tobias Stockmanns, FZ Jülich 4
Example: Module
Pixel moduleSensor
Flex
Front-ends
active
dead
copper
capton
MCC
FE
Darmstadt, 20. April 2023
![Page 5: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/5.jpg)
Tobias Stockmanns, FZ Jülich 5
CAD Parts Geant Solids
Geant
Solids are represented by their boundaries (BREPS)
The object itself does not know what type of geometrical body it is.
For example:a box is described as an object consisting of six surfaces which are planes. Each plane consists of four edges which are lines and each line has a start and stop vector.
CAD
Bodies are created by basic solids like torus, box, cylinder, sphere and a few more.
More complex solids can be created by boolean combination of basic objects
Find Geant object which fits to the bunch of surfaces of the CAD program and extract the parameters
Darmstadt, 20. April 2023
![Page 6: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/6.jpg)
Tobias Stockmanns, FZ Jülich 6
CAD Parts Geant Solids
The origin and the orientation of the solid within its local coordinate system is not defined by construction
For example:
CAD
• The origin of the box is not in the center
• No edge is parallel to the axes of the coordinate system
Geant
With the creation of the solid the origin and the orientation are given
For example:With the creation of a tube the origin is in the center of the tube and the z-axis is parallel to the symmetry axis of the tube
Calculate the transformation matrix which transforms the CAD coordinate system into the Geant coordinate system.
Darmstadt, 20. April 2023
![Page 7: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/7.jpg)
Tobias Stockmanns, FZ Jülich 7
Program structure
Import STEPImport IGES
ReadCompound
ReadSolid
AnalyzeSolid
LoadMaterialMapLoadReplacement
ReadCompound
Output
BuildSolid
Done by OpenCascade
Converts files into OpenCascade Objects
STEP file does not contain material information external file with name of solid and materialreplacement file covered later
Transformation from OpenCascade objects to GEANT objects
Darmstadt, 20. April 2023
![Page 8: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/8.jpg)
Tobias Stockmanns, FZ Jülich 8
Conversion
OpenCascade Geant
BREPS Geant solids
Darmstadt, 20. April 2023
![Page 9: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/9.jpg)
Tobias Stockmanns, FZ Jülich 9
Import STEPImport IGES
ReadCompound
ReadSolid
AnalyzeSolid
LoadMaterialMap
ReadCompound
Output
BuildSolid
Program structure
Analyzes the BREPS to find the matching Geant solid
Recursive construction of Geant like volumes
Darmstadt, 20. April 2023
![Page 10: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/10.jpg)
Tobias Stockmanns, FZ Jülich 10
Import STEPImport IGES
ReadCompound
ReadSolid
AnalyzeSolid
LoadMaterialMap
ReadCompound
Output
BuildSolid
Program structure
Extracts the parameters of the solid and calculates the transformation matrix
Darmstadt, 20. April 2023
![Page 11: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/11.jpg)
Tobias Stockmanns, FZ Jülich 11
Import STEPImport IGES
ReadCompound
ReadSolid
AnalyzeSolid
LoadMaterialMap
ReadCompound
Output
BuildSolid
Program structureOutput of the data into a root fileOther output formats possible
Darmstadt, 20. April 2023
![Page 12: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/12.jpg)
Tobias Stockmanns, FZ Jülich 12
What is the status?
Import STEPImport IGES
ReadCompound
ReadSolid
AnalyzeSolid
LoadMaterialMap
ReadCompound
Output
BuildSolid
supports now:boxtubeconetrapsubtraction-solidArb8Xtru
DDL outputCBM outputRoot output
Darmstadt, 20. April 2023
![Page 13: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/13.jpg)
MVD-Geometry
Tobias Stockmanns, FZ Jülich 13 Darmstadt, 20. April 2023
![Page 14: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/14.jpg)
MVD Geometry in ROOT
Tobias Stockmanns, FZ Jülich 14 Darmstadt, 20. April 2023
![Page 15: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/15.jpg)
Output files
• Three output files:– Root_Output.root:
the root file with the geometry (with or without geometry manager)
– Unknown_Parts.dat:list of solids which could not be recognized by the analyze part class
– Missing_Materials.datlist of solids were no material information was provided. This parts are nevertheless created inside root could cause problems in particle tracking
Tobias Stockmanns, FZ Jülich 15 Darmstadt, 20. April 2023
![Page 16: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/16.jpg)
Solenoid
Tobias Stockmanns, FZ Jülich 16
Solenoid much more complex. Many special geometries without corresponding root geometries
Darmstadt, 20. April 2023
![Page 17: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/17.jpg)
Solenoid
Tobias Stockmanns, FZ Jülich 17 Darmstadt, 20. April 2023
![Page 18: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/18.jpg)
Extension of CadConverter
Tobias Stockmanns, FZ Jülich 18
• Some geometries are too complex for an automatic conversion
• Others are too complex for fast tracking in simulation
Possibility implemented to replace any assembly within the tree of a geometry by a new one
Darmstadt, 20. April 2023
![Page 19: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/19.jpg)
Replacement File
• Instructions for the replacement of assemblies within the main STEP file are given in an additional ASCII file
• General structure of the file:– Name of the assembly which should be replaced– The method used to create the new assembly (see later)– The necessary informations– A line „EndPartDescription“
• Three methods supported:– „StringPart“– „StepPart“– „RootBooleanPart“
Tobias Stockmanns, FZ Jülich 19 Darmstadt, 20. April 2023
![Page 20: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/20.jpg)
String Part
Tobias Stockmanns, FZ Jülich 20
PixelDiskStringPartBOXx 10y 20z 12EndPartValues1 0 0 00 1 0 10 0 1 0EndPartDescription
Name of the original assembly
Method
Part name
parameters (any order)
transformation matrix
Darmstadt, 20. April 2023
![Page 21: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/21.jpg)
StepPart
Tobias Stockmanns, FZ Jülich 21
PixelDisk2StepPart/home/stockman/OpenCascade/OpenCascade6.2/samples/standard/ts/dat/Module_8FE.stpEndPartDescription
Name of the original assembly
Method
Path to STEP file
Darmstadt, 20. April 2023
![Page 22: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/22.jpg)
RootBooleanPart
Tobias Stockmanns, FZ Jülich 22
PixelDiskMixedRootBooleanPart/home/stockman/OpenCascade/OpenCascade6.2/samples/standard/ts/dat/BoxInSpace.stp/home/stockman/OpenCascade/OpenCascade6.2/samples/standard/ts/dat/PixelDiskRing.stpEndFileListPixelDiskRing – BoxInSpaceEndPartDescription
Name of the original assembly
Method
Path to STEP files (as many as necessary)
File list ended by „EndFileList“
Operation (+,-,/,(,)) Transformation matrizies are added automatically Supports assemblies
Darmstadt, 20. April 2023
![Page 23: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/23.jpg)
Barrel Yoke
Tobias Stockmanns, FZ Jülich 23 Darmstadt, 20. April 2023
![Page 24: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/24.jpg)
RootBooleanPart
Tobias Stockmanns, FZ Jülich 24
-
BarrelYoke710NewoAdd - BarrelYoke710NewoSub(BarrelYoke710NewoEndPlate:BarrelYoke710NewoEndPlateoTrans1+BarrelYoke710NewoRing1:BarrelYoke710NewoRing1oTrans1+BarrelYoke710NewoRing2:BarrelYoke710NewoRing2oTrans1+BarrelYoke710NewoRing3:BarrelYoke710NewoRing3oTrans1+BarrelYoke710NewoRing4:BarrelYoke710NewoRing4oTrans1+BarrelYoke710NewoRing5:BarrelYoke710NewoRing5oTrans1+BarrelYoke710NewoRing6:BarrelYoke710NewoRing6oTrans1+BarrelYoke710NewoRing7:BarrelYoke710NewoRing7oTrans1+BarrelYoke710NewoRing8:BarrelYoke710
NewoRing8oTrans1+BarrelYoke710NewoRing9:BarrelYoke710NewoRing9oTrans1+BarrelYoke710NewoRing10:BarrelYoke710NewoRing10oTrans1) - (BarrelYoke710NewoHoleBack:BarrelYoke710NewoHoleBackoTrans1+BarrelYoke710NewoHoleBack:BarrelYoke710NewoHoleBackoTrans2+BarrelYoke710NewoHoleBack:BarrelYoke710NewoHoleBackoTrans3+BarrelYoke710NewoHoleBack:BarrelYoke710NewoHoleBackoTrans4+BarrelYoke710NewoHoleFront:BarrelYoke710NewoHoleFrontoTrans1+BarrelYoke710NewoHoleFront:BarrelYoke710NewoHoleFrontoTrans2+BarrelYoke710NewoHoleFront:BarrelYoke710NewoHoleFrontoTrans3+BarrelYoke710NewoHoleFront:BarrelYoke710NewoHoleFrontoTrans4+BarrelYoke710NewoCryoHole:BarrelYoke710NewoCryoHoleoTrans1+BarrelYoke710oTarget:BarrelYoke710oTargetoTrans1+BarrelYoke710oTarget:BarrelYoke710oTargetoTrans2+BarrelYoke710NewoTrap:BarrelYoke710NewoTrapoTrans1)
Darmstadt, 20. April 2023
![Page 25: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/25.jpg)
Root Drawings
Tobias Stockmanns, FZ Jülich 25 Darmstadt, 20. April 2023
![Page 26: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/26.jpg)
Summary
• CAD converter is able to convert STEP files into “GEANT like” geometries
• Works best for ROOT geometries because ROOT is able to have assemblies without a predefined bounding box (or volume)
• It Is in use for the PANDA Micro-Vertex-Detector and the PANDA solenoid magnet within the PandaRoot framework
• Remarks:– It only works for simple geometries– For more complex ones a replacement mechanism exists– It has some problems with CATIA STEP files Solution: load
them into Autodesk Inventor run a small macro and save them as new STEP files
Tobias Stockmanns, FZ Jülich 26 Darmstadt, 20. April 2023
![Page 27: Darmstadt, 15. November 2015 Tobias Stockmanns, FZ Jülich1 A STEP to ROOT converter for the FairRoot framework ALICE-FAIR Computing Meeting, GSI, 28.4.2008](https://reader035.vdocuments.mx/reader035/viewer/2022070402/56649f275503460f94c3e4a9/html5/thumbnails/27.jpg)
Outlook
• Add support for:– more boolean objects (add the moment only a subtraction of
a volume in a plane is supported)– cables and tubes– handling of B-splines– loading of the media information
Tobias Stockmanns, FZ Jülich 27 Darmstadt, 20. April 2023