Geant4 integration status

● All CMS shapes integrated: box, tube, trapezoid, cone, polycone, and polyhedra – stress-tested with Geant4 test job FullCMS, a few warnings printed multiple times, ~ all of them coming from polycone or special cases. – several fixes uploaded, job still crashes using VecGeom shapes (runs to the end using Geant4 or USolids shapes)

● ...and a few more: Trd, torus2, paraboloid, orb, – integrated, but not stress-tested yet, since not used in FullCMS geant4 test job.

G. Lima – GeantV weekly meeting – 2015/10/27 1 During code sprint

● With Sandro, fixed few more bugs with the tube (point near phi- section surface) and polycone (near a ~vertical section) ● Changes in USolids shapes, to inherit from specialized shapes instead of “simple shapes” ● Crashes due to () calculation returning (0,0,0) when fully inside, but at the z- between sections z Both sections need to be checked, and several possible section outcomes Q combined → normals added: +z + (-z) = (0,0,0)

G. Lima – GeantV weekly meeting – 2015/10/27 2 Geant4 integration status

● What happened since our code sprint? – More exceptions related to Inside/Contains inconsistencies, triggered at Geant4 navigation tests ● outPoint, dir → surfPoint = outPoint + step * dir ● Inside(surfPoint) → kOutside (should be surface)

Both sections need to be checked, several possible section outcomes combined, e.g. in+in = in surf + out = surf, etc... P

G. Lima – GeantV weekly meeting – 2015/10/27 3 Geant4 integration status

● What happened after our code sprint? – Normal() fix required a similar set of steps → code duplication ● GenericKernelContainsAndInside() ● ConeImplementation::NormalKernel() (vector mode) ● UnplacedCone::Normal() (scalar mode)

– First attempt involved Normal (0,0,0) and valid=false for all points away from surface --- unacceptable for navigation – Currently a valid normal is P always provided, BUT it is not always the best one (a performance priority choice) n

G. Lima – GeantV weekly meeting – 2015/10/27 4 Geant4 integration status

● Last few weeks – Git cleanup (jira-175, jira-151, master/devel) – fixes to unit tests in Trd, Cone, Polycones, including convexity checks – all fixes so far are in lima/jira-151 branch (still more fixes needed) – merge requested → requests by Sandro included choosing the best of two kernel Contains() implementations – Validating polycone → UPolycone is not validated (ignored)

– orthogonal: GPU performance measurements (build problems)

G. Lima – GeantV weekly meeting – 2015/10/27 5 Short term plans

● Geant4 plans to drop USolids source from their repository → rely on Usolids code from VecGeom repository – immediate plans to release integrated shapes

● Short-term goals: – more bug fixes: polycone, polyhedron. trapezoid coplanarity? – move to cms2015.gdml (, trd) – integration code review – merge branch lima/jira-151 (integration)

G. Lima – GeantV weekly meeting – 2015/10/27 6