Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 09:35:01

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/GeoModel/GeoModelDetectorElement.hpp"
0010 
0011 #include "Acts/Surfaces/Surface.hpp"
0012 
0013 #include <utility>
0014 
0015 #include <GeoModelKernel/GeoFullPhysVol.h>
0016 
0017 Acts::GeoModelDetectorElement::GeoModelDetectorElement(
0018     PVConstLink geoPhysVol, std::shared_ptr<Surface> surface,
0019     const Transform3& sfTransform, double thickness)
0020     : m_geoPhysVol(std::move(geoPhysVol)),
0021       m_surface(std::move(surface)),
0022       m_surfaceTransform(sfTransform),
0023       m_thickness(thickness) {}
0024 
0025 const Acts::Transform3& Acts::GeoModelDetectorElement::transform(
0026     const GeometryContext& /*gctx*/) const {
0027   return m_surfaceTransform;
0028 }
0029 
0030 const Acts::Surface& Acts::GeoModelDetectorElement::surface() const {
0031   return *m_surface;
0032 }
0033 
0034 Acts::Surface& Acts::GeoModelDetectorElement::surface() {
0035   return *m_surface;
0036 }
0037 
0038 double Acts::GeoModelDetectorElement::thickness() const {
0039   return m_thickness;
0040 }
0041 
0042 PVConstLink Acts::GeoModelDetectorElement::physicalVolume() const {
0043   return m_geoPhysVol;
0044 }
0045 
0046 const std::string& Acts::GeoModelDetectorElement::logVolName() const {
0047   return m_geoPhysVol->getLogVol()->getName();
0048 }