Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:10:17

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2022 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/Plugins/Geant4/Geant4DetectorElement.hpp"
0010 
0011 #include "Acts/Surfaces/Surface.hpp"
0012 
0013 #include <utility>
0014 
0015 Acts::Geant4DetectorElement::Geant4DetectorElement(
0016     std::shared_ptr<Acts::Surface> surface, const G4VPhysicalVolume& g4physVol,
0017     const Acts::Transform3& toGlobal, Acts::ActsScalar thickness)
0018     : m_surface(std::move(surface)),
0019       m_g4physVol(&g4physVol),
0020       m_toGlobal(toGlobal),
0021       m_thickness(thickness) {}
0022 
0023 const Acts::Transform3& Acts::Geant4DetectorElement::transform(
0024     const GeometryContext& /*gctx*/) const {
0025   return m_toGlobal;
0026 }
0027 
0028 const Acts::Surface& Acts::Geant4DetectorElement::surface() const {
0029   return *m_surface;
0030 }
0031 
0032 Acts::Surface& Acts::Geant4DetectorElement::surface() {
0033   return *m_surface;
0034 }
0035 
0036 Acts::ActsScalar Acts::Geant4DetectorElement::thickness() const {
0037   return m_thickness;
0038 }
0039 
0040 const G4VPhysicalVolume& Acts::Geant4DetectorElement::g4PhysicalVolume() const {
0041   return *m_g4physVol;
0042 }