Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SensitiveSurfaceMapper.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SensitiveSurfaceMapper.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
13 
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
18 class G4VPhysicalVolume;
19 
20 namespace Acts {
21 class TrackingGeometry;
22 }
23 
24 namespace ActsExamples {
25 
36  public:
37  constexpr static std::string_view mappingPrefix = "ActsGeoID#";
38 
40  struct Config {
42  std::vector<std::string> materialMappings;
43 
45  std::vector<std::string> volumeMappings;
46 
48  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry;
49  };
50 
56  std::unique_ptr<const Acts::Logger> logger =
57  Acts::getDefaultLogger("SensitiveSurfaceMapper",
59  ~SensitiveSurfaceMapper() = default;
60 
68  void remapSensitiveNames(G4VPhysicalVolume* g4PhysicalVolume,
69  const Acts::Transform3& motherTransform,
70  int& sCounter) const;
71 
72  protected:
75 
76  private:
78  const Acts::Logger& logger() const { return *m_logger; }
79 
81  std::unique_ptr<const Acts::Logger> m_logger;
82 };
83 
84 } // namespace ActsExamples