Presentation is loading. Please wait.

Presentation is loading. Please wait.

Status of geometrical modeler

Similar presentations


Presentation on theme: "Status of geometrical modeler"— Presentation transcript:

1 Status of geometrical modeler
Andrei Gheata ALICE off-line week, March 4, 2003

2 Topics Final goal reminder Navigation features : status & performance
New features on visualization, I/O, user interface Geometry checking interactive utility Status of VMC integration Next steps

3 Why a new modeler ? ... Monitoring Geometry C++ package classes
The geometrical package is intended as a toolkit to provide the geometrical description of an experiment, tracking-related functionality + additional tools to ease-up building, checking and debugging a geometry. In particular, it will allow us to run different simulations and reconstruction through the same interface. Bonuses : increased speed and performance, full decoupling of user code from external simulation engines. Geometry package Reconstruction program Simulation Geant3-based Geant4-based Fluka-based C++ classes ... MySQL Visualisation Monitoring

4 Requirements Tracking-related functionality - (''Where am I?'', ''Which next and how far?'', ...) Backward compatibility - to be able to reuse Geant3 geometries Scalability - LHC geometries are big, we have to be able to represent them Performance - it should be faster than existing modelers Interactivity - users should be able to access easily all relevant geometry information + checking tools, builder interface, ...

5 Navigation features - status
These make the difference between a geometrical modeler and a transient store providing geometrical input for other applications. Long way from implementing to validating/optimizing/ tuning these features => took most of the time Luckily we had a gold mine of G3 geometries to test upon. ''Where am I ?'' => done and happy with Computing the distance to next boundary => done and working, some optimization for the most simple topologies needed Safety => globaly computed when needed, seem to work Normals to crossed surfaces => on demand (ongoing)

6 Automatic conversion from Geant3
Zebra memory Data structure JVOLUM JMATE,etc Root > .x mygeom.C Mygeom.c void gexam1() {TGeoMaterial *mat; TGeoMixture *mix; TGeoManager *gexam1 = new TGeoManager("gexam1","gexam1.C"); // List of Materials and Mixtures mat = new TGeoMaterial("mat9","ALUMINIUM",26.98,13,2.7); mix = new TGeoMixture("mix10","IRON(COMPOUND)",3); mix->DefineElement(0,55.847,26, ); mix->DefineElement(1,58.71,28, E-01); mix->DefineElement(2,51.998,24,0.197); mat = new TGeoMaterial("mat11","COPPER",63.54,29,8.96); Geant > RZ/File 21 mygeom.geom on Zebra RZ mygeom.geom g2root mygeom.geom mygeom.C

7 Validation procedure Use one million points generated by Geant3 with full physics switched on

8 Validation procedure (2)
Using points generated by Geant3 applications grecord.f --> mygeom.geom, mygeom.hbook Play-back these points in Geant3 using only the Geant3 geometry package. Compute g3path, snext, safety in myresults.hbook h2root myresults.hbook myresults.root Same operation with TGeo classes. Compare g3path with tgeopath, same for snext, safety Some discrepancies with Geant3 : Due to precision problems in Geant3 (single precision geometries collected), points recorded at the volume boundaries may be found on the other side by TGeo. When volumes declared MANY in Geant3 overlap and have sub-volumes also MANY, Geant3 is not always reporting the right answer. In general it does not matter, sometimes it does In this exercise, we also found original errors in the detector description, e.g. wrong paramers

9 ROOT modeler benchmarks vs. GEANT3
1 mil. Points extracted from G3 simulation (full physics) Point re-injected both in G3 and ROOT modeler, timings/track [microseconds] presented in the table.

10 ''Where am I ?'' - physics

11 ''Where am I ?'' - random

12 ''Distance to next ?'' - physics

13 ''Distance to next ?'' - random

14 New features Visualization Perspective view in ROOT pad
Volume focusing on double-click HLR/HSR algorithms to be implemented Simple tests for all navigation features (random points, raytracing, safety visualized, lego plots for radiation length) User interface Added methods for compatibility with the virtual MC Most user actions for building geometry are now protected against errors

15 Detector weight Volume/detector weight estimation
Based on randomly sampling current material (“where am I?”) Desired accuracy as input (default 1%) Weight of gases ignored (can be significant due to virtual containers) Some values : TPC : / [kg] ITSD : / [kg] ABSM : / [kg] DDIP : / [kg] PHOS : / [kg] B076 : / [kg]

16 I/O - file size Number RZ file text file(.C) root file nodes (kBytes) (kBytes) (kBytes) Alicenew >mem Atlas Brahms CDF CMS LHCb The size of the .root file and time to read are very important when developing a geometry. .root files includes full voxelization

17 Geometry checker It has to be able to checks for illegal extrusions/overlaps in the geometry definition. Few possible approaches : Primitive to primitive (shapes) intersection algorithms (136 combinations in our case ...) Mesh to mesh intersection => polygon to polygon, not fully accurate, but at least feasible, since all shapes have already meshes used by visualization Vertices approach : similar to mesh approach, but using only vertices information and the Contains(point) methods of shapes.

18 Extrusions Detected Not detected
A given positioned volume should not extrude its container. (unless declared MANY Vertices approach necessary conditions : All vertices of a volume have to be contained by its container None of the container vertices should be contained by any daughter For better results, the number of segments approximating tubes,cones,..., was set to 80. Detected Not detected

19 Overlaps Detected Not detected
A given volume should not intersect any brother volume (if none of the two is MANY) Vertices approach necessary conditions : All vertices of a volume have to be outside all its brothers N(N-1) combinations to check if a volume has N daughters Detected Not detected

20 Checking ALICE geometry
The vertices approach is definitely unable to find all overlaps in a geometry, but : It finds the most frequent ones (more than 90%) It is very fast : ~20 seconds for full ALICE Is able to estimate how big the overlap/extrusion is Implementation : graphical interface producing a sorted list of overlaps per volume/geometry; the overlaps are drawable objects giving the full information about the overlap topology. Full ALICE : ~160 overlaps/extrusions bigger than 1 mm found, ~200 bigger than 100 microns

21 Geant4_mc.tar.gz includes the TVirtualMC <--> Geant4
The Virtual MC Allows running several MC's starting from the same code and having the same geometry for simulation, reconstruction and event display. Geant3.tar.gz includes an upgraded Geant3 with a C++ interface Geant4_mc.tar.gz includes the TVirtualMC <--> Geant4 interface classes G3 G3 transport User Code VMC G4 G4 transport Virtual Geometrical Modeller FLUKA FLUKA transport Reconstruction Visualisation Geometrical Modeller Generators

22 TGeo integration to VMC
Started early this year by Rene -> new TGeant3 Required few modifications in the API + implementation of a new class TGeoMedium Methods to ease-up geometry building implemented in the manager class: Material(), Medium(), Matrix(), Volume(), Node(), Division() following as close as possible prototypes in VMC Functionality of navigation methods adapted to match VMC requirements

23 TGeant3 Can be compiled/run in 3 ways : G3 standalone (default)
G3 + TGeo, G3 navigator : for debugging and validation purposes TGeo as main navigator : not fully working yet Can fully build ROOT geometry in AliRoot Is able to compute geometry steps through TGeo Several checks during parralel step computation validates TGeo algorithms.

24 TFluka Work started two weeks ago : the idea is to be able to replace Flugg (G4) with TGeo at some point. Now able to build ROOT geometry in parralel with G4 one Navigation : main issue. The wrapper-based mechanisms in Flugg providing to FLUKA the G4 navigation need to be understood. Many other details, like providing to FLUKA material ''cards'' based on TGeo materials instead of G4.

25 Next steps Main focus on TGeo ''adoption'' by TGeant3 and TFluka
Work on optimizing computation of distances on some particular cases Computation of normal directions to the crossed surface has to work soon. Documentation has to be eventually written


Download ppt "Status of geometrical modeler"

Similar presentations


Ads by Google