|
||||
File indexing completed on 2025-01-18 09:27:41
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 #pragma once 0010 0011 #include "Acts/Definitions/Algebra.hpp" 0012 #include "Acts/Geometry/DetectorElementBase.hpp" 0013 #include "Acts/Geometry/GeometryContext.hpp" 0014 #include "Acts/Surfaces/Surface.hpp" 0015 0016 #include <memory> 0017 0018 class G4VPhysicalVolume; 0019 0020 namespace Acts { 0021 0022 class ISurfaceMaterial; 0023 class Surface; 0024 0025 /// @class Geant4DetectorElement 0026 /// 0027 /// Detector element representative for Geant4 sensitive 0028 /// elements. 0029 class Geant4DetectorElement : public DetectorElementBase { 0030 public: 0031 /// Broadcast the context type 0032 using ContextType = GeometryContext; 0033 0034 /// @brief Constructor with arguments 0035 /// @param surface the surface representing this detector element 0036 /// @param g4physVol the physical volume representing this detector element 0037 /// @param toGlobal the global transformation before the volume 0038 /// @param thickness the thickness of this detector element 0039 Geant4DetectorElement(std::shared_ptr<Surface> surface, 0040 const G4VPhysicalVolume& g4physVol, 0041 const Transform3& toGlobal, ActsScalar thickness); 0042 0043 /// Return local to global transform associated with this detector element 0044 /// 0045 /// @param gctx The current geometry context object, e.g. alignment 0046 const Transform3& transform(const GeometryContext& gctx) const override; 0047 0048 /// Return surface associated with this detector element 0049 const Surface& surface() const override; 0050 0051 /// Non-const access to surface associated with this detector element 0052 Surface& surface() override; 0053 0054 /// Return the thickness of this detector element 0055 ActsScalar thickness() const override; 0056 0057 /// @return to the Geant4 physical volume 0058 const G4VPhysicalVolume& g4PhysicalVolume() const; 0059 0060 private: 0061 /// Corresponding Surface 0062 std::shared_ptr<Surface> m_surface; 0063 /// The GEant4 physical volume 0064 const G4VPhysicalVolume* m_g4physVol{nullptr}; 0065 /// The global transformation before the volume 0066 Transform3 m_toGlobal; 0067 /// Thickness of this detector element 0068 ActsScalar m_thickness{0.}; 0069 }; 0070 0071 } // namespace Acts
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |