Skip to content

AtlasFieldCache : Avoid calling inside if we are already in solenoid

I think when @schaffer first introduced that the indent was less work

But this seemed to have the opposite effect, as we always anyhow call the inside so we gain not much ...

Some cases

  1. Let's assume the case of
if (!m_zone3d || m_zone3d->id() != m_solZoneId ||
      !m_zone3d->inside(z, r, phi)) {

two 1st are false so we have a zone and are inside solZoneID

if (false|| false ||
      !m_zone3d->inside(z, r, phi)) {

still needs to call inside

if (false|| true ||
      !m_zone3d->inside(z, r, phi)) {

would be true even if we are inside . So will do the calculation even if inside

I guess having FTO is good here ...

Edited by Christos Anastopoulos

Merge request reports