Skip to content

Commit

Permalink
Adding Trap converter in Geant4Converters
Browse files Browse the repository at this point in the history
  • Loading branch information
cms committed Oct 23, 2024
1 parent 0d3d440 commit f04d7fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ class Hep3Vector;
class HepRotation;
} // namespace CLHEP

namespace HepGeom {
class Transform3D;
}

#include "/home/cms/software/geant4/install_dir/include/Geant4/G4RotationMatrix.hh"
#include "/home/cms/software/geant4/install_dir/include/Geant4/G4ThreeVector.hh"
#include "/home/cms/software/geant4/install_dir/include/Geant4/G4Transform3D.hh"
Expand Down Expand Up @@ -139,15 +135,13 @@ struct Geant4ShapeConverter {
std::tuple<std::shared_ptr<TrapezoidBounds>, std::array<int, 2u>, ActsScalar>
trapezoidBounds(const G4Trd& g4Trd);

// *************************************************************************************
/// @brief Convert to trapezoid bounds - from Trap
///
/// @param g4Trd a Geant4 trapezoid shape
///
/// @return an ACTS Trapezoid bounds object, axis orientation, and thickness
std::tuple<std::shared_ptr<TrapezoidBounds>, std::array<int, 2u>, ActsScalar>
trapezoidBounds_g4Trap(const G4Trap& g4Trap);
// *************************************************************************************
trapezoidBounds(const G4Trap& g4Trap);

/// @brief Convert to general solid into a planar shape
///
Expand Down
13 changes: 3 additions & 10 deletions Plugins/Geant4/src/Geant4Converters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//#include "Acts/Plugins/Geant4/Geant4Converters.hpp"
#include "/home/cms/software/ACTS_ODD/ACTS_Source/Plugins/Geant4/include/Acts/Plugins/Geant4/Geant4Converters.hpp"
#include "Acts/Plugins/Geant4/Geant4Converters.hpp"

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Geometry/CylinderVolumeBounds.hpp"
Expand All @@ -19,8 +18,7 @@
#include "Acts/Surfaces/DiscSurface.hpp"
#include "Acts/Surfaces/LineBounds.hpp"
#include "Acts/Surfaces/PlaneSurface.hpp"
//#include "RadialBounds.hpp"
#include "/home/cms/software/ACTS_ODD/ACTS_Source/Core/include/Acts/Surfaces/RadialBounds.hpp"
#include "Acts/Surfaces/RadialBounds.hpp"
#include "Acts/Surfaces/RectangleBounds.hpp"
#include "Acts/Surfaces/StrawSurface.hpp"
#include "Acts/Surfaces/TrapezoidBounds.hpp"
Expand All @@ -32,7 +30,6 @@
#include <stdexcept>
#include <utility>
#include <vector>
#include <iostream>

#include "G4Box.hh"
#include "G4LogicalVolume.hh"
Expand Down Expand Up @@ -238,11 +235,9 @@ Acts::Geant4ShapeConverter::trapezoidBounds(const G4Trd& g4Trd) {
return std::make_tuple(std::move(tBounds), rAxes, thickness);
}

// *********************************************************************************************************

std::tuple<std::shared_ptr<Acts::TrapezoidBounds>, std::array<int, 2u>,
Acts::ActsScalar>
Acts::Geant4ShapeConverter::trapezoidBounds_g4Trap(const G4Trap& g4Trap) {
Acts::Geant4ShapeConverter::trapezoidBounds(const G4Trap& g4Trap) {
// primary parameters
ActsScalar y1 = static_cast<ActsScalar>(g4Trap.GetYHalfLength1());
ActsScalar y2 = static_cast<ActsScalar>(g4Trap.GetYHalfLength2());
Expand Down Expand Up @@ -305,8 +300,6 @@ Acts::Geant4ShapeConverter::trapezoidBounds_g4Trap(const G4Trap& g4Trap) {
return std::make_tuple(std::move(tBounds), rAxes, thickness);
}

// *********************************************************************************************************

std::tuple<std::shared_ptr<Acts::PlanarBounds>, std::array<int, 2u>,
Acts::ActsScalar>
Acts::Geant4ShapeConverter::planarBounds(const G4VSolid& g4Solid) {
Expand Down

0 comments on commit f04d7fa

Please sign in to comment.