Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:09:52

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2020 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/Units.hpp"
0012 #include "Acts/Utilities/Logger.hpp"
0013 #include "ActsExamples/Utilities/Options.hpp"
0014 
0015 #include <array>
0016 #include <memory>
0017 #include <utility>
0018 #include <vector>
0019 
0020 using namespace Acts::UnitLiterals;
0021 
0022 namespace Acts {
0023 class TrackingGeometry;
0024 class IMaterialDecorator;
0025 }  // namespace Acts
0026 
0027 namespace ActsExamples {
0028 class IContextDecorator;
0029 }  // namespace ActsExamples
0030 
0031 namespace ActsExamples::Telescope {
0032 
0033 class TelescopeDetectorElement;
0034 class TelescopeG4DetectorConstruction;
0035 
0036 struct TelescopeDetector {
0037   using DetectorElement = ActsExamples::Telescope::TelescopeDetectorElement;
0038   using DetectorElementPtr = std::shared_ptr<DetectorElement>;
0039   using DetectorStore = std::vector<DetectorElementPtr>;
0040 
0041   using ContextDecorators =
0042       std::vector<std::shared_ptr<ActsExamples::IContextDecorator>>;
0043   using TrackingGeometryPtr = std::shared_ptr<const Acts::TrackingGeometry>;
0044 
0045   struct Config {
0046     std::vector<double> positions{{0, 30, 60, 120, 150, 180}};
0047     std::vector<double> stereos{{0, 0, 0, 0, 0, 0}};
0048     std::array<double, 2> offsets{{0, 0}};
0049     std::array<double, 2> bounds{{25, 100}};
0050     double thickness{80_um};
0051     int surfaceType{0};
0052     int binValue{2};
0053   };
0054 
0055   Config config;
0056   /// The store of the detector elements (lifetime: job)
0057   DetectorStore detectorStore;
0058 
0059   std::pair<TrackingGeometryPtr, ContextDecorators> finalize(
0060       const Config& cfg,
0061       const std::shared_ptr<const Acts::IMaterialDecorator>& mdecorator);
0062 };
0063 
0064 }  // namespace ActsExamples::Telescope