diff --git a/JugTrack/src/components/ActsGeoSvc.cpp b/JugTrack/src/components/ActsGeoSvc.cpp index 8808826..92abe1e 100644 --- a/JugTrack/src/components/ActsGeoSvc.cpp +++ b/JugTrack/src/components/ActsGeoSvc.cpp @@ -26,41 +26,6 @@ static const std::map s_msgMap = { {MSG::ALWAYS, Acts::Logging::MAX}, }; -void draw_surfaces(std::shared_ptr trk_geo, const Acts::GeometryContext geo_ctx, const std::string& fname) -{ - using namespace Acts; - std::vector surfaces; - - trk_geo->visitSurfaces([&](const Acts::Surface* surface) { - // for now we just require a valid surface - if (surface == nullptr) { - std::cout << " Not a surface \n"; - return; - } - surfaces.push_back(surface); - }); - std::ofstream os; - os.open(fname); - os << std::fixed << std::setprecision(6); - size_t nVtx = 0; - for (const auto& srfx : surfaces) { - const auto* srf = dynamic_cast(srfx); - const auto* bounds = dynamic_cast(&srf->bounds()); - for (const auto& vtxloc : bounds->vertices()) { - Vector3 vtx = srf->transform(geo_ctx) * Vector3(vtxloc.x(), vtxloc.y(), 0); - os << "v " << vtx.x() << " " << vtx.y() << " " << vtx.z() << "\n"; - } - // connect them - os << "f"; - for (size_t i = 1; i <= bounds->vertices().size(); ++i) { - os << " " << nVtx + i; - } - os << "\n"; - nVtx += bounds->vertices().size(); - } - os.close(); -} - using namespace Gaudi; namespace Jug::Reco { @@ -139,7 +104,6 @@ StatusCode ActsGeoSvc::initialize() { m_materialDeco); // Visit surfaces if (m_trackingGeo) { - draw_surfaces(m_trackingGeo, m_trackingGeoCtx, "tracking_geometry.obj"); debug() << "visiting all the surfaces " << endmsg; m_trackingGeo->visitSurfaces([this](const Acts::Surface* surface) { // for now we just require a valid surface diff --git a/JugTrack/src/components/ActsGeoSvc.h b/JugTrack/src/components/ActsGeoSvc.h index 36866a4..89063f5 100644 --- a/JugTrack/src/components/ActsGeoSvc.h +++ b/JugTrack/src/components/ActsGeoSvc.h @@ -39,12 +39,6 @@ #include "JugTrack/DD4hepBField.h" -/** Draw the surfaces and save to obj file. - * This is useful for debugging the ACTS geometry. The obj file can - * be loaded into various tools, such as FreeCAD, for inspection. - */ -void draw_surfaces(std::shared_ptr trk_geo, const std::string& fname); - namespace Jug::Reco { class ActsGeoSvc : public extends {