Skip to content
Snippets Groups Projects
  1. Jul 16, 2019
  2. Jul 15, 2019
  3. Jul 14, 2019
    • scott snyder's avatar
      TrkSurfaces: SGTools -> AthenaKernel · 4fe3d1f9
      scott snyder authored
      Adjust for headers moved from SGTools to AthenaKernel.
      
      Also replace old UNUSED macro with c++17 [[maybe_unused]].
      4fe3d1f9
    • scott snyder's avatar
      MuonStationIntersectSvc: Speed up handling of dead tubes. · 749f12eb
      scott snyder authored
      The search for dead tubes was like this:
      
        for(int layer = 1; layer <= mydetEl->getNLayers(); layer++){
          for(int tube = 1; tube <= mydetEl->getNtubesperlayer(); tube++){
            bool tubefound = false;
            for(unsigned int kk=0; kk < cv->getNChildVols(); kk++) {
              int tubegeo = cv->getIdOfChildVol(kk) % 100;
              int layergeo = ( cv->getIdOfChildVol(kk) - tubegeo ) / 100;
              if( tubegeo == tube && layergeo == layer ) {
                tubefound=true;
                break;
              }
      
      However, getNChildVols() and getIdOfChildVol() are both O(N) operations,
      requiring a walk of the geo graph.  Further, geomodel will maintain
      the transform while it does so, resulting in many calls to Eigen.
      And Eigen is much, much, much slower in debug builds than in optimized builds.
      The upshot is that in debug builds, this code was taking several minutes.
      
      Rewrite using geoGetIds so that we only need to traverse the geo graph once
      (well, twice actually, since i left in the initial check on getNChildVols)
      749f12eb
Loading