EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackingGeometry.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackingGeometry.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 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 
14 
15 #include <functional>
16 #include <map>
17 #include <memory>
18 #include <vector>
19 
20 namespace Acts {
21 
22 class TrackingVolume;
23 class Layer;
24 class Surface;
25 class PerigeeSurface;
26 class IMaterialDecorator;
27 
28 using TrackingVolumePtr = std::shared_ptr<const TrackingVolume>;
29 using MutableTrackingVolumePtr = std::shared_ptr<TrackingVolume>;
30 
42 
43  public:
49  TrackingGeometry(const MutableTrackingVolumePtr& highestVolume,
50  const IMaterialDecorator* materialDecorator = nullptr);
51 
54 
58 
66  const Vector3D& gp) const;
67 
73  const TrackingVolume* trackingVolume(const std::string& name) const;
74 
82  const Vector3D& gp) const;
83 
87  void registerBeamTube(std::shared_ptr<const PerigeeSurface> beam);
88 
95  const Surface* getBeamline() const;
96 
101  void visitSurfaces(
102  const std::function<void(const Acts::Surface*)>& visitor) const;
103 
104  private:
107  std::shared_ptr<const PerigeeSurface> m_beam;
108 
110  std::map<std::string, const TrackingVolume*> m_trackingVolumes;
111 };
112 
113 } // namespace Acts