Skip to content
Snippets Groups Projects
Select Git revision
  • include-concrete
  • master default protected
  • pr/edm4eic_8_3_0
  • v25.09-stable protected
  • geant4-vecgeom-cuda
  • target-x86_64_v3
  • py-tensorflow-cuda
  • arm64
  • py-numba
  • github-actions-build-chain
  • wdconinc-master-patch-89061
  • unpin-pip
  • jl
  • acts-svg
  • numpy-unpin
  • view-hardlink
  • gaudi-39.4
  • spack-unpin
  • lhapdf-6.5.5
  • pr/snakemake_9_6_3
  • jacamar
  • v25.09.0-stable
  • v25.08.0-stable
  • v25.07.0-stable
  • v25.06.1-stable
  • v25.06.0-stable
  • v25.05.0-stable
  • v25.04.1-stable
  • v25.04.0-stable
  • v25.03.1-stable
  • v25.03.0-stable
  • v25.02.0-stable
  • v25.01.1-stable
  • v25.01.0-stable
  • v24.12.0-stable
  • 24.11.2
  • 24.11.2-stable
  • v24.11.2-stable
  • v24.11.1-stable
  • v24.11.0-stable
  • v24.10.1-stable
41 results

key4hep-spack.sh

Blame
  • test_ACTS.cxx 1.55 KiB
    R__LOAD_LIBRARY(libDDCore.so)
    R__LOAD_LIBRARY(libActsPluginDD4hep.so)
    R__LOAD_LIBRARY(libDDG4.so)
    R__LOAD_LIBRARY(libDDG4IO.so)
    #include "DD4hep/Detector.h"
    #include "DD4hep/DetElement.h"
    #include "DD4hep/Objects.h"
    #include "DD4hep/Detector.h"
    #include "DDG4/Geant4Data.h"
    #include "DDRec/CellIDPositionConverter.h"
    #include "DDRec/SurfaceManager.h"
    #include "DDRec/Surface.h"
    
    #include "TCanvas.h"
    #include "TChain.h"
    
    #include "Acts/Geometry/TrackingGeometry.hpp"
    #include "Acts/Geometry/TrackingVolume.hpp"
    #include "Acts/Plugins/DD4hep/ConvertDD4hepDetector.hpp"
    
    /** Example loading ACTs.
     *
     *
     */
    void test_ACTS(const char* compact = "athena.xml"){
    
      using namespace ROOT::Math;
      // -------------------------
      // Get the DD4hep instance
      // Load the compact XML file
      // Initialize the position converter tool
      dd4hep::Detector& detector = dd4hep::Detector::getInstance();
      detector.fromCompact(compact);
      dd4hep::rec::CellIDPositionConverter cellid_converter(detector);
    
      //std::unique_ptr<const Acts::TrackingGeometry> 
      auto acts_tracking_geometry  = Acts::convertDD4hepDetector (detector.world(),Acts::Logging::Level::VERBOSE);
      //acts_tracking_geometry  = Acts::convertDD4hepDetector (detector.world(),Acts::Logging::Level::INFO);
    
      if(acts_tracking_geometry) {
        std::cout << "success?\n";
      }
      //  if(acts_tracking_geometry->highestTrackingVolume()) {
      //    std::cout << " volume name \n ";
      //    std::cout << acts_tracking_geometry->highestTrackingVolume()->volumeName() << std::endl;
      //  } else {
      //    std::cout << "derp\n";
      //  }
      //}
    
    }