**Andrei Gheata**
(4cc9a24d)
*
at
23 Mar 15:42
*

Cleaned-up SurfData from high-level interfaces. Expose surface capa...

**Gabriele Cosmo**
(b769f806)
*
at
22 Mar 13:58
*

**Gabriele Cosmo**
(b769f806)
*
at
22 Mar 13:58
*

PlaneShell: Remove broken optimization for Trapezoid

`PlaneShell`

's `SafetyToIn`

and `SafetyToOut`

contained what looks like an
optimization for the case `N == 4`

. However, the condition / branches
were swapped so that the code would use the general loop for `N == 4`

and assume exactly four planes for `N != 4`

. This wasn't a problem in
practice because VecGeom only ever uses `PlaneShell`

with `N == 4`

, for
the Trapezoid.

Performance measurements show that the re-ordering of Max operations yields a very minor improvement of at most 1.5% - 2%. As it wasn't active up to now, just remove the code path. As such, no performance difference expected nor measured.

(cherry picked from commit d695d4bb)

`PlaneShell`

's `SafetyToIn`

and `SafetyToOut`

contained what looks like an
optimization for the case `N == 4`

. However, the condition / branches
were swapped so that the code would use the general loop for `N == 4`

and assume exactly four planes for `N != 4`

. This wasn't a problem in
practice because VecGeom only ever uses `PlaneShell`

with `N == 4`

, for
the Trapezoid.

Performance measurements show that the re-ordering of Max operations yields a very minor improvement of at most 1.5% - 2%. As it wasn't active up to now, just remove the code path. As such, no performance difference expected nor measured.

(cherry picked from commit d695d4bb)

Results available at: Jenkins [VecGeom-gitlab #2,387]

`PlaneShell`

's `SafetyToIn`

and `SafetyToOut`

contained what looks like an
optimization for the case `N == 4`

. However, the condition / branches
were swapped so that the code would use the general loop for `N == 4`

and assume exactly four planes for `N != 4`

. This wasn't a problem in
practice because VecGeom only ever uses `PlaneShell`

with `N == 4`

, for
the Trapezoid.

Performance measurements show that the re-ordering of Max operations yields a very minor improvement of at most 1.5% - 2%. As it wasn't active up to now, just remove the code path. As such, no performance difference expected nor measured.

(cherry picked from commit d695d4bb)

**Jonas Hahnfeld**
(b769f806)
*
at
22 Mar 13:31
*

PlaneShell: Remove broken optimization for Trapezoid

**Jonas Hahnfeld**
(234fa112)
*
at
22 Mar 12:43
*

@jhahnfel can you please cherry-pick this commit from the master into v1.2.2-patches?

**Andrei Gheata**
(d695d4bb)
*
at
22 Mar 11:31
*

**Andrei Gheata**
(d695d4bb)
*
at
22 Mar 11:31
*

PlaneShell: Remove broken optimization for Trapezoid

`PlaneShell`

's `SafetyToIn`

and `SafetyToOut`

contained what looks like an
optimization for the case `N == 4`

. However, the condition / branches
were swapped so that the code would use the general loop for `N == 4`

and assume exactly four planes for `N != 4`

. This wasn't a problem in
practice because VecGeom only ever uses `PlaneShell`

with `N == 4`

, for
the Trapezoid.

Results available at: Jenkins [VecGeom-gitlab #2,386]

@gcosmo I think this should be backported to 1.2. Even if it doesn't change anything in practice, I think we should fix the code.

`PlaneShell`

's `SafetyToIn`

and `SafetyToOut`

contained what looks like an
optimization for the case `N == 4`

. However, the condition / branches
were swapped so that the code would use the general loop for `N == 4`

and assume exactly four planes for `N != 4`

. This wasn't a problem in
practice because VecGeom only ever uses `PlaneShell`

with `N == 4`

, for
the Trapezoid.

**Jonas Hahnfeld**
(d695d4bb)
*
at
22 Mar 10:40
*

PlaneShell: Remove broken optimization for Trapezoid

**Andrei Gheata**
(6cb4d080)
*
at
21 Mar 10:06
*