Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExternalAlignmentDecorator.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ExternalAlignmentDecorator.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
19 
20 #include <cstddef>
21 #include <memory>
22 #include <mutex>
23 #include <string>
24 #include <unordered_map>
25 #include <vector>
26 
27 namespace Acts {
28 class TrackingGeometry;
29 }
30 
31 namespace ActsExamples {
32 struct AlgorithmContext;
33 
34 namespace Contextual {
35 
42  public:
46  std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry = nullptr;
47  };
48 
54  const Config& cfg,
55  std::unique_ptr<const Acts::Logger> logger = Acts::getDefaultLogger(
56  "ExternalAlignmentDecorator", Acts::Logging::INFO));
57 
59  ~ExternalAlignmentDecorator() override = default;
60 
68  ProcessCode decorate(AlgorithmContext& context) override;
69 
71  const std::string& name() const override { return m_name; }
72 
73  private:
75  std::unique_ptr<const Acts::Logger> m_logger;
76  std::string m_name = "ExternalAlignmentDecorator";
77 
79  std::vector<Acts::Transform3> m_nominalStore;
80 
81  std::unordered_map<
82  unsigned int,
83  std::shared_ptr<ExternallyAlignedDetectorElement::AlignmentStore>>
85 
86  std::mutex m_iovMutex;
87 
88  size_t m_eventsSeen{0};
89 
91  const Acts::Logger& logger() const { return *m_logger; }
92 
98 };
99 } // namespace Contextual
100 
101 } // namespace ActsExamples