Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • athena athena
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Jira
    • Jira
  • Merge requests 181
    • Merge requests 181
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • atlasatlas
  • athenaathena
  • Merge requests
  • !59370

AtlasFieldCache : Avoid calling inside if we are already in solenoid

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Christos Anastopoulos requested to merge ATLAS-EGamma/athena:MagField_solenoid_actual_opt into master Dec 15, 2022
  • Overview 9
  • Commits 3
  • Pipelines 3
  • Changes 1

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 Dec 15, 2022 by Christos Anastopoulos
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: MagField_solenoid_actual_opt