Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:20

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://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 namespace Acts {
0016 
0017 Geant4DetectorElement::Geant4DetectorElement(std::shared_ptr<Surface> surface,
0018                                              const G4VPhysicalVolume& g4physVol,
0019                                              const Transform3& toGlobal,
0020                                              double thickness)
0021     : m_surface(std::move(surface)),
0022       m_g4physVol(&g4physVol),
0023       m_toGlobal(toGlobal),
0024       m_thickness(thickness) {}
0025 
0026 const Transform3& Geant4DetectorElement::transform(
0027     const GeometryContext& /*gctx*/) const {
0028   return m_toGlobal;
0029 }
0030 
0031 const Surface& Geant4DetectorElement::surface() const {
0032   return *m_surface;
0033 }
0034 
0035 Surface& Geant4DetectorElement::surface() {
0036   return *m_surface;
0037 }
0038 
0039 double Geant4DetectorElement::thickness() const {
0040   return m_thickness;
0041 }
0042 
0043 const G4VPhysicalVolume& Geant4DetectorElement::g4PhysicalVolume() const {
0044   return *m_g4physVol;
0045 }
0046 
0047 }  // namespace Acts