Skip to content
Snippets Groups Projects
Select Git revision
  • module_frame
  • master default protected
  • drich-two-mirrors
  • 148-hcal-geometry-development
  • 144-irt-geometry
  • deathvalley-acts-dd4hep-plugin
  • canyonlands-acts-dd4hep-plugin
  • adjust-barrel-emcalo-geometry
  • 148-hcal-geometry-development-wdconinc-suggestion
  • WorkingGemTrd_MLmodel_andAnalysis
  • 144-test-small-sensor-overlap
  • 59-detailed-forward-gem-trd
  • vdesai-master-patch-09582
  • mriganka-branch02
  • zdemirog-master-patch-64142
  • weibin-master-patch-37475
  • vanekjan-master-patch-74522
  • lkosarzew-master-patch-25029
  • swapneshkhade-master-patch-16755
  • mlavinsky-master-patch-10431
  • niveditharam-master-patch-05822
  • deathvalley-v1.1
  • deathvalley-v1.0-1.5T
  • deathvalley-v1.0
  • canyonlands-v2.2
  • canyonlands-v2.1
  • canyonlands-v2.0
  • canyonlands-v1.2
  • canyonlands-v1.1
  • acadia-v2.1
  • canyonlands-v1.0
  • acadia-v2.0
  • acadia-v1.1
  • acadia-v1.0
  • acadia-v1.0-alpha
  • v0.2.0
  • v0.1.0
37 results

test_ACTS.cxx

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";
      //  }
      //}
    
    }